mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat(Time): add support GameTime (#16)
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#ifdef AZEROTHCORE
|
#ifdef AZEROTHCORE
|
||||||
|
|
||||||
#include "BanMgr.h"
|
#include "BanMgr.h"
|
||||||
|
#include "GameTime.h"
|
||||||
|
|
||||||
enum BanMode
|
enum BanMode
|
||||||
{
|
{
|
||||||
@@ -158,6 +159,8 @@ namespace LuaGlobalFunctions
|
|||||||
{
|
{
|
||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
Eluna::Push(L, GameTime::GetGameTime());
|
Eluna::Push(L, GameTime::GetGameTime());
|
||||||
|
#elif AZEROTHCORE
|
||||||
|
Eluna::Push(L, GameTime::GetGameTime().count());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, eWorld->GetGameTime());
|
Eluna::Push(L, eWorld->GetGameTime());
|
||||||
#endif
|
#endif
|
||||||
@@ -1940,7 +1943,7 @@ namespace LuaGlobalFunctions
|
|||||||
if (!items || items->Empty())
|
if (!items || items->Empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto const itemlist = items->m_items;
|
auto const& itemlist = items->m_items;
|
||||||
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
|
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
|
||||||
#if defined(CATA) || defined(MISTS)
|
#if defined(CATA) || defined(MISTS)
|
||||||
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);
|
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user