summaryrefslogtreecommitdiff
path: root/src/itemshortcut.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-15 21:28:10 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-16 13:19:09 -0600
commitd8d9232a67a03548b827bdb0515fe7a620a488f8 (patch)
treed6e0644f99e0ff89f9b320c0b479ba5a4e398125 /src/itemshortcut.cpp
parenta6c2b90c2dabac18ad8052d948bc540406b3a613 (diff)
downloadmana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.gz
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.bz2
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.tar.xz
mana-d8d9232a67a03548b827bdb0515fe7a620a488f8.zip
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
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r--src/itemshortcut.cpp9
1 files changed, 4 insertions, 5 deletions
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");
}
}
}