Core/Units: ported power type updates from master branch
This commit is contained in:
1 parent
e67167e8cf
commit
b653f2f819
40 files changed
+259
-278
No files matched your search
@@ -2783,7 +2783,7 @@ class spell_gen_pet_summoned : public SpellScriptLoader
|
||||
newPet->setDeathState(ALIVE);
|
||||
|
||||
newPet->SetFullHealth();
|
||||
newPet->SetPower(newPet->getPowerType(), newPet->GetMaxPower(newPet->getPowerType()));
|
||||
newPet->SetPower(newPet->GetPowerType(), newPet->GetMaxPower(newPet->GetPowerType()));
|
||||
|
||||
switch (newPet->GetEntry())
|
||||
{
|
||||
@@ -2904,7 +2904,7 @@ public:
|
||||
bool operator()(WorldObject* obj) const
|
||||
{
|
||||
if (Unit* target = obj->ToUnit())
|
||||
return target->getPowerType() != POWER_MANA;
|
||||
return target->GetPowerType() != POWER_MANA;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2960,7 +2960,7 @@ class spell_gen_replenishment : public SpellScriptLoader
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->getPowerType() == POWER_MANA;
|
||||
return GetUnitOwner()->GetPowerType() == POWER_MANA;
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
|
||||
@@ -1203,7 +1203,7 @@ class spell_item_heartpierce : public SpellScriptLoader
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
|
||||
uint32 spellId;
|
||||
switch (caster->getPowerType())
|
||||
switch (caster->GetPowerType())
|
||||
{
|
||||
case POWER_MANA:
|
||||
spellId = Mana;
|
||||
@@ -4253,7 +4253,7 @@ public:
|
||||
|
||||
Unit* target = GetCaster();
|
||||
|
||||
if (target->getPowerType() == POWER_MANA)
|
||||
if (target->GetPowerType() == POWER_MANA)
|
||||
availableElixirs.push_back(28509); // Elixir of Major Mageblood (22840)
|
||||
|
||||
uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
|
||||
@@ -4328,7 +4328,7 @@ public:
|
||||
|
||||
if (!target->IsInCombat())
|
||||
availableElixirs.push_back(53753); // Potion of Nightmares (40081)
|
||||
if (target->getPowerType() == POWER_MANA)
|
||||
if (target->GetPowerType() == POWER_MANA)
|
||||
availableElixirs.push_back(43186); // Runic Mana Potion(33448)
|
||||
|
||||
uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
|
||||
|
||||
@@ -128,7 +128,7 @@ class PowerCheck
|
||||
bool operator()(WorldObject* obj) const
|
||||
{
|
||||
if (Unit* target = obj->ToUnit())
|
||||
return target->getPowerType() != _power;
|
||||
return target->GetPowerType() != _power;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user