diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-27 07:23:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-27 07:23:36 +0300 |
commit | 03d1705dfafccdcd5ed613a2cca699e80978f747 (patch) | |
tree | 5484e6f63b50c5a6d1a3a4f7a9865b89ec46dc8c /src/net/eathena/npchandler.cpp | |
parent | ae865d08a0d913e5a5a8e843f4f3be042fca15af (diff) | |
download | plus-03d1705dfafccdcd5ed613a2cca699e80978f747.tar.gz plus-03d1705dfafccdcd5ed613a2cca699e80978f747.tar.bz2 plus-03d1705dfafccdcd5ed613a2cca699e80978f747.tar.xz plus-03d1705dfafccdcd5ed613a2cca699e80978f747.zip |
Add new chanaged packet where item id with size int32 was introduced.
Also fix some other packets for support int32 ints.
Diffstat (limited to 'src/net/eathena/npchandler.cpp')
-rw-r--r-- | src/net/eathena/npchandler.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index eb4108bb2..f8bcea2d7 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -279,10 +279,10 @@ void NpcHandler::produceMix(const int nameId, const int materialId3) const { createOutPacket(CMSG_NPC_PRODUCE_MIX); - outMsg.writeInt16(CAST_S16(nameId), "name id"); - outMsg.writeInt16(CAST_S16(materialId1), "material 1"); - outMsg.writeInt16(CAST_S16(materialId2), "material 2"); - outMsg.writeInt16(CAST_S16(materialId3), "material 3"); + outMsg.writeItemId(nameId, "item id"); + outMsg.writeItemId(materialId1, "material 1"); + outMsg.writeItemId(materialId2, "material 2"); + outMsg.writeItemId(materialId3, "material 3"); } void NpcHandler::cooking(const CookingTypeT type, @@ -290,13 +290,18 @@ void NpcHandler::cooking(const CookingTypeT type, { createOutPacket(CMSG_NPC_COOKING); outMsg.writeInt16(CAST_S16(type), "type"); - outMsg.writeInt16(CAST_S16(nameId), "name id"); + outMsg.writeItemId(nameId, "item id"); } void NpcHandler::repair(const int index) const { createOutPacket(CMSG_NPC_REPAIR); outMsg.writeInt16(CAST_S16(index), "index"); + // unused fields. + outMsg.writeItemId(0, "item id"); + outMsg.writeInt8(0, "refine"); + for (int f = 0; f < maxCards; f ++) + outMsg.writeItemId(0, "card"); } void NpcHandler::refine(const int index) const @@ -314,7 +319,7 @@ void NpcHandler::identify(const int index) const void NpcHandler::selectArrow(const int nameId) const { createOutPacket(CMSG_NPC_SELECT_ARROW); - outMsg.writeInt16(CAST_S16(nameId), "name id"); + outMsg.writeItemId(nameId, "item id"); } void NpcHandler::selectAutoSpell(const int skillId) const |