Mercurial > wow > wowdb-profiler
diff Main.lua @ 195:85c713407c4f 1.0.28
Use "npc" rather than "target" for merchants - hopefully this stops wrongly-recorded information based on race conditions
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Fri, 30 Nov 2012 12:29:24 -0600 |
parents | 5346ba9b6419 |
children | 45ba0fad1fe4 |
line wrap: on
line diff
--- a/Main.lua Wed Nov 28 09:11:02 2012 -0600 +++ b/Main.lua Fri Nov 30 12:29:24 2012 -0600 @@ -1620,12 +1620,12 @@ function WDP:UpdateMerchantItems(event_name) if not current_merchant or event_name == "MERCHANT_SHOW" then - local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("target")) + local unit_type, unit_idnum = ParseGUID(_G.UnitGUID("npc")) if not unit_idnum or not UnitTypeIsNPC(unit_type) then return end - merchant_standing = select(2, UnitFactionStanding("target")) + merchant_standing = select(2, UnitFactionStanding("npc")) current_merchant = NPCEntry(unit_idnum) current_merchant.sells = current_merchant.sells or {} end