mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 05:50:50 +00:00
turtle-wow: remove obsolete trueshot castbar entries
This commit is contained in:
@@ -41,59 +41,6 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function ()
|
|||||||
WorldMapFrameTitle:Hide()
|
WorldMapFrameTitle:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add Trueshot recognition to to custom castbars.
|
|
||||||
if not libcast.customcast["trueshot"] then
|
|
||||||
-- add trueshot to pfUI's custom casts
|
|
||||||
local player = UnitName("player")
|
|
||||||
|
|
||||||
-- add locales
|
|
||||||
pfUI_locale["enUS"]["customcast"]["TRUESHOT"] = "Trueshot"
|
|
||||||
pfUI_locale["zhCN"]["customcast"]["TRUESHOT"] = "稳固射击"
|
|
||||||
local trueshot = L["customcast"]["TRUESHOT"]
|
|
||||||
|
|
||||||
libcast.customcast[strlower(trueshot)] = function(begin, duration)
|
|
||||||
if begin then
|
|
||||||
-- cast time is 1sec, however it takes 1.4sec to fire in average
|
|
||||||
local duration = duration or 1400
|
|
||||||
|
|
||||||
for i=1,32 do
|
|
||||||
if UnitBuff("player", i) == "Interface\\Icons\\Racial_Troll_Berserk" then
|
|
||||||
local berserk = 0.3
|
|
||||||
if((UnitHealth("player")/UnitHealthMax("player")) >= 0.40) then
|
|
||||||
berserk = (1.30 - (UnitHealth("player") / UnitHealthMax("player"))) / 3
|
|
||||||
end
|
|
||||||
duration = duration / (1 + berserk)
|
|
||||||
elseif UnitBuff("player", i) == "Interface\\Icons\\Ability_Hunter_RunningShot" then
|
|
||||||
duration = duration / 1.4
|
|
||||||
elseif UnitBuff("player", i) == "Interface\\Icons\\Ability_Warrior_InnerRage" then
|
|
||||||
duration = duration / 1.3
|
|
||||||
elseif UnitBuff("player", i) == "Interface\\Icons\\Inv_Trinket_Naxxramas04" then
|
|
||||||
duration = duration / 1.2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local _,_, lag = GetNetStats()
|
|
||||||
local start = GetTime() + lag/1000
|
|
||||||
|
|
||||||
-- add cast action to the database
|
|
||||||
libcast.db[player].cast = trueshot
|
|
||||||
libcast.db[player].rank = lastrank
|
|
||||||
libcast.db[player].start = start
|
|
||||||
libcast.db[player].casttime = duration
|
|
||||||
libcast.db[player].icon = "Interface\\Icons\\Ability_hunter_steadyshot"
|
|
||||||
libcast.db[player].channel = nil
|
|
||||||
else
|
|
||||||
-- remove cast action to the database
|
|
||||||
libcast.db[player].cast = nil
|
|
||||||
libcast.db[player].rank = nil
|
|
||||||
libcast.db[player].start = nil
|
|
||||||
libcast.db[player].casttime = nil
|
|
||||||
libcast.db[player].icon = nil
|
|
||||||
libcast.db[player].channel = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- refresh paladin judgements on holy strike
|
-- refresh paladin judgements on holy strike
|
||||||
-- taken from: https://github.com/doorknob6/pfUI-turtle/blob/master/modules/debuffs.lua
|
-- taken from: https://github.com/doorknob6/pfUI-turtle/blob/master/modules/debuffs.lua
|
||||||
HookScript(libdebuff, "OnEvent", function()
|
HookScript(libdebuff, "OnEvent", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user