1) Dinv will no longer attempt to identify items in a container if the container is owned by

another player.  The previous dinv version could generate a lot of warnings if you ran a
   refresh while holding someone else's container (e.g., from a CR).
master
Durel 7 years ago
parent 5d10ece125
commit 7ba5ec47e6

@ -5969,8 +5969,12 @@ function inv.items.discoverCR(maxNumItems, refreshLocations)
-- Discover all containers -- Discover all containers
if (refreshLocation == invItemsRefreshLocAll) or (refreshLocation == invItemsRefreshLocDirty) then if (refreshLocation == invItemsRefreshLocAll) or (refreshLocation == invItemsRefreshLocDirty) then
for objId,v in pairs(inv.items.table) do for objId,v in pairs(inv.items.table) do
local itemOwner, pretitle = dbot.gmcp.getName()
if (inv.items.getStatField(objId, invStatFieldType) == invmon.typeStr[invmonTypeContainer]) then -- If this is a container that we own, try to discover everything in it. Don't try to discover
-- items if we don't own the container because we can't access it anyway.
if (inv.items.getStatField(objId, invStatFieldType) == invmon.typeStr[invmonTypeContainer]) and
(inv.items.getStatField(objId, invStatFieldOwnedBy) == itemOwner) then
-- Scan this container if the caller asked us to scan everything or if we need to scan all -- Scan this container if the caller asked us to scan everything or if we need to scan all
-- dirty containers and this container is dirty (i.e., it hasn't been verified to be clean -- dirty containers and this container is dirty (i.e., it hasn't been verified to be clean
@ -19280,6 +19284,7 @@ end -- dbot.error
-- --
-- dbot.gmcp.getArea -- dbot.gmcp.getArea
-- dbot.gmcp.getClass -- dbot.gmcp.getClass
-- dbot.gmcp.getName
-- dbot.gmcp.getLevel -- dbot.gmcp.getLevel
-- dbot.gmcp.getAlign -- dbot.gmcp.getAlign
-- dbot.gmcp.getRoomId -- dbot.gmcp.getRoomId

Loading…
Cancel
Save