Mercurial > wow > askmrrobot
comparison TeamOptimizer.lua @ 96:e0ddd02d6555 v45
tweak to ignore some junk in team optimizer loot export
| author | yellowfive |
|---|---|
| date | Sat, 01 Oct 2016 15:48:00 -0700 |
| parents | adec0972d4e1 |
| children | ed7ffc8d9936 |
comparison
equal
deleted
inserted
replaced
| 95:975b49848703 | 96:e0ddd02d6555 |
|---|---|
| 792 end | 792 end |
| 793 | 793 |
| 794 Amr.db.global.TeamOpt.LootGear = newInfo | 794 Amr.db.global.TeamOpt.LootGear = newInfo |
| 795 end | 795 end |
| 796 | 796 |
| 797 local _ignoreLoot = { | |
| 798 [139562] = true, | |
| 799 [136903] = true | |
| 800 } | |
| 801 | |
| 797 local function scanMasterLoot() | 802 local function scanMasterLoot() |
| 798 -- only care if we are in a raid or group | 803 -- only care if we are in a raid or group |
| 799 if not IsInGroup() and not IsInRaid() then return end | 804 if not IsInGroup() and not IsInRaid() then return end |
| 800 | 805 |
| 801 -- we only care about the master looter | 806 -- we only care about the master looter |
| 815 for i = 1, GetNumLootItems() do | 820 for i = 1, GetNumLootItems() do |
| 816 --local texture, item, quantity, quality, locked = GetLootSlotInfo(i) | 821 --local texture, item, quantity, quality, locked = GetLootSlotInfo(i) |
| 817 local lootType = GetLootSlotType(i) | 822 local lootType = GetLootSlotType(i) |
| 818 if lootType == 1 then | 823 if lootType == 1 then |
| 819 local link = GetLootSlotLink(i) | 824 local link = GetLootSlotLink(i) |
| 820 table.insert(loot, link) | 825 local success, itemObj = pcall(Amr.ParseItemLink, link) |
| 826 | |
| 827 if not success or not itemObj or _ignoreLoot[itemObj.id] then | |
| 828 -- ignore items that can't be read or that we explicitly don't care about | |
| 829 else | |
| 830 table.insert(loot, link) | |
| 831 end | |
| 821 end | 832 end |
| 822 end | 833 end |
| 823 | 834 |
| 824 Amr.db.char.TeamOpt.LootGuid = npcGuid | 835 Amr.db.char.TeamOpt.LootGuid = npcGuid |
| 825 Amr.db.char.TeamOpt.Loot = loot | 836 Amr.db.char.TeamOpt.Loot = loot |
