Eluna add mangos support. Notice that old MANGOS is now CMANGOS

This commit is contained in:
Rochet2
2014-06-29 14:16:59 +03:00
committed by Foereaper
parent 1f75dc7843
commit 8fe509c838
4 changed files with 58 additions and 26 deletions

View File

@@ -49,10 +49,14 @@ namespace LuaUnit
int IsRooted(lua_State* L, Unit* unit)
{
#ifndef TRINITY
Eluna::Push(L, unit->isInRoots() || unit->IsRooted());
#else
#ifdef TRINITY
Eluna::Push(L, unit->isInRoots() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
#endif
#ifdef CMANGOS
Eluna::Push(L, unit->isInRoots() || unit->IsRooted());
#endif
#ifdef MANGOS
Eluna::Push(L, unit->IsInRoots() || unit->IsRooted());
#endif
return 1;
}
@@ -96,7 +100,7 @@ namespace LuaUnit
int IsGuildMaster(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isGuildMaster());
#else
Eluna::Push(L, unit->IsGuildMaster());
@@ -106,7 +110,7 @@ namespace LuaUnit
int IsInnkeeper(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isInnkeeper());
#else
Eluna::Push(L, unit->IsInnkeeper());
@@ -116,7 +120,7 @@ namespace LuaUnit
int IsTrainer(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isTrainer());
#else
Eluna::Push(L, unit->IsTrainer());
@@ -126,7 +130,7 @@ namespace LuaUnit
int IsGossip(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isGossip());
#else
Eluna::Push(L, unit->IsGossip());
@@ -136,7 +140,7 @@ namespace LuaUnit
int IsTaxi(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isTaxi());
#else
Eluna::Push(L, unit->IsTaxi());
@@ -146,7 +150,7 @@ namespace LuaUnit
int IsSpiritHealer(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isSpiritHealer());
#else
Eluna::Push(L, unit->IsSpiritHealer());
@@ -156,7 +160,7 @@ namespace LuaUnit
int IsSpiritGuide(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isSpiritGuide());
#else
Eluna::Push(L, unit->IsSpiritGuide());
@@ -166,7 +170,7 @@ namespace LuaUnit
int IsTabardDesigner(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isTabardDesigner());
#else
Eluna::Push(L, unit->IsTabardDesigner());
@@ -176,7 +180,7 @@ namespace LuaUnit
int IsServiceProvider(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isServiceProvider());
#else
Eluna::Push(L, unit->IsServiceProvider());
@@ -186,7 +190,7 @@ namespace LuaUnit
int IsSpiritService(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isSpiritService());
#else
Eluna::Push(L, unit->IsSpiritService());
@@ -196,7 +200,7 @@ namespace LuaUnit
int IsAlive(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isAlive());
#else
Eluna::Push(L, unit->IsAlive());
@@ -206,7 +210,11 @@ namespace LuaUnit
int IsDead(lua_State* L, Unit* unit)
{
#ifdef MANGOS
Eluna::Push(L, unit->IsDead());
#else
Eluna::Push(L, unit->isDead());
#endif
return 1;
}
@@ -218,7 +226,7 @@ namespace LuaUnit
int IsBanker(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isBanker());
#else
Eluna::Push(L, unit->IsBanker());
@@ -228,7 +236,7 @@ namespace LuaUnit
int IsVendor(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isVendor());
#else
Eluna::Push(L, unit->IsVendor());
@@ -238,7 +246,7 @@ namespace LuaUnit
int IsBattleMaster(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isBattleMaster());
#else
Eluna::Push(L, unit->IsBattleMaster());
@@ -248,7 +256,7 @@ namespace LuaUnit
int IsCharmed(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isCharmed());
#else
Eluna::Push(L, unit->IsCharmed());
@@ -258,7 +266,7 @@ namespace LuaUnit
int IsArmorer(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isArmorer());
#else
Eluna::Push(L, unit->IsArmorer());
@@ -292,7 +300,7 @@ namespace LuaUnit
int IsInCombat(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isInCombat());
#else
Eluna::Push(L, unit->IsInCombat());
@@ -320,7 +328,7 @@ namespace LuaUnit
int IsQuestGiver(lua_State* L, Unit* unit)
{
#ifndef TRINITY
#ifdef CMANGOS
Eluna::Push(L, unit->isQuestGiver());
#else
Eluna::Push(L, unit->IsQuestGiver());
@@ -1174,7 +1182,11 @@ namespace LuaUnit
/* OTHER */
int ClearThreatList(lua_State* /*L*/, Unit* unit)
{
#ifdef MANGOS
unit->GetThreatManager().clearReferences();
#else
unit->getThreatManager().clearReferences();
#endif
return 0;
}