All pastes #936292 Raw Edit

DiSlord

public diff v1 · immutable
·published 2008-03-10 09:03 UTC
rendered paste body
Index: game/SpellAuras.cpp===================================================================--- game/SpellAuras.cpp	(revision 5398)+++ game/SpellAuras.cpp	(working copy)@@ -1379,7 +1379,7 @@              // final heal             int32 healBasePoints0 = m_modifier.m_amount-1;-            m_target->CastCustomSpell(m_target,33778,&healBasePoints0,NULL,NULL,true);+            m_target->CastCustomSpell(m_target,33778,&healBasePoints0,NULL,NULL,true,NULL,NULL,caster->GetGUID());         }     } Index: game/SpellEffects.cpp===================================================================--- game/SpellEffects.cpp	(revision 5398)+++ game/SpellEffects.cpp	(working copy)@@ -1829,6 +1829,16 @@ {     if( unitTarget && unitTarget->isAlive() && damage >= 0)     {+        // Try to get original caster+        Unit *caster;+        if (m_originalCasterGUID)+            caster = m_originalCaster;+        else+            caster = m_caster;+        // Skip if m_originalCaster not in game+        if (!caster)+            return;+         //Swiftmend - consumes Regrowth or Rejuvenation         if (m_spellInfo->TargetAuraState == AURA_STATE_SWIFTMEND)         {@@ -1862,18 +1872,16 @@                 }             }         }+        uint32 addhealth = caster->SpellHealingBonus(m_spellInfo, uint32(damage),HEAL, unitTarget);+        bool crit = caster->SpellCriticalBonus(m_spellInfo, &addhealth, NULL);+        caster->SendHealSpellOnPlayer(unitTarget, m_spellInfo->Id, addhealth, crit); -        uint32 addhealth = m_caster->SpellHealingBonus(m_spellInfo, uint32(damage),HEAL, unitTarget);-        bool crit = m_caster->SpellCriticalBonus(m_spellInfo, &addhealth, NULL);-        if(unitTarget->GetTypeId() == TYPEID_PLAYER)-            m_caster->SendHealSpellOnPlayer(unitTarget, m_spellInfo->Id, addhealth, crit);-         int32 gain = unitTarget->ModifyHealth( int32(addhealth) );         unitTarget->getHostilRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo); -        if(m_caster->GetTypeId()==TYPEID_PLAYER)-            if(BattleGround *bg = ((Player*)m_caster)->GetBattleGround())-                bg->UpdatePlayerScore(((Player*)m_caster), SCORE_HEALING_DONE, gain);+        if(caster->GetTypeId()==TYPEID_PLAYER)+            if(BattleGround *bg = ((Player*)caster)->GetBattleGround())+                bg->UpdatePlayerScore(((Player*)caster), SCORE_HEALING_DONE, gain);          // ignore item heals         if(m_CastItem)