Skip to content

Commit

Permalink
only update attack/range actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Jan 25, 2020
1 parent fff6f71 commit fa33dc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# tullaRange release notes

## 8.3.1

* Increase performance a bit by only updating attack actions and actions with a range

## 8.3.0

* Update for WoW 8.3.0
Expand Down
6 changes: 4 additions & 2 deletions tullaRange/tullaRange.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ local ATTACK_BUTTON_FLASH_TIME = _G.ATTACK_BUTTON_FLASH_TIME

local IsActionInRange = _G.IsActionInRange
local IsUsableAction = _G.IsUsableAction
local HasAction = _G.HasAction
local IsAttackAction = _G.IsAttackAction
local ActionHasRange = _G.ActionHasRange
-- local HasAction = _G.HasAction

--[[
Helper Functions
Expand Down Expand Up @@ -227,7 +229,7 @@ end
function Addon:UpdateButtonStatus(button)
local action = button.action

if action and button:IsVisible() and HasAction(action) then
if action and button:IsVisible() and (ActionHasRange(action) or IsAttackAction(action)) then
self.buttonsToUpdate[button] = true
else
self.buttonsToUpdate[button] = nil
Expand Down

0 comments on commit fa33dc6

Please sign in to comment.