aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-06-16 22:46:17 +0200
committerQAston <none@none>2009-06-16 22:46:17 +0200
commitab06dcc442dffeaf21478b49d6a4d0ba9d9d1f9c (patch)
tree567219c45cceccc2f1103d50c5802f1730cd7dde /src
parent7b3d740749e873eab2480deeaaf559fc66f3be4d (diff)
"*Fix Kindred Spirits.
*Fix typo causing auras SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR to modify ap with too big amount. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/StatSystem.cpp2
-rw-r--r--src/game/Unit.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 7a0b6f285eb..8287ed2b2bf 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -378,7 +378,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
AuraEffectList const& mAPbyArmor = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR);
for(AuraEffectList::const_iterator iter = mAPbyArmor.begin(); iter != mAPbyArmor.end(); ++iter)
// always: ((*i)->GetModifier()->m_miscvalue == 1 == SPELL_SCHOOL_MASK_NORMAL)
- attPowerMod += int32(GetArmor() / (*iter)->GetMiscValue());
+ attPowerMod += int32(GetArmor() / (*iter)->GetAmount());
}
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 4cef59a9037..e12b7ecd7ca 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13340,6 +13340,12 @@ void Unit::AddPetAura(PetAura const* petSpell)
if(GetTypeId() != TYPEID_PLAYER)
return;
+ // Aura already added - not need to add it twice
+ // This check is to prevent existing pet having aura applied twice (passive auras can stack)
+ // if aura has more than 1 dummy effect
+ if (m_petAuras.find(petSpell)!= m_petAuras.end())
+ return;
+
m_petAuras.insert(petSpell);
if(Pet* pet = ((Player*)this)->GetPet())
pet->CastPetAura(petSpell);