SHARE
TWEET

Untitled

a guest Sep 26th, 2016 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function VHM:UpdateRange(elapsed)
  2.     VHM.Work.extRange.Time = VHM.Work.extRange.Time + elapsed
  3.     if VHM.Work.extRange.Time >= VHM.Work.extRange.Repeat and VHM.Work.HealSpell then
  4.         -- clear old options
  5.         VHM.Work.extRange.Time = 0; VHM.Work.extRange.openedFrames = nil
  6.         VHM.Work.extRange.openedFrames = (InspectFrame and InspectFrame:IsVisible()) or (LootFrame and LootFrame:IsVisible()) or (XLootFrame and XLootFrame:IsVisible()) or (TradeFrame and TradeFrame:IsVisible())
  7.         for i=1,40 do
  8.             VHM.Track["raid"..i].extRange = 0
  9.         end
  10.         for i=1,40 do
  11.             VHM.Track["raidpet"..i].extRange = 0
  12.         end
  13.         for i=1,4 do
  14.             VHM.Track["party"..i].extRange = 0
  15.         end
  16.         for i=1,4 do
  17.             VHM.Track["partypet"..i].extRange = 0
  18.         end
  19.        
  20.         VHM.Work.extRange.UnitName = VHM.UnitName("target")
  21.        
  22.         for i=1,VHM.Work.MaxData do
  23.             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
  24.                 TargetUnit(VHM.GroupData[i].UnitID)
  25.                 if IsActionInRange(VHM.Work.HealSpell) == 1 then
  26.                     VHM.Track[VHM.GroupData[i].UnitID].extRange = 1
  27.                 end
  28.             elseif VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") and not VHM.UnitIsUnit("player","target") then
  29.                 if IsActionInRange(VHM.Work.HealSpell) == 1 then
  30.                     VHM.Track[VHM.GroupData[i].UnitID].extRange = 1
  31.                 end
  32.             end
  33.         end
  34.         VHM.ClearTarget()
  35.         if VHM.Work.extRange.UnitName then VHM.TargetByName(VHM.Work.extRange.UnitName, true) end
  36.     end
  37. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top