diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/inventorywindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/itemamount.cpp | 8 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 12 | ||||
-rw-r--r-- | src/gui/skill.cpp | 5 |
5 files changed, 23 insertions, 13 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index aa81361d..44006971 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -33,6 +33,9 @@ #include "item.h" #include "localplayer.h" +#include "net/inventoryhandler.h" +#include "net/net.h" + #include "resources/image.h" #include "resources/iteminfo.h" #include "resources/resourcemanager.h" @@ -176,7 +179,7 @@ void EquipmentWindow::action(const gcn::ActionEvent &event) mInventory->getItem(mEquipment->getEquipment(mSelected)) : mInventory->getItem(mEquipment->getArrows()); #endif - player_node->unequipItem(item); + Net::getInventoryHandler()->unequipItem(item); setSelected(-1); } } diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 1f03c67ee..d6cd3a84 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -166,12 +166,12 @@ void InventoryWindow::action(const gcn::ActionEvent &event) if (item->isEquipment()) { if (item->isEquipped()) - player_node->unequipItem(item); + Net::getInventoryHandler()->unequipItem(item); else - player_node->equipItem(item); + Net::getInventoryHandler()->equipItem(item); } else - player_node->useItem(item); + Net::getInventoryHandler()->useItem(item); } else if (event.getId() == "drop") { diff --git a/src/gui/itemamount.cpp b/src/gui/itemamount.cpp index 393cd8bc..252daf19 100644 --- a/src/gui/itemamount.cpp +++ b/src/gui/itemamount.cpp @@ -33,7 +33,9 @@ #include "gui/widgets/icon.h" #include "item.h" -#include "localplayer.h" + +#include "net/inventoryhandler.h" +#include "net/net.h" #include "utils/gettext.h" @@ -45,10 +47,10 @@ void ItemAmountWindow::finish(Item *item, int amount, Usage usage) tradeWindow->tradeItem(item, amount); break; case ItemDrop: - player_node->dropItem(item, amount); + Net::getInventoryHandler()->dropItem(item, amount); break; case ItemSplit: - player_node->splitItem(item, amount); + Net::getInventoryHandler()->splitItem(item, amount); break; case StoreAdd: storageWindow->addStore(item, amount); diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 46a33d6c..2dcf2628 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -40,6 +40,8 @@ #include "net/adminhandler.h" #include "net/inventoryhandler.h" #include "net/net.h" +#include "net/partyhandler.h" +#include "net/tradehandler.h" #include "resources/itemdb.h" #include "resources/iteminfo.h" @@ -182,7 +184,7 @@ void PopupMenu::handleLink(const std::string &link) being && being->getType() == Being::PLAYER) { - player_node->trade(being); + Net::getTradeHandler()->request(being); tradePartnerName = being->getName(); } #ifdef EATHENA_SUPPORT @@ -261,13 +263,13 @@ void PopupMenu::handleLink(const std::string &link) if (mItem->isEquipment()) { if (mItem->isEquipped()) - player_node->unequipItem(mItem); + Net::getInventoryHandler()->unequipItem(mItem); else - player_node->equipItem(mItem); + Net::getInventoryHandler()->equipItem(mItem); } else { - player_node->useItem(mItem); + Net::getInventoryHandler()->useItem(mItem); } } @@ -302,7 +304,7 @@ void PopupMenu::handleLink(const std::string &link) else if (link == "party" && being && being->getType() == Being::PLAYER) { - player_node->inviteToParty(dynamic_cast<Player*>(being)); + Net::getPartyHandler()->invite(dynamic_cast<Player*>(being)); } else if (link == "name" && being) diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index b6f6f124..3a4fb75c 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -33,6 +33,9 @@ #include "localplayer.h" #include "log.h" +#include "net/net.h" +#include "net/skillhandler.h" + #include "utils/dtor.h" #include "utils/gettext.h" #include "utils/stringutils.h" @@ -173,7 +176,7 @@ void SkillDialog::action(const gcn::ActionEvent &event) // Increment skill int selectedSkill = mTable->getSelectedRow(); if (selectedSkill >= 0) - player_node->raiseSkill(mSkillList[selectedSkill]->id); + Net::getSkillHandler()->up(mSkillList[selectedSkill]->id); } else if (event.getId() == "skill" && mTable->getSelectedRow() > -1) { |