summaryrefslogtreecommitdiff
path: root/src/net/eathena/battlegroundhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-23 18:13:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-23 18:13:34 +0300
commit919097c1635b11a925c452037dbfc901b56ed94a (patch)
treeb32b3575577e6b00c466a5f708da57c03d6dc8d8 /src/net/eathena/battlegroundhandler.cpp
parent5beba12b38c13c222322af111e17ed1aada62daf (diff)
downloadmv-919097c1635b11a925c452037dbfc901b56ed94a.tar.gz
mv-919097c1635b11a925c452037dbfc901b56ed94a.tar.bz2
mv-919097c1635b11a925c452037dbfc901b56ed94a.tar.xz
mv-919097c1635b11a925c452037dbfc901b56ed94a.zip
Move receive code from battlegroundhandler into separate file.
Diffstat (limited to 'src/net/eathena/battlegroundhandler.cpp')
-rw-r--r--src/net/eathena/battlegroundhandler.cpp76
1 files changed, 9 insertions, 67 deletions
diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp
index 3a59b495e..daa7a1bb2 100644
--- a/src/net/eathena/battlegroundhandler.cpp
+++ b/src/net/eathena/battlegroundhandler.cpp
@@ -22,6 +22,7 @@
#include "logger.h"
+#include "net/eathena/battleground.h"
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -56,35 +57,35 @@ void BattleGroundHandler::handleMessage(Net::MessageIn &msg)
switch (msg.getId())
{
case SMSG_BATTLE_EMBLEM:
- processBattleEmblem(msg);
+ BattleGround::processBattleEmblem(msg);
break;
case SMSG_BATTLE_UPDATE_SCORE:
- processBattleUpdateScore(msg);
+ BattleGround::processBattleUpdateScore(msg);
break;
case SMSG_BATTLE_UPDATE_COORDS:
- processBattleUpdateCoords(msg);
+ BattleGround::processBattleUpdateCoords(msg);
break;
case SMSG_BATTLE_PLAY:
- processBattlePlay(msg);
+ BattleGround::processBattlePlay(msg);
break;
case SMSG_BATTLE_QUEUE_ACK:
- processBattleQueueAck(msg);
+ BattleGround::processBattleQueueAck(msg);
break;
case SMSG_BATTLE_BEGINS:
- processBattleBegins(msg);
+ BattleGround::processBattleBegins(msg);
break;
case SMSG_BATTLE_NOTICE_DELETE:
- processBattleNoticeDelete(msg);
+ BattleGround::processBattleNoticeDelete(msg);
break;
case SMSG_BATTLE_JOINED:
- processBattleJoined(msg);
+ BattleGround::processBattleJoined(msg);
break;
default:
@@ -92,65 +93,6 @@ void BattleGroundHandler::handleMessage(Net::MessageIn &msg)
}
}
-void BattleGroundHandler::processBattleEmblem(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readBeingId("account id");
- msg.readString(24, "name");
- msg.readInt16("camp");
-}
-
-void BattleGroundHandler::processBattleUpdateScore(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readInt16("camp a points");
- msg.readInt16("camp b points");
-}
-
-void BattleGroundHandler::processBattleUpdateCoords(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readBeingId("account id");
- msg.readString(24, "name");
- msg.readInt16("class");
- msg.readInt16("x");
- msg.readInt16("y");
-}
-
-void BattleGroundHandler::processBattlePlay(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readString(24, "battle ground name");
-}
-
-void BattleGroundHandler::processBattleQueueAck(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readUInt8("type");
- msg.readString(24, "bg name");
-}
-
-void BattleGroundHandler::processBattleBegins(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readString(24, "bg name");
- msg.readString(24, "game name");
-}
-
-void BattleGroundHandler::processBattleNoticeDelete(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readUInt8("type");
- msg.readString(24, "bg name");
-}
-
-void BattleGroundHandler::processBattleJoined(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readString(24, "name");
- msg.readInt32("position");
-}
-
void BattleGroundHandler::registerBg(const BattleGroundTypeT &type,
const std::string &name) const
{