mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
select the correct gold base object (still crashing)
This commit is contained in:
parent
f73d3ad33f
commit
5875ce5128
@ -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…
x
Reference in New Issue
Block a user