summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-19 17:33:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-19 17:33:16 +0300
commitb7addc0a9a519cf9dcc3e804d9918ce4934a3e83 (patch)
treeeed5cd349f7e9db512fd1e940ed7b070df1c6a35 /src/net/eathena/inventoryhandler.cpp
parent403792db7d005066273bcbe138afcd1a98b3144c (diff)
downloadplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.gz
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.bz2
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.xz
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.zip
Add comments for all output packets header.
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r--src/net/eathena/inventoryhandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 65e92ed7c..1e3a80ffe 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -161,7 +161,7 @@ void InventoryHandler::equipItem(const Item *const item) const
if (!item)
return;
- MessageOut outMsg(CMSG_PLAYER_EQUIP);
+ createOutPacket(CMSG_PLAYER_EQUIP);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET), "index");
// here we set flag for any slots,
@@ -174,7 +174,7 @@ void InventoryHandler::unequipItem(const Item *const item) const
if (!item)
return;
- MessageOut outMsg(CMSG_PLAYER_UNEQUIP);
+ createOutPacket(CMSG_PLAYER_UNEQUIP);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET));
}
@@ -184,7 +184,7 @@ void InventoryHandler::useItem(const Item *const item) const
if (!item)
return;
- MessageOut outMsg(CMSG_PLAYER_INVENTORY_USE);
+ createOutPacket(CMSG_PLAYER_INVENTORY_USE);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET));
outMsg.writeInt32(item->getId()); // unused
@@ -195,7 +195,7 @@ void InventoryHandler::dropItem(const Item *const item, const int amount) const
if (!item)
return;
- MessageOut outMsg(CMSG_PLAYER_INVENTORY_DROP);
+ createOutPacket(CMSG_PLAYER_INVENTORY_DROP);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET));
outMsg.writeInt16(static_cast<int16_t>(amount));
@@ -203,7 +203,7 @@ void InventoryHandler::dropItem(const Item *const item, const int amount) const
void InventoryHandler::closeStorage(const int type A_UNUSED) const
{
- MessageOut outMsg(CMSG_CLOSE_STORAGE);
+ createOutPacket(CMSG_CLOSE_STORAGE);
}
void InventoryHandler::moveItem2(const int source,
@@ -238,7 +238,7 @@ void InventoryHandler::moveItem2(const int source,
if (packet)
{
- MessageOut outMsg(packet);
+ createOutPacket(packet);
outMsg.writeInt16(static_cast<int16_t>(slot + offset));
outMsg.writeInt32(amount);
}
@@ -246,14 +246,14 @@ void InventoryHandler::moveItem2(const int source,
void InventoryHandler::useCard(const int index) const
{
- MessageOut outMsg(CMSG_PLAYER_USE_CARD);
+ createOutPacket(CMSG_PLAYER_USE_CARD);
outMsg.writeInt16(static_cast<int16_t>(index + INVENTORY_OFFSET), "index");
}
void InventoryHandler::insertCard(const int cardIndex,
const int itemIndex) const
{
- MessageOut outMsg(CMSG_PLAYER_INSERT_CARD);
+ createOutPacket(CMSG_PLAYER_INSERT_CARD);
outMsg.writeInt16(static_cast<int16_t>(cardIndex + INVENTORY_OFFSET),
"card index");
outMsg.writeInt16(static_cast<int16_t>(itemIndex + INVENTORY_OFFSET),
@@ -263,7 +263,7 @@ void InventoryHandler::insertCard(const int cardIndex,
void InventoryHandler::favoriteItem(const Item *const item,
const bool favorite) const
{
- MessageOut outMsg(CMSG_PLAYER_FAVORITE_ITEM);
+ createOutPacket(CMSG_PLAYER_FAVORITE_ITEM);
outMsg.writeInt16(static_cast<int16_t>(item->getInvIndex()
+ INVENTORY_OFFSET),
"item index");