mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9037] Cleanups in spellmode apply code.
* Add constructores for spellmode creating instead explcit fields init * Use uint32 for family mask 2 instead unneded uint64 Also drop one from manual applies for uno-existed now spell.
This commit is contained in:
parent
9d0e943488
commit
15de428242
10 changed files with 70 additions and 127 deletions
|
|
@ -6548,13 +6548,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
}
|
||||
// No thread generated mod
|
||||
// TODO: exist special flag in spell attributes for this, need found and use!
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SPELLMOD_THREAT;
|
||||
mod->value = -100;
|
||||
mod->type = SPELLMOD_PCT;
|
||||
mod->spellId = dummySpell->Id;
|
||||
mod->mask = UI64LIT(0x0000000000000003);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
SpellModifier *mod = new SpellModifier(SPELLMOD_THREAT,SPELLMOD_PCT,-100,triggeredByAura);
|
||||
|
||||
((Player*)this)->AddSpellMod(mod, true);
|
||||
|
||||
// Remove cooldown (Chain Lightning - have Category Recovery time)
|
||||
|
|
@ -12809,13 +12804,7 @@ bool Unit::HandleMendingAuraProc( Aura* triggeredByAura )
|
|||
if(Player* target = ((Player*)this)->GetNextRandomRaidMember(radius))
|
||||
{
|
||||
// aura will applied from caster, but spell casted from current aura holder
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SPELLMOD_CHARGES;
|
||||
mod->value = jumps-5; // negative
|
||||
mod->type = SPELLMOD_FLAT;
|
||||
mod->spellId = spellProto->Id;
|
||||
mod->mask = spellProto->SpellFamilyFlags;
|
||||
mod->mask2 = spellProto->SpellFamilyFlags2;
|
||||
SpellModifier *mod = new SpellModifier(SPELLMOD_CHARGES,SPELLMOD_FLAT,jumps-5,spellProto->Id,spellProto->SpellFamilyFlags,spellProto->SpellFamilyFlags2);
|
||||
|
||||
// remove before apply next (locked against deleted)
|
||||
triggeredByAura->SetInUse(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue