@@ -1003,7 +1003,6 @@ namespace LuaUnit
10031003 return 1 ;
10041004 }
10051005
1006- #if ELUNA_EXPANSION < EXP_RETAIL
10071006 /* *
10081007 * Returns the [Unit]'s class' name in given or default locale or nil.
10091008 *
@@ -1024,7 +1023,11 @@ namespace LuaUnit
10241023 */
10251024 int GetClassAsString (Eluna* E, Unit* unit)
10261025 {
1026+ #if ELUNA_EXPANSION < EXP_RETAIL
10271027 uint8 locale = E->CHECKVAL <uint8>(2 , DEFAULT_LOCALE );
1028+ #else
1029+ LocaleConstant locale = LocaleConstant (E->CHECKVAL <uint8>(2 , DEFAULT_LOCALE ));
1030+ #endif
10281031 if (locale >= TOTAL_LOCALES )
10291032 return luaL_argerror (E->L , 2 , " valid LocaleConstant expected" );
10301033
@@ -1056,7 +1059,11 @@ namespace LuaUnit
10561059 */
10571060 int GetRaceAsString (Eluna* E, Unit* unit)
10581061 {
1062+ #if ELUNA_EXPANSION < EXP_RETAIL
10591063 uint8 locale = E->CHECKVAL <uint8>(2 , DEFAULT_LOCALE );
1064+ #else
1065+ LocaleConstant locale = LocaleConstant (E->CHECKVAL <uint8>(2 , DEFAULT_LOCALE ));
1066+ #endif
10601067 if (locale >= TOTAL_LOCALES )
10611068 return luaL_argerror (E->L , 2 , " valid LocaleConstant expected" );
10621069
@@ -1067,7 +1074,6 @@ namespace LuaUnit
10671074 E->Push (entry->Name [locale]);
10681075 return 1 ;
10691076 }
1070- #endif
10711077
10721078 /* *
10731079 * Returns the [Unit]'s faction ID.
@@ -2636,6 +2642,8 @@ namespace LuaUnit
26362642 { " GetClass" , &LuaUnit::GetClass },
26372643 { " GetRaceMask" , &LuaUnit::GetRaceMask },
26382644 { " GetClassMask" , &LuaUnit::GetClassMask },
2645+ { " GetRaceAsString" , &LuaUnit::GetRaceAsString },
2646+ { " GetClassAsString" , &LuaUnit::GetClassAsString },
26392647 { " GetAura" , &LuaUnit::GetAura },
26402648 { " GetFaction" , &LuaUnit::GetFaction },
26412649 { " GetCurrentSpell" , &LuaUnit::GetCurrentSpell },
@@ -2661,12 +2669,9 @@ namespace LuaUnit
26612669 { " GetVehicle" , &LuaUnit::GetVehicle },
26622670 { " GetMovementType" , &LuaUnit::GetMovementType },
26632671#if ELUNA_EXPANSION < EXP_RETAIL
2664- { " GetRaceAsString" , &LuaUnit::GetRaceAsString },
2665- { " GetClassAsString" , &LuaUnit::GetClassAsString },
2672+
26662673 { " GetBaseSpellPower" , &LuaUnit::GetBaseSpellPower },
26672674#else
2668- { " GetRaceAsString" , METHOD_REG_NONE },
2669- { " GetClassAsString" , METHOD_REG_NONE },
26702675 { " GetBaseSpellPower" , METHOD_REG_NONE },
26712676#endif
26722677
0 commit comments