forked from mirror/openmw-tes3mp
When searching object by id, search in active cells before searching in the player's inventory
This commit is contained in:
parent
e597328b6b
commit
7c981587fc
1 changed files with 6 additions and 6 deletions
|
@ -529,12 +529,6 @@ namespace MWWorld
|
|||
return mPlayer->getPlayer();
|
||||
}
|
||||
|
||||
Ptr ptr = Class::get (mPlayer->getPlayer()).
|
||||
getContainerStore (mPlayer->getPlayer()).search (name);
|
||||
|
||||
if (!ptr.isEmpty())
|
||||
return ptr;
|
||||
|
||||
std::string lowerCaseName = Misc::StringUtils::lowerCase(name);
|
||||
|
||||
// active cells
|
||||
|
@ -548,6 +542,12 @@ namespace MWWorld
|
|||
return ptr;
|
||||
}
|
||||
|
||||
Ptr ptr = Class::get (mPlayer->getPlayer()).
|
||||
getContainerStore (mPlayer->getPlayer()).search (lowerCaseName);
|
||||
|
||||
if (!ptr.isEmpty())
|
||||
return ptr;
|
||||
|
||||
if (!activeOnly)
|
||||
{
|
||||
ret = mCells.getPtr (lowerCaseName);
|
||||
|
|
Loading…
Reference in a new issue