summaryrefslogtreecommitdiff
path: root/src/net/gameserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/gameserver')
-rw-r--r--src/net/gameserver/player.cpp17
-rw-r--r--src/net/gameserver/player.h4
2 files changed, 19 insertions, 2 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);
+}
diff --git a/src/net/gameserver/player.h b/src/net/gameserver/player.h
index 7cc45486..cb6927ba 100644
--- a/src/net/gameserver/player.h
+++ b/src/net/gameserver/player.h
@@ -39,8 +39,10 @@ namespace Net
void pickUp(int x, int y);
void drop(int slot, int amount);
void equip(int slot);
- void attack(unsigned char direction);
+ void attack(int direction);
void changeAction(Being::Action action);
+ void talkToNPC(int id, bool restart);
+ void selectFromNPC(int id, int choice);
}
}
}