diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:55:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:55:20 +0300 |
commit | fd050698f74b5dc7a9867bc93ba6b7c65ef2462f (patch) | |
tree | 246017e7d1b399e60a5d7b97a7106cd75587b88f /src/being/playerinfo.cpp | |
parent | 4228763829f71ec4db50ed185483d7707c5e47eb (diff) | |
download | plus-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.gz plus-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.bz2 plus-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.tar.xz plus-fd050698f74b5dc7a9867bc93ba6b7c65ef2462f.zip |
Remove getter for inventoryHandler.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r-- | src/being/playerinfo.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index b84fb72a9..3768b6e35 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -188,7 +188,7 @@ Inventory *getInventory() Inventory *getStorageInventory() { - return Net::getInventoryHandler()->getStorage(); + return inventoryHandler->getStorage(); } void clearInventory() @@ -233,21 +233,21 @@ void equipItem(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::EQUIP); - Net::getInventoryHandler()->equipItem(item); + inventoryHandler->equipItem(item); } void unequipItem(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::UNEQUIP); - Net::getInventoryHandler()->unequipItem(item); + inventoryHandler->unequipItem(item); } void useItem(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::USE); - Net::getInventoryHandler()->useItem(item); + inventoryHandler->useItem(item); } void useEquipItem(const Item *const item, const bool sfx) @@ -260,20 +260,20 @@ void useEquipItem(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::UNEQUIP); - Net::getInventoryHandler()->unequipItem(item); + inventoryHandler->unequipItem(item); } else { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::EQUIP); - Net::getInventoryHandler()->equipItem(item); + inventoryHandler->equipItem(item); } } else { if (mProtectedItems.find(item->getId()) == mProtectedItems.end()) { - Net::getInventoryHandler()->useItem(item); + inventoryHandler->useItem(item); if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::USE); } @@ -291,13 +291,13 @@ void useEquipItem2(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::UNEQUIP); - Net::getInventoryHandler()->unequipItem(item); + inventoryHandler->unequipItem(item); } else { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::EQUIP); - Net::getInventoryHandler()->equipItem(item); + inventoryHandler->equipItem(item); } } else @@ -306,7 +306,7 @@ void useEquipItem2(const Item *const item, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::USE); - Net::getInventoryHandler()->useItem(item); + inventoryHandler->useItem(item); } } } @@ -318,7 +318,7 @@ void dropItem(const Item *const item, const int amount, const bool sfx) { if (sfx) ItemSoundManager::playSfx(item, ItemSoundEvent::DROP); - Net::getInventoryHandler()->dropItem(item, amount); + inventoryHandler->dropItem(item, amount); } } |