aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAIMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-15 23:10:06 -0500
committermegamage <none@none>2009-06-15 23:10:06 -0500
commit208fbe220db7be29e9ecb297441a1bc6daf59a14 (patch)
tree55ac2f0689e30eef184c3dea8f21b26bf0db9b59 /src/game/CreatureEventAIMgr.cpp
parent00f4a31b735f327b715ff12d82f78de33c95539e (diff)
[8018] Implement EVENT_T_BUFFED and EVENT_T_TARGET_BUFFED for creature EventAI. Author: VladimirMangos
Its can be used for check specific spell auras stack size for event triggering. [8017] Always reset creature EventAI phase at creature death. --HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAIMgr.cpp')
-rw-r--r--src/game/CreatureEventAIMgr.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp
index 0a6fb8bdb59..643a5a3212a 100644
--- a/src/game/CreatureEventAIMgr.cpp
+++ b/src/game/CreatureEventAIMgr.cpp
@@ -378,6 +378,20 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
break;
}
+ case EVENT_T_BUFFED:
+ case EVENT_T_TARGET_BUFFED:
+ {
+ SpellEntry const* pSpell = sSpellStore.LookupEntry(temp.buffed.spellId);
+ if (!pSpell)
+ {
+ sLog.outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
+ continue;
+ }
+ if (temp.buffed.repeatMax < temp.buffed.repeatMin)
+ sLog.outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ break;
+ }
+
default:
sLog.outErrorDb("CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i);
break;