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
@@ -935,7 +935,7 @@ void Spell::EffectPowerDrain(SpellEffIndex effIndex)
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->GetPowerType() != powerType || damage < 0)
|
||||
return;
|
||||
|
||||
// add spell damage bonus
|
||||
@@ -1011,7 +1011,7 @@ void Spell::EffectPowerBurn(SpellEffIndex effIndex)
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->GetPowerType() != powerType || damage < 0)
|
||||
return;
|
||||
|
||||
// burn x% of target's mana, up to maximum of 2x% of caster's mana (Mana Burn)
|
||||
@@ -1433,7 +1433,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
|
||||
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && m_spellInfo->SpellFamilyName != SPELLFAMILY_POTION
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->GetPowerType() != power && m_spellInfo->SpellFamilyName != SPELLFAMILY_POTION
|
||||
&& !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
return;
|
||||
|
||||
@@ -1497,7 +1497,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
|
||||
|
||||
Powers power = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->GetPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER))
|
||||
return;
|
||||
|
||||
uint32 maxPower = unitTarget->GetMaxPower(power);
|
||||
@@ -2514,8 +2514,8 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
if (OldSummon->getPetType() == SUMMON_PET)
|
||||
{
|
||||
OldSummon->SetHealth(OldSummon->GetMaxHealth());
|
||||
OldSummon->SetPower(OldSummon->getPowerType(),
|
||||
OldSummon->GetMaxPower(OldSummon->getPowerType()));
|
||||
OldSummon->SetPower(OldSummon->GetPowerType(),
|
||||
OldSummon->GetMaxPower(OldSummon->GetPowerType()));
|
||||
}
|
||||
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER && OldSummon->isControlled())
|
||||
|
||||
Reference in new issue
Block a user