# HG changeset patch # User James D. Callahan III # Date 1354300164 21600 # Node ID 85c713407c4f700d8d2fecdd51bae6955434a264 # Parent 26e73084ffda085667b479959b70b53888360794 Use "npc" rather than "target" for merchants - hopefully this stops wrongly-recorded information based on race conditions diff -r 26e73084ffda -r 85c713407c4f Main.lua --- 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