Created
October 23, 2009 12:54
-
-
Save yaroot/216858 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function isLeader(u) | |
return ((UnitInParty(u) or UnitInRaid(u)) and UnitIsPartyLeader(u)) | |
end | |
local function isMasterLoot(u) | |
local method, party, raid = GetLootMethod() | |
local unit | |
if method == 'master' then | |
if party then | |
unit = party == 0 and 'player' or 'party' .. party | |
elseif raid then | |
unit = 'raid' .. raid | |
end | |
return unit and UnitIsUnit(u, unit) | |
end | |
end | |
local function func(unit) | |
if isLeader(unit) and isMasterLoot(unit) then | |
-- blah blah blah | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment