Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.16 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2J_Server_BETA
  3. Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
  4. ===================================================================
  5. --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (revision 6587)
  6. +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
  7. @@ -8709,6 +8709,25 @@
  8.             return false;
  9.         }
  10.        
  11. +       if (!skill.isDebuff() && (target instanceof L2Playable))
  12. +       {
  13. +          
  14. +           L2PcInstance cha = target.getActingPlayer();
  15. +           if (this != cha)
  16. +           {
  17. +               boolean sameParty = isInParty() && getParty().getMembers().contains(cha);
  18. +               boolean sameClan = ((getClan() != null) && getClan().isMember(cha.getObjectId()));
  19. +               boolean sameAlly = (cha.isPlayer() && (getAllyId() != 0) && (getAllyId() == cha.getAllyId()));
  20. +               boolean fail = !(sameParty || sameClan || sameAlly);
  21. +              
  22. +               if (fail)
  23. +               {
  24. +                   sendMessage("Cannot use buffs on not friendly target.");
  25. +                   sendPacket(ActionFailed.STATIC_PACKET);
  26. +                   return false;
  27. +               }
  28. +           }
  29. +       }
  30.         // skills can be used on Walls and Doors only during siege
  31.         if (target.isDoor())
  32.         {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement