mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
feat(Core/Modules): add separated lib for modules (#9281)
This commit is contained in:
@@ -51,10 +51,6 @@
|
||||
#include "WorldSocket.h"
|
||||
#include <zlib.h>
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
std::string const DefaultPlayerName = "<none>";
|
||||
@@ -254,12 +250,10 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
}
|
||||
#endif // !ACORE_DEBUG
|
||||
|
||||
sScriptMgr->OnPacketSend(this, *packet);
|
||||
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnPacketSend(this, *packet))
|
||||
if (!sScriptMgr->CanPacketSend(this, *packet))
|
||||
{
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
LOG_TRACE("network.opcode", "S->C: %s %s", GetPlayerInfo().c_str(), GetOpcodeNameForLogging(static_cast<OpcodeServer>(packet->GetOpcode())).c_str());
|
||||
m_Socket->SendPacket(*packet);
|
||||
@@ -346,11 +340,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
}
|
||||
else if (_player->IsInWorld() && AntiDOS.EvaluateOpcode(*packet, currentTime))
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(this, *packet);
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnPacketReceive(this, *packet))
|
||||
if (!sScriptMgr->CanPacketReceive(this, *packet))
|
||||
{
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
opHandle->Call(this, *packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
@@ -358,11 +352,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
case STATUS_TRANSFER:
|
||||
if (_player && !_player->IsInWorld() && AntiDOS.EvaluateOpcode(*packet, currentTime))
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(this, *packet);
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnPacketReceive(this, *packet))
|
||||
if (!sScriptMgr->CanPacketReceive(this, *packet))
|
||||
{
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
opHandle->Call(this, *packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
@@ -373,11 +367,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
|
||||
if (AntiDOS.EvaluateOpcode(*packet, currentTime))
|
||||
{
|
||||
sScriptMgr->OnPacketReceive(this, *packet);
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnPacketReceive(this, *packet))
|
||||
if (!sScriptMgr->CanPacketReceive(this, *packet))
|
||||
{
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
opHandle->Call(this, *packet);
|
||||
LogUnprocessedTail(packet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user