diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-02 22:37:35 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-02 22:37:35 -0600 |
commit | d13b3eaca82e3547c84f60b9b135464ff3a51cf0 (patch) | |
tree | e4ede7c58a991b85ff208a7155d0b74236f23bac /src/net/tmwserv/inventoryhandler.cpp | |
parent | 4916370e6130bfee7eb9ae486f03391d2214ecf4 (diff) | |
download | mana-d13b3eaca82e3547c84f60b9b135464ff3a51cf0.tar.gz mana-d13b3eaca82e3547c84f60b9b135464ff3a51cf0.tar.bz2 mana-d13b3eaca82e3547c84f60b9b135464ff3a51cf0.tar.xz mana-d13b3eaca82e3547c84f60b9b135464ff3a51cf0.zip |
Start TMWServ's PlayerHandler and InventoryHandler
Diffstat (limited to 'src/net/tmwserv/inventoryhandler.cpp')
-rw-r--r-- | src/net/tmwserv/inventoryhandler.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/net/tmwserv/inventoryhandler.cpp b/src/net/tmwserv/inventoryhandler.cpp index f6522128..a342c1d3 100644 --- a/src/net/tmwserv/inventoryhandler.cpp +++ b/src/net/tmwserv/inventoryhandler.cpp @@ -23,6 +23,8 @@ #include "net/tmwserv/protocol.h" +#include "net/tmwserv/gameserver/player.h" + #include "net/messagein.h" #include "equipment.h" @@ -77,3 +79,44 @@ void InventoryHandler::handleMessage(MessageIn &msg) break; } } + +void InventoryHandler::equipItem(Item *item) +{ + Net::GameServer::Player::equip(item->getInvIndex()); +} + +void InventoryHandler::unequipItem(Item *item) +{ + Net::GameServer::Player::unequip(item->getInvIndex()); +} + +void InventoryHandler::useItem(Item *item) +{ + Net::GameServer::Player::useItem(item->getInvIndex()); +} + +void InventoryHandler::dropItem(Item *item, int amount) +{ + Net::GameServer::Player::drop(item->getInvIndex(), amount); +} + +void InventoryHandler::splitItem(Item *item, int amount) +{ + // TODO +} + +void InventoryHandler::openStorage() +{ + // TODO +} + +void InventoryHandler::closeStorage() +{ + // TODO +} + +void InventoryHandler::moveItem(StorageType source, int slot, int amount, + StorageType destination) +{ + // TODO +} |