summaryrefslogtreecommitdiff
path: root/src/net/gameserver/player.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-23 16:51:13 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-23 16:51:13 +0000
commit430bbe292eb51b3f3bb7b356d8b218b28bed0ff4 (patch)
treeafe53ed4e2978408a0082ec974f0b9dfab32a00c /src/net/gameserver/player.cpp
parenta30bb2e92405fb379db298f2996e1c0ecd3f4bbd (diff)
downloadmana-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.gz
mana-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.bz2
mana-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.xz
mana-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.zip
Converted NPC code to new server.
Diffstat (limited to 'src/net/gameserver/player.cpp')
-rw-r--r--src/net/gameserver/player.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net/gameserver/player.cpp b/src/net/gameserver/player.cpp
index 9af0c238..daf76c3e 100644
--- a/src/net/gameserver/player.cpp
+++ b/src/net/gameserver/player.cpp
@@ -67,7 +67,7 @@ void Net::GameServer::Player::equip(int slot)
Net::GameServer::connection->send(msg);
}
-void Net::GameServer::Player::attack(unsigned char direction)
+void Net::GameServer::Player::attack(int direction)
{
MessageOut msg(PGMSG_ATTACK);
msg.writeByte(direction);
@@ -80,3 +80,18 @@ void Net::GameServer::Player::changeAction(Being::Action action)
msg.writeByte(action);
Net::GameServer::connection->send(msg);
}
+
+void Net::GameServer::Player::talkToNPC(int id, bool restart)
+{
+ MessageOut msg(restart ? PGMSG_NPC_TALK : PGMSG_NPC_TALK_NEXT);
+ msg.writeShort(id);
+ Net::GameServer::connection->send(msg);
+}
+
+void Net::GameServer::Player::selectFromNPC(int id, int choice)
+{
+ MessageOut msg(PGMSG_NPC_SELECT);
+ msg.writeShort(id);
+ msg.writeByte(choice);
+ Net::GameServer::connection->send(msg);
+}