summaryrefslogtreecommitdiff
path: root/src/npc.cpp
diff options
context:
space:
mode:
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);
}