From ecef67c066b3ea41299402aae93826f124298c42 Mon Sep 17 00:00:00 2001 From: Gethe Date: Sat, 6 Nov 2021 03:40:02 +0000 Subject: [PATCH] 2.5.2 (40892) --- .../Blizzard_Commentator.lua | 13 + .../Blizzard_CommentatorUnitFrame.lua | 2 +- .../Blizzard_UIWidgetTopCenterFrame.lua | 2 +- .../FrameXML/ObjectAPI/PlayerLocation.lua | 18 + .../AddOns/Blizzard_Commentator/Bindings.xml | 184 ----- .../CommentatorVictoryFanfare.lua | 66 -- .../CommentatorVictoryFanfare.xml | 173 ---- Interface_TBC/FrameXML/BNet.lua | 5 + Interface_TBC/FrameXML/FriendsFrame.lua | 11 +- Interface_TBC/FrameXML/Minimap.lua | 6 - Interface_TBC/FrameXML/StaticPopup.lua | 22 - Interface_TBC/FrameXML/UnitPopup.lua | 2 + .../AddOns/Blizzard_Commentator/Bindings.xml | 352 --------- .../CommentatorEventAlerts.lua | 26 - .../CommentatorEventAlerts.xml | 16 - .../CommentatorVictoryFanfare.lua | 66 -- .../CommentatorVictoryFanfare.xml | 173 ---- .../Blizzard_Commentator/PvPCommentator.lua | 630 --------------- .../Blizzard_Commentator/PvPCommentator.xml | 11 - .../Blizzard_Commentator/TeamDisplay.lua | 197 ----- .../Blizzard_Commentator/TeamDisplay.xml | 85 -- .../AddOns/Blizzard_Commentator/UnitFrame.lua | 415 ---------- .../UnitFrameLayoutData.lua | 741 ------------------ .../UnitFrameTemplates.xml | 126 --- Interface_Vanilla/FrameXML/BNet.lua | 5 + Interface_Vanilla/FrameXML/FriendsFrame.lua | 11 +- Interface_Vanilla/FrameXML/Minimap.lua | 1 - Interface_Vanilla/FrameXML/UnitPopup.lua | 2 + 28 files changed, 65 insertions(+), 3296 deletions(-) delete mode 100644 Interface_TBC/AddOns/Blizzard_Commentator/Bindings.xml delete mode 100644 Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.lua delete mode 100644 Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/Bindings.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/CommentatorEventAlerts.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/CommentatorEventAlerts.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/PvPCommentator.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/PvPCommentator.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/TeamDisplay.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/TeamDisplay.xml delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/UnitFrame.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/UnitFrameLayoutData.lua delete mode 100644 Interface_Vanilla/AddOns/Blizzard_Commentator/UnitFrameTemplates.xml diff --git a/Interface/AddOns/Blizzard_Commentator/Blizzard_Commentator.lua b/Interface/AddOns/Blizzard_Commentator/Blizzard_Commentator.lua index 5a413943e9..94cbf3ec4d 100644 --- a/Interface/AddOns/Blizzard_Commentator/Blizzard_Commentator.lua +++ b/Interface/AddOns/Blizzard_Commentator/Blizzard_Commentator.lua @@ -36,6 +36,15 @@ function CycleFollowCameraTransitionPreset(index) C_Commentator.SetFollowCameraSpeeds(unpack(FOLLOW_CAM_TRANSITION_SPEEDS[CurrentCamTransitionIndex])); end +function SetSpectatorModeForOtherFrames(spectatorMode) + if (UIWidgetTopCenterContainerFrame) then + UIWidgetTopCenterContainerFrame:SetSpectatorMode(spectatorMode, Commentator.Scoreboard.Clock); + end + if (BattlefieldMapFrame) then + BattlefieldMapFrame:SetSpectatorMode(spectatorMode); + end +end + CommentatorMixin = {} function CommentatorMixin:OnLoad() @@ -276,6 +285,7 @@ function CommentatorMixin:Shutdown() self.Scoreboard:Hide(); self:ClearUnitFrames(); self:SetFrameLock(false); + SetSpectatorModeForOtherFrames(false); end function CommentatorMixin:Reset() @@ -457,6 +467,7 @@ function CommentatorMixin:OnObserverStateChanged(oldState, newState) self:ClearUnitFrames(); self:SetFrameLock(true); + SetSpectatorModeForOtherFrames(true); elseif newState == TOURNAMENTARENA_ZONESTATE_OBSERVING or newState == TOURNAMENTARENA_ZONESTATE_PREMATCH then ClearTarget(); @@ -466,6 +477,7 @@ function CommentatorMixin:OnObserverStateChanged(oldState, newState) self.currentSpeedFactor = nil; self:SetFrameLock(true); + SetSpectatorModeForOtherFrames(true); elseif newState == TOURNAMENTARENA_ZONESTATE_SCANNING then ClearTarget(); @@ -477,6 +489,7 @@ function CommentatorMixin:OnObserverStateChanged(oldState, newState) self:ClearUnitFrames(); self:SetFrameLock(false); + SetSpectatorModeForOtherFrames(false); end end diff --git a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorUnitFrame.lua b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorUnitFrame.lua index 0d55378fbf..15b1b89a32 100644 --- a/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorUnitFrame.lua +++ b/Interface/AddOns/Blizzard_Commentator/Blizzard_CommentatorUnitFrame.lua @@ -255,7 +255,7 @@ end function CommentatorUnitFrameMixin:GetPlayerNameText() if self.lifeState == LifeState.Dead then - return COMMENTATOR_UNITFRAME_DEAD_STR; + return self:GetPlayerName() .. " " .. COMMENTATOR_UNITFRAME_DEAD_STR; elseif self.ccDisplayText and GetCVarBool("commentatorLossOfControlTextUnitFrame") then return self.ccDisplayText; else diff --git a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTopCenterFrame.lua b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTopCenterFrame.lua index a7821de523..cc6682255e 100644 --- a/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTopCenterFrame.lua +++ b/Interface/AddOns/Blizzard_UIWidgets/Blizzard_UIWidgetTopCenterFrame.lua @@ -50,7 +50,7 @@ end function UIWidgetTopCenterContainerMixin:SetSpectatorMode(spectatorMode, relativeFrame) if (spectatorMode) then if (relativeFrame) then - self:SetPoint("TOP", relativeFrame, "BOTTOM", 0, -5); + self:SetPoint("TOP", relativeFrame, "BOTTOM", 0, 0); end self:SetScale(1.5); else diff --git a/Interface/FrameXML/ObjectAPI/PlayerLocation.lua b/Interface/FrameXML/ObjectAPI/PlayerLocation.lua index f49c2c7575..bfab2c89bf 100644 --- a/Interface/FrameXML/ObjectAPI/PlayerLocation.lua +++ b/Interface/FrameXML/ObjectAPI/PlayerLocation.lua @@ -43,6 +43,12 @@ end return playerLocation; end +--[[static]] function PlayerLocation:CreateFromWhoIndex(whoIndex) + local playerLocation = CreateFromMixins(PlayerLocationMixin); + playerLocation:SetWhoIndex(whoIndex); + return playerLocation; +end + --[[public api]] function PlayerLocationMixin:SetGUID(guid) self:ClearAndSetField("guid", guid); @@ -118,6 +124,18 @@ function PlayerLocationMixin:GetVoiceID() return self.voiceMemberID, self.voiceChannelID; end +function PlayerLocationMixin:SetWhoIndex(whoIndex) + self:ClearAndSetField("whoIndex", whoIndex); +end + +function PlayerLocationMixin:IsWhoIndex() + return self.whoIndex ~= nil; +end + +function PlayerLocationMixin:GetWhoIndex() + return self.whoIndex; +end + function PlayerLocationMixin:SetCommunityData(clubID, streamID, epoch, position) self:Clear(); self.communityClubID = clubID; diff --git a/Interface_TBC/AddOns/Blizzard_Commentator/Bindings.xml b/Interface_TBC/AddOns/Blizzard_Commentator/Bindings.xml deleted file mode 100644 index b526e74ca0..0000000000 --- a/Interface_TBC/AddOns/Blizzard_Commentator/Bindings.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - Commentator:Reset(); - - - - Commentator:ModifyCameraSpeed(1); - - - Commentator:ModifyCameraSpeed(-1); - - - - C_Commentator.ZoomIn(); - - - C_Commentator.ZoomOut(); - - - C_Commentator.ResetFoVTarget(); - - - C_Commentator.SetUseSmartCamera(not C_Commentator.IsUsingSmartCamera()); - - - C_Commentator.SetSmartCameraLocked(not C_Commentator.IsSmartCameraLocked()); - > - - - C_Commentator.ClearCameraTarget(); - - - - - CycleFollowCameraTransitionPreset(); - - - C_Commentator.ForceFollowTransition(); - - - C_Commentator.SetSmoothFollowTransitioning(not C_Commentator.GetSmoothFollowTransitioning()); - - - C_Commentator.SetCameraCollision(not C_Commentator.GetCameraCollision()); - - - - - Commentator.Scoreboard:AddScore(1) - - - Commentator.Scoreboard:AddScore(2) - - - Commentator.Scoreboard:RemoveScore(1) - - - Commentator.Scoreboard:RemoveScore(2) - - - Commentator.Scoreboard:ResetScores() - - - Commentator:SwapTeams(); - - - Commentator:CheckScoreboard(); - - - Commentator:ToggleFrameLock(); - - - - Commentator:ObservePlayer(1, 1, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(1, 2, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(1, 3, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(1, 4, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(1, 5, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(1, 6, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 1, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 2, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 3, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 4, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 5, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - Commentator:ObservePlayer(2, 6, TOURNAMENT_OBSERVE_PLAYER_PRIMARY); - - - - Commentator:ObservePlayer(1, 1, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(1, 2, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(1, 3, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(1, 4, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(1, 5, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(1, 6, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 1, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 2, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 3, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 4, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 5, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - Commentator:ObservePlayer(2, 6, TOURNAMENT_OBSERVE_PLAYER_PRIMARY_SNAP); - - - - Commentator:ObservePlayer(1, 1, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(1, 2, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(1, 3, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(1, 4, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(1, 5, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(1, 6, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 1, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 2, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 3, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 4, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 5, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - - Commentator:ObservePlayer(2, 6, TOURNAMENT_OBSERVE_PLAYER_SECONDARY); - - diff --git a/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.lua b/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.lua deleted file mode 100644 index 08f3b18ae6..0000000000 --- a/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.lua +++ /dev/null @@ -1,66 +0,0 @@ - -local COMMENTATOR_VICTORY_FANFARE_MODEL_SCENE_ID = 59; -local COMMENTATOR_VICTORY_FANFARE_EFFECT_MODEL_ID = 382335;--"SPELLS\\EASTERN_PLAGUELANDS_BEAM_EFFECT.M2"; - -CommentatorVictoryFanfareFrameMixin = {}; - -function CommentatorVictoryFanfareFrameMixin:OnLoad() - self:RegisterEvent("PLAYER_ENTERING_WORLD"); - self.BackgroundModelScene:SetFromModelSceneID(COMMENTATOR_VICTORY_FANFARE_MODEL_SCENE_ID, true); - - local effect = self.BackgroundModelScene:GetActorByTag("effect"); - if effect then - effect:SetModelByFileID(COMMENTATOR_VICTORY_FANFARE_EFFECT_MODEL_ID); - effect:SetAlpha(0.0); - self.BackgroundModelScene.effect = effect; - end - - local effect2 = self.BackgroundModelScene:GetActorByTag("effect2"); - if effect2 then - effect2:SetModelByFileID(COMMENTATOR_VICTORY_FANFARE_EFFECT_MODEL_ID); - effect2:SetAlpha(0.0); - self.BackgroundModelScene.effect2 = effect2; - end - - self.BG1:SetWidth(GetScreenWidth() * 0.8); - self.BG1:SetHeight(2); - - self.BG2:SetWidth(GetScreenWidth() * 0.8); - self.BG2:SetHeight(2); - -end - -function CommentatorVictoryFanfareFrameMixin:OnEvent(event) - if event == "PLAYER_ENTERING_WORLD" then - self:Reset(); - self:Hide(); - end -end - -function CommentatorVictoryFanfareFrameMixin:PlayVictoryFanfare(text, team) - self.Title:SetText(text); - self.TitleFlash:SetText(text); - self.TeamName:SetText(team); - self.TeamNameFlash:SetText(team); - - self:Reset(); - self.Anim:Play(); - - C_Timer.After(1.5, function() - self.BackgroundModelScene.EffectAnimIn:Play(); - self.BackgroundModelScene:Show(); - end); - - C_Timer.After(5.0, function() - self.ExitArenaButton:Show(); - end); -end - -function CommentatorVictoryFanfareFrameMixin:Reset() - self.Icon:SetAlpha(0); - self.Icon2:SetAlpha(0); - self.Icon3:SetAlpha(0); - self.BackgroundModelScene:Hide(); - self.Anim:Stop(); - self.ExitArenaButton:Hide(); -end diff --git a/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.xml b/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.xml deleted file mode 100644 index 60b2fda445..0000000000 --- a/Interface_TBC/AddOns/Blizzard_Commentator/CommentatorVictoryFanfare.xml +++ /dev/null @@ -1,173 +0,0 @@ - - -