From 9873293b17c4066a781367c05765c7d2d173d250 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sat, 24 May 2014 17:15:15 +0300 Subject: [PATCH] Update UnitMethods.h --- UnitMethods.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UnitMethods.h b/UnitMethods.h index 142f19c..72c9f8f 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -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; }