Implement aura use in new version of racial trait 20550. Add unit stat mods for rune/runic powers.

Last change will also prevent corruption armor and holy resistence values.
This commit is contained in:
VladimirMangos 2008-12-04 05:53:02 +03:00
parent a2503162fc
commit e58df484a2
5 changed files with 31 additions and 20 deletions

View file

@ -332,7 +332,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleNULL, //279
&Aura::HandleNULL, //280 ignore armor?
&Aura::HandleNULL, //281 increase honor gain?
&Aura::HandleNULL, //282
&Aura::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
&Aura::HandleNULL //283 SPD/heal from AP?
};
@ -4718,24 +4718,32 @@ void Aura::HandleAuraModIncreaseEnergy(bool apply, bool Real)
if(int32(powerType) != m_modifier.m_miscvalue)
return;
m_target->HandleStatModifier(UnitMods(UNIT_MOD_POWER_START + powerType), TOTAL_VALUE, float(m_modifier.m_amount), apply);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
m_target->HandleStatModifier(unitMod, TOTAL_VALUE, float(m_modifier.m_amount), apply);
}
void Aura::HandleAuraModIncreaseEnergyPercent(bool apply, bool Real)
void Aura::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/)
{
Powers powerType = m_target->getPowerType();
if(int32(powerType) != m_modifier.m_miscvalue)
return;
m_target->HandleStatModifier(UnitMods(UNIT_MOD_POWER_START + powerType), TOTAL_PCT, float(m_modifier.m_amount), apply);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
m_target->HandleStatModifier(unitMod, TOTAL_PCT, float(m_modifier.m_amount), apply);
}
void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool Real)
void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/)
{
//m_target->ApplyMaxHealthPercentMod(m_modifier.m_amount,apply);
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_modifier.m_amount), apply);
}
void Aura::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)
{
m_target->HandleStatModifier(UNIT_MOD_HEALTH, BASE_PCT, float(m_modifier.m_amount), apply);
}
/********************************/
/*** FIGHT ***/
/********************************/