MerchantFrame.Instance.Merchant returns null, and has done so for quite a while now. I imagine you're not aware of it since I doubt many people use this, but I use it in my AntiCap plugin and this broken api has caused the plugin to not work for a few months now. Could you please fix it?
I just looked through your code, and you are not using this api call, so it's not really relevant for this topic Could a HB dev please check it out and fix it? I've made a temporary workaround, but it's not as failproof, so I'd prefer to use this.
Yeah, I'm not having any problems with MerchantFrame.Instance, but with MerchantFrame.Instance.Merchant which is always null.
Just tested the Merchant property and I can say it doesn't work. Code: public WoWUnit Merchant() { return MerchantFrame.Instance.IsVisible ? MerchantFrame.Instance.Merchant : null; } Code: try { Logging.Write("Merchant: " + Merchant().Name); } catch (Exception e) { Logging.Write(e.Message + " | " + e.Data + " | " + e.Source); } EDIT1: Hold on... EDIT2: Definitely doesn't work on the Release version although this may have been fixed in the Beta, tried on several NPCs which included Armorsmith, Innkeeper, General Goods etc.