forked from Bastion/Bastion
parent
33ca6a0707
commit
3b2a60e0f6
@ -0,0 +1,45 @@ |
||||
local |
||||
Tinkr, |
||||
---@type Bastion |
||||
Bastion = ... |
||||
|
||||
local Player = Bastion.UnitManager:Get('player') |
||||
|
||||
local RuneOfPower = Bastion.SpellBook:GetSpell(116011) |
||||
|
||||
local Draw = Tinkr.Util.Draw:New() |
||||
|
||||
Draw:Sync(function(draw) |
||||
for i, object in ipairs(Objects()) do |
||||
local name = ObjectName(object) |
||||
|
||||
if name == RuneOfPower:GetName() then |
||||
local creator = ObjectCreator(object) |
||||
|
||||
if tostring(creator) == tostring(Player:GetGUID()) then |
||||
local distance = ObjectDistance('player', object) |
||||
local ropX, ropY, ropZ = ObjectPosition(object) |
||||
|
||||
draw:Circle(ropX, ropY, ropZ, 8) |
||||
draw:SetColor(69, 7, 58) |
||||
|
||||
if distance > 8 then |
||||
draw:SetColor(252, 3, 207) |
||||
end |
||||
end |
||||
end |
||||
end |
||||
end) |
||||
|
||||
local isEnabled = false |
||||
|
||||
-- Draws a circle around the players Rune of Power to make it easier to stay within range. |
||||
|
||||
local function EnableDrawROP() |
||||
if not isEnabled then |
||||
isEnabled = true |
||||
Draw:Enable() |
||||
end |
||||
end |
||||
|
||||
return EnableDrawROP() |
Loading…
Reference in new issue