mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Update UnitMethods.h
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user