*Fix healing amount of Earthliving.

*Fix a typo causing freeze-thanks to megamage

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-20 00:23:32 +02:00
parent caf9b7d356
commit 9e5276fe16
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -1194,6 +1194,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if(roll_chance_i(i->second)) if(roll_chance_i(i->second))
{ {
m_caster->CastSpell(unit, i->first, true); m_caster->CastSpell(unit, i->first, true);
sLog.outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first);
} }
if (GetSpellDuration(i->first)==-1) if (GetSpellDuration(i->first)==-1)
{ {
+9 -3
View File
@@ -9056,6 +9056,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Check for table values // Check for table values
SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id); SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id);
float coeff; float coeff;
float factorMod = 1.0f;
bool scripted = false; bool scripted = false;
if (bonus) if (bonus)
{ {
@@ -9081,6 +9082,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
else else
coeff = 1.0f; coeff = 1.0f;
} }
// Earthliving - 0.45% of normal hot coeff
else if (spellProto->SpellFamilyName==SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000)
{
factorMod *= 0.45f;
}
} }
// Default calculation // Default calculation
@@ -9137,15 +9143,15 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
coeff = (CastingTime / 3500.0f) * DotFactor * 1.88f; coeff = (CastingTime / 3500.0f) * DotFactor * 1.88f;
} }
float coeff2 = CalculateLevelPenalty(spellProto)* stack; factorMod *= CalculateLevelPenalty(spellProto)* stack;
TakenTotal += TakenAdvertisedBenefit * coeff * coeff2; TakenTotal += TakenAdvertisedBenefit * coeff * factorMod;
if(Player* modOwner = GetSpellModOwner()) if(Player* modOwner = GetSpellModOwner())
{ {
coeff *= 100.0f; coeff *= 100.0f;
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_SPELL_BONUS_DAMAGE, coeff); modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_SPELL_BONUS_DAMAGE, coeff);
coeff /= 100.0f; coeff /= 100.0f;
} }
DoneTotal += DoneAdvertisedBenefit * coeff * coeff2; DoneTotal += DoneAdvertisedBenefit * coeff * factorMod;
} }
// use float as more appropriate for negative values and percent applying // use float as more appropriate for negative values and percent applying