|
@@ -5961,14 +5961,18 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|
|
}
|
|
|
}
|
|
|
// Notify AI
|
|
|
- if (skill.isBad() && !skill.hasEffectType(L2EffectType.HATE))
|
|
|
+ if (skill.isBad() && (skill.getTargetType() != L2TargetType.SELF) && !skill.hasEffectType(L2EffectType.HATE))
|
|
|
{
|
|
|
for (L2Object target : targets)
|
|
|
{
|
|
|
- if ((target instanceof L2Character) && ((L2Character) target).hasAI())
|
|
|
+ if (target instanceof L2Character)
|
|
|
{
|
|
|
- // notify target AI about the attack
|
|
|
- ((L2Character) target).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
|
|
+ final L2Character creature = (L2Character) target;
|
|
|
+ if (creature.hasAI())
|
|
|
+ {
|
|
|
+ // notify target AI about the attack
|
|
|
+ creature.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|