Eluna change definition checks from mangos to tc

This commit is contained in:
Rochet2
2014-06-29 12:26:16 +03:00
committed by Foereaper
parent c2a3ea5043
commit 1f75dc7843
20 changed files with 181 additions and 181 deletions

View File

@@ -18,7 +18,7 @@ namespace LuaCreature
int IsRegeneratingHealth(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->IsRegeneratingHealth());
#else
Eluna::Push(L, creature->isRegeneratingHealth());
@@ -30,7 +30,7 @@ namespace LuaCreature
{
uint32 quest_id = Eluna::CHECKVAL<uint32>(L, 2);
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->HasInvolvedQuest(quest_id));
#else
Eluna::Push(L, creature->hasInvolvedQuest(quest_id));
@@ -72,7 +72,7 @@ namespace LuaCreature
int HasLootRecipient(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->HasLootRecipient());
#else
Eluna::Push(L, creature->hasLootRecipient());
@@ -82,7 +82,7 @@ namespace LuaCreature
int IsCombatAllowed(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
if (CreatureAI* ai = creature->AI())
Eluna::Push(L, ai->IsCombatMovement());
else
@@ -113,7 +113,7 @@ namespace LuaCreature
int IsElite(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->IsElite());
#else
Eluna::Push(L, creature->isElite());
@@ -141,7 +141,7 @@ namespace LuaCreature
int IsWorldBoss(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->IsWorldBoss());
#else
Eluna::Push(L, creature->isWorldBoss());
@@ -169,7 +169,7 @@ namespace LuaCreature
{
uint32 questId = Eluna::CHECKVAL<uint32>(L, 2);
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->HasQuest(questId));
#else
Eluna::Push(L, creature->hasQuest(questId));
@@ -243,7 +243,7 @@ namespace LuaCreature
{
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2);
#ifdef MANGOS
#ifndef TRINITY
float AttackDist = creature->GetAttackDistance(target);
float ThreatRadius = sWorld.getConfig(CONFIG_FLOAT_THREAT_RADIUS);
Eluna::Push(L, ThreatRadius > AttackDist ? ThreatRadius : AttackDist);
@@ -263,7 +263,7 @@ namespace LuaCreature
int GetLootRecipientGroup(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->GetGroupLootRecipient());
#else
Eluna::Push(L, creature->GetLootRecipientGroup());
@@ -312,7 +312,7 @@ namespace LuaCreature
int GetHomePosition(lua_State* L, Creature* creature)
{
float x, y, z, o;
#ifdef MANGOS
#ifndef TRINITY
creature->GetRespawnCoord(x, y, z, &o);
#else
creature->GetHomePosition(x, y, z, o);
@@ -465,7 +465,7 @@ namespace LuaCreature
{
int32 state = Eluna::CHECKVAL<int32>(L, 2);
#ifdef MANGOS
#ifndef TRINITY
creature->SetDeathState((DeathState)state);
#else
creature->setDeathState((DeathState)state);
@@ -485,7 +485,7 @@ namespace LuaCreature
{
bool allow = Eluna::CHECKVAL<bool>(L, 2);
#ifdef MANGOS
#ifndef TRINITY
if (CreatureAI* ai = creature->AI())
ai->SetCombatMovement(allow);
#else
@@ -552,7 +552,7 @@ namespace LuaCreature
{
bool enable = Eluna::CHECKVAL<bool>(L, 2, true);
#ifdef MANGOS
#ifndef TRINITY
creature->SetLevitate(enable);
#else
creature->SetHover(enable);
@@ -582,7 +582,7 @@ namespace LuaCreature
{
uint32 msTimeToDespawn = Eluna::CHECKVAL<uint32>(L, 2, 0);
#ifdef MANGOS
#ifndef TRINITY
creature->ForcedDespawn(msTimeToDespawn);
#else
creature->DespawnOrUnsummon(msTimeToDespawn);
@@ -604,7 +604,7 @@ namespace LuaCreature
int MoveWaypoint(lua_State* /*L*/, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
creature->GetMotionMaster()->MoveWaypoint();
#else
creature->GetMotionMaster()->MovePath(creature->GetWaypointPath(), true);
@@ -648,7 +648,7 @@ namespace LuaCreature
int SelectVictim(lua_State* L, Creature* creature)
{
#ifdef MANGOS
#ifndef TRINITY
Eluna::Push(L, creature->SelectHostileTarget());
#else
Eluna::Push(L, creature->SelectVictim());
@@ -661,7 +661,7 @@ namespace LuaCreature
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);
uint32 dataGuidLow = Eluna::CHECKVAL<uint32>(L, 3, 0);
#ifdef MANGOS
#ifndef TRINITY
creature->UpdateEntry(entry, ALLIANCE, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL);
#else
creature->UpdateEntry(entry, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL);