Fix TC build

This commit is contained in:
Rochet2
2019-07-04 21:19:30 +03:00
parent ba8891e447
commit 7e41c418bc
3 changed files with 40 additions and 0 deletions

View File

@@ -54,7 +54,11 @@ namespace LuaAura
*/
int GetCasterLevel(lua_State* L, Aura* aura)
{
#ifdef TRINITY
Eluna::Push(L, aura->GetCaster()->GetLevel());
#else
Eluna::Push(L, aura->GetCaster()->getLevel());
#endif
return 1;
}

View File

@@ -307,7 +307,11 @@ namespace LuaItem
item->GetEnchantmentId(BONUS_ENCHANTMENT_SLOT) << ":" <<
#endif
item->GetItemRandomPropertyId() << ":" << item->GetItemSuffixFactor() << ":" <<
#ifdef TRINITY
(uint32)item->GetOwner()->GetLevel() << "|h[" << name << "]|h|r";
#else
(uint32)item->GetOwner()->getLevel() << "|h[" << name << "]|h|r";
#endif
Eluna::Push(L, oss.str());
return 1;

View File

@@ -836,7 +836,11 @@ namespace LuaUnit
*/
int GetLevel(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetLevel());
#else
Eluna::Push(L, unit->getLevel());
#endif
return 1;
}
@@ -1026,7 +1030,11 @@ namespace LuaUnit
*/
int GetGender(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetGender());
#else
Eluna::Push(L, unit->getGender());
#endif
return 1;
}
@@ -1037,7 +1045,11 @@ namespace LuaUnit
*/
int GetRace(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetRace());
#else
Eluna::Push(L, unit->getRace());
#endif
return 1;
}
@@ -1048,7 +1060,11 @@ namespace LuaUnit
*/
int GetClass(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetClass());
#else
Eluna::Push(L, unit->getClass());
#endif
return 1;
}
@@ -1059,7 +1075,11 @@ namespace LuaUnit
*/
int GetRaceMask(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetRaceMask());
#else
Eluna::Push(L, unit->getRaceMask());
#endif
return 1;
}
@@ -1070,7 +1090,11 @@ namespace LuaUnit
*/
int GetClassMask(lua_State* L, Unit* unit)
{
#ifdef TRINITY
Eluna::Push(L, unit->GetClassMask());
#else
Eluna::Push(L, unit->getClassMask());
#endif
return 1;
}
@@ -1131,7 +1155,11 @@ namespace LuaUnit
if (locale >= TOTAL_LOCALES)
return luaL_argerror(L, 2, "valid LocaleConstant expected");
#ifdef TRINITY
const ChrClassesEntry* entry = sChrClassesStore.LookupEntry(unit->GetClass());
#else
const ChrClassesEntry* entry = sChrClassesStore.LookupEntry(unit->getClass());
#endif
if (!entry)
return 1;
@@ -1166,7 +1194,11 @@ namespace LuaUnit
if (locale >= TOTAL_LOCALES)
return luaL_argerror(L, 2, "valid LocaleConstant expected");
#ifdef TRINITY
const ChrRacesEntry* entry = sChrRacesStore.LookupEntry(unit->GetRace());
#else
const ChrRacesEntry* entry = sChrRacesStore.LookupEntry(unit->getRace());
#endif
if (!entry)
return 1;