mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
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:
parent
a2503162fc
commit
e58df484a2
5 changed files with 31 additions and 20 deletions
|
|
@ -9514,7 +9514,9 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
|
|||
case UNIT_MOD_RAGE:
|
||||
case UNIT_MOD_FOCUS:
|
||||
case UNIT_MOD_ENERGY:
|
||||
case UNIT_MOD_HAPPINESS: UpdateMaxPower(GetPowerTypeByAuraGroup(unitMod)); break;
|
||||
case UNIT_MOD_HAPPINESS:
|
||||
case UNIT_MOD_RUNE:
|
||||
case UNIT_MOD_RUNIC_POWER: UpdateMaxPower(GetPowerTypeByAuraGroup(unitMod)); break;
|
||||
|
||||
case UNIT_MOD_RESISTANCE_HOLY:
|
||||
case UNIT_MOD_RESISTANCE_FIRE:
|
||||
|
|
@ -9627,21 +9629,18 @@ Stats Unit::GetStatByAuraGroup(UnitMods unitMod) const
|
|||
|
||||
Powers Unit::GetPowerTypeByAuraGroup(UnitMods unitMod) const
|
||||
{
|
||||
Powers power = POWER_MANA;
|
||||
|
||||
switch(unitMod)
|
||||
{
|
||||
case UNIT_MOD_MANA: power = POWER_MANA; break;
|
||||
case UNIT_MOD_RAGE: power = POWER_RAGE; break;
|
||||
case UNIT_MOD_FOCUS: power = POWER_FOCUS; break;
|
||||
case UNIT_MOD_ENERGY: power = POWER_ENERGY; break;
|
||||
case UNIT_MOD_HAPPINESS: power = POWER_HAPPINESS; break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case UNIT_MOD_MANA: return POWER_MANA;
|
||||
case UNIT_MOD_RAGE: return POWER_RAGE;
|
||||
case UNIT_MOD_FOCUS: return POWER_FOCUS;
|
||||
case UNIT_MOD_ENERGY: return POWER_ENERGY;
|
||||
case UNIT_MOD_HAPPINESS: return POWER_HAPPINESS;
|
||||
case UNIT_MOD_RUNE: return POWER_RUNE;
|
||||
case UNIT_MOD_RUNIC_POWER:return POWER_RUNIC_POWER;
|
||||
}
|
||||
|
||||
return power;
|
||||
return POWER_MANA;
|
||||
}
|
||||
|
||||
float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue