Commit 467edfb1 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-30430patch8.2.0_PTR

parent b117620f
......@@ -49,15 +49,6 @@ local ClubFinder =
Name = "ClearClubFinderPostingsCache",
Type = "Function",
},
{
Name = "GetApplicantInfoList",
Type = "Function",
Returns =
{
{ Name = "applicants", Type = "table", InnerType = "ClubFinderApplicantInfo", Nilable = false },
},
},
{
Name = "GetClubRecruitmentSettings",
Type = "Function",
......@@ -119,6 +110,8 @@ local ClubFinder =
Arguments =
{
{ Name = "clubId", Type = "string", Nilable = false },
{ Name = "enableListing", Type = "bool", Nilable = false },
{ Name = "autoAcceptApplicants", Type = "bool", Nilable = false },
{ Name = "minimumLevel", Type = "number", Nilable = false },
{ Name = "itemLevelRequirement", Type = "number", Nilable = false },
{ Name = "name", Type = "string", Nilable = false },
......@@ -170,6 +163,29 @@ local ClubFinder =
{ Name = "requestType", Type = "ClubFinderRequestType", Nilable = false },
},
},
{
Name = "ReturnCommunityApplicantList",
Type = "Function",
Arguments =
{
{ Name = "clubId", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "info", Type = "table", InnerType = "ClubFinderApplicantInfo", Nilable = false },
},
},
{
Name = "ReturnGuildApplicantList",
Type = "Function",
Returns =
{
{ Name = "info", Type = "table", InnerType = "ClubFinderApplicantInfo", Nilable = false },
},
},
{
Name = "ReturnMatchingCommunityList",
Type = "Function",
......@@ -188,6 +204,29 @@ local ClubFinder =
{ Name = "recruitingClubs", Type = "table", InnerType = "RecruitingClubInfo", Nilable = false },
},
},
{
Name = "ReturnPendingCommunityApplicantList",
Type = "Function",
Arguments =
{
{ Name = "clubId", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "info", Type = "table", InnerType = "ClubFinderApplicantInfo", Nilable = false },
},
},
{
Name = "ReturnPendingGuildApplicantList",
Type = "Function",
Returns =
{
{ Name = "info", Type = "table", InnerType = "ClubFinderApplicantInfo", Nilable = false },
},
},
{
Name = "SetPlayerApplicantSettings",
Type = "Function",
......@@ -260,6 +299,10 @@ local ClubFinder =
Type = "Event",
LiteralName = "CLUB_FINDER_RECRUITS_UPDATED",
Documentation = { "Signals when we recieve the recruits list" },
Payload =
{
{ Name = "type", Type = "ClubFinderRequestType", Nilable = false },
},
},
},
......
......@@ -6,6 +6,15 @@ local GuildInfo =
Functions =
{
{
Name = "CanEditOfficerNote",
Type = "Function",
Returns =
{
{ Name = "canEditOfficerNote", Type = "bool", Nilable = false },
},
},
{
Name = "CanSpeakInGuildChat",
Type = "Function",
......@@ -15,6 +24,15 @@ local GuildInfo =
{ Name = "canSpeakInGuildChat", Type = "bool", Nilable = false },
},
},
{
Name = "CanViewOfficerNote",
Type = "Function",
Returns =
{
{ Name = "canViewOfficerNote", Type = "bool", Nilable = false },
},
},
{
Name = "GetGuildNewsInfo",
Type = "Function",
......
......@@ -14,6 +14,11 @@ local MountJournal =
{
{ Name = "itemLocation", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "canContinue", Type = "bool", Nilable = false },
},
},
{
Name = "AreMountEquipmentEffectsSuppressed",
......
......@@ -175,6 +175,29 @@ local PvpInfo =
{ Name = "info", Type = "HonorRewardInfo", Nilable = true },
},
},
{
Name = "GetMatchPVPStatColumn",
Type = "Function",
Arguments =
{
{ Name = "pvpStatID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "info", Type = "MatchPVPStatColumn", Nilable = true },
},
},
{
Name = "GetMatchPVPStatIDs",
Type = "Function",
Returns =
{
{ Name = "pvpStatIDs", Type = "table", InnerType = "number", Nilable = false },
},
},
{
Name = "GetNextHonorLevelForReward",
Type = "Function",
......@@ -875,6 +898,18 @@ local PvpInfo =
{ Name = "achievementRewardedID", Type = "number", Nilable = false },
},
},
{
Name = "MatchPVPStatColumn",
Type = "Structure",
Fields =
{
{ Name = "pvpStatID", Type = "number", Nilable = false },
{ Name = "columnHeaderID", Type = "number", Nilable = false },
{ Name = "orderIndex", Type = "number", Nilable = false },
{ Name = "name", Type = "string", Nilable = false },
{ Name = "tooltip", Type = "string", Nilable = false },
},
},
{
Name = "PVPPersonalRatedInfo",
Type = "Structure",
......@@ -942,15 +977,15 @@ local PvpInfo =
},
},
{
Name = "PVPScoreStatInfo",
Name = "PVPStatInfo",
Type = "Structure",
Fields =
{
{ Name = "pvpStatID", Type = "number", Nilable = false },
{ Name = "pvpStatValue", Type = "number", Nilable = false },
{ Name = "name", Type = "string", Nilable = false },
{ Name = "icon", Type = "string", Nilable = false },
{ Name = "tooltip", Type = "string", Nilable = false },
{ Name = "id", Type = "number", Nilable = false },
{ Name = "value", Type = "number", Nilable = false },
{ Name = "iconName", Type = "string", Nilable = false },
},
},
{
......@@ -976,7 +1011,7 @@ local PvpInfo =
{ Name = "mmrChange", Type = "number", Nilable = false },
{ Name = "talentSpec", Type = "string", Nilable = false },
{ Name = "honorLevel", Type = "number", Nilable = false },
{ Name = "stats", Type = "table", InnerType = "PVPScoreStatInfo", Nilable = false },
{ Name = "stats", Type = "table", InnerType = "PVPStatInfo", Nilable = false },
},
},
{
......
......@@ -344,6 +344,11 @@ local QuestLog =
Type = "Event",
LiteralName = "TREASURE_PICKER_CACHE_FLUSH",
},
{
Name = "WaypointUpdate",
Type = "Event",
LiteralName = "WAYPOINT_UPDATE",
},
{
Name = "WorldQuestCompletedBySpell",
Type = "Event",
......
......@@ -189,6 +189,15 @@ local VoiceChat =
{ Name = "memberID", Type = "number", Nilable = true },
},
},
{
Name = "GetMasterVolumeScale",
Type = "Function",
Returns =
{
{ Name = "scale", Type = "number", Nilable = true },
},
},
{
Name = "GetMemberGUID",
Type = "Function",
......@@ -548,6 +557,15 @@ local VoiceChat =
{ Name = "volume", Type = "number", Nilable = false },
},
},
{
Name = "SetMasterVolumeScale",
Type = "Function",
Arguments =
{
{ Name = "scale", Type = "number", Nilable = false },
},
},
{
Name = "SetMemberMuted",
Type = "Function",
......
UIPanelWindows["AzeriteEssenceUI"] = { area = "left", pushable = 1 };
AzeriteEssenceUIMixin = { };
AzeriteEssenceUIMixin = CreateFromMixins(CallbackRegistryBaseMixin);
AzeriteEssenceUIMixin:GenerateCallbackEvents(
{
"OnShow",
"OnHide",
});
local ESSENCE_BUTTON_HEIGHT = 41;
local ESSENCE_HEADER_HEIGHT = 21;
......@@ -30,18 +36,20 @@ local AZERITE_ESSENCE_FRAME_EVENTS = {
};
local MILESTONE_LOCATIONS = {
[1] = { left = 219, top = -218 },
[2] = { left = 92, top = -190 },
[3] = { left = 110, top = -287 },
[4] = { left = 223, top = -348 },
[5] = { left = 332, top = -280 },
[6] = { left = 330, top = -150 },
[7] = { left = 213, top = -90 },
[1] = { left = 237, top = -235 },
[2] = { left = 100, top = -203 },
[3] = { left = 117, top = -310 },
[4] = { left = 242, top = -376 },
[5] = { left = 362, top = -301 },
[6] = { left = 356, top = -160 },
[7] = { left = 232, top = -94 },
};
local LOCKED_RUNE_ATLASES = { "heartofazeroth-slot-minor-unlearned-bottomleft", "heartofazeroth-slot-minor-unlearned-topright" };
function AzeriteEssenceUIMixin:OnLoad()
CallbackRegistryBaseMixin.OnLoad(self);
self.TopTileStreaks:Hide();
self:SetupModelScene();
self:SetupMilestones();
......@@ -145,7 +153,7 @@ function AzeriteEssenceUIMixin:OnShow()
local itemLocation = C_AzeriteItem.FindActiveAzeriteItem();
if itemLocation then
local item = Item:CreateFromItemLocation(itemLocation);
self.itemDataLoadedCancelFunc = item:ContinueWithCancelOnItemLoad(function()
item:ContinueOnItemLoad(function()
self:SetPortraitToAsset(item:GetItemIcon());
self:SetTitle(item:GetItemName());
end);
......@@ -157,6 +165,8 @@ function AzeriteEssenceUIMixin:OnShow()
self:RefreshMilestones();
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN); -- temp?
self:TriggerEvent(AzeriteEssenceUIMixin.Event.OnShow);
end
function AzeriteEssenceUIMixin:OnHide()
......@@ -165,6 +175,11 @@ function AzeriteEssenceUIMixin:OnHide()
CloseAllBags(self);
end
if self.itemDataLoadedCancelFunc then
self.itemDataLoadedCancelFunc();
self.itemDataLoadedCancelFunc = nil;
end
FrameUtil.UnregisterFrameForEvents(self, AZERITE_ESSENCE_FRAME_EVENTS);
self:ClearNewlyActivatedEssence();
......@@ -175,6 +190,8 @@ function AzeriteEssenceUIMixin:OnHide()
AzeriteEssenceLearnAnimFrame:StopAnim();
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE); -- temp?
self:TriggerEvent(AzeriteEssenceUIMixin.Event.OnHide);
end
function AzeriteEssenceUIMixin:OnMouseUp(mouseButton)
......@@ -220,8 +237,25 @@ function AzeriteEssenceUIMixin:RefreshPowerLevel()
end
end
function AzeriteEssenceUIMixin:MeetsPowerLevel(powerLevel)
return self.powerLevel >= powerLevel;
function AzeriteEssenceUIMixin:OnEnterPowerLevelBadgeFrame()
local itemLocation = C_AzeriteItem.FindActiveAzeriteItem();
if itemLocation then
local item = Item:CreateFromItemLocation(itemLocation);
self.itemDataLoadedCancelFunc = item:ContinueWithCancelOnItemLoad(function()
GameTooltip:SetOwner(self.PowerLevelBadgeFrame, "ANCHOR_RIGHT", -7, -6);
GameTooltip_SetTitle(GameTooltip, item:GetItemName(), item:GetItemQualityColor().color);
GameTooltip_AddColoredLine(GameTooltip, string.format(HEART_OF_AZEROTH_LEVEL, self.powerLevel), WHITE_FONT_COLOR);
GameTooltip:Show();
end);
end
end
function AzeriteEssenceUIMixin:OnLeavePowerLevelBadgeFrame()
GameTooltip:Hide();
if self.itemDataLoadedCancelFunc then
self.itemDataLoadedCancelFunc();
self.itemDataLoadedCancelFunc = nil;
end
end
function AzeriteEssenceUIMixin:RefreshMilestones()
......@@ -232,16 +266,16 @@ function AzeriteEssenceUIMixin:RefreshMilestones()
for i, lineContainer in ipairs(self.Lines) do
if lineContainer.toButton.unlocked then
lineContainer:SetState(PowerDependencyLineMixin.LINE_STATE_CONNECTED);
lineContainer:SetAlpha(0.25);
lineContainer:SetAlpha(0.15);
else
if lineContainer.fromButton.unlocked and lineContainer.toButton.canUnlock then
lineContainer:SetDisconnectedColor(DISCONNECTED_LINE_COLOR);
lineContainer:SetState(PowerDependencyLineMixin.LINE_STATE_DISCONNECTED);
lineContainer:SetAlpha(0.1);
lineContainer:SetAlpha(0.08);
else
lineContainer:SetDisconnectedColor(LOCKED_LINE_COLOR);
lineContainer:SetState(PowerDependencyLineMixin.LINE_STATE_DISCONNECTED);
lineContainer:SetAlpha(0.1);
lineContainer:SetAlpha(0.08);
end
end
end
......@@ -339,6 +373,9 @@ function AzeriteEssenceListMixin:OnLoad()
self.dynamic = function(...) return self:CalculateScrollOffset(...); end
HybridScrollFrame_CreateButtons(self, "AzeriteEssenceButtonTemplate", 4, -ESSENCE_LIST_PADDING, "TOPLEFT", "TOPLEFT", 0, -ESSENCE_BUTTON_OFFSET, "TOP", "BOTTOM");
self.HeaderButton:SetParent(self.ScrollChild);
self:RegisterEvent("VARIABLES_LOADED");
self.collapsed = GetCVarBool("otherRolesAzeriteEssencesHidden");
end
function AzeriteEssenceListMixin:OnShow()
......@@ -360,6 +397,9 @@ function AzeriteEssenceListMixin:OnEvent(event)
self:SetupModelScene(true);
elseif event == "PENDING_AZERITE_ESSENCE_CHANGED" then
self:Refresh();
elseif event == "VARIABLES_LOADED" then
self.collapsed = GetCVarBool("otherRolesAzeriteEssencesHidden");
self:Refresh();
end
end
......@@ -425,6 +465,7 @@ end
function AzeriteEssenceListMixin:ToggleHeader()
self.collapsed = not self.collapsed;
SetCVar("otherRolesAzeriteEssencesHidden", self.collapsed);
self:Refresh();
end
......@@ -762,7 +803,7 @@ function AzeriteMilestoneSlotMixin:Refresh()
stateFrame.EmptyGlow.Anim:Play();
end
else
if self:GetParent():MeetsPowerLevel(milestoneInfo.requiredLevel) then
if milestoneInfo.canUnlock then
self:ShowStateFrame(self.AvailableState);
if C_AzeriteEssence.IsAtForge() then
self.AvailableState.GlowAnim:Stop();
......
......@@ -87,7 +87,7 @@
<Texture parentKey="Rune" atlas="heartofazeroth-slot-minor-unactivated-rune" alphaMode="ADD">
<Size x="46" y="49"/>
<Anchors>
<Anchor point="CENTER" y="-2"/>
<Anchor point="CENTER" y="0"/>
</Anchors>
</Texture>
</Layer>
......@@ -217,7 +217,8 @@
<Texture parentKey="Icon" atlas="heartofazeroth-node-on" setAllPoints="true"/>
</Layer>
<Layer level="ARTWORK" textureSubLevel="1">
<Texture parentKey="Glow" atlas="heartofazeroth-node-glow" useAtlasSize="true" alphaMode="ADD" alpha="0">
<Texture parentKey="Glow" atlas="heartofazeroth-node-glow" alphaMode="ADD" alpha="0">
<Size x="49" y="47"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
......@@ -370,22 +371,27 @@
</Frame>
<Frame name="AzeriteEssenceUI" inherits="PortraitFrameTemplate" toplevel="true" parent="UIParent" enableMouse="true" hidden="true" mixin="AzeriteEssenceUIMixin">
<Size x="665" y="469"/>
<Size x="707" y="510"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Frames>
<Frame parentKey="PowerLevelBadgeFrame" frameStrata="HIGH">
<Size x="64" y="64"/>
<Size x="36" y="36"/>
<Anchors>
<Anchor point="TOPLEFT" x="25" y="-26"/>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture parentKey="Ring" file="Interface\Minimap\MiniMap-TrackingBorder" setAllPoints="true"/>
<Texture parentKey="Ring" file="Interface\Minimap\MiniMap-TrackingBorder">
<Size x="64" y="64"/>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Texture>
<FontString parentKey="Label" inherits="SystemFont_Shadow_Med2">
<Anchors>
<Anchor point="CENTER" x="-13" y="13"/>
<Anchor point="CENTER" x="1" y="-1"/>
</Anchors>
<Color r="1.0" g="0.82" b="0"/>
</FontString>
......@@ -394,17 +400,25 @@
<Texture parentKey="BackgroundBlack" alpha="0.7">
<Size x="22" y="22"/>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.Background" relativePoint="TOPLEFT" x="8" y="-7"/>
<Anchor point="CENTER"/>
</Anchors>
<Color r="0" g="0" b="0"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
self:GetParent():OnEnterPowerLevelBadgeFrame();
</OnEnter>
<OnLeave>
self:GetParent():OnLeavePowerLevelBadgeFrame();
</OnLeave>
</Scripts>
</Frame>
<Frame parentKey="LeftInset" useParentLevel="true" inherits="InsetFrameTemplate">
<Size x="443"/>
<Size x="485"/>
<Anchors>
<Anchor point="TOPLEFT" x="4" y="-25"/>
<Anchor point="TOPLEFT" x="4" y="-24"/>
<Anchor point="BOTTOMLEFT" x="4" y="6"/>
</Anchors>
</Frame>
......@@ -425,9 +439,9 @@
</Layers>
</Frame>
<ModelScene parentKey="ItemModelScene" inherits="NonInteractableModelSceneMixinTemplate" useParentLevel="true" drawLayer="BORDER">
<Size x="435" y="431"/>
<Size x="473" y="469"/>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.LeftInset" x="4" y="-3"/>
<Anchor point="TOPLEFT" relativeKey="$parent.LeftInset" x="6" y="-6"/>
</Anchors>
</ModelScene>
<Frame parentKey="StarsAnimationFrame1" inherits="AzeriteEssenceStarsAnimationFrameTemplate">
......@@ -549,22 +563,24 @@
<Layers>
<Layer level="BORDER" textureSubLevel="-2">
<Texture parentKey="OrbBackground">
<Size x="435" y="431"/>
<Size x="475" y="471"/>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.ItemModelScene" x="-1" y="1"/>
<Anchor point="TOPLEFT" relativeKey="$parent.ItemModelScene" x="0" y="1"/>
</Anchors>
<Color r="0" g="0" b="0" a="1"/>
</Texture>
</Layer>
<Layer level="ARTWORK" textureSubLevel="1">
<Texture parentKey="OrbGlass" atlas="heartofazeroth-orb-glass" useAtlasSize="true" alphaMode="ADD" alpha="0.6">
<Texture parentKey="OrbGlass" atlas="heartofazeroth-orb-glass" alphaMode="ADD" alpha="0.3">
<Size x="438" y="438"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.OrbBackground"/>
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK" textureSubLevel="2">
<Texture parentKey="OrbShadow" atlas="heartofazeroth-orb-shadow" useAtlasSize="true">
<Texture parentKey="OrbShadow" atlas="heartofazeroth-orb-shadow">
<Size x="438" y="438"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.OrbBackground"/>
</Anchors>
......@@ -572,7 +588,7 @@
</Layer>
<Layer level="ARTWORK" textureSubLevel="3">
<Texture parentKey="ActivationGlow" atlas="heartofazeroth-orb-activated" alpha="0" alphaMode="ADD">
<Size x="400" y="400"/>
<Size x="438" y="438"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.OrbBackground"/>
</Anchors>
......@@ -586,7 +602,7 @@
</Layer>
<Layer level="ARTWORK" textureSubLevel="4">
<Texture parentKey="OrbRing" atlas="heartofazeroth-orb-ring">
<Size x="437" y="433"/>
<Size x="477" y="473"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.OrbBackground"/>
</Anchors>
......@@ -662,13 +678,13 @@
</Anchors>
</Texture>
<Texture parentKey="OrbActivated" parentArray="Textures" alpha="0" alphaMode="ADD" atlas="heartofazeroth-orb-activated">
<Size x="401" y="392"/>
<Size x="430" y="430"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
<Texture parentKey="OrbActivated2" parentArray="Textures" alpha="0" alphaMode="ADD" atlas="heartofazeroth-orb-activated">
<Size x="401" y="392"/>
<Size x="430" y="430"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.OrbActivated"/>
</Anchors>
......
......@@ -170,6 +170,7 @@ function MountJournal_ApplyEquipment(self, itemLocation)
-- We're applying equipment from inventory, so we should have the item information in this context.
if itemLocation and C_MountJournal.IsItemMountEquipment(itemLocation) then
local pendingItem = Item:CreateFromItemLocation(itemLocation);
local canContinue = true;
if C_MountJournal.IsMountEquipmentApplied() then