mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Added missed recharge and repair sounds
This commit is contained in:
parent
3c9f3a0f7f
commit
31bd70f334
3 changed files with 13 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
||||
#include "../mwworld/containerstore.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
@ -137,10 +138,16 @@ void Recharge::onItemClicked(MyGUI::Widget *sender, const MWWorld::Ptr& item)
|
|||
item.getCellRef().setEnchantmentCharge(
|
||||
std::min(item.getCellRef().getEnchantmentCharge() + restored, static_cast<float>(enchantment->mData.mCharge)));
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->playSound("Enchant Success",1,1);
|
||||
|
||||
player.getClass().getContainerStore(player).restack(item);
|
||||
|
||||
player.getClass().skillUsageSucceeded (player, ESM::Skill::Enchant, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound("Enchant Fail",1,1);
|
||||
}
|
||||
|
||||
gem.getContainerStore()->remove(gem, 1, player);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
||||
#include "../mwmechanics/actorutil.hpp"
|
||||
|
||||
|
@ -62,6 +63,8 @@ void Repair::exit()
|
|||
|
||||
void Repair::startRepairItem(const MWWorld::Ptr &item)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound("Item Repair Up",1,1);
|
||||
|
||||
mRepair.setTool(item);
|
||||
|
||||
mToolIcon->setItem(item);
|
||||
|
|
|
@ -99,6 +99,9 @@ void Repair::repair(const MWWorld::Ptr &itemToRepair)
|
|||
if (Misc::StringUtils::ciEqual(iter->getCellRef().getRefId(), mTool.getCellRef().getRefId()))
|
||||
{
|
||||
mTool = *iter;
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->playSound("Item Repair Up",1,1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue