From 41466fc5fc38bba602ce8c2115a078811ae97a53 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 18 May 2012 23:00:31 +0200 Subject: [PATCH] gold label fix, and don't allow selling gold --- apps/openmw/mwgui/container.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 871989fab7..85a399450d 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -127,7 +127,9 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender) if (isInventory()) { // the player is trying to sell an item, check if the merchant accepts it - if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object)) + // also, don't allow selling gold (let's be better than Morrowind at this, can we?) + if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object) + || MWWorld::Class::get(object).getName(object) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str) { // user notification "i don't buy this item" MWBase::Environment::get().getWindowManager()-> @@ -533,7 +535,7 @@ std::string ContainerBase::getCountString(const int count) if (count == 1) return ""; if (count > 9999) - return boost::lexical_cast(count/1000.f) + "k"; + return boost::lexical_cast(int(count/1000.f)) + "k"; else return boost::lexical_cast(count); }