aboutsummaryrefslogtreecommitdiff
path: root/src/server/ipc
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-10-06 00:30:47 +0200
committerShauren <shauren.trinity@gmail.com>2015-10-06 00:30:47 +0200
commit63def8aa3291d0a6e5f83b289ad12c4c8a3cebd9 (patch)
treecfb5fe68515b5421c0719430f3689733bde20429 /src/server/ipc
parent2c828a47a5aa03c850f0a0fdf7c2100771f69ef8 (diff)
Core/Battle.net:
* Changed packet structures to mirror client names * Simplified ToString Building * Removed deprecated structures World: Cleaned up duplicate realm info 'realm' and 'realmHandle' variables (realmHandle was removed, that data is fully contained in realm)
Diffstat (limited to 'src/server/ipc')
-rw-r--r--src/server/ipc/CMakeLists.txt3
-rw-r--r--src/server/ipc/Commands.cpp20
-rw-r--r--src/server/ipc/Commands.h53
3 files changed, 37 insertions, 39 deletions
diff --git a/src/server/ipc/CMakeLists.txt b/src/server/ipc/CMakeLists.txt
index e9f38f20c17..7f4541ab91b 100644
--- a/src/server/ipc/CMakeLists.txt
+++ b/src/server/ipc/CMakeLists.txt
@@ -19,7 +19,8 @@ set(ipc_SRCS
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/dep/zmqpp
- ${CMAKE_SOURCE_DIR}/src/common/
+ ${CMAKE_SOURCE_DIR}/src/common
+ ${CMAKE_SOURCE_DIR}/src/server/shared
${ZMQ_INCLUDE_DIR}
)
diff --git a/src/server/ipc/Commands.cpp b/src/server/ipc/Commands.cpp
index e08943030f7..777bf3932ae 100644
--- a/src/server/ipc/Commands.cpp
+++ b/src/server/ipc/Commands.cpp
@@ -18,7 +18,7 @@
#include "Commands.h"
#include <zmqpp/message.hpp>
-zmqpp::message& operator>>(zmqpp::message& msg, IPCHeader& header)
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::Header& header)
{
msg >> header.Channel;
msg >> header.Command;
@@ -28,19 +28,19 @@ zmqpp::message& operator>>(zmqpp::message& msg, IPCHeader& header)
zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::RealmHandle& realm)
{
msg >> realm.Region;
- msg >> realm.Battlegroup;
- msg >> realm.Index;
+ msg >> realm.Site;
+ msg >> realm.Realm;
return msg;
}
-zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::Header& header)
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::BattlenetComm::Header& header)
{
msg >> header.Ipc;
msg >> header.Realm;
return msg;
}
-zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::ToonHandle& toonHandle)
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::BattlenetComm::ToonHandle& toonHandle)
{
msg >> toonHandle.AccountId;
msg >> toonHandle.GameAccountId;
@@ -49,7 +49,7 @@ zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::ToonHandle& toonHandl
return msg;
}
-zmqpp::message& operator<<(zmqpp::message& msg, IPCHeader const& header)
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::Header const& header)
{
msg << header.Channel;
msg << header.Command;
@@ -59,19 +59,19 @@ zmqpp::message& operator<<(zmqpp::message& msg, IPCHeader const& header)
zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::RealmHandle const& realm)
{
msg << realm.Region;
- msg << realm.Battlegroup;
- msg << realm.Index;
+ msg << realm.Site;
+ msg << realm.Realm;
return msg;
}
-zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::Header const& header)
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::BattlenetComm::Header const& header)
{
msg << header.Ipc;
msg << header.Realm;
return msg;
}
-zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::ToonHandle const& toonHandle)
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::BattlenetComm::ToonHandle const& toonHandle)
{
msg << toonHandle.AccountId;
msg << toonHandle.GameAccountId;
diff --git a/src/server/ipc/Commands.h b/src/server/ipc/Commands.h
index b594090b0f8..174b5b10795 100644
--- a/src/server/ipc/Commands.h
+++ b/src/server/ipc/Commands.h
@@ -19,6 +19,7 @@
#define _COMMANDS_H
#include "Define.h"
+#include "Realm/Realm.h"
#include <string>
enum Channels
@@ -35,34 +36,30 @@ enum BnetCommands
IPC_BNET_MAX_COMMAND
};
-struct IPCHeader
+namespace IPC
{
- uint8 Channel;
- uint8 Command;
-};
-
-namespace Battlenet
-{
- struct RealmHandle
- {
- uint8 Region;
- uint8 Battlegroup;
- uint32 Index;
- };
-
struct Header
{
- IPCHeader Ipc;
- RealmHandle Realm;
+ uint8 Channel;
+ uint8 Command;
};
- struct ToonHandle
+ namespace BattlenetComm
{
- uint32 AccountId;
- uint32 GameAccountId;
- uint64 Guid;
- std::string Name;
- };
+ struct Header
+ {
+ IPC::Header Ipc;
+ Battlenet::RealmHandle Realm;
+ };
+
+ struct ToonHandle
+ {
+ uint32 AccountId;
+ uint32 GameAccountId;
+ uint64 Guid;
+ std::string Name;
+ };
+ }
}
namespace zmqpp
@@ -70,14 +67,14 @@ namespace zmqpp
class message;
}
-zmqpp::message& operator>>(zmqpp::message& msg, IPCHeader& header);
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::Header& header);
zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::RealmHandle& realm);
-zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::Header& header);
-zmqpp::message& operator>>(zmqpp::message& msg, Battlenet::ToonHandle& toonHandle);
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::BattlenetComm::Header& header);
+zmqpp::message& operator>>(zmqpp::message& msg, IPC::BattlenetComm::ToonHandle& toonHandle);
-zmqpp::message& operator<<(zmqpp::message& msg, IPCHeader const& header);
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::Header const& header);
zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::RealmHandle const& realm);
-zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::Header const& header);
-zmqpp::message& operator<<(zmqpp::message& msg, Battlenet::ToonHandle const& toonHandle);
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::BattlenetComm::Header const& header);
+zmqpp::message& operator<<(zmqpp::message& msg, IPC::BattlenetComm::ToonHandle const& toonHandle);
#endif // _COMMANDS_H