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/itemshortcut.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/itemshortcut.cpp') diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp index 064fdbc6..eaf16889 100644 --- a/src/itemshortcut.cpp +++ b/src/itemshortcut.cpp @@ -20,6 +20,7 @@ */ #include "configuration.h" +#include "event.h" #include "inventory.h" #include "item.h" #include "itemshortcut.h" @@ -72,14 +73,12 @@ void ItemShortcut::useItem(int index) if (item->isEquipment()) { if (item->isEquipped()) - Net::getInventoryHandler()->unequipItem(item); + item->doEvent("doUnequip"); else - Net::getInventoryHandler()->equipItem(item); + item->doEvent("doEquip"); } else - { - Net::getInventoryHandler()->useItem(item); - } + item->doEvent("doUse"); } } } -- cgit v1.2.3-60-g2f50