forked from teamnwah/openmw-tes3coop
Play item sound even if merchant doesn't purchase it.
This commit is contained in:
parent
7ed3effc92
commit
e4c4747a27
1 changed files with 2 additions and 0 deletions
|
@ -162,6 +162,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
|
|
||||||
const ItemStack& item = mTradeModel->getItem(index);
|
const ItemStack& item = mTradeModel->getItem(index);
|
||||||
|
std::string sound = MWWorld::Class::get(item.mBase).getDownSoundId(item.mBase);
|
||||||
|
|
||||||
MWWorld::Ptr object = item.mBase;
|
MWWorld::Ptr object = item.mBase;
|
||||||
int count = item.mCount;
|
int count = item.mCount;
|
||||||
|
@ -213,6 +214,7 @@ namespace MWGui
|
||||||
int services = MWBase::Environment::get().getWindowManager()->getTradeWindow()->getMerchantServices();
|
int services = MWBase::Environment::get().getWindowManager()->getTradeWindow()->getMerchantServices();
|
||||||
if (!MWWorld::Class::get(object).canSell(object, services))
|
if (!MWWorld::Class::get(object).canSell(object, services))
|
||||||
{
|
{
|
||||||
|
MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0);
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox("#{sBarterDialog4}");
|
messageBox("#{sBarterDialog4}");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue