fix error message while swapping bags

This commit is contained in:
shagu
2016-11-04 22:34:03 +01:00
parent b3e74f1a1d
commit 7d563088f4
+9 -7
View File
@@ -247,14 +247,16 @@ pfUI:RegisterModule("bags", function ()
local bagtype
if bag > 0 then
local _, _, id = strfind(GetInventoryItemLink("player", ContainerIDToInventoryID(bag)) or "", "item:(%d+)");
local _, _, _, _, itemType, subType = GetItemInfo(id);
bagtype = pfLocaleBagtypes[pfUI.cache["locale"]][itemType]
bagsubtype = pfLocaleBagtypes[pfUI.cache["locale"]][subType]
if id then
local _, _, _, _, itemType, subType = GetItemInfo(id);
bagtype = pfLocaleBagtypes[pfUI.cache["locale"]][itemType]
bagsubtype = pfLocaleBagtypes[pfUI.cache["locale"]][subType]
if bagsubtype == "SOULBAG" then
bagtype = "SOULBAG"
elseif not (bagsubtype and bagsubtype == "DEFAULT") and bagtype ~= "QUIVER" and bagtype ~= "SOULBAG" then
bagtype = "SPECIAL"
if bagsubtype == "SOULBAG" then
bagtype = "SOULBAG"
elseif not (bagsubtype and bagsubtype == "DEFAULT") and bagtype ~= "QUIVER" and bagtype ~= "SOULBAG" then
bagtype = "SPECIAL"
end
end
end