mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna: fix compatibility with new guid changes, fix bg methods for cata
This commit is contained in:
@@ -77,7 +77,11 @@ namespace LuaBattleGround
|
||||
*/
|
||||
int GetEndTime(lua_State* L, BattleGround* bg)
|
||||
{
|
||||
#ifdef CATA
|
||||
Eluna::Push(L, bg->GetRemainingTime());
|
||||
#else
|
||||
Eluna::Push(L, bg->GetEndTime());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@ typedef uint64 ObjectGuid;
|
||||
#define GET_GUID GetGUID
|
||||
#else
|
||||
typedef QueryNamedResult ElunaQuery;
|
||||
#define MAKE_NEW_GUID(l, e, h) ObjectGuid(h, e, l)
|
||||
#define GUID_ENPART(guid) ObjectGuid(guid).GetEntry()
|
||||
#define GUID_LOPART(guid) ObjectGuid(guid).GetCounter()
|
||||
#define GUID_HIPART(guid) ObjectGuid(guid).GetHigh()
|
||||
#define ASSERT MANGOS_ASSERT
|
||||
#define ELUNA_LOG_INFO(...) sLog.outString(__VA_ARGS__);
|
||||
#define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);
|
||||
@@ -64,6 +60,19 @@ typedef QueryNamedResult ElunaQuery;
|
||||
#define UNORDERED_SET std::unordered_set
|
||||
#endif
|
||||
|
||||
#ifndef MAKE_NEW_GUID
|
||||
#define MAKE_NEW_GUID(l, e, h) ObjectGuid(h, e, l)
|
||||
#endif
|
||||
#ifndef GUID_ENPART
|
||||
#define GUID_ENPART(guid) ObjectGuid(guid).GetEntry()
|
||||
#endif
|
||||
#ifndef GUID_LOPART
|
||||
#define GUID_LOPART(guid) ObjectGuid(guid).GetCounter()
|
||||
#endif
|
||||
#ifndef GUID_HIPART
|
||||
#define GUID_HIPART(guid) ObjectGuid(guid).GetHigh()
|
||||
#endif
|
||||
|
||||
class Unit;
|
||||
class WorldObject;
|
||||
|
||||
|
||||
12
MapMethods.h
12
MapMethods.h
@@ -203,25 +203,25 @@ namespace LuaMap
|
||||
switch (GUID_HIPART(guid))
|
||||
{
|
||||
case HIGHGUID_PLAYER:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Player*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Player*)NULL));
|
||||
break;
|
||||
case HIGHGUID_TRANSPORT:
|
||||
case HIGHGUID_MO_TRANSPORT:
|
||||
case HIGHGUID_GAMEOBJECT:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (GameObject*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (GameObject*)NULL));
|
||||
break;
|
||||
case HIGHGUID_VEHICLE:
|
||||
case HIGHGUID_UNIT:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Creature*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Creature*)NULL));
|
||||
break;
|
||||
case HIGHGUID_PET:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Pet*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Pet*)NULL));
|
||||
break;
|
||||
case HIGHGUID_DYNAMICOBJECT:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (DynamicObject*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (DynamicObject*)NULL));
|
||||
break;
|
||||
case HIGHGUID_CORPSE:
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Corpse*)NULL));
|
||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Corpse*)NULL));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user