Alert Fixes (2.1.1)

This commit is contained in:
mikx 2020-12-06 05:03:00 -05:00
parent 6111ec4c2d
commit 8408ffd1ec
4 changed files with 14 additions and 7 deletions

View File

@ -35,11 +35,16 @@ LOOT_OPENED_Frame:SetScript("OnEvent",
if (itemId ~= nil) then if (itemId ~= nil) then
value = MX.TSM:GetItemValue(itemId, "DBMinBuyout"); value = MX.TSM:GetItemValue(itemId, "DBMinBuyout");
end end
if (value ~= nil and value >= Farmer_Logic_MinAlert) then
if (quality ~= nil and quality >= 1) then
if (class == L["Alert_Class_Armor"] or class == L["Alert_Class_Weapon"] or class == L["Alert_Class_TradeGoods"] or class == L["Alert_Class_Consumable"] or class == L["Alert_Class_Misc"] or class == "Recipe") then
MX:SendAlert(iLink,lootQuantity,value,by) MX:SendAlert(iLink,lootQuantity,value,by)
by = by - 85 by = by - 85
end end
if (value ~= nil) then end
end
end
if (value ~= nil and quality ~= nil and quality >= 1) then
Farmer_Money_LootSession = Farmer_Money_LootSession + value; Farmer_Money_LootSession = Farmer_Money_LootSession + value;
MX:MainUIUpdate() MX:MainUIUpdate()
value = nil value = nil

View File

@ -19,8 +19,10 @@ function MX:ShowAlert(item,stackqty,value,y)
local AlertIcon = AlertUI:CreateTexture(nil,"ARTWORK") local AlertIcon = AlertUI:CreateTexture(nil,"ARTWORK")
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(item) local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(item)
local frameWidth = 200 + (string.len(itemLink)*2);
AlertUI:SetFrameStrata("BACKGROUND") AlertUI:SetFrameStrata("BACKGROUND")
AlertUI:SetWidth(300) AlertUI:SetWidth(frameWidth)
AlertUI:SetHeight(80) AlertUI:SetHeight(80)
AlertUI:SetPoint("CENTER", 0, y) AlertUI:SetPoint("CENTER", 0, y)

View File

@ -1,6 +1,6 @@
## Interface: 90001 ## Interface: 90001
## Title: |cff1784d1MxW|r ## Title: |cff1784d1MxW|r
## Version: 2.1.0 ## Version: 2.1.1
## Author: mikx ## Author: mikx
## Notes: MxW Addon ## Notes: MxW Addon
## RequiredDeps: TradeSkillMaster ## RequiredDeps: TradeSkillMaster

View File

@ -168,7 +168,7 @@ local function MyAddonCommands(msg, editbox)
elseif (msg == 'atest') then elseif (msg == 'atest') then
local by = 300; local by = 300;
for i = 4,1,-1 do for i = 4,1,-1 do
MX:ShowAlert("\124cff1eff00\124Hitem:171830::::::::60:::::\124h[Oxxein Ore]\124h\124r",4,50000000,by); MX:ShowAlert("\124cff0070dd\124Hitem:145050::::::::60:::::\124h[Cruel Combatant's Dreadplate Chestpiece]\124h\124r",4,50000000,by);
by = by - 90; by = by - 90;
end end
local by = 300; local by = 300;