mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10156] Add shared object for auras of same spell and move spell proc code to its own file, also spread procs by auras and effect indexes.
This commit is contained in:
parent
abe6776358
commit
a32b3063a2
32 changed files with 7507 additions and 6076 deletions
|
|
@ -291,10 +291,8 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
break;
|
||||
case EVENT_T_BUFFED:
|
||||
{
|
||||
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
|
||||
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
|
||||
Aura* aura = m_creature->GetAura(event.buffed.spellId, EFFECT_INDEX_0);
|
||||
if (!aura || aura->GetStackAmount() < event.buffed.amount)
|
||||
SpellAuraHolder* holder = m_creature->GetSpellAuraHolder(event.buffed.spellId);
|
||||
if (!holder || holder->GetStackAmount() < event.buffed.amount)
|
||||
return false;
|
||||
|
||||
//Repeat Timers
|
||||
|
|
@ -307,10 +305,8 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
if (!pActionInvoker)
|
||||
return false;
|
||||
|
||||
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
|
||||
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
|
||||
Aura* aura = pActionInvoker->GetAura(event.buffed.spellId, EFFECT_INDEX_0);
|
||||
if(!aura || aura->GetStackAmount() < event.buffed.amount)
|
||||
SpellAuraHolder* holder = pActionInvoker->GetSpellAuraHolder(event.buffed.spellId);
|
||||
if(!holder || holder->GetStackAmount() < event.buffed.amount)
|
||||
return false;
|
||||
|
||||
//Repeat Timers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue