|
@@ -689,10 +689,13 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
|
|
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, originalAttackTarget, 1);
|
|
|
if ((originalAttackTarget instanceof L2PcInstance) || (originalAttackTarget instanceof L2Summon))
|
|
|
{
|
|
|
- L2PcInstance player = (originalAttackTarget instanceof L2PcInstance)?
|
|
|
+ if (npc.getTemplate().getEventQuests(Quest.QuestEventType.ON_FACTION_CALL) != null)
|
|
|
+ {
|
|
|
+ L2PcInstance player = (originalAttackTarget instanceof L2PcInstance)?
|
|
|
(L2PcInstance)originalAttackTarget: ((L2Summon) originalAttackTarget).getOwner();
|
|
|
- for (Quest quest: npc.getTemplate().getEventQuests(Quest.QuestEventType.ON_FACTION_CALL))
|
|
|
- quest.notifyFactionCall(npc, (L2NpcInstance) _actor, player, (originalAttackTarget instanceof L2Summon));
|
|
|
+ for (Quest quest: npc.getTemplate().getEventQuests(Quest.QuestEventType.ON_FACTION_CALL))
|
|
|
+ quest.notifyFactionCall(npc, (L2NpcInstance) _actor, player, (originalAttackTarget instanceof L2Summon));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// heal or resurrect friends
|