All pastes #936262 Raw Edit

DiSlord

public diff v1 · immutable
·published 2008-03-10 08:23 UTC
rendered paste body
Index: SpellAuras.cpp===================================================================--- SpellAuras.cpp	(revision 5398)+++ 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: SpellEffects.cpp===================================================================--- SpellEffects.cpp	(revision 5398)+++ SpellEffects.cpp	(working copy)@@ -1862,18 +1862,24 @@                 }             }         }+        // Try to get original caster+        Unit *caster;+        if (m_originalCaster)+            caster = m_originalCaster;+        else+            caster = m_caster; -        uint32 addhealth = m_caster->SpellHealingBonus(m_spellInfo, uint32(damage),HEAL, unitTarget);-        bool crit = m_caster->SpellCriticalBonus(m_spellInfo, &addhealth, NULL);+        uint32 addhealth = caster->SpellHealingBonus(m_spellInfo, uint32(damage),HEAL, unitTarget);+        bool crit = caster->SpellCriticalBonus(m_spellInfo, &addhealth, NULL);         if(unitTarget->GetTypeId() == TYPEID_PLAYER)-            m_caster->SendHealSpellOnPlayer(unitTarget, m_spellInfo->Id, addhealth, crit);+            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(BattleGround *bg = ((Player*)caster)->GetBattleGround())+                bg->UpdatePlayerScore(((Player*)caster), SCORE_HEALING_DONE, gain);          // ignore item heals         if(m_CastItem)