Core/Misc: Added helper function Unit::SetFullPower * Also renamed Unit::getPowerType and Unit::setPowerType to follow style guidelines
This commit is contained in:
@@ -2047,7 +2047,7 @@ namespace Scripts.Spells.Generic
|
||||
newPet.setDeathState(DeathState.Alive);
|
||||
|
||||
newPet.SetFullHealth();
|
||||
newPet.SetPower(newPet.getPowerType(), newPet.GetMaxPower(newPet.getPowerType()));
|
||||
newPet.SetFullPower(newPet.GetPowerType());
|
||||
|
||||
switch (newPet.GetEntry())
|
||||
{
|
||||
@@ -2171,7 +2171,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
var target = obj.ToUnit();
|
||||
if (target)
|
||||
return target.getPowerType() != PowerType.Mana;
|
||||
return target.GetPowerType() != PowerType.Mana;
|
||||
|
||||
return true;
|
||||
});
|
||||
@@ -3312,7 +3312,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
Unit unit = target.ToUnit();
|
||||
if (unit)
|
||||
return unit.getPowerType() != PowerType.Mana;
|
||||
return unit.GetPowerType() != PowerType.Mana;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ namespace Scripts.Spells.Items
|
||||
Unit caster = eventInfo.GetActor();
|
||||
|
||||
uint spellId;
|
||||
switch (caster.getPowerType())
|
||||
switch (caster.GetPowerType())
|
||||
{
|
||||
case PowerType.Mana:
|
||||
spellId = _manaSpellId;
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace Scripts.Spells.Priest
|
||||
{
|
||||
Unit target = obj.ToUnit();
|
||||
if (target)
|
||||
return target.getPowerType() != PowerType.Mana;
|
||||
return target.GetPowerType() != PowerType.Mana;
|
||||
|
||||
return true;
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user