summaryrefslogtreecommitdiff
path: root/src/net/manaserv/inventoryhandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-11-07 11:47:24 -0700
committerJared Adams <jaxad0127@gmail.com>2009-11-07 11:47:24 -0700
commit99be9859a30e84e758ee3bfe7dcc3de33dfa2391 (patch)
tree49354012582a4c9e9218ebafad429b07b19b2539 /src/net/manaserv/inventoryhandler.cpp
parent9c1cc1e46fd21ec48809fbb8f64853fcecef2439 (diff)
downloadmana-99be9859a30e84e758ee3bfe7dcc3de33dfa2391.tar.gz
mana-99be9859a30e84e758ee3bfe7dcc3de33dfa2391.tar.bz2
mana-99be9859a30e84e758ee3bfe7dcc3de33dfa2391.tar.xz
mana-99be9859a30e84e758ee3bfe7dcc3de33dfa2391.zip
More eAthena guild stuff
Also some related chenges elsewhere
Diffstat (limited to 'src/net/manaserv/inventoryhandler.cpp')
-rw-r--r--src/net/manaserv/inventoryhandler.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index 0d0c1b34..e2a579fd 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -66,7 +66,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
case GPMSG_INVENTORY:
while (msg.getUnreadLength())
{
- int slot = msg.readInt8();
+ unsigned int slot = msg.readInt8();
if (slot == 255)
{
player_node->setMoney(msg.readInt32());
@@ -78,7 +78,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
{
player_node->mEquipment->setEquipment(slot, id);
}
- else if (slot >= 32 && slot < 32 + getInventorySize())
+ else if (slot >= 32 && slot < 32 + getSize(INVENTORY))
{
int amount = id ? msg.readInt8() : 0;
player_node->setInvItem(slot - 32, id, amount);
@@ -153,12 +153,12 @@ void InventoryHandler::moveItem(int oldIndex, int newIndex)
gameServerConnection->send(msg);
}
-void InventoryHandler::openStorage()
+void InventoryHandler::openStorage(StorageType type)
{
// TODO
}
-void InventoryHandler::closeStorage()
+void InventoryHandler::closeStorage(StorageType type)
{
// TODO
}
@@ -169,14 +169,19 @@ void InventoryHandler::moveItem(StorageType source, int slot, int amount,
// TODO
}
-size_t InventoryHandler::getInventorySize() const
+size_t InventoryHandler::getSize(StorageType type) const
{
- return 50;
-}
+ switch (type)
+ {
+ case INVENTORY:
+ return 50;
+ case STORAGE:
+ case GUILD_STORAGE:
+ return 300;
+ case CART:
+ return 0;
+ }
-size_t InventoryHandler::getStorageSize() const
-{
- return 300;
}
} // namespace ManaServ