[8334] Small cleanup in magic shield back damage code. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-09 15:48:37 -05:00
parent 8fb63dc91c
commit ee2a26ee9f

View File

@@ -1735,9 +1735,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
{
alreadyDone.insert(*i);
uint32 damage=(*i)->GetAmount();
SpellEntry const *spellProto = sSpellStore.LookupEntry((*i)->GetId());
if(!spellProto)
continue;
SpellEntry const *i_spellProto = (*i)->GetSpellProto();
//Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
//uint32 absorb;
//uint32 resist;
@@ -1749,13 +1747,13 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4));
data << uint64(pVictim->GetGUID());
data << uint64(GetGUID());
data << uint32(spellProto->Id);
data << uint32(i_spellProto->Id);
data << uint32(damage); // Damage
data << uint32(0); // Overkill
data << uint32(spellProto->SchoolMask);
data << uint32(i_spellProto->SchoolMask);
pVictim->SendMessageToSet(&data, true );
pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(spellProto), spellProto, true);
pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true);
if (pVictim->m_removedAurasCount > removedAuras)
{