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)
|
int GetEndTime(lua_State* L, BattleGround* bg)
|
||||||
{
|
{
|
||||||
|
#ifdef CATA
|
||||||
|
Eluna::Push(L, bg->GetRemainingTime());
|
||||||
|
#else
|
||||||
Eluna::Push(L, bg->GetEndTime());
|
Eluna::Push(L, bg->GetEndTime());
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ typedef uint64 ObjectGuid;
|
|||||||
#define GET_GUID GetGUID
|
#define GET_GUID GetGUID
|
||||||
#else
|
#else
|
||||||
typedef QueryNamedResult ElunaQuery;
|
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 ASSERT MANGOS_ASSERT
|
||||||
#define ELUNA_LOG_INFO(...) sLog.outString(__VA_ARGS__);
|
#define ELUNA_LOG_INFO(...) sLog.outString(__VA_ARGS__);
|
||||||
#define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);
|
#define ELUNA_LOG_ERROR(...) sLog.outErrorEluna(__VA_ARGS__);
|
||||||
@@ -64,6 +60,19 @@ typedef QueryNamedResult ElunaQuery;
|
|||||||
#define UNORDERED_SET std::unordered_set
|
#define UNORDERED_SET std::unordered_set
|
||||||
#endif
|
#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 Unit;
|
||||||
class WorldObject;
|
class WorldObject;
|
||||||
|
|
||||||
|
|||||||
12
MapMethods.h
12
MapMethods.h
@@ -203,25 +203,25 @@ namespace LuaMap
|
|||||||
switch (GUID_HIPART(guid))
|
switch (GUID_HIPART(guid))
|
||||||
{
|
{
|
||||||
case HIGHGUID_PLAYER:
|
case HIGHGUID_PLAYER:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Player*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Player*)NULL));
|
||||||
break;
|
break;
|
||||||
case HIGHGUID_TRANSPORT:
|
case HIGHGUID_TRANSPORT:
|
||||||
case HIGHGUID_MO_TRANSPORT:
|
case HIGHGUID_MO_TRANSPORT:
|
||||||
case HIGHGUID_GAMEOBJECT:
|
case HIGHGUID_GAMEOBJECT:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (GameObject*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (GameObject*)NULL));
|
||||||
break;
|
break;
|
||||||
case HIGHGUID_VEHICLE:
|
case HIGHGUID_VEHICLE:
|
||||||
case HIGHGUID_UNIT:
|
case HIGHGUID_UNIT:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Creature*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Creature*)NULL));
|
||||||
break;
|
break;
|
||||||
case HIGHGUID_PET:
|
case HIGHGUID_PET:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Pet*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Pet*)NULL));
|
||||||
break;
|
break;
|
||||||
case HIGHGUID_DYNAMICOBJECT:
|
case HIGHGUID_DYNAMICOBJECT:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (DynamicObject*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (DynamicObject*)NULL));
|
||||||
break;
|
break;
|
||||||
case HIGHGUID_CORPSE:
|
case HIGHGUID_CORPSE:
|
||||||
Eluna::Push(L, sObjectAccessor->GetObjectInMap(guid, map, (Corpse*)NULL));
|
Eluna::Push(L, sObjectAccessor->GetObjectInMap(ObjectGuid(guid), map, (Corpse*)NULL));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user