mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 19:49:41 +00:00
Fix "removeitem gold_100" behavior
This commit is contained in:
parent
aefcd1ad07
commit
9485aa5e44
1 changed files with 11 additions and 1 deletions
|
@ -362,8 +362,18 @@ int MWWorld::ContainerStore::remove(const std::string& itemId, int count, const
|
||||||
{
|
{
|
||||||
int toRemove = count;
|
int toRemove = count;
|
||||||
|
|
||||||
|
std::string id = itemId;
|
||||||
|
|
||||||
|
if(Misc::StringUtils::ciEqual(itemId, "gold_005")
|
||||||
|
|| Misc::StringUtils::ciEqual(itemId, "gold_010")
|
||||||
|
|| Misc::StringUtils::ciEqual(itemId, "gold_025")
|
||||||
|
|| Misc::StringUtils::ciEqual(itemId, "gold_100"))
|
||||||
|
{
|
||||||
|
id = MWWorld::ContainerStore::sGoldId;
|
||||||
|
}
|
||||||
|
|
||||||
for (ContainerStoreIterator iter(begin()); iter != end() && toRemove > 0; ++iter)
|
for (ContainerStoreIterator iter(begin()); iter != end() && toRemove > 0; ++iter)
|
||||||
if (Misc::StringUtils::ciEqual(iter->getCellRef().getRefId(), itemId))
|
if (Misc::StringUtils::ciEqual(iter->getCellRef().getRefId(), id))
|
||||||
toRemove -= remove(*iter, toRemove, actor);
|
toRemove -= remove(*iter, toRemove, actor);
|
||||||
|
|
||||||
flagAsModified();
|
flagAsModified();
|
||||||
|
|
Loading…
Reference in a new issue