ActionKey.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.model.entity;
  16. /**
  17. *
  18. * @author mrTJO
  19. */
  20. public class ActionKey
  21. {
  22. int _cat;
  23. int _cmd;
  24. int _key;
  25. int _tgKey1;
  26. int _tgKey2;
  27. int _show;
  28. /**
  29. * L2ActionKey Initialization
  30. * @param cat: Category ID
  31. * @param cmd: Command ID
  32. * @param key: User Defined Primary Key
  33. * @param tgKey1: 1st Toogled Key (eg. Alt, Ctrl or Shift)
  34. * @param tgKey2: 2nd Toogled Key (eg. Alt, Ctrl or Shift)
  35. * @param show: Show Action in UI
  36. */
  37. public ActionKey(int cat, int cmd, int key, int tgKey1, int tgKey2, int show)
  38. {
  39. _cat = cat;
  40. _cmd = cmd;
  41. _key = key;
  42. _tgKey1 = tgKey1;
  43. _tgKey2 = tgKey2;
  44. _show = show;
  45. }
  46. public int getCategory()
  47. {
  48. return _cat;
  49. }
  50. public int getCommandId()
  51. {
  52. return _cmd;
  53. }
  54. public int getKeyId()
  55. {
  56. return _key;
  57. }
  58. public int getToogleKey1()
  59. {
  60. return _tgKey1;
  61. }
  62. public int getToogleKey2()
  63. {
  64. return _tgKey2;
  65. }
  66. public int getShowStatus()
  67. {
  68. return _show;
  69. }
  70. public String getSqlSaveString(int playerId, int order)
  71. {
  72. return "("+playerId+", "+_cat+", "+order+", "+_cmd+","
  73. +_key+", "+_tgKey1+", "+_tgKey2+", "+_show+")";
  74. }
  75. }