aboutsummaryrefslogtreecommitdiff
path: root/src/game/NullCreatureAI.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/NullCreatureAI.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/NullCreatureAI.cpp')
-rw-r--r--src/game/NullCreatureAI.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/NullCreatureAI.cpp b/src/game/NullCreatureAI.cpp
index be59ed6e40d..5547ad8f059 100644
--- a/src/game/NullCreatureAI.cpp
+++ b/src/game/NullCreatureAI.cpp
@@ -20,6 +20,7 @@
#include "NullCreatureAI.h"
#include "Creature.h"
+#include "TemporarySummon.h"
void PassiveAI::UpdateAI(const uint32)
{
@@ -68,3 +69,13 @@ void CritterAI::EnterEvadeMode()
me->SetControlled(false, UNIT_STAT_FLEEING);
CreatureAI::EnterEvadeMode();
}
+
+void TriggerAI::UpdateAI(const uint32 diff)
+{
+ if(!casted)
+ {
+ casted = true;
+ if(me->m_spells[0] && me->isSummon())
+ me->CastSpell(me, me->m_spells[0], false, 0, 0, ((TempSummon*)me)->GetSummonerGUID());
+ }
+}