*Aura Consolidation + MaxModifier. By Authorius, modified by Deafboy and thenecromancer, adapted by Muhaha.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-11-28 12:58:12 -06:00
1 parent c72bf6e8c4
commit beddd27430
10 files changed
+285 -242

No files matched your search

+6 -6
View File
@@ -840,7 +840,7 @@ void Player::HandleDrowning()
AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifierValue()) / 100.0f);
if ((m_isunderwater & 0x01) && !(m_isunderwater & 0x80) && isAlive())
{
@@ -1892,7 +1892,7 @@ void Player::Regenerate(Powers power)
AuraList const& ModPowerRegenPCTAuras = GetAurasByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
for(AuraList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
if ((*i)->GetModifier()->m_miscvalue == power)
addvalue *= ((*i)->GetModifier()->m_amount + 100) / 100.0f;
addvalue *= ((*i)->GetModifierValue() + 100) / 100.0f;
}
if (power != POWER_RAGE)
@@ -1933,7 +1933,7 @@ void Player::RegenerateHealth()
{
AuraList const& mModHealthRegenPct = GetAurasByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
for(AuraList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
addvalue *= (100.0f + (*i)->GetModifier()->m_amount) / 100.0f;
addvalue *= (100.0f + (*i)->GetModifierValue()) / 100.0f;
}
else if(HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
addvalue *= GetTotalAuraModifier(SPELL_AURA_MOD_REGEN_DURING_COMBAT) / 100.0f;
@@ -2130,7 +2130,7 @@ void Player::GiveXP(uint32 xp, Unit* victim)
// handle SPELL_AURA_MOD_XP_PCT auras
Unit::AuraList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
for(Unit::AuraList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
xp = uint32(xp*(1.0f + (*i)->GetModifier()->m_amount / 100.0f));
xp = uint32(xp*(1.0f + (*i)->GetModifierValue() / 100.0f));
// XP resting bonus for kill
uint32 rested_bonus_xp = victim ? GetXPRestBonus(xp) : 0;
@@ -6766,7 +6766,7 @@ void Player::_ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attac
if (item->IsFitToSpellRequirements(aura->GetSpellProto()))
{
HandleBaseModValue(mod, FLAT_MOD, float (aura->GetModifier()->m_amount), apply);
HandleBaseModValue(mod, FLAT_MOD, float (aura->GetModifierValue()), apply);
}
}
@@ -6800,7 +6800,7 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att
if (item->IsFitToSpellRequirements(aura->GetSpellProto()))
{
HandleStatModifier(unitMod, unitModType, float(modifier->m_amount),apply);
HandleStatModifier(unitMod, unitModType, float(aura->GetModifierValue()),apply);
}
}