1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Don't mark gold as stolen, adjust stolen tooltip (Fixes #2465)

This commit is contained in:
scrawl 2015-03-22 17:25:23 +01:00
parent 7bc0d41bb0
commit 5cb61fa01c
2 changed files with 7 additions and 2 deletions

View File

@ -593,7 +593,10 @@ namespace MWGui
for (std::vector<std::pair<std::string, int> >::const_iterator it = itemOwners.begin(); it != itemOwners.end(); ++it)
{
ret += std::string("\nStolen from ") + it->first;
if (it->second == std::numeric_limits<int>::max())
ret += std::string("\nStolen from ") + it->first; // for legacy (ESS) savegames
else
ret += std::string("\nStolen ") + MyGUI::utility::toString(it->second) + " from " + it->first;
}
ret += getMiscString(cellref.getGlobalVariable(), "Global");

View File

@ -1030,7 +1030,9 @@ namespace MWMechanics
owner.second = true;
}
Misc::StringUtils::toLower(owner.first);
mStolenItems[Misc::StringUtils::lowerCase(item.getClass().getId(item))][owner] += count;
if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId))
mStolenItems[Misc::StringUtils::lowerCase(item.getClass().getId(item))][owner] += count;
commitCrime(ptr, victim, OT_Theft, item.getClass().getValue(item) * count);
}