summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-21 20:25:56 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-21 20:25:56 +0300
commitbde5efd020baf48312eb093f120d2b9094d2f994 (patch)
treeaae42f2c5e85f59b0b704a99520bff5b3d9ba7a4
parent70b8dc1a827e878ef899cf9824362706e86f30e5 (diff)
downloadplus-bde5efd020baf48312eb093f120d2b9094d2f994.tar.gz
plus-bde5efd020baf48312eb093f120d2b9094d2f994.tar.bz2
plus-bde5efd020baf48312eb093f120d2b9094d2f994.tar.xz
plus-bde5efd020baf48312eb093f120d2b9094d2f994.zip
Add packet SMSG_WALK_ERROR 0x0b21.
-rw-r--r--src/being/localplayer.cpp6
-rw-r--r--src/being/localplayer.h4
-rw-r--r--src/net/eathena/packetsin.inc1
-rw-r--r--src/net/eathena/playerrecv.cpp9
-rw-r--r--src/net/eathena/playerrecv.h1
5 files changed, 20 insertions, 1 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 01e4466bf..9f8ad71c4 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -2117,7 +2117,6 @@ void LocalPlayer::updateCoords()
break;
}
}
-
if (mDrawPath && mShowNavigePath)
{
tmpLayer->clean();
@@ -2586,6 +2585,11 @@ void LocalPlayer::updateNavigateList()
}
}
+void LocalPlayer::failMove(const int x A_UNUSED,
+ const int y A_UNUSED)
+{
+}
+
void LocalPlayer::waitFor(const std::string &nick)
{
mWaitFor = nick;
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index b09e63828..5fa17b7f8 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -425,6 +425,9 @@ class LocalPlayer final : public Being,
void freezeMoving(const int timeWaitTicks);
+ void failMove(const int x,
+ const int y);
+
protected:
void updateCoords() override final;
@@ -523,6 +526,7 @@ class LocalPlayer final : public Being,
bool mShowNavigePath;
bool mAllowRename;
bool mFreezed;
+ bool mAllowNextStep;
};
extern LocalPlayer *localPlayer;
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 8e847a1cd..49d5a3e5d 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -808,6 +808,7 @@ if (serverVersion > 0)
packet(SMSG_SKILL_CASTING2, 0x0b1e, -1, &BeingRecv::processSkillCasting2, 0);
packet(SMSG_PLAYER_ADD_SKILL2, 0x0b1f, -1, &SkillRecv::processSkillAdd2, 0);
packet(SMSG_PLAYER_UPDATE_SKILL2, 0x0b20, -1, &SkillRecv::processSkillUpdate2, 0);
+ packet(SMSG_WALK_ERROR, 0x0b21, 10, &PlayerRecv::processWalkError, 0);
// char server
packet(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0);
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index eb958a764..6f9f5a43c 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -220,6 +220,15 @@ void PlayerRecv::processWalkResponse(Net::MessageIn &msg)
BLOCK_END("PlayerRecv::processWalkResponse")
}
+void PlayerRecv::processWalkError(Net::MessageIn &msg)
+{
+ msg.readInt32("tick");
+ const int x = msg.readInt16("x");
+ const int y = msg.readInt16("y");
+ if (localPlayer)
+ localPlayer->failMove(x, y);
+}
+
void PlayerRecv::processPvpInfo(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
diff --git a/src/net/eathena/playerrecv.h b/src/net/eathena/playerrecv.h
index b768edd0d..d0ce72b74 100644
--- a/src/net/eathena/playerrecv.h
+++ b/src/net/eathena/playerrecv.h
@@ -40,6 +40,7 @@ namespace EAthena
void processPlayerHeal(Net::MessageIn &msg);
void processPlayerSkillMessage(Net::MessageIn &msg);
void processWalkResponse(Net::MessageIn &msg);
+ void processWalkError(Net::MessageIn &msg);
void processNotifyMapInfo(Net::MessageIn &msg);
void processPlayerFameBlacksmith(Net::MessageIn &msg);
void processPlayerFameAlchemist(Net::MessageIn &msg);