Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function VHM:UpdateRange(elapsed)
- VHM.Work.extRange.Time = VHM.Work.extRange.Time + elapsed
- if VHM.Work.extRange.Time >= VHM.Work.extRange.Repeat and VHM.Work.HealSpell then
- -- clear old options
- VHM.Work.extRange.Time = 0; VHM.Work.extRange.openedFrames = nil
- VHM.Work.extRange.openedFrames = (InspectFrame and InspectFrame:IsVisible()) or (LootFrame and LootFrame:IsVisible()) or (XLootFrame and XLootFrame:IsVisible()) or (TradeFrame and TradeFrame:IsVisible())
- for i=1,40 do
- VHM.Track["raid"..i].extRange = 0
- end
- for i=1,40 do
- VHM.Track["raidpet"..i].extRange = 0
- end
- for i=1,4 do
- VHM.Track["party"..i].extRange = 0
- end
- for i=1,4 do
- VHM.Track["partypet"..i].extRange = 0
- end
- VHM.Work.extRange.UnitName = VHM.UnitName("target")
- for i=1,VHM.Work.MaxData do
- if VHM.GroupData[i].Visible and not VHM.GroupData[i].UnitRange and not VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") and not VHM.UnitIsUnit("player",VHM.GroupData[i].UnitID) and not VHM.Work.extRange.openedFrames then
- TargetUnit(VHM.GroupData[i].UnitID)
- if IsActionInRange(VHM.Work.HealSpell) == 1 then
- VHM.Track[VHM.GroupData[i].UnitID].extRange = 1
- end
- elseif VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") and not VHM.UnitIsUnit("player","target") then
- if IsActionInRange(VHM.Work.HealSpell) == 1 then
- VHM.Track[VHM.GroupData[i].UnitID].extRange = 1
- end
- end
- end
- VHM.ClearTarget()
- if VHM.Work.extRange.UnitName then VHM.TargetByName(VHM.Work.extRange.UnitName, true) end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement