From 208fbe220db7be29e9ecb297441a1bc6daf59a14 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 15 Jun 2009 23:10:06 -0500 Subject: [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 --- src/game/CreatureEventAIMgr.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/game/CreatureEventAIMgr.cpp') 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; -- cgit v1.2.3