aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNevan <none@none>2009-08-08 17:47:15 +0200
committerNevan <none@none>2009-08-08 17:47:15 +0200
commit233f3c830600e231f0bd7a976ba936ac4705bc82 (patch)
tree86717ae70ce4040195011d5e2c6e3356262468fa /src
parentea605726d6d2e54518ef8a5f6c6195edeabcc9ba (diff)
*Fix Icebound Fortitude Formula
*Fix Glyph of Icebound Fortitude --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 71bf632b7bb..82e12a86119 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -946,6 +946,35 @@ void Aura::HandleAuraSpecificMods(bool apply)
{
if (apply)
{
+ if(m_spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
+ {
+ // Icebound Fortitude
+ if (m_spellProto->SpellFamilyFlags[0] & 0x00100000)
+ {
+ Unit * caster = GetCaster();
+ if (caster && caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ if(AuraEffect *auraeff = GetPartAura(2))
+ {
+ int32 value = int32((auraeff->GetAmount()*-1)-10);
+ uint32 defva = uint32(((Player*)caster)->GetSkillValue(SKILL_DEFENSE) + ((Player*)this)->GetRatingBonusValue(CR_DEFENSE_SKILL));
+
+ if(defva > 400)
+ value += int32((defva-400)*0.15);
+
+ // Glyph of Icebound Fortitude
+ if (AuraEffect *auradummy = caster->GetAuraEffect(58625,0))
+ {
+ uint32 valmax = auradummy->GetAmount();
+ if(value < valmax)
+ value = valmax;
+ }
+ auraeff->SetAmount(-value);
+ }
+ }
+ }
+ }
+
if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE)
{
if (m_spellProto->SpellFamilyFlags[0] & 0x00000001 && m_spellProto->SpellFamilyFlags[2] & 0x00000008)