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 then
- 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())
- -- do the magic here!
- for i=1,VHM.Work.MaxData do
- VHM.GroupData[i].ExtRange = nil
- if VHM.GroupData[i].Visible and not VHM.GroupData[i].UnitRange and VHM.GroupData[i].HealthDeficite > VHM.Work.extRange.HPLimit and not VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") and not VHM.Work.extRange.openedFrames then
- TargetUnit(VHM.GroupData[i].UnitID)
- if IsActionInRange(VHM.Work.HealSpell) then
- VHM.GroupData[i].ExtRange = 1
- end
- TargetLastTarget()
- elseif VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") then
- if IsActionInRange(VHM.Work.HealSpell) then
- VHM.GroupData[i].ExtRange = 1
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement