summaryrefslogtreecommitdiff
path: root/src/npc.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/npc.cpp
parenta30bb2e92405fb379db298f2996e1c0ecd3f4bbd (diff)
downloadmana-client-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.gz
mana-client-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.bz2
mana-client-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.tar.xz
mana-client-430bbe292eb51b3f3bb7b356d8b218b28bed0ff4.zip
Converted NPC code to new server.
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index 2d291104..f65c8d19 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -27,6 +27,8 @@
#include "graphics.h"
#include "gui/gui.h"
+#include "net/messageout.h"
+#include "net/gameserver/player.h"
NPC *current_npc = 0;
@@ -57,34 +59,20 @@ NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
void
NPC::talk()
{
- // XXX Convert for new server
- /*
- MessageOut outMsg(CMSG_NPC_TALK);
- outMsg.writeLong(mId);
- outMsg.writeByte(0);
+ Net::GameServer::Player::talkToNPC(mId, true);
current_npc = this;
- */
}
void
NPC::nextDialog()
{
- // XXX Convert for new server
- /*
- MessageOut outMsg(CMSG_NPC_NEXT_REQUEST);
- outMsg.writeLong(mId);
- */
+ Net::GameServer::Player::talkToNPC(mId, false);
}
void
-NPC::dialogChoice(char choice)
+NPC::dialogChoice(int choice)
{
- // XXX Convert for new server
- /*
- MessageOut outMsg(CMSG_NPC_LIST_CHOICE);
- outMsg.writeLong(mId);
- outMsg.writeByte(choice);
- */
+ Net::GameServer::Player::selectFromNPC(mId, choice);
}
/*