diff options
| author | Liberate <tbaart@gmail.com> | 2011-10-18 23:38:55 +0200 |
|---|---|---|
| committer | Liberate <tbaart@gmail.com> | 2011-10-18 23:38:55 +0200 |
| commit | 8cc13ff8386609f2d979cfe23fee6c29f790891d (patch) | |
| tree | 60003aa4e5b16a6e23af6536f67bec4c36627daf /src/server/game/Entities/Unit | |
| parent | 68428f66ae6d69b66858e8283cc23af7eddc0b9c (diff) | |
And I forgot to turn on tabs to spaces. Also fixed...
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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<SpellGroup, int32> SameEffectSpellGroup; + std::map<SpellGroup, int32> 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<SpellGroup, int32>::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<SpellGroup, int32>::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr) - { - AddPctN(multiplier, itr->second); - } return multiplier; } |
