Core/Misc: Minimize differences between branches in WorldSession::Update

This commit removes OnUnknownPacketReceive script hook - it could never be fired anyway at that point
This commit is contained in:
Shauren
2016-03-13 00:12:09 +01:00
parent 811b29c8e1
commit 5a6db6e84d
3 changed files with 83 additions and 110 deletions

View File

@@ -229,10 +229,6 @@ class ServerScript : public ScriptObject
// Called when a (valid) packet is received by a client. The packet object is a copy of the original packet, so
// reading and modifying it is safe. Make sure to check WorldSession pointer before usage, it might be null in case of auth packets
virtual void OnPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { }
// Called when an invalid (unknown opcode) packet is received by a client. The packet is a reference to the orignal
// packet; not a copy. This allows you to actually handle unknown packets (for whatever purpose).
virtual void OnUnknownPacketReceive(WorldSession* /*session*/, WorldPacket& /*packet*/) { }
};
class WorldScript : public ScriptObject
@@ -886,7 +882,6 @@ class ScriptMgr
void OnSocketClose(std::shared_ptr<WorldSocket> socket);
void OnPacketReceive(WorldSession* session, WorldPacket const& packet);
void OnPacketSend(WorldSession* session, WorldPacket const& packet);
void OnUnknownPacketReceive(WorldSession* session, WorldPacket const& packet);
public: /* WorldScript */