aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-09 15:48:37 -0500
committermegamage <none@none>2009-08-09 15:48:37 -0500
commitee2a26ee9f572c62bd79aaecaca99aa4238d1285 (patch)
tree905b82e6158042ac22ecfa94739ff172d31b3e02 /src
parent8fb63dc91c87d20a5b56c9c57b09e29779f8cd71 (diff)
[8334] Small cleanup in magic shield back damage code. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 74eda6482d0..f02e8917f32 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -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)
{