1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 05:53:50 +00:00

Merge pull request #2769 from Capostrophic/quickkeys

Don't play equip sound for reactivated quick key items (bug #5367)
This commit is contained in:
Andrei Kortunov 2020-04-13 13:41:41 +04:00 committed by GitHub
commit 7d6962b6be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,7 @@
0.47.0 0.47.0
------ ------
Bug #5367: Selecting a spell on an enchanted item per hotkey always plays the equip sound
Bug #5369: Spawnpoint in the Grazelands doesn't produce oversized creatures Bug #5369: Spawnpoint in the Grazelands doesn't produce oversized creatures
0.46.0 0.46.0

View file

@ -401,6 +401,7 @@ namespace MWGui
return; return;
} }
if (!store.isEquipped(item))
MWBase::Environment::get().getWindowManager()->useItem(item); MWBase::Environment::get().getWindowManager()->useItem(item);
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight); MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
// change draw state only if the item is in player's right hand // change draw state only if the item is in player's right hand
@ -411,8 +412,8 @@ namespace MWGui
} }
else if (key->type == Type_MagicItem) else if (key->type == Type_MagicItem)
{ {
// equip, if it can be equipped // equip, if it can be equipped and isn't yet equipped
if (!item.getClass().getEquipmentSlots(item).first.empty()) if (!item.getClass().getEquipmentSlots(item).first.empty() && !store.isEquipped(item))
{ {
MWBase::Environment::get().getWindowManager()->useItem(item); MWBase::Environment::get().getWindowManager()->useItem(item);