From 8cc13ff8386609f2d979cfe23fee6c29f790891d Mon Sep 17 00:00:00 2001 From: Liberate Date: Tue, 18 Oct 2011 23:38:55 +0200 Subject: And I forgot to turn on tabs to spaces. Also fixed... --- src/server/game/Entities/Unit/Unit.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/server/game/Entities/Unit') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index bb4d92927c8..4cce0fcd361 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4425,25 +4425,25 @@ int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) float Unit::GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const { - std::map SameEffectSpellGroup; + std::map SameEffectSpellGroup; float multiplier = 1.0f; AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) { if (((*i)->GetMiscValue() & misc_mask)) - { - // Check if the Aura Effect has a the Same Effect Stack Rule and if so, use the highest amount of that SpellGroup - // If the Aura Effect does not have this Stack Rule, it returns false so we can add to the multiplier as usual - if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup)) + { + // Check if the Aura Effect has a the Same Effect Stack Rule and if so, use the highest amount of that SpellGroup + // If the Aura Effect does not have this Stack Rule, it returns false so we can add to the multiplier as usual + if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup)) AddPctN(multiplier, (*i)->GetAmount()); - } + } + } + // Add the highest of the Same Effect Stack Rule SpellGroups to the multiplier + for (std::map::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr) + { + AddPctN(multiplier, itr->second); } - // Add the highest of the Same Effect Stack Rule SpellGroups to the multiplier - for (std::map::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr) - { - AddPctN(multiplier, itr->second); - } return multiplier; } -- cgit v1.2.3