diff options
author | QAston <none@none> | 2009-03-08 21:29:00 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-08 21:29:00 +0100 |
commit | 7289f5b36dd490e88e52d46ae1dbe5519f04f556 (patch) | |
tree | 9e53136f09680d4dfa4e35d68a7faee7942f7e46 /src | |
parent | e979eb56f268d9ee9e94c61c40f1f66e6147d442 (diff) |
*Fix Guardian Spirit.
*Fix Replenishment-by panaut0lordv.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 8 | ||||
-rw-r--r-- | src/game/Unit.cpp | 16 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index df6ff87a6a5..d5c160a9768 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3908,8 +3908,7 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real) // Replenishment (0.25% from max) // Infinite Replenishment - if (GetId() == 57669 || - GetId() == 61782) + if (m_spellProto->SpellIconID == 3184 && m_spellProto->SpellVisual[0] == 12495) m_modifier.m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000; } @@ -5818,10 +5817,7 @@ void Aura::PeriodicTick() uint32 amount = m_modifier.m_amount < 0 ? 0 : m_modifier.m_amount; uint32 pdamage; - // Replenishment (Judgements of the Wise) - if (m_spellProto->SpellIconID == 3184 && m_spellProto->SpellVisual[0] == 12495) - pdamage = 0.25f * m_target->GetMaxPower(POWER_MANA); - else if( m_modifier.m_auraname == SPELL_AURA_OBS_MOD_ENERGY ) + if( m_modifier.m_auraname == SPELL_AURA_OBS_MOD_ENERGY ) pdamage = uint32(m_target->GetMaxPower(power) * amount/100); else pdamage = amount; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 30c611e4ab4..6fe15958541 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2002,6 +2002,20 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe } case SPELLFAMILY_PRIEST: { + // Guardian Spirit + if (spellProto->SpellFamilyFlags.IsEqual(0x400, 0, 0xC0000000)) + { + if (pVictim->GetHealth() <= RemainingDamage) // Killing Blow + { + healAmount = pVictim->GetMaxHealth(); + healCaster = pVictim; + healSpell = 48153; + currentAbsorb = mod->m_amount; + RemainingDamage=0; + break; + } + } + // Reflective Shield if (spellProto->SpellFamilyFlags.IsEqual(0x1)) { @@ -2246,7 +2260,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe } } - TotalAbsorb -= RemainingDamage; + TotalAbsorb = (TotalAbsorb - RemainingDamage > 0) ? TotalAbsorb - RemainingDamage : 0; // TODO: School should be checked for absorbing auras or for attacks? int32 auraAbsorbMod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL); AuraList const& AbsIgnoreAurasAb = GetAurasByType(SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL); |