Advertisement
chr2trance

mxc request: 278590.0

Jul 21st, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.88 KB | None | 0 0
  1. Index: head-src/com/l2jfrozen/gameserver/model/Inventory.java
  2. ===================================================================
  3. --- head-src/com/l2jfrozen/gameserver/model/Inventory.java  (revision 1004)
  4. +++ head-src/com/l2jfrozen/gameserver/model/Inventory.java  (working copy)
  5. @@ -1180,7 +1180,7 @@
  6.      *
  7.      * @param slot : int designating the slot
  8.      */
  9. -   private void unEquipItemInBodySlot(int slot)
  10. +   public void unEquipItemInBodySlot(int slot)
  11.     {
  12.         if(Config.DEBUG)
  13.         {
  14. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
  15. ===================================================================
  16. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 1004)
  17. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy)
  18. @@ -51,6 +51,7 @@
  19.  import com.l2jfrozen.gameserver.model.actor.instance.L2ClassMasterInstance;
  20.  import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
  21.  import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  22. +import com.l2jfrozen.gameserver.model.base.ClassId;
  23.  import com.l2jfrozen.gameserver.model.base.ClassLevel;
  24.  import com.l2jfrozen.gameserver.model.base.PlayerClass;
  25.  import com.l2jfrozen.gameserver.model.entity.Announcements;
  26. @@ -92,6 +93,7 @@
  27.  import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
  28.  import com.l2jfrozen.gameserver.network.serverpackets.UserInfo;
  29.  import com.l2jfrozen.gameserver.powerpak.PowerPakConfig;
  30. +import com.l2jfrozen.gameserver.templates.L2WeaponType;
  31.  import com.l2jfrozen.gameserver.thread.TaskPriority;
  32.  import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
  33.  import com.l2jfrozen.gameserver.util.Util;
  34. @@ -406,6 +408,17 @@
  35.             activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
  36.             activeChar.sendMessage("You have been teleported to the nearest town due to you being in siege zone");
  37.         }
  38. +      
  39. +       if (activeChar.getClassId() == ClassId.phoenixKnight || activeChar.getClassId() == ClassId.hellKnight || activeChar.getClassId() == ClassId.evaTemplar || activeChar.getClassId() == ClassId.shillienTemplar)
  40. +       {
  41. +           L2ItemInstance item  = activeChar.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
  42. +          
  43. +           if (item != null && item.getItemType() == L2WeaponType.BOW)
  44. +           {
  45. +               int slot = activeChar.getInventory().getSlotFromItem(item);
  46. +               activeChar.getInventory().unEquipItemInBodySlot(slot);
  47. +           }
  48. +       }
  49.  
  50.         RegionBBSManager.getInstance().changeCommunityBoard();
  51.         CustomWorldHandler.getInstance().enterWorld(activeChar);
  52. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java
  53. ===================================================================
  54. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java    (revision 1004)
  55. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java    (working copy)
  56. @@ -33,6 +33,7 @@
  57.  import com.l2jfrozen.gameserver.model.L2Object;
  58.  import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
  59.  import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  60. +import com.l2jfrozen.gameserver.model.base.ClassId;
  61.  import com.l2jfrozen.gameserver.network.SystemMessageId;
  62.  import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
  63.  import com.l2jfrozen.gameserver.network.serverpackets.EtcStatusUpdate;
  64. @@ -194,6 +195,12 @@
  65.             return;
  66.         }
  67.        
  68. +       if ((activeChar.getClassId() == ClassId.phoenixKnight || activeChar.getClassId() == ClassId.hellKnight || activeChar.getClassId() == ClassId.evaTemplar || activeChar.getClassId() == ClassId.shillienTemplar) && item.getItemType() == L2WeaponType.BOW)
  69. +       {
  70. +           activeChar.sendMessage("You can't equip that");
  71. +           return;
  72. +       }
  73. +      
  74.         // Scroll of resurrection like L2OFF if you are casting you can't use them
  75.         if ((itemId == 737 || itemId == 3936 || itemId == 3959 || itemId == 6387) && activeChar.isCastingNow())
  76.             return;
  77. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  78. ===================================================================
  79. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 1004)
  80. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  81. @@ -15447,6 +15447,17 @@
  82.         _macroses.sendUpdate();
  83.         _shortCuts.restore();
  84.         sendPacket(new ShortCutInit(this));
  85. +      
  86. +       if (getClassId() == ClassId.phoenixKnight || getClassId() == ClassId.hellKnight || getClassId() == ClassId.evaTemplar || getClassId() == ClassId.shillienTemplar)
  87. +       {
  88. +           L2ItemInstance item  = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
  89. +          
  90. +           if (item != null && item.getItemType() == L2WeaponType.BOW)
  91. +           {
  92. +               int slot = getInventory().getSlotFromItem(item);
  93. +               getInventory().unEquipItemInBodySlot(slot);
  94. +           }
  95. +       }
  96.  
  97.         // Rebirth Caller - if player has any skills, they will be granted them.
  98.         if(Config.REBIRTH_ENABLE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement