1.6.0 - 8.0.1

This commit is contained in:
mikx
2018-11-16 23:41:09 -05:00
parent f3e05ec550
commit 04345705c9
44 changed files with 7222 additions and 107 deletions

View File

@@ -1,6 +1,6 @@
-- MxW (MxW Addon)
-- By mikx
-- https://git.mikx.ca/wow-addons/MxW_Addon
-- https://git.mikx.xyz/wow/MxW_Addon
-- Licensed under the GNU General Public License 3.0
-- See included License file for more informations.
@@ -8,6 +8,8 @@ local MX = LibStub("AceAddon-3.0"):GetAddon("MxW");
local L = LibStub("AceLocale-3.0"):GetLocale("MxW");
local numItems
local iLink
local value
local LOOT_OPENED_Frame = CreateFrame("Frame")
LOOT_OPENED_Frame:RegisterEvent("LOOT_OPENED")
@@ -22,50 +24,58 @@ LOOT_OPENED_Frame:SetScript("OnEvent",
for i = 1, numItems do
-- get loot slot link to get iteminfo, we can't use item name due to API limitation
iLink = GetLootSlotLink(i)
-- get the iteminfo only if the itemlink is not empty (EXEMPLE: money in a slot = empty)
-- get the iteminfo and continue only if the itemlink is not empty (EXEMPLE: money in a slot = empty)
if (iLink ~= nil) then
-- get the iteminfo using the slot itemlink
name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(iLink)
end
-- get the item value using the link, return nil if the item has no value
value = MX.TSM:GetItemValue(link, "DBMarket");
-- get the item value using the link, return nil if the item has no value
value = MX.TSM:GetItemValue(link, "DBMarket");
-- MINIMUM QUALITY SETTINGS ------
local eq = 2 -- equipable quality
local mq = 1 -- mats quality
local cq = 1 -- consumable quality
local oq = 1 -- other quality
local rq = 1 -- recipe quality
----------------------------------
-- if value is nil, the object is not BoE/not known by TSM & Looter is the player
-- we use locales because the item class is localized by the client
if (value ~= nil) then
if(class == L["Alert_Class_Armor"]) then
if (value >= Farmer_Logic_MinAlert and quality >= eq) then
MX:SendAlert(link,value);
-- MINIMUM QUALITY SETTINGS ------
local eq = 2 -- equipable quality
local mq = 1 -- mats quality
local cq = 1 -- consumable quality
local oq = 1 -- other quality
local rq = 1 -- recipe quality
----------------------------------
-- if value is nil, the object is not BoE/not known by TSM & Looter is the player
-- we use locales because the item class is localized by the client
if (value ~= nil and Settings_Alert_Enabled) then
if(class == L["Alert_Class_Armor"]) then
if (value >= Farmer_Logic_MinAlert and quality >= eq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
elseif(class == L["Alert_Class_Weapon"]) then
if (value >= Farmer_Logic_MinAlert and quality >= eq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
elseif(class == L["Alert_Class_TradeGoods"]) then
if (value >= Farmer_Logic_MinAlert and quality >= mq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
elseif(class == L["Alert_Class_Consumable"]) then
if (value >= Farmer_Logic_MinAlert and quality >= cq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
elseif(class == L["Alert_Class_Misc"]) then
if (value >= Farmer_Logic_MinAlert and quality >= oq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
elseif(class == "Recipe") then
if (value >= Farmer_Logic_MinAlert and quality >= rq) then
MX:SendAlert(link,value);
MX:ChatGuildLootMessage(link,value);
end
end
elseif(class == L["Alert_Class_Weapon"]) then
if (value >= Farmer_Logic_MinAlert and quality >= eq) then
MX:SendAlert(link,value);
end
elseif(class == L["Alert_Class_TradeGoods"]) then
if (value >= Farmer_Logic_MinAlert and quality >= mq) then
MX:SendAlert(link,value);
end
elseif(class == L["Alert_Class_Consumable"]) then
if (value >= Farmer_Logic_MinAlert and quality >= cq) then
MX:SendAlert(link,value);
end
elseif(class == L["Alert_Class_Misc"]) then
if (value >= Farmer_Logic_MinAlert and quality >= oq) then
MX:SendAlert(link,value);
end
elseif(class == "Recipe") then
if (value >= Farmer_Logic_MinAlert and quality >= rq) then
MX:SendAlert(link,value);
end
end
end
value = nil
iLink = nil
end
end
end
end