Merge commit 'origin/master' into 320

This commit is contained in:
tomrus88 2009-07-17 13:26:56 +04:00
commit ca2a2195be
22 changed files with 80 additions and 234 deletions

View file

@ -1294,19 +1294,13 @@ void Aura::HandleAddModifier(bool apply, bool Real)
mod->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
ptr = &spellAffect->SpellClassMask[0];
else
switch (m_effIndex)
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
@ -1340,19 +1334,13 @@ void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
mod->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
ptr = &spellAffect->SpellClassMask[0];
else
switch (m_effIndex)
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;