mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
af74c9e3fe
|
|||
611f37a1f3
|
|||
5d8b83e5ef
|
|||
53fdb48b05
|
|||
b64294ca11
|
|||
0785265feb
|
|||
4007f1258b
|
|||
c7c92d468e
|
|||
eee20f17b4
|
|||
0aa584d81a
|
|||
51e2debc4d
|
|||
d48ae9b12a
|
|||
83028c159f
|
|||
a8a3da753e
|
|||
9e77fa6831 |
61
IceCore.lua
61
IceCore.lua
@ -41,6 +41,26 @@ IceCore.TextDecorationStyle = {
|
|||||||
NoDecoration = L["No decoration"],
|
NoDecoration = L["No decoration"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local ZM_MAP_ID = 1970
|
||||||
|
IceCore.zmPuzzleIds = {
|
||||||
|
--Fugueal Protolock
|
||||||
|
366046,
|
||||||
|
366108,
|
||||||
|
359488,
|
||||||
|
--Mezzonic Protolock
|
||||||
|
366042,
|
||||||
|
366106,
|
||||||
|
351405,
|
||||||
|
--Cantaric Protolock
|
||||||
|
365840,
|
||||||
|
366107,
|
||||||
|
348792,
|
||||||
|
}
|
||||||
|
IceCore.zmPuzzleMap = {}
|
||||||
|
for i=1, #IceCore.zmPuzzleIds do
|
||||||
|
IceCore.zmPuzzleMap[IceCore.zmPuzzleIds[i]] = true
|
||||||
|
end
|
||||||
|
|
||||||
local SUNDER_SPELL_ID = 7386
|
local SUNDER_SPELL_ID = 7386
|
||||||
local LACERATE_SPELL_ID = 33745
|
local LACERATE_SPELL_ID = 33745
|
||||||
local MAELSTROM_SPELL_ID = 53817
|
local MAELSTROM_SPELL_ID = 53817
|
||||||
@ -259,6 +279,10 @@ function IceCore.prototype:Enable(userToggle)
|
|||||||
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_OPEN")
|
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_OPEN")
|
||||||
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
|
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
|
||||||
end
|
end
|
||||||
|
if C_Map then
|
||||||
|
self.IceHUDFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
|
self.IceHUDFrame:RegisterEvent("ZONE_CHANGED")
|
||||||
|
end
|
||||||
self.IceHUDFrame:RegisterEvent("UNIT_AURA")
|
self.IceHUDFrame:RegisterEvent("UNIT_AURA")
|
||||||
self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...)
|
self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...)
|
||||||
if (event == "PET_BATTLE_OPENING_START") then
|
if (event == "PET_BATTLE_OPENING_START") then
|
||||||
@ -279,13 +303,48 @@ function IceCore.prototype:Enable(userToggle)
|
|||||||
end
|
end
|
||||||
elseif (event == "UNIT_AURA") then
|
elseif (event == "UNIT_AURA") then
|
||||||
local unit = ...
|
local unit = ...
|
||||||
if IceHUD.IceCore.settings.bHideDuringShellGame and unit == "player" and IceHUD:HasDebuffs("player", {271571})[1] and UnitInVehicle("player") then
|
if unit ~= "player" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if IceHUD.IceCore.settings.bHideDuringShellGame and IceHUD:HasAnyDebuff("player", {271571}) and UnitInVehicle("player") then
|
||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE")
|
||||||
self:Hide()
|
self:Hide()
|
||||||
|
elseif C_Map then
|
||||||
|
local bestMapID = C_Map.GetBestMapForUnit("player")
|
||||||
|
if bestMapID ~= ZM_MAP_ID then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if IceHUD:HasAnyBuff("player", IceCore.zmPuzzleIds) then
|
||||||
|
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elseif (event == "UNIT_EXITED_VEHICLE") then
|
elseif (event == "UNIT_EXITED_VEHICLE") then
|
||||||
self:UnregisterEvent("UNIT_EXITED_VEHICLE")
|
self:UnregisterEvent("UNIT_EXITED_VEHICLE")
|
||||||
self:Show()
|
self:Show()
|
||||||
|
elseif (event == "PLAYER_ENTERING_WORLD" or event == "ZONE_CHANGED") then
|
||||||
|
if C_Map then
|
||||||
|
local bestMapID = C_Map.GetBestMapForUnit("player")
|
||||||
|
if bestMapID == ZM_MAP_ID then
|
||||||
|
if IceHUD:HasAnyBuff("player", IceCore.zmPuzzleIds) then
|
||||||
|
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
|
||||||
|
self:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
|
||||||
|
local _,subevent,_,_,_,_,_,_,destName,_,_,spellId = CombatLogGetCurrentEventInfo()
|
||||||
|
|
||||||
|
if subevent == "SPELL_AURA_REMOVED" then
|
||||||
|
if destName == UnitName("player") then
|
||||||
|
if IceCore.zmPuzzleMap[spellId] then
|
||||||
|
self:Show()
|
||||||
|
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
26
IceHUD.lua
26
IceHUD.lua
@ -35,6 +35,8 @@ IceHUD.PerTargetComboPoints = IceHUD.WowVer < 60000
|
|||||||
IceHUD.CanTrackOtherUnitBuffs = not IceHUD.WowClassic
|
IceHUD.CanTrackOtherUnitBuffs = not IceHUD.WowClassic
|
||||||
IceHUD.CanTrackGCD = not IceHUD.WowClassic
|
IceHUD.CanTrackGCD = not IceHUD.WowClassic
|
||||||
IceHUD.GetSpellInfoReturnsFunnel = IceHUD.WowMain and IceHUD.WowVer < 60000
|
IceHUD.GetSpellInfoReturnsFunnel = IceHUD.WowMain and IceHUD.WowVer < 60000
|
||||||
|
IceHUD.CanHookDestroyTotem = IceHUD.WowClassic or IceHUD.WowClassicBC
|
||||||
|
IceHUD.ShouldUpdateTargetHealthEveryTick = IceHUD.WowClassicBC and GetCVarBool("predictedHealth")
|
||||||
|
|
||||||
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
||||||
|
|
||||||
@ -492,6 +494,30 @@ do
|
|||||||
function IceHUD:HasDebuffs(unit, spellIDs, filter)
|
function IceHUD:HasDebuffs(unit, spellIDs, filter)
|
||||||
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
|
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceHUD:HasAnyBuff(unit, spellIDs, filter)
|
||||||
|
local buffs = IceHUD:HasBuffs(unit, spellIDs, filter)
|
||||||
|
|
||||||
|
for i=1, #buffs do
|
||||||
|
if buffs[i] then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function IceHUD:HasAnyDebuff(unit, spellIDs, filter)
|
||||||
|
local debuffs = IceHUD:HasDebuffs(unit, spellIDs, filter)
|
||||||
|
|
||||||
|
for i=1, #debuffs do
|
||||||
|
if debuffs[i] then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceHUD:OnDisable()
|
function IceHUD:OnDisable()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## Interface: 90105
|
## Interface: 90200
|
||||||
## Interface-Retail: 90105
|
## Interface-Retail: 90200
|
||||||
## Interface-Classic: 11401
|
## Interface-Classic: 11402
|
||||||
## Interface-BCC: 20502
|
## Interface-BCC: 20503
|
||||||
## Author: Parnic, originally created by Iceroth
|
## Author: Parnic, originally created by Iceroth
|
||||||
## Name: IceHUD
|
## Name: IceHUD
|
||||||
## Title: IceHUD |cff7fff7f-Ace3-|r
|
## Title: IceHUD |cff7fff7f-Ace3-|r
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## Interface: 90105
|
## Interface: 90200
|
||||||
## Interface-Retail: 90105
|
## Interface-Retail: 90200
|
||||||
## Interface-Classic: 11401
|
## Interface-Classic: 11402
|
||||||
## Interface-BCC: 20502
|
## Interface-BCC: 20503
|
||||||
## Title: IceHUD |cff7fff7f-Options-|r
|
## Title: IceHUD |cff7fff7f-Options-|r
|
||||||
## Author: Parnic
|
## Author: Parnic
|
||||||
## Version: @project-version@
|
## Version: @project-version@
|
||||||
|
17
changelog.md
17
changelog.md
@ -1,5 +1,22 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.13.13:
|
||||||
|
|
||||||
|
- Slight optimization of Zereth Mortis puzzle detection logic.
|
||||||
|
- Fixed target health updating infrequently on Classic-BC.
|
||||||
|
- Fixed reported error in TargetInvuln module.
|
||||||
|
|
||||||
|
v1.13.12:
|
||||||
|
|
||||||
|
- Hide IceHUD during Zereth Mortis puzzles
|
||||||
|
- Fixed default player and target frames coming back sometimes (github issue #19)
|
||||||
|
- Updated TOC for 9.2.0 and 1.14.2
|
||||||
|
|
||||||
|
v1.13.11:
|
||||||
|
|
||||||
|
- Fixed totem bar dismissal for BC-Classic and Classic
|
||||||
|
- Updated TOC for BC-Clasic
|
||||||
|
|
||||||
v1.13.10:
|
v1.13.10:
|
||||||
|
|
||||||
- Updated TOCs for 9.1.5 and 1.14.1
|
- Updated TOCs for 9.1.5 and 1.14.1
|
||||||
|
@ -1407,15 +1407,18 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:ShowBlizz()
|
function PlayerHealth.prototype:ShowBlizz()
|
||||||
PlayerFrame:Show()
|
PlayerFrame:SetParent(self.OriginalPlayerFrameParent or UIParent)
|
||||||
PlayerFrame:GetScript("OnLoad")(PlayerFrame)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function PlayerHealth.prototype:HideBlizz()
|
function PlayerHealth.prototype:HideBlizz()
|
||||||
PlayerFrame:Hide()
|
if not self.PlayerFrameParent then
|
||||||
|
self.PlayerFrameParent = CreateFrame("Frame")
|
||||||
|
self.PlayerFrameParent:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
PlayerFrame:UnregisterAllEvents()
|
self.OriginalPlayerFrameParent = PlayerFrame:GetParent()
|
||||||
|
PlayerFrame:SetParent(self.PlayerFrameParent)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:HideBlizzardParty()
|
function PlayerHealth.prototype:HideBlizzardParty()
|
||||||
|
@ -642,6 +642,10 @@ function IceTargetHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
|
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
|
||||||
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
|
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if IceHUD.ShouldUpdateTargetHealthEveryTick and self.unit == "target" then
|
||||||
|
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.moduleSettings.hideBlizz) then
|
if (self.moduleSettings.hideBlizz) then
|
||||||
@ -659,6 +663,10 @@ function IceTargetHealth.prototype:Disable(core)
|
|||||||
|
|
||||||
UnregisterUnitWatch(self.frame)
|
UnregisterUnitWatch(self.frame)
|
||||||
|
|
||||||
|
if self.registerEvents and IceHUD.ShouldUpdateTargetHealthEveryTick and self.unit == "target" then
|
||||||
|
self.frame:SetScript("OnUpdate", nil)
|
||||||
|
end
|
||||||
|
|
||||||
if self.moduleSettings.hideBlizz then
|
if self.moduleSettings.hideBlizz then
|
||||||
self:ShowBlizz()
|
self:ShowBlizz()
|
||||||
end
|
end
|
||||||
@ -1057,20 +1065,25 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function IceTargetHealth.prototype:ShowBlizz()
|
function IceTargetHealth.prototype:ShowBlizz()
|
||||||
TargetFrame:Show()
|
TargetFrame:SetParent(self.OriginalTargetFrameParent or UIParent)
|
||||||
TargetFrame:GetScript("OnLoad")(TargetFrame)
|
ComboFrame:SetParent(self.OriginalComboFrameParent or UIParent)
|
||||||
|
|
||||||
ComboFrame:Show()
|
|
||||||
ComboFrame:GetScript("OnLoad")(ComboFrame)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceTargetHealth.prototype:HideBlizz()
|
function IceTargetHealth.prototype:HideBlizz()
|
||||||
TargetFrame:Hide()
|
if not self.TargetFrameParent then
|
||||||
TargetFrame:UnregisterAllEvents()
|
self.TargetFrameParent = CreateFrame("Frame")
|
||||||
|
self.TargetFrameParent:Hide()
|
||||||
|
end
|
||||||
|
if not self.ComboFrameParent then
|
||||||
|
self.ComboFrameParent = CreateFrame("Frame")
|
||||||
|
self.ComboFrameParent:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
ComboFrame:Hide()
|
self.OriginalTargetFrameParent = TargetFrame:GetParent()
|
||||||
ComboFrame:UnregisterAllEvents()
|
TargetFrame:SetParent(self.TargetFrameParent)
|
||||||
|
self.OriginalComboFrameParent = ComboFrame:GetParent()
|
||||||
|
ComboFrame:SetParent(self.ComboFrameParent)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceTargetHealth.prototype:UpdateBar(scale, color, alpha)
|
function IceTargetHealth.prototype:UpdateBar(scale, color, alpha)
|
||||||
|
@ -197,7 +197,7 @@ end
|
|||||||
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
|
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
|
||||||
local name, duration, remaining
|
local name, duration, remaining
|
||||||
|
|
||||||
if not isUpdate then
|
if not isUpdate or not self.lastUpdateTime then
|
||||||
self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)
|
self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)
|
||||||
else
|
else
|
||||||
self.buffRemaining = math.max(0, self.buffRemaining - (GetTime() - self.lastUpdateTime))
|
self.buffRemaining = math.max(0, self.buffRemaining - (GetTime() - self.lastUpdateTime))
|
||||||
|
@ -339,7 +339,6 @@ function Totems.prototype:CreateTotem(i, name)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local haveTotem, name, startTime, duration, icon = GetTotemInfo(i)
|
local haveTotem, name, startTime, duration, icon = GetTotemInfo(i)
|
||||||
local bWasNewFrame = false
|
|
||||||
if (not self.frame.graphical[i]) then
|
if (not self.frame.graphical[i]) then
|
||||||
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame)
|
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame)
|
||||||
self.frame.graphical[i].totem = self.frame.graphical[i]:CreateTexture(nil, "LOW")
|
self.frame.graphical[i].totem = self.frame.graphical[i]:CreateTexture(nil, "LOW")
|
||||||
@ -348,7 +347,6 @@ function Totems.prototype:CreateTotem(i, name)
|
|||||||
|
|
||||||
self.frame.graphical[i].totem:SetTexture(icon)
|
self.frame.graphical[i].totem:SetTexture(icon)
|
||||||
self.frame.graphical[i].totem:SetAllPoints(self.frame.graphical[i])
|
self.frame.graphical[i].totem:SetAllPoints(self.frame.graphical[i])
|
||||||
bWasNewFrame = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
|
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
|
||||||
@ -405,18 +403,19 @@ function Totems.prototype:CreateTotem(i, name)
|
|||||||
self.frame.graphical[i]:EnableMouse(true)
|
self.frame.graphical[i]:EnableMouse(true)
|
||||||
self.frame.graphical[i]:SetScript("OnEnter", self.graphicalOnEnter)
|
self.frame.graphical[i]:SetScript("OnEnter", self.graphicalOnEnter)
|
||||||
self.frame.graphical[i]:SetScript("OnLeave", self.graphicalOnLeave)
|
self.frame.graphical[i]:SetScript("OnLeave", self.graphicalOnLeave)
|
||||||
|
if IceHUD.CanHookDestroyTotem then
|
||||||
|
self.frame.graphical[i]:SetScript("OnMouseUp", self.graphicalOnMouseUp)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self.frame.graphical[i]:EnableMouse(false)
|
self.frame.graphical[i]:EnableMouse(false)
|
||||||
self.frame.graphical[i]:SetScript("OnEnter", nil)
|
self.frame.graphical[i]:SetScript("OnEnter", nil)
|
||||||
self.frame.graphical[i]:SetScript("OnLeave", nil)
|
self.frame.graphical[i]:SetScript("OnLeave", nil)
|
||||||
|
if IceHUD.CanHookDestroyTotem then
|
||||||
|
self.frame.graphical[i]:SetScript("OnMouseUp", nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
self.frame.graphical[i].slot = i
|
self.frame.graphical[i].slot = i
|
||||||
self.frame.graphical[i].name = name
|
self.frame.graphical[i].name = name
|
||||||
|
|
||||||
-- it looks like HookScript will continue to add handlers every time instead of replacing them like SetScript
|
|
||||||
if (bWasNewFrame) then
|
|
||||||
--self.frame.graphical[i]:HookScript("OnMouseUp", self.graphicalOnMouseUp)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Load us up
|
-- Load us up
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
v1.13.10:
|
v1.13.13:
|
||||||
|
|
||||||
- Updated TOCs for 9.1.5 and 1.14.1
|
- Slight optimization of Zereth Mortis puzzle detection logic.
|
||||||
|
- Fixed target health updating infrequently on Classic-BC.
|
||||||
|
- Fixed reported error in TargetInvuln module.
|
||||||
|
Reference in New Issue
Block a user