summaryrefslogtreecommitdiff
path: root/src/net/tmwa/npchandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-30 14:37:49 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-01 17:51:01 +0300
commitc01aec243610016c2cd5e4211fee484627bc69ea (patch)
tree46a0b704701a9c1229fafa5e7ed7117002fc1579 /src/net/tmwa/npchandler.cpp
parent8321043b76660235a5ebbfbb8f43504f43c1af8b (diff)
downloadmanaplus-c01aec243610016c2cd5e4211fee484627bc69ea.tar.gz
manaplus-c01aec243610016c2cd5e4211fee484627bc69ea.tar.bz2
manaplus-c01aec243610016c2cd5e4211fee484627bc69ea.tar.xz
manaplus-c01aec243610016c2cd5e4211fee484627bc69ea.zip
Add npc avatars for evol server.
Change protocol version to 6.
Diffstat (limited to 'src/net/tmwa/npchandler.cpp')
-rw-r--r--src/net/tmwa/npchandler.cpp19
1 files changed, 17 insertions, 2 deletions
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;