aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-19 14:44:16 +0200
committerQAston <none@none>2009-04-19 14:44:16 +0200
commit568879e10967c984a39c9b7a37be55e0ffa4a00b (patch)
tree3536ea7eb9c7339825ee7e56704a4aba7605b261 /src/game/SpellEffects.cpp
parent6e27a4c455633851c381d8ded602325c6c888ff9 (diff)
*Send overheal amount to client.
*Fix potion cooldowns. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 604be4ba554..f4f7ae2e78b 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2601,9 +2601,9 @@ void Spell::EffectHealPct( uint32 /*i*/ )
if(Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DAMAGE, addhealth, this);
- caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false);
-
int32 gain = unitTarget->ModifyHealth( int32(addhealth) );
+ caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false, &gain);
+
unitTarget->getHostilRefManager().threatAssist(m_caster, float(gain) * 0.5f, m_spellInfo);
if(caster->GetTypeId()==TYPEID_PLAYER)
@@ -2625,8 +2625,8 @@ void Spell::EffectHealMechanical( uint32 /*i*/ )
return;
uint32 addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, uint32(damage), HEAL);
- caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false);
- unitTarget->ModifyHealth( int32(damage) );
+ int32 Gain = unitTarget->ModifyHealth( int32(damage) );
+ caster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false, &Gain);
}
}
@@ -2657,10 +2657,10 @@ void Spell::EffectHealthLeech(uint32 i)
{
new_damage = m_caster->SpellHealingBonus(m_caster, m_spellInfo, new_damage, HEAL);
- m_caster->ModifyHealth(new_damage);
+ int32 Gain = m_caster->ModifyHealth(new_damage);
if(m_caster->GetTypeId() == TYPEID_PLAYER)
- m_caster->SendHealSpellLog(m_caster, m_spellInfo->Id, uint32(new_damage));
+ m_caster->SendHealSpellLog(m_caster, m_spellInfo->Id, uint32(new_damage), false, &Gain);
}
// m_healthLeech+=tmpvalue;
// m_damage+=new_damage;
@@ -4322,10 +4322,10 @@ void Spell::EffectHealMaxHealth(uint32 /*i*/)
if(!unitTarget->isAlive())
return;
- uint32 addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth();
+ int32 addhealth = unitTarget->GetMaxHealth() - unitTarget->GetHealth();
unitTarget->SetHealth(unitTarget->GetMaxHealth());
if(m_originalCaster)
- m_originalCaster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false);
+ m_originalCaster->SendHealSpellLog(unitTarget, m_spellInfo->Id, addhealth, false, &addhealth);
}
void Spell::EffectInterruptCast(uint32 i)