summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/network.h4
-rw-r--r--src/net/tmwa/npchandler.cpp19
2 files changed, 19 insertions, 4 deletions
diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h
index 2dc91e509..03f24839b 100644
--- a/src/net/tmwa/network.h
+++ b/src/net/tmwa/network.h
@@ -39,8 +39,8 @@
* Protocol version, reported to the eAthena char and mapserver who can adjust
* the protocol accordingly.
*/
-#define CLIENT_PROTOCOL_VERSION 5
-#define CLIENT_TMW_PROTOCOL_VERSION 1
+#define CLIENT_PROTOCOL_VERSION 6
+#define CLIENT_TMW_PROTOCOL_VERSION 1
namespace TmwAthena
{
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index ec3ef48b8..be58f0bc5 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -290,10 +290,25 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg, int npcId)
viewport->moveCameraRelative(x, y);
}
break;
- case 5:
+ case 5: // close dialog
closeDialog(npcId);
break;
-
+ case 6: // show avatar
+ if (mDialog)
+ mDialog->showAvatar(msg.readInt32()); // avatar id
+ break;
+ case 7: // set avatar direction
+ if (mDialog)
+ {
+ mDialog->setAvatarDirection(
+ Net::MessageIn::fromServerDirection(
+ msg.readInt32())); // direction
+ }
+ break;
+ case 8: // set avatar action
+ if (mDialog)
+ mDialog->setAvatarAction(msg.readInt32()); // direction
+ break;
default:
logger->log("unknown npc command: %d", cmd);
break;