diff --git a/UnitMethods.h b/UnitMethods.h index 618f653..3ce365a 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -555,12 +555,12 @@ namespace LuaUnit Powers PowerSelectorHelper(lua_State* L, Unit* unit, int powerType = -1) { -#if (!defined(TRINITY) && defined(WOTLK)) - if (powerType == -1) - return unit->GetPowerType(); -#else +#ifdef TRINITY if (powerType == -1) return unit->getPowerType(); +#else + if (powerType == -1) + return unit->GetPowerType(); #endif if (powerType < 0 || powerType >= int(MAX_POWERS)) @@ -603,10 +603,10 @@ namespace LuaUnit int GetPowerType(lua_State* L, Unit* unit) { -#if (!defined(TRINITY) && defined(WOTLK)) - Eluna::Push(L, unit->GetPowerType()); -#else +#ifdef TRINITY Eluna::Push(L, unit->getPowerType()); +#else + Eluna::Push(L, unit->GetPowerType()); #endif return 1; } @@ -919,10 +919,11 @@ namespace LuaUnit uint32 type = Eluna::CHECKVAL(L, 2); if (type >= int(MAX_POWERS)) return luaL_argerror(L, 2, "valid Powers expected"); -#if (!defined(TRINITY) && defined(WOTLK)) - unit->SetPowerType((Powers)type); -#else + +#ifdef TRINITY unit->setPowerType((Powers)type); +#else + unit->SetPowerType((Powers)type); #endif return 0; }