mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Fix breaking of enchanted items casting
This commit is contained in:
parent
053b3dc371
commit
3d8ca02479
1 changed files with 4 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/inventorystore.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
@ -647,7 +648,9 @@ namespace MWInput
|
|||
return;
|
||||
|
||||
// Not allowed if no spell selected
|
||||
if (MWBase::Environment::get().getWindowManager()->getSelectedSpell().empty())
|
||||
MWWorld::InventoryStore& inventory = MWWorld::Class::get(mPlayer->getPlayer()).getInventoryStore(mPlayer->getPlayer());
|
||||
if (MWBase::Environment::get().getWindowManager()->getSelectedSpell().empty() &&
|
||||
inventory.getSelectedEnchantItem() == inventory.end())
|
||||
return;
|
||||
|
||||
MWMechanics::DrawState_ state = mPlayer->getDrawState();
|
||||
|
|
Loading…
Reference in a new issue