Fixing L2EffectZone message spamming.

This commit is contained in:
MobiusDev 2016-06-12 10:56:32 +00:00
parent 366024dd3a
commit 3632bd9852
2 changed files with 6 additions and 3 deletions

View File

@ -724,7 +724,7 @@ public final class Formulas
Debug.sendSkillDebug(attacker, target, skill, set);
}
if (finalRate <= Rnd.get(100))
if ((finalRate <= Rnd.get(100)) && (target != attacker))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_HAS_RESISTED_YOUR_S2);
sm.addCharName(target);
@ -805,7 +805,7 @@ public final class Formulas
Debug.sendSkillDebug(attacker.getOwner(), target, skill, set);
}
return (Rnd.get(100) < finalRate);
return Rnd.get(100) < finalRate;
}
public static boolean calcMagicSuccess(L2Character attacker, L2Character target, Skill skill)

View File

@ -250,7 +250,10 @@ public final class L2EffectZone extends L2ZoneType
final Skill skill = SkillData.getInstance().getSkill(e.getKey(), e.getValue());
if ((skill != null) && (_bypassConditions || skill.checkCondition(character, character)))
{
skill.activateSkill(character, character);
if (!character.isAffectedBySkill(skill.getId()))
{
skill.activateSkill(character, character);
}
}
}
}