From d8d9232a67a03548b827bdb0515fe7a620a488f8 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 15 Aug 2010 21:28:10 -0600 Subject: Move more to the event system Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram --- src/gui/popupmenu.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/gui/popupmenu.cpp') diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 7bf1d4fb..41ecafc9 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -277,14 +277,12 @@ void PopupMenu::handleLink(const std::string &link) if (mItem->isEquipment()) { if (mItem->isEquipped()) - Net::getInventoryHandler()->unequipItem(mItem); + mItem->doEvent("doUnequip"); else - Net::getInventoryHandler()->equipItem(mItem); + mItem->doEvent("doEquip"); } else - { - Net::getInventoryHandler()->useItem(mItem); - } + mItem->doEvent("doUse"); } else if (link == "chat") -- cgit v1.2.3-70-g09d2