mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/Vehicle: Add an extra check for required energy before setting power.
This commit is contained in:
@@ -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