diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-11-03 23:15:47 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-11-03 23:27:30 +0100 |
commit | b7f58023d6596d96c36b904c02a81e0b52fc28f1 (patch) | |
tree | 7a10a72c7e8fa9ca99e98a913704c76fe5bfe5f9 /src/scripting | |
parent | 0de400f87b7ecc4bcbdbd1f3dfd552c60c5e927b (diff) | |
download | manaserv-b7f58023d6596d96c36b904c02a81e0b52fc28f1.tar.gz manaserv-b7f58023d6596d96c36b904c02a81e0b52fc28f1.tar.bz2 manaserv-b7f58023d6596d96c36b904c02a81e0b52fc28f1.tar.xz manaserv-b7f58023d6596d96c36b904c02a81e0b52fc28f1.zip |
Renamed write{Byte,Short,Long} to writeInt{8,16,32}
Mainly for consistency with the client, and the general consensus was
that these numbered versions were clearer.
Diffstat (limited to 'src/scripting')
-rw-r--r-- | src/scripting/lua.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index c186be8b..410b1cbf 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -77,7 +77,7 @@ static int npc_message(lua_State *s) return 0; } MessageOut msg(GPMSG_NPC_MESSAGE); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); msg.writeString(std::string(m), l); gameHandler->sendTo(q, msg); return 1; @@ -97,7 +97,7 @@ static int npc_choice(lua_State *s) return 0; } MessageOut msg(GPMSG_NPC_CHOICE); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); for (int i = 3, i_end = lua_gettop(s); i <= i_end; ++i) { if (lua_isstring(s, i)) @@ -144,7 +144,7 @@ static int npc_ask_integer(lua_State *s) return 0; } MessageOut msg(GPMSG_NPC_NUMBER); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); int min = lua_tointeger(s, 3); int max = lua_tointeger(s, 4); @@ -152,9 +152,9 @@ static int npc_ask_integer(lua_State *s) if (lua_gettop(s) == 5) default_num = lua_tointeger(s, 5); - msg.writeLong(min); - msg.writeLong(max); - msg.writeLong(default_num); + msg.writeInt32(min); + msg.writeInt32(max); + msg.writeInt32(default_num); gameHandler->sendTo(q, msg); return 0; @@ -174,7 +174,7 @@ static int npc_ask_string(lua_State *s) return 0; } MessageOut msg(GPMSG_NPC_STRING); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); gameHandler->sendTo(q, msg); return 0; @@ -222,7 +222,7 @@ static int npc_end(lua_State *s) } MessageOut msg(GPMSG_NPC_CLOSE); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); gameHandler->sendTo(q, msg); return 0; } @@ -243,7 +243,7 @@ static int npc_post(lua_State *s) } MessageOut msg(GPMSG_NPC_POST); - msg.writeShort(p->getPublicID()); + msg.writeInt16(p->getPublicID()); gameHandler->sendTo(q, msg); return 0; |