From 924cf7c46bee4ba5e0ecad3c232f6b579d1daf7d Mon Sep 17 00:00:00 2001 From: Laise Date: Sat, 4 Sep 2010 16:48:08 +0300 Subject: [PATCH] [10442] Fix armor bonus part of talent 33853 and ranks --- src/game/SpellAuras.cpp | 21 +++++++++++++++++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 92e449de6..f032f9bff 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5913,7 +5913,7 @@ void Aura::HandleShapeshiftBoosts(bool apply) if (MasterShaperSpellId) { Unit::AuraList const& ShapeShifterAuras = target->GetAurasByType(SPELL_AURA_DUMMY); - for(Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); i++) + for(Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); ++i) { if ((*i)->GetSpellProto()->SpellIconID == 2851) { @@ -5936,11 +5936,28 @@ void Aura::HandleShapeshiftBoosts(bool apply) if (form == FORM_CAT && ((Player*)target)->HasAura(52610)) target->CastSpell(target, 62071, true); + // Survival of the Fittest (Armor part) + if (form == FORM_BEAR || form == FORM_DIREBEAR) + { + Unit::AuraList const& modAuras = target->GetAurasByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE); + for (Unit::AuraList::const_iterator i = modAuras.begin(); i != modAuras.end(); ++i) + { + if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && + (*i)->GetSpellProto()->SpellIconID == 961) + { + int32 bp = (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2); + if (bp) + target->CastCustomSpell(target, 62069, &bp, NULL, NULL, true, NULL, this); + break; + } + } + } + // Improved Moonkin Form if (form == FORM_MOONKIN) { Unit::AuraList const& dummyAuras = target->GetAurasByType(SPELL_AURA_DUMMY); - for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); i++) + for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i) { if ((*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID && (*i)->GetSpellProto()->SpellIconID == 2855) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 604b75329..7f33550e7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10441" + #define REVISION_NR "10442" #endif // __REVISION_NR_H__