mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:36:42 +00:00
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();
|
int goldAmount = object.getRefData().getCount();
|
||||||
|
|
||||||
std::string base = "Gold_001";
|
std::string base = "Gold_001";
|
||||||
if (goldAmount >= 5)
|
if (goldAmount >= 100)
|
||||||
base = "Gold_005";
|
base = "Gold_100";
|
||||||
else if (goldAmount >= 10)
|
|
||||||
base = "Gold_010";
|
|
||||||
else if (goldAmount >= 25)
|
else if (goldAmount >= 25)
|
||||||
base = "Gold_025";
|
base = "Gold_025";
|
||||||
else if (goldAmount >= 100)
|
else if (goldAmount >= 10)
|
||||||
base = "Gold_100";
|
base = "Gold_010";
|
||||||
|
else if (goldAmount >= 5)
|
||||||
|
base = "Gold_005";
|
||||||
|
|
||||||
std::cout << "using " << base << std::endl;
|
std::cout << "using " << base << std::endl;
|
||||||
MWWorld::ManualRef newRef (getStore(), base);
|
MWWorld::ManualRef newRef (getStore(), base);
|
||||||
object = newRef.getPtr();
|
object = newRef.getPtr();
|
||||||
object.getRefData().setCount(goldAmount);
|
object.getRefData().setCount(goldAmount);
|
||||||
object.mCell = cell;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ESM::Position& pos = object.getRefData().getPosition();
|
ESM::Position& pos = object.getRefData().getPosition();
|
||||||
|
|
Loading…
Reference in a new issue