summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-20 00:15:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-20 00:15:59 +0300
commit16121e499c734c00c714abd0998c24f4845329c3 (patch)
tree8c4455653f645d6e4d2fa5581f3134497a2b0247 /src
parent022bc6fb67b8d5bda5e3a3225071ffdabd179b62 (diff)
downloadmanaverse-16121e499c734c00c714abd0998c24f4845329c3.tar.gz
manaverse-16121e499c734c00c714abd0998c24f4845329c3.tar.bz2
manaverse-16121e499c734c00c714abd0998c24f4845329c3.tar.xz
manaverse-16121e499c734c00c714abd0998c24f4845329c3.zip
eathena: add packet CMSG_SET_STATUS.
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp8
-rw-r--r--src/net/eathena/playerhandler.cpp5
-rw-r--r--src/net/eathena/protocol.h2
-rw-r--r--src/net/eathena/serverfeatures.cpp2
4 files changed, 12 insertions, 5 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 02c63bf97..761a17d86 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -3260,9 +3260,11 @@ void LocalPlayer::updateStatus() const
if (serverFeatures->havePlayerStatusUpdate() && mEnableAdvert)
{
uint8_t status = 0;
- if (mTradebot && shopWindow && !shopWindow->isShopEmpty())
- status |= BeingFlag::SHOP;
-
+ if (!serverFeatures->haveVending())
+ {
+ if (mTradebot && shopWindow && !shopWindow->isShopEmpty())
+ status |= BeingFlag::SHOP;
+ }
if (settings.awayMode || settings.pseudoAwayMode)
status |= BeingFlag::AWAY;
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 601dab1c6..03dbb2cf5 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -251,8 +251,11 @@ void PlayerHandler::requestOnlineList() const
{
}
-void PlayerHandler::updateStatus(const uint8_t status A_UNUSED) const
+void PlayerHandler::updateStatus(const uint8_t status) const
{
+ createOutPacket(CMSG_SET_STATUS);
+ outMsg.writeInt8(status, "status");
+ outMsg.writeInt8(0, "unused");
}
void PlayerHandler::setShortcut(const int idx,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index a02495b19..73357f562 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -573,4 +573,6 @@
#define CMSG_SEARCHSTORE_CLOSE 0x083b
#define CMSG_SEARCHSTORE_CLICK 0x0835
+#define CMSG_SET_STATUS 0x0b0e
+
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index b9a752946..182c97186 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -67,7 +67,7 @@ bool ServerFeatures::haveLangTab() const
bool ServerFeatures::havePlayerStatusUpdate() const
{
- return false;
+ return serverVersion >= 5;
}
bool ServerFeatures::haveBrokenPlayerAttackDistance() const