mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10493] Implement EVENT_T_TARGET_MISSING_BUFF
This commit is contained in:
parent
92e9670a11
commit
26f8e9c35e
5 changed files with 19 additions and 1 deletions
|
|
@ -344,6 +344,20 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
pHolder.UpdateRepeatTimer(m_creature,event.buffed.repeatMin,event.buffed.repeatMax);
|
||||
break;
|
||||
}
|
||||
case EVENT_T_TARGET_MISSING_BUFF:
|
||||
{
|
||||
//Prevent event from occuring on no unit
|
||||
if (!pActionInvoker)
|
||||
return false;
|
||||
|
||||
SpellAuraHolder* holder = pActionInvoker->GetSpellAuraHolder(event.buffed.spellId);
|
||||
if (holder && holder->GetStackAmount() >= event.buffed.amount)
|
||||
return false;
|
||||
|
||||
//Repeat Timers
|
||||
pHolder.UpdateRepeatTimer(m_creature,event.buffed.repeatMin,event.buffed.repeatMax);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog.outErrorDb("CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue