summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-06 00:00:54 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-06 00:05:22 +0200
commit9113afb868f6c1da5911437d3ddabdcf169cbec2 (patch)
tree4efb107417b369e8362630fd49ea10fa38210f2a /src/gui
parent96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe (diff)
downloadmana-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.gz
mana-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.bz2
mana-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.xz
mana-9113afb868f6c1da5911437d3ddabdcf169cbec2.zip
Use a namespace to keep apart implementations of network handlers
Since we'll have three "InventoryHandler" classes, etc. this shows an example of how we can compile with all of them at the same time using namespaces. We'll have: Net::InventoryHandler - the interface EAthena::InventoryHandler - the eAthena implementation TmwServ::InventoryHandler - the tmwserv implementation Maybe we'll find a better way later, but for now this works. I'm not convinced yet that using namespaces is better than just using longer class names like EAthenaInventoryHandler.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/storagewindow.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp
index 2828b197..22b28a8f 100644
--- a/src/gui/storagewindow.cpp
+++ b/src/gui/storagewindow.cpp
@@ -187,22 +187,19 @@ Item *StorageWindow::getSelectedItem() const
void StorageWindow::addStore(Item *item, int amount)
{
- // Net::getInventoryHandler()->moveItem(Net::InvyHandler::INVENTORY,
- inventoryHandler->moveItem(Net::InventoryHandler::INVENTORY,
- item->getInvIndex(), amount,
- Net::InventoryHandler::STORAGE);
+ Net::getInventoryHandler()->moveItem(Net::InventoryHandler::INVENTORY,
+ item->getInvIndex(), amount,
+ Net::InventoryHandler::STORAGE);
}
void StorageWindow::removeStore(Item *item, int amount)
{
- // Net::getInventoryHandler()->moveItem(Net::InvyHandler::STORAGE,
- inventoryHandler->moveItem(Net::InventoryHandler::STORAGE,
- item->getInvIndex(), amount,
- Net::InventoryHandler::INVENTORY);
+ Net::getInventoryHandler()->moveItem(Net::InventoryHandler::STORAGE,
+ item->getInvIndex(), amount,
+ Net::InventoryHandler::INVENTORY);
}
void StorageWindow::close()
{
- // Net::getInventoryHandler()->closeStorage();
- inventoryHandler->closeStorage();
+ Net::getInventoryHandler()->closeStorage();
}