Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function()
- local x, y = 0
- local e = aura_env
- local distance = "??m"
- if WeakAuras.IsOptionsOpen() then
- e.group_id = 3
- e.mark_expires = GetTime()+5
- return ("%s\n%.1f"):format(e.group_desc[e.group_id]:gsub("{rt([1-8])}", e.icon), e.mark_expires- GetTime()) .. "s"
- end
- if e.group_id > 0 and e.mark_expires and e.mark_expires > GetTime() then
- local ricon = e.group_desc[e.group_id]:gsub("{rt([1-8])}", e.icon)
- local mexp = e.mark_expires - GetTime()
- local posx, posy = UnitPosition("player")
- local soakdebuff = ""
- if e.debuff then
- x = e.motl_debuff_pos_x[e.group_id]
- y = e.motl_debuff_pos_y[e.group_id]
- distance = math.floor(math.sqrt(math.pow((x-posx), 2) + math.pow((y-posy), 2)) + 0.5)
- soakdebuff = string.gsub(e.debuff_string, "@T", e.mark_timer .. "s")
- if GExRT == nil or e.disable_all_arrow == true or e.disable_debuff_arrows == true then
- return ("%s\n%s\n%.1f"):format(ricon, soakdebuff, mexp) .. "s"
- else
- return ("%s\n%s\n%s\n%.1f"):format(ricon, soakdebuff, distance .. "m" .. GExRT.F.ArrowTextCoord(y, x), mexp) .. "s"
- end
- else
- local mytarget = e.color_name(e.debuff_person)
- x, y = UnitPosition(e.debuff_person)
- if x == nil then -- This should only happen in testing
- x = 0
- y = 0
- distance = "??"
- else
- distance = math.floor(math.sqrt(math.pow((x-posx), 2) + math.pow((y-posy), 2)) + 0.5)
- end
- soakdebuff = e.soak_string
- if GExRT == nil or e.disable_all_arrows == true then
- return ("%s\n%s\n%.1f"):format(ricon, soakdebuff, mexp) .. "s"
- else
- return ("%s\n%s\n%s\n%.1f"):format(ricon, soakdebuff, mytarget .. " " .. distance .. "m" .. GExRT.F.ArrowTextPlayer(e.debuff_person), mexp) .. "s"
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement