aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureAISelector.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-09 16:18:08 -0500
committermegamage <none@none>2009-06-09 16:18:08 -0500
commit63c07a5767cd9a1171c6db24db0ff59dd7773235 (patch)
tree42dcec722782d81649891ebda056a2e156f50f24 /src/game/CreatureAISelector.cpp
parent2625b4b6c61f3e8bb95454a2b97e7434bfb22b0b (diff)
*Do not trigger spells with triggers with scripts. This fixes the bug that shadow fissure of Kel'thuzad deals damage without delay.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureAISelector.cpp')
-rw-r--r--src/game/CreatureAISelector.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/CreatureAISelector.cpp b/src/game/CreatureAISelector.cpp
index bcec34781b0..65e50a2e41b 100644
--- a/src/game/CreatureAISelector.cpp
+++ b/src/game/CreatureAISelector.cpp
@@ -60,12 +60,17 @@ namespace FactorySelector
ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
else if(creature->isGuard())
ai_factory = ai_registry.GetRegistryItem("GuardAI");
- else if(creature->HasSummonMask(SUMMON_MASK_GUARDIAN))
+ else if(creature->isGuardian())
ai_factory = ai_registry.GetRegistryItem("PetAI");
else if(creature->isTotem())
ai_factory = ai_registry.GetRegistryItem("TotemAI");
- else if(creature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
- ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
+ else if(creature->isTrigger())
+ {
+ if(creature->m_spells[0])
+ ai_factory = ai_registry.GetRegistryItem("TriggerAI");
+ else
+ ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
+ }
else if(creature->GetCreatureType() == CREATURE_TYPE_CRITTER)
ai_factory = ai_registry.GetRegistryItem("CritterAI");
}