Core/Vehicle: Add an extra check for required energy before setting power.
This commit is contained in:
1 parent
621ba87917
commit
af5d3daeab
1 file changed
+1
-1
@@ -102,7 +102,7 @@ void Vehicle::Install()
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
if (spellInfo->PowerType == POWER_ENERGY)
|
||||
if (spellInfo->PowerType == POWER_ENERGY && spellInfo->CalcPowerCost(_me, spellInfo->GetSchoolMask()) > 0)
|
||||
{
|
||||
_me->setPowerType(POWER_ENERGY);
|
||||
_me->SetMaxPower(POWER_ENERGY, 100);
|
||||
|
||||
Reference in new issue
Block a user