From c7e7b62aa94bf295ca1dc556762ad6070221e0cd Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Tue, 25 Jul 2006 18:04:38 +0000 Subject: Switched client to use enet and modified login sequence to work with the new protocol from tmwserv. --- src/npc.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/npc.cpp') 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); } -- cgit v1.2.3-70-g09d2