Advertisement
Guest User

APPEARANCE STONES HIGH FIVE

a guest
Oct 15th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.79 KB | None | 0 0
  1. Index: game/data/scripts/handlers/bypasshandlers/Augment.java
  2. ===================================================================
  3. --- game/data/scripts/handlers/bypasshandlers/Augment.java  (revision 22072)
  4. +++ game/data/scripts/handlers/bypasshandlers/Augment.java  (working copy)
  5. @@ -46,6 +46,13 @@
  6.             switch (Integer.parseInt(command.substring(8, 9).trim()))
  7.             {
  8.                 case 1:
  9. +                   // If the appearance system are ON if you start augment stopping it.
  10. +                   if (activeChar.isAddAppearance())
  11. +                   {
  12. +                       activeChar.setIsAddAppearance(false);
  13. +                       activeChar.setAppearanceItem(null);
  14. +                   }
  15. +                  
  16.                     activeChar.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
  17.                     return true;
  18.                 case 2:
  19. Index: game/data/scripts/handlers/itemhandlers/AppearanceStone.java
  20. ===================================================================
  21. --- game/data/scripts/handlers/itemhandlers/AppearanceStone.java    (revision 0)
  22. +++ game/data/scripts/handlers/itemhandlers/AppearanceStone.java    (working copy)
  23. @@ -0,0 +1,63 @@
  24. +/*
  25. + * Copyright (C) 2004-2015 L2J DataPack
  26. + *
  27. + * This file is part of L2J DataPack.
  28. + *
  29. + * L2J DataPack is free software: you can redistribute it and/or modify
  30. + * it under the terms of the GNU General Public License as published by
  31. + * the Free Software Foundation, either version 3 of the License, or
  32. + * (at your option) any later version.
  33. + *
  34. + * L2J DataPack is distributed in the hope that it will be useful,
  35. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  36. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  37. + * General Public License for more details.
  38. + *
  39. + * You should have received a copy of the GNU General Public License
  40. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  41. + */
  42. +package handlers.itemhandlers;
  43. +
  44. +import com.l2jserver.Config;
  45. +import com.l2jserver.gameserver.model.actor.L2Playable;
  46. +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  47. +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
  48. +import com.l2jserver.gameserver.network.SystemMessageId;
  49. +import com.l2jserver.gameserver.network.serverpackets.ExShowVariationCancelWindow;
  50. +import com.l2jserver.gameserver.network.serverpackets.ExShowVariationMakeWindow;
  51. +
  52. +/**
  53. + * @author LOBILLO
  54. + */
  55. +
  56. +public class AppearanceStone extends ItemSkills
  57. +{
  58. +   @Override
  59. +   public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
  60. +   {
  61. +       if (!playable.isPlayer())
  62. +       {
  63. +           playable.sendPacket(SystemMessageId.ITEM_NOT_FOR_PETS);
  64. +           return false;
  65. +       }
  66. +      
  67. +       final L2PcInstance activeChar = playable.getActingPlayer();
  68. +       if (activeChar.isCastingNow())
  69. +       {
  70. +           return false;
  71. +       }
  72. +      
  73. +       activeChar.setIsAddAppearance(true);
  74. +       activeChar.setAppearanceItem(item);
  75. +      
  76. +       if (item.getId() == Config.APPEARANCE_REMOVE_STONE_ID)
  77. +       {
  78. +           activeChar.sendPacket(ExShowVariationCancelWindow.STATIC_PACKET);
  79. +       }
  80. +       else
  81. +       {
  82. +           activeChar.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
  83. +       }
  84. +       return true;
  85. +   }
  86. +}
  87. Index: game/data/scripts/handlers/MasterHandler.java
  88. ===================================================================
  89. --- game/data/scripts/handlers/MasterHandler.java   (revision 22072)
  90. +++ game/data/scripts/handlers/MasterHandler.java   (working copy)
  91. @@ -181,6 +181,7 @@
  92.  import handlers.communityboard.MemoBoard;
  93.  import handlers.communityboard.RegionBoard;
  94.  import handlers.custom.CustomAnnouncePkPvP;
  95. +import handlers.itemhandlers.AppearanceStone;
  96.  import handlers.itemhandlers.BeastSoulShot;
  97.  import handlers.itemhandlers.BeastSpiritShot;
  98.  import handlers.itemhandlers.BlessedSpiritShot;
  99. @@ -465,6 +466,7 @@
  100.         },
  101.         {
  102.             // Item Handlers
  103. +           AppearanceStone.class,
  104.             BeastSoulShot.class,
  105.             BeastSpiritShot.class,
  106.             BlessedSpiritShot.class,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement