From 5875ce51286fca173550d8ddea8c880ecac7710f Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 16 May 2012 22:13:56 +0200 Subject: [PATCH] select the correct gold base object (still crashing) --- apps/openmw/mwworld/world.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index 0672d5f3b2..2f8deeff99 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -988,20 +988,19 @@ namespace MWWorld int goldAmount = object.getRefData().getCount(); std::string base = "Gold_001"; - if (goldAmount >= 5) - base = "Gold_005"; - else if (goldAmount >= 10) - base = "Gold_010"; + if (goldAmount >= 100) + base = "Gold_100"; else if (goldAmount >= 25) base = "Gold_025"; - else if (goldAmount >= 100) - base = "Gold_100"; + else if (goldAmount >= 10) + base = "Gold_010"; + else if (goldAmount >= 5) + base = "Gold_005"; std::cout << "using " << base << std::endl; MWWorld::ManualRef newRef (getStore(), base); object = newRef.getPtr(); object.getRefData().setCount(goldAmount); - object.mCell = cell; } ESM::Position& pos = object.getRefData().getPosition();