Update UnitMethods.h

This commit is contained in:
Rochet2
2014-05-24 17:15:15 +03:00
committed by Foereaper
parent 166115b612
commit 9873293b17

View File

@@ -675,7 +675,11 @@ namespace LuaUnit
int GetPowerPct(lua_State* L, Unit* unit)
{
#if (defined(MANGOS) && defined(WOTLK))
float percent = (unit->GetPower(unit->GetPowerType()) / unit->GetMaxPower(unit->GetPowerType())) * 100;
#else
float percent = (unit->GetPower(unit->getPowerType()) / unit->GetMaxPower(unit->getPowerType())) * 100;
#endif
sEluna->Push(L, percent);
return 1;
}