However, your code will currently not work, for several reasons. Most importantly:
|
awwww I'm stupid!
for my bad lua knowledge i usually forget correct logic lol
so that code magically worked as a wrong way.....
Apart from that, some other issues / suggestions / hints:
|
thank you i've learn lots from this!
Indentation was lost when i copy to thread (i delete some note when copy it).
what thay need -- sloved:
1.auto select master loot in guild team.
2.auto select freeforall if not in a guild team.
they are release now.
------
what thay need -- now doing:
3.need keep personal loot when sometimes make a premade group, so need a function to disable it.
>do not auto select, creat a frame show option just like "wanna change loot method? [presonal] [master] [freeforall]" when leader make a group or get into a instance.
>a slash cmd to enable/disable addon.
form this, in fact i think they just need a Popup frame to "remind them change loot method if need".
so i try another thing: make a frame to remind ppl when they get into raid.
is this way correct?
Code:
local f = CreateFrame("Frame")
f:SetPoint("CENTER", UIParent, "CENTER", 0, 120)
f:SetSize(150, 70)
f:Hide()
f.Text = f:CreateFontString(nil, "OVERLAY")
f.Text:SetFont(STANDARD_TEXT_FONT, 16, OUTLINE)
f.Text:SetPoint("CENTER", f)
f:RegisterEvent("ZONE_CHANGED_NEW_AREA")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function()
if IsInRaid() and UnitIsGroupLeader("player") then
f:Show()
f.Text:SetText("check loot method!")
else
f:Hide()
end
end)
f:SetScript("OnMouseUp", function()
f:Hide()
end)