Skip to content

Commit

Permalink
Update for GetPetActionInfo API change in WoW 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Phanx committed May 6, 2018
1 parent cfce25d commit a18b133
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ local GetTime = GetTime
local GetSpellInfo = GetSpellInfo
local UnitExists, HasPetUI = UnitExists, HasPetUI

local IS_WOW_8 = GetBuildInfo():match("^8")

local db, block
local backdrop = { edgeSize=16, } -- Left Unchanged
local section, iconsize = 0, 0
Expand Down Expand Up @@ -572,7 +574,12 @@ function CoolLine:PET_BAR_UPDATE_COOLDOWN()
for i = 1, 10, 1 do
local start, duration, enable = GetPetActionCooldown(i)
if enable == 1 then
local name, _, texture = GetPetActionInfo(i)
local name, _, texture
if IS_WOW_8 then
name, texture = GetPetActionInfo(i)
else
name, _, texture = GetPetActionInfo(i)
end
if name then
if start > 0 and not block[name] then
if duration > 3 then
Expand Down

0 comments on commit a18b133

Please sign in to comment.