forked from teamnwah/openmw-tes3coop
fixes: containers: key id case comparison
This commit is contained in:
parent
4a9821dc65
commit
96b56d9803
1 changed files with 7 additions and 1 deletions
|
@ -95,9 +95,15 @@ namespace MWClass
|
|||
bool needKey = ptr.getCellRef().mLockLevel>0;
|
||||
bool hasKey = false;
|
||||
std::string keyName;
|
||||
|
||||
// make key id lowercase
|
||||
std::string keyId = ptr.getCellRef().mKey;
|
||||
std::transform(keyId.begin(), keyId.end(), keyId.begin(), ::tolower);
|
||||
for (MWWorld::ContainerStoreIterator it = invStore.begin(); it != invStore.end(); ++it)
|
||||
{
|
||||
if (it->getCellRef ().mRefID == ptr.getCellRef().mKey)
|
||||
std::string refId = it->getCellRef().mRefID;
|
||||
std::transform(refId.begin(), refId.end(), refId.begin(), ::tolower);
|
||||
if (refId == keyId)
|
||||
{
|
||||
hasKey = true;
|
||||
keyName = MWWorld::Class::get(*it).getName(*it);
|
||||
|
|
Loading…
Reference in a new issue