[8949] Implement proper support spell auras with maxstack > 1 and charges > 0.

* Like auras expected to be proccessed in spell proc event code (not lost charge at use in spellmods code).
  Exist examples for like spells that affect value in spellmods but have different expire requirements.
* Propertly work with stacked auras in spell proc event code
  - remove only one auras from stack
  - in case charges exist in same time not touch charges but return expire
    (all really used auars with maxstack>1 and charges have 1 in one from this values)
This commit is contained in:
VladimirMangos 2009-12-08 21:59:03 +03:00
parent c6bf3a2cdc
commit dbd3177121
4 changed files with 59 additions and 48 deletions

View file

@ -6471,7 +6471,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
CastSpell(this, spell, true, castItem, triggeredByAura);
if ((*itr)->DropAuraCharge())
RemoveAurasDueToSpell((*itr)->GetId());
RemoveSingleSpellAurasFromStack((*itr)->GetId());
return true;
}
}
@ -6573,7 +6573,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
}
CastSpell(target, spell, true, castItem, triggeredByAura);
if ((*itr)->DropAuraCharge())
RemoveAurasDueToSpell((*itr)->GetId());
RemoveSingleSpellAurasFromStack((*itr)->GetId());
return true;
}
}
@ -12039,7 +12039,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
removedSpells.unique();
// Remove auras from removedAuras
for(RemoveSpellList::const_iterator i = removedSpells.begin(); i != removedSpells.end();++i)
RemoveAurasDueToSpell(*i);
RemoveSingleSpellAurasFromStack(*i);
}
}