panel: add tbc compatibility for minimap zone text

This commit is contained in:
Artur Morozov
2019-06-16 14:55:59 +02:00
committed by shagu
parent 3232e10daa
commit 5082a7deb3
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@ if pfUI.expansion ~= "tbc" then return end
-- [[ Constants ]]-- -- [[ Constants ]]--
CASTBAR_EVENT_CAST_DELAY = "UNIT_SPELLCAST_DELAYED" CASTBAR_EVENT_CAST_DELAY = "UNIT_SPELLCAST_DELAYED"
CASTBAR_EVENT_CHANNEL_DELAY = "UNIT_SPELLCAST_CHANNEL_UPDATE" CASTBAR_EVENT_CHANNEL_DELAY = "UNIT_SPELLCAST_CHANNEL_UPDATE"
EVENTS_MINIMAP_ZONE_UPDATE = {"PLAYER_ENTERING_WORLD", "ZONE_CHANGED_NEW_AREA", "ZONE_CHANGED"}
MICRO_BUTTONS = { MICRO_BUTTONS = {
'CharacterMicroButton', 'SpellbookMicroButton', 'TalentMicroButton', 'CharacterMicroButton', 'SpellbookMicroButton', 'TalentMicroButton',
+1
View File
@@ -5,6 +5,7 @@ if pfUI.expansion ~= "vanilla" then return end
-- [[ Constants ]]-- -- [[ Constants ]]--
CASTBAR_EVENT_CAST_DELAY = "SPELLCAST_DELAYED" CASTBAR_EVENT_CAST_DELAY = "SPELLCAST_DELAYED"
CASTBAR_EVENT_CHANNEL_DELAY = "SPELLCAST_CHANNEL_UPDATE" CASTBAR_EVENT_CHANNEL_DELAY = "SPELLCAST_CHANNEL_UPDATE"
EVENTS_MINIMAP_ZONE_UPDATE = {"PLAYER_ENTERING_WORLD", "MINIMAP_ZONE_CHANGED"}
MICRO_BUTTONS = { MICRO_BUTTONS = {
'CharacterMicroButton', 'SpellbookMicroButton', 'TalentMicroButton', 'CharacterMicroButton', 'SpellbookMicroButton', 'TalentMicroButton',
+3 -2
View File
@@ -397,8 +397,9 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function()
do -- Zone do -- Zone
local widget = CreateFrame("Frame", "pfPanelWidgetZone", UIParent) local widget = CreateFrame("Frame", "pfPanelWidgetZone", UIParent)
widget:RegisterEvent("PLAYER_ENTERING_WORLD") for _,event in pairs(EVENTS_MINIMAP_ZONE_UPDATE) do
widget:RegisterEvent("MINIMAP_ZONE_CHANGED") widget:RegisterEvent(event)
end
widget.Tooltip = function() widget.Tooltip = function()
local real = GetRealZoneText() local real = GetRealZoneText()
local sub = GetSubZoneText() local sub = GetSubZoneText()