Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2J_Server_BETA
- Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 6587)
- +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -8709,6 +8709,25 @@
- return false;
- }
- + if (!skill.isDebuff() && (target instanceof L2Playable))
- + {
- +
- + L2PcInstance cha = target.getActingPlayer();
- + if (this != cha)
- + {
- + boolean sameParty = isInParty() && getParty().getMembers().contains(cha);
- + boolean sameClan = ((getClan() != null) && getClan().isMember(cha.getObjectId()));
- + boolean sameAlly = (cha.isPlayer() && (getAllyId() != 0) && (getAllyId() == cha.getAllyId()));
- + boolean fail = !(sameParty || sameClan || sameAlly);
- +
- + if (fail)
- + {
- + sendMessage("Cannot use buffs on not friendly target.");
- + sendPacket(ActionFailed.STATIC_PACKET);
- + return false;
- + }
- + }
- + }
- // skills can be used on Walls and Doors only during siege
- if (target.isDoor())
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement