Skip to content

Commit

Permalink
3.4.3 (52237)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 22, 2023
1 parent 69c9aac commit 5db7310
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Interface/FrameXML/ChatFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ SlashCmdList["WHO"] = function(msg)
ShowWhoPanel();
end
WhoFrameEditBox:SetText(msg);
C_FriendList.SendWho(msg, Enum.SocialWhoOrigin.CHAT);
C_FriendList.SendWho(msg, Enum.SocialWhoOrigin.Chat);
end

SlashCmdList["CHANNEL"] = function(msg, editBox)
Expand Down
2 changes: 1 addition & 1 deletion Interface/FrameXML/FriendsFrame_Shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ function OpenFriendsFrame(tab)
end

function WhoFrameEditBox_OnEnterPressed(self)
C_FriendList.SendWho(self:GetText(), Enum.SocialWhoOrigin.SOCIAL);
C_FriendList.SendWho(self:GetText(), Enum.SocialWhoOrigin.Social);
self:ClearFocus();
end

Expand Down
2 changes: 1 addition & 1 deletion Interface/FrameXML/ItemRef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function SetItemRef(link, text, button, chatFrame)
if ( ChatEdit_GetActiveWindow() ) then
ChatEdit_InsertLink(name);
else
C_FriendList.SendWho(WHO_TAG_EXACT..name, Enum.SocialWhoOrigin.ITEM);
C_FriendList.SendWho(WHO_TAG_EXACT..name, Enum.SocialWhoOrigin.Item);
end

elseif ( button == "RightButton" and (not isGMLink) ) then
Expand Down
2 changes: 1 addition & 1 deletion Interface/FrameXML/PVPHelper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
</Anchors>
<Scripts>
<OnClick>
if ( AcceptBattlefieldPort(self:GetParent().activeIndex, true) ) then
if (self:GetParent().activeIndex and AcceptBattlefieldPort(self:GetParent().activeIndex, true )) then
if( StaticPopup_Visible( "DEATH" ) ) then
StaticPopup_Hide( "DEATH" );
end
Expand Down
31 changes: 31 additions & 0 deletions Interface/FrameXML/PlayerFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function PlayerFrame_OnLoad(self)
self:RegisterEvent("UNIT_ENTERING_VEHICLE");
self:RegisterEvent("UNIT_EXITING_VEHICLE");
self:RegisterEvent("UNIT_EXITED_VEHICLE");
self:RegisterEvent("PLAYER_FLAGS_CHANGED");
self:RegisterEvent("VARIABLES_LOADED");
self:RegisterUnitEvent("UNIT_COMBAT", "player", "vehicle");
self:RegisterUnitEvent("UNIT_MAXPOWER", "player", "vehicle");
Expand Down Expand Up @@ -111,6 +112,9 @@ function PlayerFrame_UpdatePvPStatus()
PlayerPVPIconHitArea.tooltipTitle = PVPFFA;
PlayerPVPIconHitArea.tooltipText = NEWBIE_TOOLTIP_PVPFFA;
PlayerPVPIconHitArea:Show();

PlayerPVPTimerText:Hide();
PlayerPVPTimerText.timeLeft = nil;
elseif ( factionGroup and factionGroup ~= "Neutral" and UnitIsPVP("player") ) then
if ( not PlayerPVPIcon:IsShown() ) then
PlaySound(SOUNDKIT.IG_PVP_UPDATE);
Expand All @@ -132,6 +136,19 @@ function PlayerFrame_UpdatePvPStatus()
PlayerPrestigeBadge:Hide();
PlayerPVPIcon:Hide();
PlayerPVPIconHitArea:Hide();

PlayerPVPTimerText:Hide();
PlayerPVPTimerText.timeLeft = nil;
end
end

function PlayerFrame_UpdatePVPTimer()
if ( IsPVPTimerRunning() ) then
PlayerPVPTimerText:Show();
PlayerPVPTimerText.timeLeft = GetPVPTimer();
else
PlayerPVPTimerText:Hide();
PlayerPVPTimerText.timeLeft = nil;
end
end

Expand Down Expand Up @@ -159,6 +176,7 @@ function PlayerFrame_OnEvent(self, event, ...)
self.onHateList = nil;
PlayerFrame_Update();
PlayerFrame_UpdateStatus();
PlayerFrame_UpdatePVPTimer();
elseif ( event == "PLAYER_ENTER_COMBAT" ) then
self.inCombat = 1;
PlayerFrame_UpdateStatus();
Expand Down Expand Up @@ -217,6 +235,8 @@ function PlayerFrame_OnEvent(self, event, ...)
self.inSeat = true;
PlayerFrame_UpdateArt(self);
end
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
PlayerFrame_UpdatePVPTimer();
elseif ( event == "VARIABLES_LOADED" ) then
PlayerFrame_SetLocked(not PLAYER_FRAME_UNLOCKED);
if ( PLAYER_FRAME_CASTBARS_SHOWN ) then
Expand Down Expand Up @@ -394,6 +414,17 @@ function PlayerFrame_OnUpdate (self, elapsed)
PlayerStatusGlow:SetAlpha(alpha);
end

if ( PlayerPVPTimerText.timeLeft ) then
PlayerPVPTimerText.timeLeft = PlayerPVPTimerText.timeLeft - elapsed*1000;
local timeLeft = PlayerPVPTimerText.timeLeft;
if ( timeLeft < 0 ) then
PlayerPVPTimerText:Hide()
end
PlayerPVPTimerText:SetFormattedText(SecondsToTimeAbbrev(floor(timeLeft/1000)));
else
PlayerPVPTimerText:Hide();
end

CombatFeedback_OnUpdate(self, elapsed);
end

Expand Down
5 changes: 5 additions & 0 deletions Interface/FrameXML/PlayerFrame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<Anchor point="CENTER" x="-63" y="-16"/>
</Anchors>
</FontString>
<FontString name="PlayerPVPTimerText" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="CENTER" relativePoint="TOPLEFT" x="38" y="-8"/>
</Anchors>
</FontString>
<FontString name="PlayerFrameHealthBarText" inherits="TextStatusBarText">
<Anchors>
<Anchor point="CENTER" x="50" y="3"/>
Expand Down
3 changes: 3 additions & 0 deletions Interface_TBC/FrameXML/Minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function Minimap_OnLoad(self)
self:RegisterEvent("MINIMAP_PING");
self:RegisterEvent("MINIMAP_UPDATE_ZOOM");
self:RegisterEvent("PLAYER_TARGET_CHANGED");
self:RegisterEvent("PLAYER_FLAGS_CHANGED");
end

function ToggleMinimap()
Expand Down Expand Up @@ -94,6 +95,8 @@ function Minimap_OnEvent(self, event, ...)
elseif ( zoom == 0 ) then
MinimapZoomOut:Disable();
end
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
Minimap_Update();
end
end

Expand Down
3 changes: 3 additions & 0 deletions Interface_Vanilla/FrameXML/Minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function Minimap_OnLoad(self)
self:RegisterEvent("MINIMAP_PING");
self:RegisterEvent("MINIMAP_UPDATE_ZOOM");
self:RegisterEvent("PLAYER_TARGET_CHANGED");
self:RegisterEvent("PLAYER_FLAGS_CHANGED");
end

function ToggleMinimap()
Expand Down Expand Up @@ -94,6 +95,8 @@ function Minimap_OnEvent(self, event, ...)
elseif ( zoom == 0 ) then
MinimapZoomOut:Disable();
end
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
Minimap_Update();
end
end

Expand Down
3 changes: 3 additions & 0 deletions Interface_Wrath/FrameXML/Minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function Minimap_OnLoad(self)
self:RegisterEvent("MINIMAP_PING");
self:RegisterEvent("MINIMAP_UPDATE_ZOOM");
self:RegisterEvent("PLAYER_TARGET_CHANGED");
self:RegisterEvent("PLAYER_FLAGS_CHANGED");
end

function ToggleMinimap()
Expand Down Expand Up @@ -95,6 +96,8 @@ function Minimap_OnEvent(self, event, ...)
elseif ( zoom == 0 ) then
MinimapZoomOut:Disable();
end
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
Minimap_Update();
end
end

Expand Down

0 comments on commit 5db7310

Please sign in to comment.