forked from mirror/openmw-tes3mp
select the correct gold base object (still crashing)
This commit is contained in:
parent
f73d3ad33f
commit
5875ce5128
1 changed files with 6 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue