Commit c8151dc4 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-28616patch8.1.0_PTR

parent 4b3b52c2
......@@ -6,6 +6,20 @@ local AchievementInfo =
Functions =
{
{
Name = "GetRewardItemID",
Type = "Function",
Arguments =
{
{ Name = "achievementID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "rewardItemID", Type = "number", Nilable = true },
},
},
{
Name = "GetSupercedingAchievements",
Type = "Function",
......
......@@ -36,8 +36,9 @@ local AreaPoiInfo =
},
},
{
Name = "GetAreaPOITimeLeft",
Name = "GetAreaPOISecondsLeft",
Type = "Function",
Documentation = { "Returns the number of seconds until the POI expires." },
Arguments =
{
......@@ -46,7 +47,7 @@ local AreaPoiInfo =
Returns =
{
{ Name = "minutesLeft", Type = "number", Nilable = false },
{ Name = "secondsLeft", Type = "number", Nilable = false },
},
},
{
......
......@@ -94,7 +94,7 @@ local AzeriteEmpoweredItem =
{
{ Name = "azeriteEmpoweredItemLocation", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
{ Name = "powerID", Type = "number", Nilable = false },
{ Name = "upgraded", Type = "bool", Nilable = true },
{ Name = "level", Type = "AzeritePowerLevel", Nilable = false },
},
Returns =
......@@ -286,6 +286,19 @@ local AzeriteEmpoweredItem =
Tables =
{
{
Name = "AzeritePowerLevel",
Type = "Enumeration",
NumValues = 3,
MinValue = 0,
MaxValue = 2,
Fields =
{
{ Name = "Base", Type = "AzeritePowerLevel", EnumValue = 0 },
{ Name = "Upgraded", Type = "AzeritePowerLevel", EnumValue = 1 },
{ Name = "Downgraded", Type = "AzeritePowerLevel", EnumValue = 2 },
},
},
{
Name = "AzeriteEmpoweredItemPowerInfo",
Type = "Structure",
......
......@@ -63,6 +63,20 @@ local EncounterJournal =
{ Name = "info", Type = "EncounterJournalSectionInfo", Nilable = false },
},
},
{
Name = "InstanceHasLoot",
Type = "Function",
Arguments =
{
{ Name = "instanceID", Type = "number", Nilable = true },
},
Returns =
{
{ Name = "hasLoot", Type = "bool", Nilable = false },
},
},
},
Events =
......
......@@ -20,6 +20,20 @@ local Item =
{ Name = "canBeScrapped", Type = "bool", Nilable = false },
},
},
{
Name = "CanViewItemPowers",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isItemViewable", Type = "bool", Nilable = false },
},
},
{
Name = "DoesItemExist",
Type = "Function",
......
......@@ -6,6 +6,15 @@ local QuestChoice =
Functions =
{
{
Name = "GetQuestChoiceInfo",
Type = "Function",
Returns =
{
{ Name = "choiceInfo", Type = "QuestChoiceInfo", Nilable = false },
},
},
{
Name = "GetQuestChoiceOptionInfo",
Type = "Function",
......@@ -17,20 +26,7 @@ local QuestChoice =
Returns =
{
{ Name = "responseID", Type = "number", Nilable = false },
{ Name = "buttonText", Type = "string", Nilable = false },
{ Name = "description", Type = "string", Nilable = false },
{ Name = "header", Type = "string", Nilable = false },
{ Name = "choiceArtID", Type = "number", Nilable = false },
{ Name = "confirmation", Type = "string", Nilable = true },
{ Name = "widgetSetID", Type = "number", Nilable = true },
{ Name = "disabledButton", Type = "bool", Nilable = false },
{ Name = "desaturatedArt", Type = "bool", Nilable = false },
{ Name = "groupID", Type = "number", Nilable = true },
{ Name = "headerIconAtlasElement", Type = "string", Nilable = true },
{ Name = "subHeader", Type = "string", Nilable = true },
{ Name = "buttonTooltip", Type = "string", Nilable = true },
{ Name = "rewardQuestID", Type = "number", Nilable = true },
{ Name = "info", Type = "QuestChoiceOptionInfo", Nilable = false },
},
},
},
......@@ -51,6 +47,42 @@ local QuestChoice =
Tables =
{
{
Name = "QuestChoiceInfo",
Type = "Structure",
Fields =
{
{ Name = "choiceID", Type = "number", Nilable = false },
{ Name = "questionText", Type = "string", Nilable = false },
{ Name = "numOptions", Type = "number", Nilable = false },
{ Name = "uiTextureKitID", Type = "number", Nilable = true },
{ Name = "soundKitID", Type = "number", Nilable = true },
{ Name = "hideWarboardHeader", Type = "bool", Nilable = false },
{ Name = "keepOpenAfterChoice", Type = "bool", Nilable = false },
},
},
{
Name = "QuestChoiceOptionInfo",
Type = "Structure",
Fields =
{
{ Name = "responseID", Type = "number", Nilable = false },
{ Name = "buttonText", Type = "string", Nilable = false },
{ Name = "description", Type = "string", Nilable = false },
{ Name = "header", Type = "string", Nilable = false },
{ Name = "choiceArtID", Type = "number", Nilable = false },
{ Name = "confirmation", Type = "string", Nilable = true },
{ Name = "widgetSetID", Type = "number", Nilable = true },
{ Name = "disabledButton", Type = "bool", Nilable = false },
{ Name = "desaturatedArt", Type = "bool", Nilable = false },
{ Name = "groupID", Type = "number", Nilable = true },
{ Name = "headerIconAtlasElement", Type = "string", Nilable = true },
{ Name = "subHeader", Type = "string", Nilable = true },
{ Name = "buttonTooltip", Type = "string", Nilable = true },
{ Name = "rewardQuestID", Type = "number", Nilable = true },
{ Name = "soundKitID", Type = "number", Nilable = true },
},
},
},
};
......
......@@ -31,6 +31,10 @@ local ReportSystem =
{ Name = "comment", Type = "string", Nilable = true },
},
},
{
Name = "ReportServerLag",
Type = "Function",
},
{
Name = "SetPendingReportPetTarget",
Type = "Function",
......
......@@ -159,14 +159,15 @@ local UIModelInfo =
{
Name = "ItemTryOnReason",
Type = "Enumeration",
NumValues = 3,
NumValues = 4,
MinValue = 0,
MaxValue = 2,
MaxValue = 3,
Fields =
{
{ Name = "Success", Type = "ItemTryOnReason", EnumValue = 0 },
{ Name = "WrongRace", Type = "ItemTryOnReason", EnumValue = 1 },
{ Name = "NotEquippable", Type = "ItemTryOnReason", EnumValue = 2 },
{ Name = "DataPending", Type = "ItemTryOnReason", EnumValue = 3 },
},
},
{
......
......@@ -297,7 +297,10 @@ function ArchaeologyFrame_CurrentArtifactUpdate(self)
self.historyScroll.child.text:SetText(description);
self.historyTitle:ClearAllPoints();
local runeName, _, _, _, _, _, _, _, _, runeStoneIconPath = GetItemInfo(RaceitemID);
local runeName, runeStoneIconPath;
if RaceitemID > 0 then
runeName, _, _, _, _, _, _, _, _, runeStoneIconPath = GetItemInfo(RaceitemID);
end
local endFound = false;
for i=1,ARCHAEOLOGY_MAX_STONES do
if i > numSockets or not runeName then
......
......@@ -421,15 +421,31 @@ function AzeriteEmpoweredItemPowerMixin:SetFinalPowerTooltipDescriptions(tooltip
finalPowers = self.owningTierFrame:GetOwner():GetPowerIdsForFinalSelectedTier();
end
if(finalPowers) then
tooltip:AddLine(" ");
for powerIndex, powerID in ipairs(finalPowers) do
local WRAP = true;
local UPGRADED = true;
local powerInfoUpgraded = C_AzeriteEmpoweredItem.GetPowerText(empoweredItemLocation, powerID, UPGRADED);
GameTooltip_AddColoredLine(tooltip,DASH_WITH_TEXT:format(powerInfoUpgraded.name), HIGHLIGHT_FONT_COLOR, WRAP);
local powerInfoBase = C_AzeriteEmpoweredItem.GetPowerText(empoweredItemLocation, powerID, not UPGRADED);
GameTooltip_AddNormalLine(tooltip, GetHighlightedNumberDifferenceString(powerInfoBase.description, powerInfoUpgraded.description), WRAP, TOOLTIP_INDENT_OFFSET);
if(not finalPowers) then
return;
end
local WRAP = true;
local type = nil;
local finalPowerSelected = false;
local base = Enum.AzeritePowerLevel.Base;
if(self:IsSelected()) then
type = Enum.AzeritePowerLevel.Downgraded;
finalPowerSelected = true;
else
type = Enum.AzeritePowerLevel.Upgraded;
end
tooltip:AddLine(" ");
for powerIndex, powerID in ipairs(finalPowers) do
local powerInfoModified = C_AzeriteEmpoweredItem.GetPowerText(empoweredItemLocation, powerID, type);
GameTooltip_AddColoredLine(tooltip,DASH_WITH_TEXT:format(powerInfoModified.name), HIGHLIGHT_FONT_COLOR, WRAP);
local powerInfoBase = C_AzeriteEmpoweredItem.GetPowerText(empoweredItemLocation, powerID, base);
if(finalPowerSelected) then
GameTooltip_AddNormalLine(tooltip, GetHighlightedNumberDifferenceString(powerInfoModified.description, powerInfoBase.description), WRAP, TOOLTIP_INDENT_OFFSET);
else
GameTooltip_AddNormalLine(tooltip, GetHighlightedNumberDifferenceString(powerInfoBase.description, powerInfoModified.description), WRAP, TOOLTIP_INDENT_OFFSET);
end
end
end
......
......@@ -169,6 +169,14 @@ function AzeriteEmpoweredItemUIMixin:GetPowerIdsForFinalSelectedTier()
return powerIds;
end
function AzeriteEmpoweredItemUIMixin:IsFinalPowerSelected()
for tierIndex, tierFrame in ipairs(self.tiersByIndex) do
if(tierFrame:IsFinalTier()) then
return tierFrame:HasAnySelected();
end
end
end
function AzeriteEmpoweredItemUIMixin:IsAnyTierRevealing()
for tierIndex, tierFrame in ipairs(self.tiersByIndex) do
if tierFrame:IsRevealing() then
......@@ -256,6 +264,8 @@ function AzeriteEmpoweredItemUIMixin:OnItemSet()
self.BorderFrame.TitleText:SetText(azeriteEmpoweredItem:GetItemName());
end);
self.oldItem = azeriteEmpoweredItem;
FrameUtil.RegisterFrameForEvents(self, AZERITE_EMPOWERED_FRAME_EVENTS);
self:RegisterUnitEvent("PLAYER_SPECIALIZATION_CHANGED", "player");
......
......@@ -206,45 +206,22 @@ function ChannelRosterButtonMixin:OnLeave()
end
function ChannelRosterButtonMixin:Update()
self:UpdateName();
local showRank = self:IsMemberLeadership();
self.Rank:SetShown(showRank);
-- The following methods are not really an API, should only use the public entry point of Update.
self:UpdateRankVisibleState();
self.SelfDeafenButton:UpdateVisibleState();
self.SelfMuteButton:UpdateVisibleState();
self.MemberMuteButton:UpdateVisibleState();
-- Adjust the name to be smaller to make room for the voice buttons
if self.SelfMuteButton:IsShown() then
self.Name:SetWidth(showRank and 98 or 113);
elseif self.MemberMuteButton:IsShown() then
self.Name:SetWidth(showRank and 113 or 128);
else
self.Name:SetWidth(140);
end
if showRank then
local nameOffset = self.Name:GetLeft() - self:GetLeft();
local nameWidth = self.Name:GetWidth();
local nameStringWidth = self.Name:GetStringWidth();
local rankOffset = (self.Name:IsTruncated() and nameWidth or (nameStringWidth + 4)) + nameOffset;
self.Rank:SetPoint("LEFT", self, "LEFT", rankOffset, 0);
end
if self:IsMemberOwner() then
self.Rank:SetTexture("Interface\\GroupFrame\\UI-Group-LeaderIcon");
elseif self:IsMemberModerator() then
self.Rank:SetTexture("Interface\\GroupFrame\\UI-Group-AssistantIcon");
end
self:UpdateName();
self:UpdateNameSize();
self:UpdateRankPosition();
self:UpdateVoiceActivityNotification();
self:Show();
end
do
function ChannelRosterButton_VoiceActivityNotificationCreatedCallback(self, notification)
local function ChannelRosterButton_VoiceActivityNotificationCreatedCallback(self, notification)
notification:SetParent(self);
notification:ClearAllPoints();
notification:SetPoint("RIGHT", self, "RIGHT", 0, 0);
......@@ -294,4 +271,52 @@ function ChannelRosterButtonMixin:UpdateName()
end
self.Name:SetTextColor(r, g, b);
end
function ChannelRosterButtonMixin:UpdateNameSize()
-- Adjust the name to be smaller to make room for the voice buttons
if self.SelfMuteButton:IsShown() then
self.Name:SetWidth(self.showRank and 98 or 113);
elseif self.MemberMuteButton:IsShown() then
self.Name:SetWidth(self.showRank and 113 or 128);
else
self.Name:SetWidth(140);
end
end
function ChannelRosterButtonMixin:UpdateRankVisibleState()
self.showRank = self:IsMemberLeadership();
self.Rank:SetShown(self.showRank);
if self.showRank then
if self:IsMemberOwner() then
self.Rank:SetTexture("Interface\\GroupFrame\\UI-Group-LeaderIcon");
elseif self:IsMemberModerator() then
self.Rank:SetTexture("Interface\\GroupFrame\\UI-Group-AssistantIcon");
end
end
end
function ChannelRosterButtonMixin:UpdateRankPosition()
if self.showRank then
local nameOffset = self.Name:GetLeft() - self:GetLeft();
local nameWidth = self.Name:GetWidth();
local nameStringWidth = self.Name:GetStringWidth();
local rankOffset = (self.Name:IsTruncated() and nameWidth or (nameStringWidth + 4)) + nameOffset;
self.Rank:SetPoint("LEFT", self, "LEFT", rankOffset, 0);
end
end
function ChannelRosterButtonMixin:OnHide()
self:ClearData();
end
function ChannelRosterButtonMixin:ClearData()
-- This only clears the main identifying data for the button all member/voice info
-- some of the other data could remain, but should be updated if the button is shown
-- again.
self:SetMemberID(nil);
self:SetVoiceChannelID(nil);
self:SetVoiceMemberID(nil);
self:SetMemberName(nil);
end
\ No newline at end of file
......@@ -6,7 +6,7 @@
<Size x="160" y="22"/>
<Layers>
<Layer level="BORDER">
<FontString parentKey="Name" justifyH="LEFT" inherits="GameFontHighlightSmall">
<FontString parentKey="Name" justifyH="LEFT" wordWrap="false" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="LEFT" x="8" y="0" />
</Anchors>
......@@ -41,6 +41,7 @@
<OnClick method="OnClick"/>
<OnEnter method="OnEnter"/>
<OnLeave method="OnLeave"/>
<OnHide method="OnHide"/>
</Scripts>
<NormalTexture parentKey="NormalTexture" atlas="voicechat-channellist-row-background" alphaMode="ADD"/>
<HighlightTexture parentKey="HighlightTexture" atlas="voicechat-channellist-row-highlight" alphaMode="ADD"/>
......
......@@ -63,6 +63,27 @@ end
VoiceChatActivateChannelPromptMixin = {};
function VoiceChatActivateChannelPromptMixin:OnShow()
self:RegisterEvent("VOICE_CHAT_CHANNEL_ACTIVATED");
end
function VoiceChatActivateChannelPromptMixin:OnHide()
self:UnregisterEvent("VOICE_CHAT_CHANNEL_ACTIVATED");
end
function VoiceChatActivateChannelPromptMixin:OnEvent(event, ...)
if event == "VOICE_CHAT_CHANNEL_ACTIVATED" then
self:OnVoiceChannelActivated(...);
end
end
function VoiceChatActivateChannelPromptMixin:OnVoiceChannelActivated(channelID)
-- Hide prompt when channel is externally activated.
if channelID == self.channel.channelID then
self:Hide();
end
end
function VoiceChatActivateChannelPromptMixin:Setup(channel)
self.Icon:SetAtlas("voicechat-icon-headphone-pending");
......@@ -77,6 +98,7 @@ function VoiceChatActivateChannelPromptMixin:ShowPrompt(channel)
self:SetExternallyManagedOutroAnimation(true);
AlertFrame_ShowNewAlert(self);
VoiceChatChannelActivatedNotification:ListenForChannelActivation(self.channel);
C_Timer.After(10, function()
self:SetExternallyManagedOutroAnimation(false);
......@@ -106,15 +128,16 @@ function VoiceChatActivateChannelPromptMixin:ShouldPromptForChannelActivate(chan
end
function VoiceChatActivateChannelPromptMixin:ActivateChannel()
VoiceChatChannelActivatedNotification:ListenForChannelActivation(self.channel);
C_VoiceChat.ActivateChannel(self.channel.channelID);
self:UnregisterEvent("VOICE_CHAT_CHANNEL_ACTIVATED");
end
VoiceChatActivateChannelPromptButtonMixin = {};
function VoiceChatActivateChannelPromptButtonMixin:OnClick()
self:GetParent():ActivateChannel();
self:GetParent():Hide();
local parent = self:GetParent();
parent:ActivateChannel();
parent:Hide();
end
VoiceChatChannelActivatedNotificationMixin = {};
......
......@@ -38,6 +38,11 @@
</Scripts>
</Button>
</Frames>
<Scripts>
<OnEvent method="OnEvent"/>
<OnShow method="OnShow"/>
<OnHide method="OnHide"/>
</Scripts>
</ContainedAlertFrame>
<ContainedAlertFrame name="VoiceChatChannelActivatedNotification" mixin="VoiceChatChannelActivatedNotificationMixin" inherits="VoiceChatPromptTemplate">
......
......@@ -196,8 +196,8 @@ function CombatText_OnEvent(self, event, ...)
return
end
message = "-"..BreakUpLargeNumbers(data);
if(arg3 and arg3 > 0) then
message = COMBAT_TEXT_BLOCK_REDUCED:format(message);
if(arg1 and arg1 == "BLOCK" and arg3 and arg3 > 0) then
message = COMBAT_TEXT_BLOCK_REDUCED:format(arg3);
end
elseif ( messageType == "SPELL_CAST" ) then
message = "<"..data..">";
......
......@@ -777,7 +777,9 @@ function CommunitiesFrameMixin:OnHide()
self:CloseActiveDialogs();
C_Club.ClearClubPresenceSubscription();
C_Club.ClearAutoAdvanceStreamViewMarker();
C_Club.Flush();
self:SetFocusedStream(nil, nil);
FrameUtil.UnregisterFrameForEvents(self, COMMUNITIES_FRAME_EVENTS);
UpdateMicroButtons();
end
......
......@@ -417,7 +417,7 @@
<KeyValue key="frame" value="CommunitiesGuildLogFrame" type="Global"/>
</KeyValues>
</Button>
<Frame parentKey="GuildMemberDetailFrame" frameLevel="100" inherits="CommunitiesGuildMemberDetailFrameTemplate" hidden="true">
<Frame parentKey="GuildMemberDetailFrame" frameLevel="1000" inherits="CommunitiesGuildMemberDetailFrameTemplate" hidden="true">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPRIGHT" x="-8" y="-76"/>
</Anchors>
......
......@@ -614,10 +614,6 @@ function CommunitiesMemberListMixin:OnEvent(event, ...)
if voiceChannelID == self:GetVoiceChannelID() then
self:MarkMemberListDirty();
end
elseif event == "GUILD_ROSTER_UPDATE" then
if C_Club.GetGuildClubId() == self:GetSelectedClubId() then
self:MarkMemberListDirty();
end
elseif event == "VOICE_CHAT_CHANNEL_ACTIVATED" or event == "VOICE_CHAT_CHANNEL_DEACTIVATED" then
local voiceChannelID = ...;
if voiceChannelID == self:GetVoiceChannelID() then
......@@ -651,8 +647,7 @@ function CommunitiesMemberListMixin:OnEvent(event, ...)
GuildRoster();
end
local clubInfo = self:GetSelectedClubInfo();
if clubInfo and clubInfo.clubType == Enum.ClubType.Guild then
if C_Club.GetGuildClubId() == self:GetSelectedClubId() then
self:MarkMemberListDirty();
self:MarkSortDirty();
end
......
......@@ -502,12 +502,39 @@ function FrameStackTooltip_OnDisplaySizeChanged(self)
end
end
function FrameStackTooltip_IsShowHiddenEnabled()
return GetCVarBool("fstack_showhidden");
end
function FrameStackTooltip_IsShowRegionsEnabled()
return GetCVarBool("fstack_showregions");
end
function FrameStackTooltip_IsShowAnchorsEnabled()
return GetCVarBool("fstack_showanchors");
end
function FrameStackTooltip_OnFramestackVisibilityUpdated(self)
if ( self:IsVisible() ) then
--[[Since these properties impact the contents displayed on the framestack,
toggle the framestack off and then on to reinitialize it.--]]
FrameStackTooltip_Hide(self);
local showHidden = FrameStackTooltip_IsShowHiddenEnabled();
local showRegions = FrameStackTooltip_IsShowRegionsEnabled();
local showAnchors = FrameStackTooltip_IsShowAnchorsEnabled();