Originally Posted by Lombra
Aren't you going to want to wait with disbanding until everyone else has looted?
|
I gave up on the disbanding, instead i'm just leaving the group, but i still can't find a way to guarantee that i looted the mob before leaving.
Code:
local champions = {"Deathtalon", "Doomroller", "Terrorfist", "Vengeance"}
caelUI.rares:SetScript("OnEvent", function(self, event, addon, arg)
if event == "CHAT_MSG_MONSTER_YELL" and (arg == "Frogan" or arg == "Shadow-Lord Iskar" or arg == "Siegemaster Mar\'tak" or arg == "Tyrant Velhari") and not IsInRaid() then
self:RegisterEvent("PLAYER_TARGET_CHANGED")
end
if event == "PLAYER_TARGET_CHANGED" then
for name = 1, #champions do
if UnitName("target") == champions[name] then
self:RegisterEvent("PLAYER_REGEN_ENABLED")
-- C_LFGList.CreateListing(Category ID, "groupName", itemLevel, "voiceChat", "comment", autoAccept)
C_LFGList.CreateListing(16, UnitName("target"), 0, "", "Join quick !", true)
C_Timer.After(5, function()
ConvertToRaid()
end)
self:UnregisterEvent("PLAYER_TARGET_CHANGED")
end
end
end
if event == "PLAYER_REGEN_ENABLED" then
C_Timer.After(5, function()
C_LFGList.RemoveListing()
LeaveParty()
end)
self:UnregisterEvent("PLAYER_REGEN_ENABLED")
end
end)