From 6b07806d0c034e6b88cf0426c753e620841181a5 Mon Sep 17 00:00:00 2001 From: thenecromancer Date: Wed, 13 Jan 2010 10:08:49 +0100 Subject: [PATCH] Add support for additional passive for FORM_MOONKIN --HG-- branch : trunk --- src/game/SpellAuraEffects.cpp | 1 + src/game/Unit.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 1492d58694..6c2dd45123 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -2288,6 +2288,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const break; case FORM_MOONKIN: spellId = 24905; + spellId2 = 69366; break; case FORM_FLIGHT: spellId = 33948; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e7e08b8323..f0c1636560 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1849,6 +1849,14 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff RemainingDamage -= int32(currentAbsorb * pVictim->GetTotalAttackPowerValue(BASE_ATTACK) / 100); continue; } + // Moonkin Form passive + if (spellProto->Id == 69366) + { + //reduces all damage taken while Stunned + if (unitflag & UNIT_FLAG_STUNNED) + RemainingDamage -= RemainingDamage * currentAbsorb / 100; + continue; + } break; } case SPELLFAMILY_ROGUE: