Skip to content

Instantly share code, notes, and snippets.

@benphelps
Created October 29, 2013 22:12
Show Gist options
  • Save benphelps/7223596 to your computer and use it in GitHub Desktop.
Save benphelps/7223596 to your computer and use it in GitHub Desktop.
ProbablyEngine.module.world.aquireHealth = function(guid)
local inGroup = GetNumGroupMembers()
if inGroup then
if IsInRaid("player") then
for i=1,inGroup do
if guid == UnitGUID("RAID".. i .. "TARGET") then
return UnitHealth("RAID".. i .. "TARGET")
end
end
else
for i=1,inGroup do
if guid == UnitGUID("PARTY".. i .. "TARGET") then
return UnitHealth("PARTY".. i .. "TARGET")
end
end
end
else
if guid == UnitGUID("PLAYERTARGET") then
return UnitHealth("PLAYERTARGET")
end
end
return false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment