feat(Time): add support GameTime (#16)

This commit is contained in:
Kargatum
2022-01-24 17:56:08 +07:00
committed by GitHub
parent 9fbfec18df
commit 5ead47b733

View File

@@ -12,6 +12,7 @@
#ifdef AZEROTHCORE
#include "BanMgr.h"
#include "GameTime.h"
enum BanMode
{
@@ -158,6 +159,8 @@ namespace LuaGlobalFunctions
{
#ifdef TRINITY
Eluna::Push(L, GameTime::GetGameTime());
#elif AZEROTHCORE
Eluna::Push(L, GameTime::GetGameTime().count());
#else
Eluna::Push(L, eWorld->GetGameTime());
#endif
@@ -1940,7 +1943,7 @@ namespace LuaGlobalFunctions
if (!items || items->Empty())
return 0;
auto const itemlist = items->m_items;
auto const& itemlist = items->m_items;
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
#if defined(CATA) || defined(MISTS)
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);