ActionKey.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. * @author mrTJO
  18. */
  19. public class ActionKey
  20. {
  21. int _cat;
  22. int _cmd;
  23. int _key;
  24. int _tgKey1;
  25. int _tgKey2;
  26. int _show;
  27. /**
  28. * L2ActionKey Initialization
  29. * @param cat Category ID
  30. * @param cmd Command ID
  31. * @param key User Defined Primary Key
  32. * @param tgKey1 1st Toogled Key (eg. Alt, Ctrl or Shift)
  33. * @param tgKey2 2nd Toogled Key (eg. Alt, Ctrl or Shift)
  34. * @param show Show Action in UI
  35. */
  36. public ActionKey(int cat, int cmd, int key, int tgKey1, int tgKey2, int show)
  37. {
  38. _cat = cat;
  39. _cmd = cmd;
  40. _key = key;
  41. _tgKey1 = tgKey1;
  42. _tgKey2 = tgKey2;
  43. _show = show;
  44. }
  45. public int getCategory()
  46. {
  47. return _cat;
  48. }
  49. public int getCommandId()
  50. {
  51. return _cmd;
  52. }
  53. public int getKeyId()
  54. {
  55. return _key;
  56. }
  57. public int getToogleKey1()
  58. {
  59. return _tgKey1;
  60. }
  61. public int getToogleKey2()
  62. {
  63. return _tgKey2;
  64. }
  65. public int getShowStatus()
  66. {
  67. return _show;
  68. }
  69. public String getSqlSaveString(int playerId, int order)
  70. {
  71. return "(" + playerId + ", " + _cat + ", " + order + ", " + _cmd + "," + _key + ", " + _tgKey1 + ", " + _tgKey2 + ", " + _show + ")";
  72. }
  73. }