Skip to content

Commit

Permalink
2.5.2 (40892)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gethe committed Nov 6, 2021
1 parent 2864b3f commit ecef67c
Show file tree
Hide file tree
Showing 28 changed files with 65 additions and 3,296 deletions.
13 changes: 13 additions & 0 deletions Interface/AddOns/Blizzard_Commentator/Blizzard_Commentator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -276,6 +285,7 @@ function CommentatorMixin:Shutdown()
self.Scoreboard:Hide();
self:ClearUnitFrames();
self:SetFrameLock(false);
SetSpectatorModeForOtherFrames(false);
end

function CommentatorMixin:Reset()
Expand Down Expand Up @@ -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();

Expand All @@ -466,6 +477,7 @@ function CommentatorMixin:OnObserverStateChanged(oldState, newState)
self.currentSpeedFactor = nil;

self:SetFrameLock(true);
SetSpectatorModeForOtherFrames(true);
elseif newState == TOURNAMENTARENA_ZONESTATE_SCANNING then
ClearTarget();

Expand All @@ -477,6 +489,7 @@ function CommentatorMixin:OnObserverStateChanged(oldState, newState)
self:ClearUnitFrames();

self:SetFrameLock(false);
SetSpectatorModeForOtherFrames(false);
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions Interface/FrameXML/ObjectAPI/PlayerLocation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
184 changes: 0 additions & 184 deletions Interface_TBC/AddOns/Blizzard_Commentator/Bindings.xml

This file was deleted.

This file was deleted.

0 comments on commit ecef67c

Please sign in to comment.