Mercurial > wow > askmrrobot
comparison Export.lua @ 191:4aeedce4c995 v93
Added better identification of duplicate items.
| author | yellowfive |
|---|---|
| date | Fri, 30 Oct 2020 21:14:57 -0700 |
| parents | a7f2ba17c39a |
| children | cb7eb9b9cc24 |
comparison
equal
deleted
inserted
replaced
| 190:4232d073a90b | 191:4aeedce4c995 |
|---|---|
| 113 local _lastBankSlotId = nil | 113 local _lastBankSlotId = nil |
| 114 local _bankOpen = false | 114 local _bankOpen = false |
| 115 | 115 |
| 116 local function scanBag(bagId, isBank, bagTable, bagItemsWithCount) | 116 local function scanBag(bagId, isBank, bagTable, bagItemsWithCount) |
| 117 local numSlots = GetContainerNumSlots(bagId) | 117 local numSlots = GetContainerNumSlots(bagId) |
| 118 local loc = ItemLocation.CreateEmpty() | 118 --local loc = ItemLocation.CreateEmpty() |
| 119 local item | |
| 119 for slotId = 1, numSlots do | 120 for slotId = 1, numSlots do |
| 120 local _, itemCount, _, _, _, _, itemLink = GetContainerItemInfo(bagId, slotId) | 121 local _, itemCount, _, _, _, _, itemLink = GetContainerItemInfo(bagId, slotId) |
| 121 if itemLink ~= nil then | 122 if itemLink ~= nil then |
| 122 local itemData = Amr.Serializer.ParseItemLink(itemLink) | 123 local itemData = Amr.Serializer.ParseItemLink(itemLink) |
| 123 if itemData ~= nil then | 124 if itemData ~= nil then |
| 125 item = Item:CreateFromBagAndSlot(bagId, slotId) | |
| 126 | |
| 127 -- seems to be of the form Item-1147-0-4000000XXXXXXXXX, so we take just the last 9 digits | |
| 128 itemData.guid = item:GetItemGUID() | |
| 129 if itemData.guid and strlen(itemData.guid) > 9 then | |
| 130 itemData.guid = strsub(itemData.guid, -9) | |
| 131 end | |
| 124 | 132 |
| 125 -- see if this is an azerite item and read azerite power ids | 133 -- see if this is an azerite item and read azerite power ids |
| 126 --[[loc:SetBagAndSlot(bagId, slotId) | 134 --[[loc:SetBagAndSlot(bagId, slotId) |
| 127 if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(loc) then | 135 if C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItem(loc) then |
| 128 local powers = Amr.ReadAzeritePowers(loc) | 136 local powers = Amr.ReadAzeritePowers(loc) |
