74 outMsg.writeBeingId(being->
getId(),
"npc id");
75 outMsg.writeInt8(0,
"unused");
82 outMsg.writeBeingId(npcId,
"npc id");
88 outMsg.writeBeingId(npcId,
"npc id");
94 if (dialog !=
nullptr)
103 const unsigned char value)
const
106 outMsg.writeBeingId(npcId,
"npc id");
107 outMsg.writeInt8(value,
"value");
111 const int value)
const
114 outMsg.writeBeingId(npcId,
"npc id");
115 outMsg.writeInt32(value,
"value");
119 const std::string &value)
const
124 outMsg.writeInt16(
CAST_S16(value.length() + 8),
"len");
125 outMsg.writeBeingId(npcId,
"npc id");
126 outMsg.writeString(value,
CAST_S32(value.length()),
"value");
130 outMsg.writeInt16(
CAST_S16(value.length() + 9),
"len");
131 outMsg.writeBeingId(npcId,
"npc id");
132 outMsg.writeString(value,
CAST_S32(value.length()),
"value");
133 outMsg.writeInt8(0,
"null byte");
139 if (being ==
nullptr)
142 outMsg.writeBeingId(being->
getId(),
"npc id");
143 outMsg.writeInt8(0,
"action");
150 outMsg.writeBeingId(beingId,
"npc id");
151 outMsg.writeInt8(0,
"action");
158 outMsg.writeBeingId(beingId,
"npc id");
159 outMsg.writeInt8(1,
"action");
165 const int amount)
const
168 outMsg.writeInt16(8,
"len");
169 outMsg.writeInt16(
CAST_S16(amount),
"amount");
170 outMsg.writeItemId(itemId,
"item id");
178 FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items)
183 if (usedQuantity == 0)
202 outMsg.writeInt16(
CAST_S16(4 + pairSize * cnt),
"len");
203 FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items)
207 if (usedQuantity == 0)
217 for (
int f = 0; f < usedQuantity; f ++)
219 outMsg.writeInt16(
CAST_S16(1),
"amount");
220 outMsg.writeItemId(item->
getId(),
226 outMsg.writeInt16(
CAST_S16(usedQuantity),
"amount");
227 outMsg.writeItemId(item->
getId(),
"item id");
233 const int itemId,
const int amount)
const
236 outMsg.writeInt16(8,
"len");
239 outMsg.writeInt16(
CAST_S16(amount),
"amount");
244 const int pairSize = 4;
247 FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items)
251 if (usedQuantity == 0)
257 outMsg.writeInt16(
CAST_S16(4 + pairSize * cnt),
"len");
258 FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items)
262 if (usedQuantity == 0)
269 outMsg.writeInt16(
CAST_S16(usedQuantity),
"amount");
279 const int materialId1,
280 const int materialId2,
281 const int materialId3)
const
284 outMsg.writeItemId(nameId,
"item id");
285 outMsg.writeItemId(materialId1,
"material 1");
286 outMsg.writeItemId(materialId2,
"material 2");
287 outMsg.writeItemId(materialId3,
"material 3");
291 const int nameId)
const
294 outMsg.writeInt16(
CAST_S16(type),
"type");
295 outMsg.writeItemId(nameId,
"item id");
301 outMsg.writeInt16(
CAST_S16(index),
"index");
303 outMsg.writeItemId(0,
"item id");
304 outMsg.writeInt8(0,
"refine");
306 outMsg.writeItemId(0,
"card");
312 outMsg.writeInt32(index,
"index");
318 outMsg.writeInt16(
CAST_S16(index),
"index");
324 outMsg.writeItemId(nameId,
"item id");
330 outMsg.writeInt32(
CAST_S16(skillId),
"skill id");
336 const BeingId npcId =
msg.readBeingId(
"npc id");
376 const int itemId)
const
385 outMsg.writeString(mapName, 16,
"map name");
386 outMsg.writeItemId(itemId,
"item");
const BeingTypeId BeingTypeId_zero
BeingTypeId getSubType() const
void integerInput(const BeingId npcId, const int value) const
void completeProgressBar() const
void buy(const Being *const being) const
void buyItems(std::vector< ShopItem * > &items) const
void stringInput(const BeingId npcId, const std::string &value) const
void repair(const int index) const
void buyItem(const BeingId beingId, const int itemId, const ItemColor color, const int amount) const
BeingId getNpc(Net::MessageIn &msg, const NpcActionT action)
void sellItems(std::vector< ShopItem * > &items) const
void produceMix(const int nameId, const int materialId1, const int materialId2, const int materialId3) const
void cooking(const CookingTypeT type, const int nameId) const
void refine(const int index) const
void nextDialog(const BeingId npcId) const
void closeDialog(const BeingId npcId)
void talk(const Being *const being) const
void identify(const int index) const
void requestAirship(const std::string &mapName, const int itemId) const
void listInput(const BeingId npcId, const unsigned char value) const
void sell(const BeingId beingId) const
void selectAutoSpell(const int skillId) const
void sellItem(const BeingId beingId, const int itemId, const int amount) const
void selectArrow(const int nameId) const
ItemTypeT getType() const
void stopWalking(const bool sendToServer)
static NpcDialogs mNpcDialogs
int getCurrentInvIndex() const
void increaseUsedQuantity(const int amount)
int getUsedQuantity() const
static const int INVENTORY_OFFSET
CookingType ::T CookingTypeT
#define FOR_EACH(type, iter, array)
LocalPlayer * localPlayer
#define createOutPacket(name)
bool msg(InputEvent &event)
Net::NpcHandler * npcHandler