Quote:
Originally Posted by Heloxian
Yeah some autobuy for candles for my priest would be very nice, havent found an addon that does this tho.
|
Hmm, kind of complicated guys... it takes 3 parts: part 1 is it a reagent vendor? part 2 which reagents? part 3 are you missing reagents?
local IsReagentVendor = false
local IsRepairVendor = CanMerchantRepair()
local NeedReagents = false
if GetItemCount(L["Arcane Powder"]) < addon.db.profile.RestockPowder or
GetItemCount(L["Rune of Teleportation"]) < addon.db.profile.RestockTeleport or
GetItemCount(L["Rune of Portals"]) < addon.db.profile.RestockPortals then
NeedReagents = true
end
if NeedReagents and addon.db.profile.Restock then
for i = 1, GetMerchantNumItems(), 1 do
local name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(i)
if (name == L["Arcane Powder"] or name == L["Rune of Teleportation"] or name == L["Rune of Portals"]) then
if addon.db.profile.RestockConfirm then
StaticPopup_Show("RESTOCK_REAGENTS")
else
WittyMage:RestockReagents()
end
IsReagentVendor = true
break;
end
end
end