mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix TC build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||
* This program is free software licensed under GPL version 3
|
||||
* Please see the included DOCS/LICENSE.md for more information
|
||||
@@ -1037,9 +1037,12 @@ auto const& threatlist = creature->getThreatManager().getThreatList();
|
||||
*/
|
||||
int SetInCombatWithZone(lua_State* /*L*/, Creature* creature)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
#if defined AZEROTHCORE
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->DoZoneInCombat();
|
||||
#elif defined TRINITY
|
||||
if (creature->IsAIEnabled())
|
||||
creature->AI()->DoZoneInCombat();
|
||||
#else
|
||||
creature->SetInCombatWithZone();
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||
* This program is free software licensed under GPL version 3
|
||||
* Please see the included DOCS/LICENSE.md for more information
|
||||
@@ -328,7 +328,6 @@ ElunaRegister<Unit> UnitMethods[] =
|
||||
{ "SetSheath", &LuaUnit::SetSheath },
|
||||
{ "SetCreatorGUID", &LuaUnit::SetCreatorGUID },
|
||||
{ "SetMinionGUID", &LuaUnit::SetPetGUID },
|
||||
{ "SetCharmerGUID", &LuaUnit::SetCharmerGUID },
|
||||
{ "SetPetGUID", &LuaUnit::SetPetGUID },
|
||||
#if (!defined(TBC) && !defined(CLASSIC))
|
||||
{ "SetCritterGUID", &LuaUnit::SetCritterGUID },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||
* This program is free software licensed under GPL version 3
|
||||
* Please see the included DOCS/LICENSE.md for more information
|
||||
@@ -68,9 +68,12 @@ namespace LuaUnit
|
||||
*/
|
||||
int IsRooted(lua_State* L, Unit* unit)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
#ifdef AZEROTHCORE
|
||||
Eluna::Push(L, unit->isInRoots() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
|
||||
#endif
|
||||
#ifdef TRINITY
|
||||
Eluna::Push(L, unit->IsRooted() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
|
||||
#endif
|
||||
#ifdef CMANGOS
|
||||
Eluna::Push(L, unit->isInRoots() || unit->IsRooted());
|
||||
#endif
|
||||
@@ -659,8 +662,10 @@ namespace LuaUnit
|
||||
*/
|
||||
int GetCharmGUID(lua_State* L, Unit* unit)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
#if defined AZEROTHCORE
|
||||
Eluna::Push(L, unit->GetCharmGUID());
|
||||
#elif defined TRINITY
|
||||
Eluna::Push(L, unit->GetCharmedGUID());
|
||||
#else
|
||||
Eluna::Push(L, unit->GetCharmGuid());
|
||||
#endif
|
||||
@@ -1755,22 +1760,6 @@ namespace LuaUnit
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets charmer GUID
|
||||
*
|
||||
* @param uint64 guid
|
||||
*/
|
||||
int SetCharmerGUID(lua_State* L, Unit* unit)
|
||||
{
|
||||
uint64 guid = Eluna::CHECKVAL<uint64>(L, 2);
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
unit->SetCharmerGUID(ObjectGuid(guid));
|
||||
#else
|
||||
unit->SetCharmerGuid(ObjectGuid(guid));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets pet GUID
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user