summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-07-25 18:04:38 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-07-25 18:04:38 +0000
commitc7e7b62aa94bf295ca1dc556762ad6070221e0cd (patch)
tree04f827df0df64a80e04a4115986609486d715237 /src/npc.cpp
parentc0c8775271679ac4904bc0bc02a74d28fc75efd0 (diff)
downloadmana-client-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.gz
mana-client-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.bz2
mana-client-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.xz
mana-client-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.zip
Switched client to use enet and modified login sequence to work with the new protocol from tmwserv.
Diffstat (limited to 'src/npc.cpp')
-rw-r--r--src/npc.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index 354322a3..54205ad3 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -46,28 +46,28 @@ NPC::getType() const
void
NPC::talk()
{
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_NPC_TALK);
- outMsg.writeInt32(mId);
- outMsg.writeInt8(0);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_NPC_TALK);
+ outMsg.writeLong(mId);
+ outMsg.writeByte(0);
current_npc = this;
}
void
NPC::nextDialog()
{
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_NPC_NEXT_REQUEST);
- outMsg.writeInt32(mId);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_NPC_NEXT_REQUEST);
+ outMsg.writeLong(mId);
}
void
NPC::dialogChoice(char choice)
{
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_NPC_LIST_CHOICE);
- outMsg.writeInt32(mId);
- outMsg.writeInt8(choice);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_NPC_LIST_CHOICE);
+ outMsg.writeLong(mId);
+ outMsg.writeByte(choice);
}
/*
@@ -77,17 +77,17 @@ NPC::dialogChoice(char choice)
void
NPC::buy()
{
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_NPC_BUY_SELL_REQUEST);
- outMsg.writeInt32(mId);
- outMsg.writeInt8(0);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_NPC_BUY_SELL_REQUEST);
+ outMsg.writeLong(mId);
+ outMsg.writeByte(0);
}
void
NPC::sell()
{
- MessageOut outMsg(mNetwork);
- outMsg.writeInt16(CMSG_NPC_BUY_SELL_REQUEST);
- outMsg.writeInt32(mId);
- outMsg.writeInt8(1);
+ MessageOut outMsg;
+ outMsg.writeShort(CMSG_NPC_BUY_SELL_REQUEST);
+ outMsg.writeLong(mId);
+ outMsg.writeByte(1);
}