Advertisement
Guest User

Untitled

a guest
Jul 30th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.94 KB | None | 0 0
  1. Index: /gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  2. ===================================================================
  3. --- /gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 3)
  4. +++ /gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java    (revision 4)
  5. @@ -291,4 +291,6 @@
  6.     private long _lastTeleportAction = 0;
  7.    
  8. +    private static final int[] enchantItemForReward = {111, 222, 333};
  9. +    
  10.     public PlayerStatus getActualStatus(){
  11.        
  12. @@ -6689,4 +6691,23 @@
  13.         if(checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 || isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP))
  14.         {
  15. +            for (int ii : enchantItemForReward)
  16. +            {
  17. +                L2ItemInstance item = null;
  18. +                
  19. +                if (getInventory().getPaperdollItem(Inventory.PAPERDOLL_LRHAND) != null)
  20. +                    item = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LRHAND);
  21. +                else if (getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) != null)
  22. +                    item = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
  23. +                
  24. +                if (item != null)
  25. +                    if (item.getItemId() == ii)
  26. +                    {
  27. +                        int enchant = item.getEnchantLevel();
  28. +                        if (enchant > 3)
  29. +                            getInventory().addItem("reward", 4037, enchant, this, null);
  30. +                    }
  31. +                item = null;
  32. +            }
  33. +
  34.             increasePvpKills();
  35.         }
  36. ##getInventory().addItem("reward", 4037, enchant, this, null); // produces a number of item is on that enchanted weapons (only if more than 3), an item = 4037
  37. ##private static final int[] enchantItemForReward = {111, 222, 333}; // then write a comma weapons are affected by the award. (for S grade)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement