mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[8018] Implement EVENT_T_BUFFED and EVENT_T_TARGET_BUFFED for creature EventAI.
Its can be used for check specific spell auras stack size for event triggering.
This commit is contained in:
parent
3c9f9e3fa3
commit
5350dbafd9
5 changed files with 73 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue