Procházet zdrojové kódy

fix for #2424. Thanks HanWik

Fulminus před 17 roky
rodič
revize
84e41f1a65

+ 6 - 3
L2_GameServer_T1/java/net/sf/l2j/gameserver/ai/L2AttackableAI.java

@@ -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