mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
Merge pull request #195 from OpenMW/master
Add OpenMW commits up to 10 Apr 2017
This commit is contained in:
commit
b9d68c0ab2
@ -12,6 +12,7 @@
|
|||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/containerstore.hpp"
|
#include "../mwworld/containerstore.hpp"
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
@ -137,10 +138,16 @@ void Recharge::onItemClicked(MyGUI::Widget *sender, const MWWorld::Ptr& item)
|
|||||||
item.getCellRef().setEnchantmentCharge(
|
item.getCellRef().setEnchantmentCharge(
|
||||||
std::min(item.getCellRef().getEnchantmentCharge() + restored, static_cast<float>(enchantment->mData.mCharge)));
|
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().getContainerStore(player).restack(item);
|
||||||
|
|
||||||
player.getClass().skillUsageSucceeded (player, ESM::Skill::Enchant, 0);
|
player.getClass().skillUsageSucceeded (player, ESM::Skill::Enchant, 0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getSoundManager()->playSound("Enchant Fail",1,1);
|
||||||
|
}
|
||||||
|
|
||||||
gem.getContainerStore()->remove(gem, 1, player);
|
gem.getContainerStore()->remove(gem, 1, player);
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
|
||||||
#include "../mwmechanics/actorutil.hpp"
|
#include "../mwmechanics/actorutil.hpp"
|
||||||
|
|
||||||
@ -62,6 +63,8 @@ void Repair::exit()
|
|||||||
|
|
||||||
void Repair::startRepairItem(const MWWorld::Ptr &item)
|
void Repair::startRepairItem(const MWWorld::Ptr &item)
|
||||||
{
|
{
|
||||||
|
MWBase::Environment::get().getSoundManager()->playSound("Item Repair Up",1,1);
|
||||||
|
|
||||||
mRepair.setTool(item);
|
mRepair.setTool(item);
|
||||||
|
|
||||||
mToolIcon->setItem(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()))
|
if (Misc::StringUtils::ciEqual(iter->getCellRef().getRefId(), mTool.getCellRef().getRefId()))
|
||||||
{
|
{
|
||||||
mTool = *iter;
|
mTool = *iter;
|
||||||
|
|
||||||
|
MWBase::Environment::get().getSoundManager()->playSound("Item Repair Up",1,1);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,9 +127,7 @@ std::string Misc::ResourceHelpers::correctBookartPath(const std::string &resPath
|
|||||||
std::string Misc::ResourceHelpers::correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs)
|
std::string Misc::ResourceHelpers::correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs)
|
||||||
{
|
{
|
||||||
std::string mdlname = resPath;
|
std::string mdlname = resPath;
|
||||||
std::string::size_type p = mdlname.rfind('\\');
|
std::string::size_type p = mdlname.find_last_of("/\\");
|
||||||
if(p == std::string::npos)
|
|
||||||
p = mdlname.rfind('/');
|
|
||||||
if(p != std::string::npos)
|
if(p != std::string::npos)
|
||||||
mdlname.insert(mdlname.begin()+p+1, 'x');
|
mdlname.insert(mdlname.begin()+p+1, 'x');
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user