daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Sep 24th, 2016 73 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 then
  4.         VHM.Work.extRange.Time = 0; VHM.Work.extRange.openedFrames = nil
  5.         VHM.Work.extRange.openedFrames = (InspectFrame and InspectFrame:IsVisible()) or (LootFrame and LootFrame:IsVisible()) or (XLootFrame and XLootFrame:IsVisible()) or (TradeFrame and TradeFrame:IsVisible())
  6.         -- do the magic here!
  7.         for i=1,VHM.Work.MaxData do
  8.             VHM.GroupData[i].ExtRange = nil
  9.             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
  10.                 TargetUnit(VHM.GroupData[i].UnitID)
  11.                 if IsActionInRange(VHM.Work.HealSpell) then
  12.                     VHM.GroupData[i].ExtRange = 1
  13.                 end
  14.                 TargetLastTarget()
  15.             elseif VHM.UnitIsUnit("target",VHM.GroupData[i].UnitID) and not VHM.UnitIsEnemy("player","target") then
  16.                 if IsActionInRange(VHM.Work.HealSpell) then
  17.                     VHM.GroupData[i].ExtRange = 1
  18.                 end
  19.             end
  20.         end
  21.     end
  22. 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