From fe6cf1afe02665dc081c45ca1b4791aca47d86b2 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sun, 6 Jul 2014 07:13:57 +0400 Subject: [PATCH] Third --- ElvUI_SLE/modules/loot/loot.lua | 57 ++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/ElvUI_SLE/modules/loot/loot.lua b/ElvUI_SLE/modules/loot/loot.lua index d0f64f3..c3a41c9 100755 --- a/ElvUI_SLE/modules/loot/loot.lua +++ b/ElvUI_SLE/modules/loot/loot.lua @@ -119,13 +119,13 @@ function LT:Announce() elseif numbers[i] > 1 then SendChatMessage(i..". "..loot[i].."x"..numbers[i], IsPartyLFG() and "INSTANCE_CHAT" or "RAID") end - else - if numbers[i] == 1 then - SendChatMessage(i..". "..loot[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") - elseif numbers[i] > 1 then - SendChatMessage(i..". "..loot[i].."x"..numbers[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") - end - end + else + if numbers[i] == 1 then + SendChatMessage(i..". "..loot[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + elseif numbers[i] > 1 then + SendChatMessage(i..". "..loot[i].."x"..numbers[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + end + end elseif E.db.sle.loot.chat == "SAY" then if numbers[i] == 1 then SendChatMessage(i..". "..loot[i], "SAY") @@ -135,6 +135,49 @@ function LT:Announce() end end end + if nI ~= 0 then + if E.db.sle.loot.chat == "PARTY" then + SendChatMessage(L["Loot Dropped (Improved):"], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + elseif E.db.sle.loot.chat == "RAID" then + if IsInRaid() then + SendChatMessage(L["Loot Dropped (Improved):"], IsPartyLFG() and "INSTANCE_CHAT" or "RAID") + else + SendChatMessage(L["Loot Dropped (Improved):"], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + end + elseif E.db.sle.loot.chat == "SAY" then + SendChatMessage(L["Loot Dropped (Improved):"], "SAY") + end + end + for i = 1, n do + if E.db.sle.loot.chat == "PARTY" then + if numbersImp[i] == 1 then + SendChatMessage(i..". "..lootImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + elseif numbersImp[i] > 1 then + SendChatMessage(i..". "..lootImp[i].."x"..numbersImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + end + elseif E.db.sle.loot.chat == "RAID" then + if IsInRaid() then + if numbersImp[i] == 1 then + SendChatMessage(i..". "..lootImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "RAID") + elseif numbersImp[i] > 1 then + SendChatMessage(i..". "..lootImp[i].."x"..numbersImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "RAID") + end + else + if numbersImp[i] == 1 then + SendChatMessage(i..". "..lootImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + elseif numbersImp[i] > 1 then + SendChatMessage(i..". "..lootImp[i].."x"..numbersImp[i], IsPartyLFG() and "INSTANCE_CHAT" or "PARTY") + end + end + elseif E.db.sle.loot.chat == "SAY" then + if numbersImp[i] == 1 then + SendChatMessage(i..". "..lootImp[i], "SAY") + elseif numbersImp[i] > 1 then + SendChatMessage(i..". "..lootImp[i].."x"..numbersImp[i], "SAY") + end + end + end + end for i = 1, GetNumLootItems() do if GetLootSlotType(i) == 1 then loottemp[i] = GetLootSlotLink(i) -- 1.7.9.5