mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
Eluna implementation (#847)
* azerothcore + eluna done. * Remove the Eluna single thread limit. * Read Eluna Settings file. * submodule change. * fix(test) Ubuntu - Cant Link Library after Compile * The ELUNA is disabled by default. * remove submodule luaEngine. * some change * fix a error * change cmake * fix: some onplayerchat does not have hooks. * Eluna: Add BG event Hooks. * fix:cmake hook AFTER_LOAD_CONF not work. * Remove the eluna switch. * Remove some define in the core. * fix conf file not read in the linux. * eluna : change bg hook parameter type * Remove TC log function call * change bg hook OnBGEnd parameter type. Note: to enable Eluna, the module is required
This commit is contained in:
@@ -32,7 +32,9 @@
|
||||
#include "BattlegroundRV.h"
|
||||
#include "Transport.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
namespace Trinity
|
||||
{
|
||||
class BattlegroundChatBuilder
|
||||
@@ -201,6 +203,10 @@ Battleground::~Battleground()
|
||||
for (uint32 i = 0; i < size; ++i)
|
||||
DelObject(i);
|
||||
|
||||
#ifdef ELUNA
|
||||
sEluna->OnBGDestroy(this, GetBgTypeID(), GetInstanceID());
|
||||
#endif
|
||||
|
||||
sBattlegroundMgr->RemoveBattleground(GetBgTypeID(), GetInstanceID());
|
||||
// unload map
|
||||
if (m_Map)
|
||||
@@ -493,6 +499,10 @@ 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]);
|
||||
@@ -1037,6 +1047,10 @@ 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
|
||||
}
|
||||
|
||||
uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const
|
||||
|
||||
Reference in New Issue
Block a user