summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/npchandler.cpp16
-rw-r--r--src/net/eathena/npchandler.h3
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 19 insertions, 3 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 62b6b09e7..5ae4c4084 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -52,6 +52,7 @@ NpcHandler::NpcHandler() :
SMSG_NPC_STR_INPUT,
SMSG_NPC_CUTIN,
SMSG_NPC_VIEWPOINT,
+ SMSG_NPC_SHOW_PROGRESS_BAR,
0
};
handledMessages = _messages;
@@ -96,6 +97,10 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
processNpcViewPoint(msg);
break;
+ case SMSG_NPC_SHOW_PROGRESS_BAR:
+ processNpcShowProgressBar(msg);
+ break;
+
default:
break;
}
@@ -240,13 +245,13 @@ int NpcHandler::getNpc(Net::MessageIn &msg)
return npcId;
}
-void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED)
+void NpcHandler::processNpcCutin(Net::MessageIn &msg)
{
msg.readString(64); // image name
msg.readUInt8(); // type
}
-void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED)
+void NpcHandler::processNpcViewPoint(Net::MessageIn &msg)
{
// +++ probably need add nav point and start moving to it
msg.readInt32("npc id");
@@ -259,4 +264,11 @@ void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED)
msg.readInt32("color");
}
+void NpcHandler::processNpcShowProgressBar(Net::MessageIn &msg) const
+{
+ // +++ probably need show progress bar in npc dialog
+ msg.readInt32("color");
+ msg.readInt32("seconds");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index eadba2a13..90f9627c9 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -67,9 +67,12 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
int getNpc(Net::MessageIn &msg) override final;
+ protected:
static void processNpcCutin(Net::MessageIn &msg);
static void processNpcViewPoint(Net::MessageIn &msg);
+
+ void processNpcShowProgressBar(Net::MessageIn &msg) const;
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 6605600b7..8eb80105f 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -101,7 +101,7 @@ int16_t packet_lengths[] =
0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//0 1 2 3 4 5 6 7 8 9 a b c d e f
//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// #0x0300
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 27e6d250d..9b1bff51e 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -123,6 +123,7 @@
#define SMSG_NPC_SELL_RESPONSE 0x00cb
#define SMSG_NPC_INT_INPUT 0x0142 /**< Integer input */
#define SMSG_NPC_STR_INPUT 0x01d4 /**< String input */
+#define SMSG_NPC_SHOW_PROGRESS_BAR 0x02f0
#define SMSG_PLAYER_CHAT 0x008e /**< Player talks */
#define SMSG_WHISPER 0x0097 /**< Whisper Recieved */
#define SMSG_WHISPER_RESPONSE 0x09df