feat(Core/Modules): add separated lib for modules (#9281)

This commit is contained in:
Kargatum
2021-12-02 20:28:58 +07:00
committed by GitHub
parent 8668a03e14
commit 51adbffae4
56 changed files with 1904 additions and 1014 deletions
+2 -13
View File
@@ -44,9 +44,6 @@
#include "World.h"
#include "WorldPacket.h"
#ifdef ELUNA
#include "LuaEngine.h"
#endif
namespace Acore
{
class BattlegroundChatBuilder
@@ -217,9 +214,7 @@ Battleground::~Battleground()
for (uint32 i = 0; i < size; ++i)
DelObject(i);
#ifdef ELUNA
sEluna->OnBGDestroy(this, GetBgTypeID(), GetInstanceID());
#endif
sScriptMgr->OnBattlegroundDestroy(this);
sBattlegroundMgr->RemoveBattleground(GetBgTypeID(), GetInstanceID());
// unload map
@@ -513,10 +508,6 @@ inline void Battleground::_ProcessJoin(uint32 diff)
StartingEventOpenDoors();
#ifdef ELUNA
sEluna->OnBGStart(this, GetBgTypeID(), GetInstanceID());
#endif
SendWarningToAll(StartMessageIds[BG_STARTING_EVENT_FOURTH]);
SetStatus(STATUS_IN_PROGRESS);
SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
@@ -1063,9 +1054,7 @@ void Battleground::EndBattleground(TeamId winnerTeamId)
if (winmsg_id)
SendMessageToAll(winmsg_id, CHAT_MSG_BG_SYSTEM_NEUTRAL);
#ifdef ELUNA
sEluna->OnBGEnd(this, GetBgTypeID(), GetInstanceID(), winnerTeamId);
#endif
sScriptMgr->OnBattlegroundEnd(this, winnerTeamId);
}
uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const
@@ -48,10 +48,6 @@
#include <random>
#include <unordered_map>
#ifdef ELUNA
#include "LuaEngine.h"
#endif
/*********************************************************/
/*** BATTLEGROUND MANAGER ***/
/*********************************************************/
@@ -994,9 +990,8 @@ void BattlegroundMgr::AddBattleground(Battleground* bg)
m_BattlegroundTemplates[bg->GetBgTypeID()] = bg;
else
m_Battlegrounds[bg->GetInstanceID()] = bg;
#ifdef ELUNA
sEluna->OnBGCreate(bg, bg->GetBgTypeID(), bg->GetInstanceID());
#endif
sScriptMgr->OnBattlegroundCreate(bg);
}
void BattlegroundMgr::RemoveBattleground(BattlegroundTypeId bgTypeId, uint32 instanceId)