Core/Misc: Added helper function Unit::SetFullPower * Also renamed Unit::getPowerType and Unit::setPowerType to follow style guidelines

This commit is contained in:
hondacrx
2018-01-03 13:57:16 -05:00
parent 8b43b08f6f
commit 9d3e87fd87
30 changed files with 106 additions and 124 deletions
+3 -3
View File
@@ -823,7 +823,7 @@ namespace Game.Spells
PowerType powerType = (PowerType)effectInfo.MiscValue;
if (unitTarget == null || !unitTarget.IsAlive() || unitTarget.getPowerType() != powerType || damage < 0)
if (unitTarget == null || !unitTarget.IsAlive() || unitTarget.GetPowerType() != powerType || damage < 0)
return;
// add spell damage bonus
@@ -902,7 +902,7 @@ namespace Game.Spells
PowerType powerType = (PowerType)effectInfo.MiscValue;
if (unitTarget == null || !unitTarget.IsAlive() || unitTarget.getPowerType() != powerType || damage < 0)
if (unitTarget == null || !unitTarget.IsAlive() || unitTarget.GetPowerType() != powerType || damage < 0)
return;
int newDamage = -(unitTarget.ModifyPower(powerType, -damage));
@@ -4077,7 +4077,7 @@ namespace Game.Spells
player.SetHealth(health);
player.SetPower(PowerType.Mana, mana);
player.SetPower(PowerType.Rage, 0);
player.SetPower(PowerType.Energy, player.GetMaxPower(PowerType.Energy));
player.SetFullPower(PowerType.Energy);
player.SetPower(PowerType.Focus, 0);
player.SpawnCorpseBones();