From 8832e42fefdc1f50266a0f43753f0863d7db2b59 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 3 Nov 2024 11:12:42 +0100 Subject: [PATCH] turtle-wow: remove obsolete trueshot castbar entries --- modules/turtle-wow.lua | 53 ------------------------------------------ 1 file changed, 53 deletions(-) diff --git a/modules/turtle-wow.lua b/modules/turtle-wow.lua index ddc677d9..1c7cf16e 100644 --- a/modules/turtle-wow.lua +++ b/modules/turtle-wow.lua @@ -41,59 +41,6 @@ pfUI:RegisterModule("turtle-wow", "vanilla", function () WorldMapFrameTitle:Hide() 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 -- taken from: https://github.com/doorknob6/pfUI-turtle/blob/master/modules/debuffs.lua HookScript(libdebuff, "OnEvent", function()