forked from mirror/openmw-tes3mp
Merge pull request #1368 from akortunov/tradefix
Trade window improvements
This commit is contained in:
commit
a78f254883
2 changed files with 4 additions and 4 deletions
|
@ -320,7 +320,7 @@ namespace MWGui
|
|||
{
|
||||
ensureSelectedItemUnequipped(count);
|
||||
const ItemStack& item = mTradeModel->getItem(mSelectedItem);
|
||||
std::string sound = item.mBase.getClass().getDownSoundId(item.mBase);
|
||||
std::string sound = item.mBase.getClass().getUpSoundId(item.mBase);
|
||||
MWBase::Environment::get().getWindowManager()->playSound(sound);
|
||||
|
||||
if (item.mType == ItemStack::Type_Barter)
|
||||
|
|
|
@ -122,8 +122,6 @@ namespace MWGui
|
|||
mCurrentBalance = 0;
|
||||
mCurrentMerchantOffer = 0;
|
||||
|
||||
restock();
|
||||
|
||||
std::vector<MWWorld::Ptr> itemSources;
|
||||
MWBase::Environment::get().getWorld()->getContainersOwnedBy(actor, itemSources);
|
||||
|
||||
|
@ -209,7 +207,7 @@ namespace MWGui
|
|||
void TradeWindow::sellItem(MyGUI::Widget* sender, int count)
|
||||
{
|
||||
const ItemStack& item = mTradeModel->getItem(mItemToSell);
|
||||
std::string sound = item.mBase.getClass().getDownSoundId(item.mBase);
|
||||
std::string sound = item.mBase.getClass().getUpSoundId(item.mBase);
|
||||
MWBase::Environment::get().getWindowManager()->playSound(sound);
|
||||
|
||||
TradeItemModel* playerTradeModel = MWBase::Environment::get().getWindowManager()->getInventoryWindow()->getTradeModel();
|
||||
|
@ -357,6 +355,8 @@ namespace MWGui
|
|||
|
||||
MWBase::Environment::get().getWindowManager()->playSound("Item Gold Up");
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Barter);
|
||||
|
||||
restock();
|
||||
}
|
||||
|
||||
void TradeWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
|
||||
|
|
Loading…
Reference in a new issue