Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement