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/>
|
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||||
* This program is free software licensed under GPL version 3
|
* This program is free software licensed under GPL version 3
|
||||||
* Please see the included DOCS/LICENSE.md for more information
|
* 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)
|
int SetInCombatWithZone(lua_State* /*L*/, Creature* creature)
|
||||||
{
|
{
|
||||||
#if defined TRINITY || AZEROTHCORE
|
#if defined AZEROTHCORE
|
||||||
if (creature->IsAIEnabled)
|
if (creature->IsAIEnabled)
|
||||||
creature->AI()->DoZoneInCombat();
|
creature->AI()->DoZoneInCombat();
|
||||||
|
#elif defined TRINITY
|
||||||
|
if (creature->IsAIEnabled())
|
||||||
|
creature->AI()->DoZoneInCombat();
|
||||||
#else
|
#else
|
||||||
creature->SetInCombatWithZone();
|
creature->SetInCombatWithZone();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||||
* This program is free software licensed under GPL version 3
|
* This program is free software licensed under GPL version 3
|
||||||
* Please see the included DOCS/LICENSE.md for more information
|
* Please see the included DOCS/LICENSE.md for more information
|
||||||
@@ -328,7 +328,6 @@ ElunaRegister<Unit> UnitMethods[] =
|
|||||||
{ "SetSheath", &LuaUnit::SetSheath },
|
{ "SetSheath", &LuaUnit::SetSheath },
|
||||||
{ "SetCreatorGUID", &LuaUnit::SetCreatorGUID },
|
{ "SetCreatorGUID", &LuaUnit::SetCreatorGUID },
|
||||||
{ "SetMinionGUID", &LuaUnit::SetPetGUID },
|
{ "SetMinionGUID", &LuaUnit::SetPetGUID },
|
||||||
{ "SetCharmerGUID", &LuaUnit::SetCharmerGUID },
|
|
||||||
{ "SetPetGUID", &LuaUnit::SetPetGUID },
|
{ "SetPetGUID", &LuaUnit::SetPetGUID },
|
||||||
#if (!defined(TBC) && !defined(CLASSIC))
|
#if (!defined(TBC) && !defined(CLASSIC))
|
||||||
{ "SetCritterGUID", &LuaUnit::SetCritterGUID },
|
{ "SetCritterGUID", &LuaUnit::SetCritterGUID },
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
|
||||||
* This program is free software licensed under GPL version 3
|
* This program is free software licensed under GPL version 3
|
||||||
* Please see the included DOCS/LICENSE.md for more information
|
* Please see the included DOCS/LICENSE.md for more information
|
||||||
@@ -68,9 +68,12 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int IsRooted(lua_State* L, Unit* unit)
|
int IsRooted(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#if defined TRINITY || AZEROTHCORE
|
#ifdef AZEROTHCORE
|
||||||
Eluna::Push(L, unit->isInRoots() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
|
Eluna::Push(L, unit->isInRoots() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TRINITY
|
||||||
|
Eluna::Push(L, unit->IsRooted() || unit->HasUnitMovementFlag(MOVEMENTFLAG_ROOT));
|
||||||
|
#endif
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isInRoots() || unit->IsRooted());
|
Eluna::Push(L, unit->isInRoots() || unit->IsRooted());
|
||||||
#endif
|
#endif
|
||||||
@@ -659,8 +662,10 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int GetCharmGUID(lua_State* L, Unit* unit)
|
int GetCharmGUID(lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#if defined TRINITY || AZEROTHCORE
|
#if defined AZEROTHCORE
|
||||||
Eluna::Push(L, unit->GetCharmGUID());
|
Eluna::Push(L, unit->GetCharmGUID());
|
||||||
|
#elif defined TRINITY
|
||||||
|
Eluna::Push(L, unit->GetCharmedGUID());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->GetCharmGuid());
|
Eluna::Push(L, unit->GetCharmGuid());
|
||||||
#endif
|
#endif
|
||||||
@@ -1755,22 +1760,6 @@ namespace LuaUnit
|
|||||||
return 0;
|
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
|
* Sets pet GUID
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user