Mercurial > wow > wowdb-profiler
comparison Main.lua @ 57:11fcae12db20
Made the filters actually apply so ALL items are scanned.
| author | James D. Callahan III <jcallahan@curse.com> |
|---|---|
| date | Tue, 03 Jul 2012 19:44:41 -0500 |
| parents | b58277aa11da |
| children | 63f7286e5d13 |
comparison
equal
deleted
inserted
replaced
| 56:b58277aa11da | 57:11fcae12db20 |
|---|---|
| 888 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) | 888 local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) |
| 889 | 889 |
| 890 if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then | 890 if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then |
| 891 return | 891 return |
| 892 end | 892 end |
| 893 local num_items = _G.GetMerchantNumItems() | |
| 894 local current_filters = _G.GetMerchantFilter() | 893 local current_filters = _G.GetMerchantFilter() |
| 895 local _, merchant_standing = UnitFactionStanding("target") | 894 local _, merchant_standing = UnitFactionStanding("target") |
| 896 local merchant = NPCEntry(unit_idnum) | 895 local merchant = NPCEntry(unit_idnum) |
| 897 merchant.sells = merchant.sells or {} | 896 merchant.sells = merchant.sells or {} |
| 898 | 897 |
| 899 _G.MerchantFrame_SetFilter(nil, _G.LE_LOOT_FILTER_ALL) | 898 _G.SetMerchantFilter(_G.LE_LOOT_FILTER_ALL) |
| 899 _G.MerchantFrame_Update() | |
| 900 | |
| 901 local num_items = _G.GetMerchantNumItems() | |
| 900 | 902 |
| 901 for item_index = 1, num_items do | 903 for item_index = 1, num_items do |
| 902 local _, _, copper_price, stack_size, num_available, _, extended_cost = _G.GetMerchantItemInfo(item_index) | 904 local _, _, copper_price, stack_size, num_available, _, extended_cost = _G.GetMerchantItemInfo(item_index) |
| 903 local item_id = ItemLinkToID(_G.GetMerchantItemLink(item_index)) | 905 local item_id = ItemLinkToID(_G.GetMerchantItemLink(item_index)) |
| 904 | 906 |
| 961 end | 963 end |
| 962 | 964 |
| 963 if _G.CanMerchantRepair() then | 965 if _G.CanMerchantRepair() then |
| 964 merchant.can_repair = true | 966 merchant.can_repair = true |
| 965 end | 967 end |
| 966 _G.MerchantFrame_SetFilter(nil, current_filters) | 968 _G.SetMerchantFilter(current_filters) |
| 969 _G.MerchantFrame_Update() | |
| 967 end | 970 end |
| 968 end -- do-block | 971 end -- do-block |
| 969 | 972 |
| 970 function WDP:PET_BAR_UPDATE() | 973 function WDP:PET_BAR_UPDATE() |
| 971 if not action_data.label or not action_data.label == "mind_control" then | 974 if not action_data.label or not action_data.label == "mind_control" then |
