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:
ayase
2018-05-23 02:22:11 +08:00
committed by Barbz
parent 0da1f8c706
commit 00777a80ae
38 changed files with 854 additions and 62 deletions

View File

@@ -35,6 +35,9 @@
#include "WardenMac.h"
#include "SavingSystem.h"
#include "AccountMgr.h"
#ifdef ELUNA
#include "LuaEngine.h"
#endif
namespace {
@@ -202,6 +205,13 @@ void WorldSession::SendPacket(WorldPacket const* packet)
}
#endif // !TRINITY_DEBUG
sScriptMgr->OnPacketSend(this, *packet);
#ifdef ELUNA
if (!sEluna->OnPacketSend(this, *packet))
return;
#endif
if (m_Socket->SendPacket(*packet) == -1)
m_Socket->CloseSocket();
}
@@ -276,6 +286,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
delete movementPacket;
movementPacket = NULL;
}
sScriptMgr->OnPacketReceive(this, *packet);
#ifdef ELUNA
if (!sEluna->OnPacketReceive(this, *packet))
break;
#endif
(this->*opHandle.handler)(*packet);
}
}
@@ -288,12 +303,23 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
delete movementPacket;
movementPacket = NULL;
}
sScriptMgr->OnPacketReceive(this, *packet);
#ifdef ELUNA
if (!sEluna->OnPacketReceive(this, *packet))
break;
#endif
(this->*opHandle.handler)(*packet);
}
break;
case STATUS_AUTHED:
if (m_inQueue) // prevent cheating
break;
sScriptMgr->OnPacketReceive(this, *packet);
#ifdef ELUNA
if (!sEluna->OnPacketReceive(this, *packet))
break;
#endif
(this->*opHandle.handler)(*packet);
break;
case STATUS_NEVER: