Commit ea76fcd0 authored by TOM_RUS's avatar TOM_RUS

WOW-30168patch8.2.0_PTR

parent 7d4b4db6
......@@ -67,6 +67,15 @@ local AzeriteItem =
{ Name = "isAzeriteItem", Type = "bool", Nilable = false },
},
},
{
Name = "IsAzeriteItemAtMaxLevel",
Type = "Function",
Returns =
{
{ Name = "isAtMax", Type = "bool", Nilable = false },
},
},
{
Name = "IsAzeriteItemByID",
Type = "Function",
......
......@@ -222,50 +222,86 @@ local ClubFinder =
Tables =
{
{
Name = "ClubFinderRequestType",
Name = "PlayerClubRequestStatus",
Type = "Enumeration",
NumValues = 3,
NumValues = 8,
MinValue = 0,
MaxValue = 2,
MaxValue = 7,
Fields =
{
{ Name = "None", Type = "ClubFinderRequestType", EnumValue = 0 },
{ Name = "Guild", Type = "ClubFinderRequestType", EnumValue = 1 },
{ Name = "Community", Type = "ClubFinderRequestType", EnumValue = 2 },
{ Name = "None", Type = "PlayerClubRequestStatus", EnumValue = 0 },
{ Name = "Pending", Type = "PlayerClubRequestStatus", EnumValue = 1 },
{ Name = "AutoJoined", Type = "PlayerClubRequestStatus", EnumValue = 2 },
{ Name = "Declined", Type = "PlayerClubRequestStatus", EnumValue = 3 },
{ Name = "Approved", Type = "PlayerClubRequestStatus", EnumValue = 4 },
{ Name = "Joined", Type = "PlayerClubRequestStatus", EnumValue = 5 },
{ Name = "JoinedAnother", Type = "PlayerClubRequestStatus", EnumValue = 6 },
{ Name = "Canceled", Type = "PlayerClubRequestStatus", EnumValue = 7 },
},
},
{
Name = "ClubFinderSettingFlags",
Name = "ClubFinderApplicationUpdateType",
Type = "Enumeration",
NumValues = 11,
NumValues = 4,
MinValue = 0,
MaxValue = 10,
MaxValue = 3,
Fields =
{
{ Name = "Dungeon", Type = "ClubFinderSettingFlags", EnumValue = 0 },
{ Name = "Raiding", Type = "ClubFinderSettingFlags", EnumValue = 1 },
{ Name = "Pvp", Type = "ClubFinderSettingFlags", EnumValue = 2 },
{ Name = "Rp", Type = "ClubFinderSettingFlags", EnumValue = 3 },
{ Name = "Social", Type = "ClubFinderSettingFlags", EnumValue = 4 },
{ Name = "Small", Type = "ClubFinderSettingFlags", EnumValue = 5 },
{ Name = "Medium", Type = "ClubFinderSettingFlags", EnumValue = 6 },
{ Name = "Large", Type = "ClubFinderSettingFlags", EnumValue = 7 },
{ Name = "Tank", Type = "ClubFinderSettingFlags", EnumValue = 8 },
{ Name = "Healer", Type = "ClubFinderSettingFlags", EnumValue = 9 },
{ Name = "Damage", Type = "ClubFinderSettingFlags", EnumValue = 10 },
{ Name = "None", Type = "ClubFinderApplicationUpdateType", EnumValue = 0 },
{ Name = "AcceptInvite", Type = "ClubFinderApplicationUpdateType", EnumValue = 1 },
{ Name = "DeclineInvite", Type = "ClubFinderApplicationUpdateType", EnumValue = 2 },
{ Name = "Cancel", Type = "ClubFinderApplicationUpdateType", EnumValue = 3 },
},
},
{
Name = "PlayerClubRequestStatus",
Name = "ClubFinderReportType",
Type = "Enumeration",
NumValues = 3,
MinValue = 0,
MaxValue = 2,
Fields =
{
{ Name = "Requested", Type = "PlayerClubRequestStatus", EnumValue = 0 },
{ Name = "Accepted", Type = "PlayerClubRequestStatus", EnumValue = 1 },
{ Name = "Declined", Type = "PlayerClubRequestStatus", EnumValue = 2 },
{ Name = "Any", Type = "ClubFinderReportType", EnumValue = 0 },
{ Name = "InapropriateName", Type = "ClubFinderReportType", EnumValue = 1 },
{ Name = "InapropriateComment", Type = "ClubFinderReportType", EnumValue = 2 },
},
},
{
Name = "ClubFinderRequestType",
Type = "Enumeration",
NumValues = 4,
MinValue = 0,
MaxValue = 3,
Fields =
{
{ Name = "None", Type = "ClubFinderRequestType", EnumValue = 0 },
{ Name = "Guild", Type = "ClubFinderRequestType", EnumValue = 1 },
{ Name = "Community", Type = "ClubFinderRequestType", EnumValue = 2 },
{ Name = "All", Type = "ClubFinderRequestType", EnumValue = 3 },
},
},
{
Name = "ClubFinderSettingFlags",
Type = "Enumeration",
NumValues = 14,
MinValue = 0,
MaxValue = 13,
Fields =
{
{ Name = "None", Type = "ClubFinderSettingFlags", EnumValue = 0 },
{ Name = "MaxLevelOnly", Type = "ClubFinderSettingFlags", EnumValue = 1 },
{ Name = "AutoAccept", Type = "ClubFinderSettingFlags", EnumValue = 2 },
{ Name = "Dungeons", Type = "ClubFinderSettingFlags", EnumValue = 3 },
{ Name = "Raids", Type = "ClubFinderSettingFlags", EnumValue = 4 },
{ Name = "Pvp", Type = "ClubFinderSettingFlags", EnumValue = 5 },
{ Name = "Rp", Type = "ClubFinderSettingFlags", EnumValue = 6 },
{ Name = "Social", Type = "ClubFinderSettingFlags", EnumValue = 7 },
{ Name = "Small", Type = "ClubFinderSettingFlags", EnumValue = 8 },
{ Name = "Medium", Type = "ClubFinderSettingFlags", EnumValue = 9 },
{ Name = "Large", Type = "ClubFinderSettingFlags", EnumValue = 10 },
{ Name = "Tank", Type = "ClubFinderSettingFlags", EnumValue = 11 },
{ Name = "Healer", Type = "ClubFinderSettingFlags", EnumValue = 12 },
{ Name = "Damage", Type = "ClubFinderSettingFlags", EnumValue = 13 },
},
},
{
......@@ -273,6 +309,7 @@ local ClubFinder =
Type = "Structure",
Fields =
{
{ Name = "clubFinderGUID", Type = "string", Nilable = false },
{ Name = "playerGUID", Type = "string", Nilable = false },
{ Name = "name", Type = "string", Nilable = false },
{ Name = "message", Type = "string", Nilable = false },
......@@ -280,6 +317,7 @@ local ClubFinder =
{ Name = "classID", Type = "number", Nilable = false },
{ Name = "ilvl", Type = "number", Nilable = false },
{ Name = "specIds", Type = "table", InnerType = "number", Nilable = false },
{ Name = "requestStatus", Type = "PlayerClubRequestStatus", Nilable = false },
},
},
{
......@@ -325,6 +363,8 @@ local ClubFinder =
{ Name = "tabardInfo", Type = "ClubFinderGuildTabardInfo", Nilable = true },
{ Name = "clubStatus", Type = "PlayerClubRequestStatus", Nilable = true },
{ Name = "recruitingSpecIds", Type = "table", InnerType = "number", Nilable = false },
{ Name = "cached", Type = "bool", Nilable = false },
{ Name = "cacheRequested", Type = "bool", Nilable = false },
},
},
},
......
......@@ -152,7 +152,7 @@ local MountJournal =
},
},
{
Name = "GetMountEquipmentLevelRequirement",
Name = "GetMountEquipmentUnlockLevel",
Type = "Function",
Returns =
......@@ -308,6 +308,15 @@ local MountJournal =
{ Name = "isApplied", Type = "bool", Nilable = false },
},
},
{
Name = "IsMountEquipmentUnlocked",
Type = "Function",
Returns =
{
{ Name = "isUnlocked", Type = "bool", Nilable = false },
},
},
{
Name = "IsSourceChecked",
Type = "Function",
......
......@@ -23,6 +23,7 @@ local ReportSystem =
{
Name = "InitiateReportPlayer",
Type = "Function",
Documentation = { "Not allowed to be called by addons" },
Arguments =
{
......@@ -35,6 +36,18 @@ local ReportSystem =
{ Name = "token", Type = "number", Nilable = false },
},
},
{
Name = "OpenReportPlayerDialog",
Type = "Function",
Documentation = { "Addons should use this to open the ReportPlayer dialog. InitiateReportPlayer and SendReportPlayer are no loner accessible to addons." },
Arguments =
{
{ Name = "reportType", Type = "string", Nilable = false },
{ Name = "playerName", Type = "string", Nilable = false },
{ Name = "playerLocation", Type = "table", Mixin = "PlayerLocationMixin", Nilable = true },
},
},
{
Name = "ReportServerLag",
Type = "Function",
......@@ -42,6 +55,7 @@ local ReportSystem =
{
Name = "SendReportPlayer",
Type = "Function",
Documentation = { "Not allowed to be called by addons" },
Arguments =
{
......@@ -95,6 +109,17 @@ local ReportSystem =
Events =
{
{
Name = "OpenReportPlayer",
Type = "Event",
LiteralName = "OPEN_REPORT_PLAYER",
Payload =
{
{ Name = "token", Type = "number", Nilable = false },
{ Name = "reportType", Type = "string", Nilable = false },
{ Name = "playerName", Type = "string", Nilable = false },
},
},
{
Name = "ReportPlayerResult",
Type = "Event",
......
......@@ -44,20 +44,18 @@ local TIER_2_FINAL_POWER_REVEAL_SHAKE_FREQUENCY = 0.001;
local TIER_2_GLOW_TIME = 3.2;
local TIER_2_FORGING_MODEL_SCENE_ID = 55;
local TIER_2_FORGING_EFFECT_MODEL_ID = 382335;--"SPELLS\\EASTERN_PLAGUELANDS_BEAM_EFFECT.M2";
local TIER_2_FORGE_EFFECT_FADE_IN_DELAY = 0;
local TIER_2_BACKGROUND_FRONT_INTENSITY_IN_DELAY = 0;
local TIER_2_BACKGROUND_FRONT_INTENSITY_IN_EFFECT = 0;
local TIER_2_FORGE_EFFECT_FADE_OUT_DELAY = 0.5;
local TIER_2_BACKGROUND_FRONT_INTENSITY_OUT_DELAY = 0.5;
local TIER_2_SLAM_EFFECT_MODEL_SCENE_ID = 57;
local TIER_2_SLAM_EFFECT_MODEL_ID = 1369310; --"SPELLS\\CFX_WARRIOR_THUNDERCLAP_CASTWORLD.M2"
local TIER_2_SLAM_EFFECT_DELAY = 0.275;
local TIER_2_SLAM_EFFECT_HIDE_DELAY = 0.5;
local TIER2_FORGING_MODEL_SCENE_INFO = StaticModelInfo.CreateModelSceneEntry(55, 382335); --"SPELLS\\EASTERN_PLAGUELANDS_BEAM_EFFECT.M2";
local TIER2_SLAM_EFFECT_MODEL_SCENE_INFO = StaticModelInfo.CreateModelSceneEntry(57, 1369310); --"SPELLS\\CFX_WARRIOR_THUNDERCLAP_CASTWORLD.M2"
-------------------- Animation Constants End --------------------
function ArtifactPerksMixin:OnLoad()
......@@ -295,20 +293,15 @@ function ArtifactPerksMixin:RefreshPowerTiers()
self.CrestFrame:SetPoint("CENTER", finalTier2Button, "CENTER");
self.CrestFrame:Show();
local forceUpdate = true;
self.Tier2ForgingScene:Show();
self.Tier2ForgingScene:SetFromModelSceneID(TIER_2_FORGING_MODEL_SCENE_ID, true);
local forgingEffect = self.Tier2ForgingScene:GetActorByTag("effect");
local forgingEffect = StaticModelInfo.SetupModelScene(self.Tier2ForgingScene, TIER2_FORGING_MODEL_SCENE_INFO, forceUpdate);
if ( forgingEffect ) then
forgingEffect:SetModelByFileID(TIER_2_FORGING_EFFECT_MODEL_ID);
forgingEffect:SetAlpha(0.0);
self.Tier2ForgingScene.ForgingEffect = forgingEffect;
end
self.Tier2SlamEffectModelScene:SetFromModelSceneID(TIER_2_SLAM_EFFECT_MODEL_SCENE_ID, true);
local slamEffect = self.Tier2SlamEffectModelScene:GetActorByTag("effect");
if ( slamEffect ) then
slamEffect:SetModelByFileID(TIER_2_SLAM_EFFECT_MODEL_ID);
end
StaticModelInfo.SetupModelScene(self.Tier2SlamEffectModelScene, TIER2_SLAM_EFFECT_MODEL_SCENE_INFO, forceUpdate);
else
self.CrestFrame:Hide();
self.Tier2SlamEffectModelScene:Hide();
......@@ -492,216 +485,10 @@ function ArtifactPerksMixin:Refresh(newItem)
self.newItem = self.newItem or newItem;
end
ArtifactLineMixin = {};
ArtifactLineMixin.LINE_STATE_CONNECTED = 1;
ArtifactLineMixin.LINE_STATE_DISCONNECTED = 2;
ArtifactLineMixin.LINE_STATE_LOCKED = 3;
ArtifactLineMixin.LINE_FADE_ANIM_TYPE_CONNECTED = 1;
ArtifactLineMixin.LINE_FADE_ANIM_TYPE_UNLOCKED = 2;
ArtifactLineMixin.LINE_FADE_ANIM_TYPE_LOCKED = 3;
function ArtifactLineMixin:SetState(lineState)
self.lineState = lineState;
if lineState == self.LINE_STATE_CONNECTED then
self:SetConnected();
elseif lineState == self.LINE_STATE_DISCONNECTED then
self:SetDisconnected();
elseif lineState == self.LINE_STATE_LOCKED then
self:SetLocked();
end
end
function ArtifactLineMixin:SetConnected()
self.Fill:SetVertexColor(self.connectedColor:GetRGB());
self.FillScroll1:SetVertexColor(self.connectedColor:GetRGB());
if self.FillScroll2 then
self.FillScroll2:SetVertexColor(self.connectedColor:GetRGB());
end
self:PlayLineFadeAnim(self.LINE_FADE_ANIM_TYPE_CONNECTED);
end
function ArtifactLineMixin:SetDisconnected()
self.Fill:SetVertexColor(self.disconnectedColor:GetRGB());
self:PlayLineFadeAnim(self.LINE_FADE_ANIM_TYPE_UNLOCKED);
end
function ArtifactLineMixin:SetLocked()
self.Fill:SetVertexColor(self.connectedColor:GetRGB());
self:PlayLineFadeAnim(self.LINE_FADE_ANIM_TYPE_LOCKED);
end
function ArtifactLineMixin:PlayLineFadeAnim(lineAnimType)
self.FadeAnim:Finish();
self.FadeAnim.Background:SetFromAlpha(self.Background:GetAlpha());
self.FadeAnim.Fill:SetFromAlpha(self.Fill:GetAlpha());
self.FadeAnim.FillScroll1:SetFromAlpha(self.FillScroll1:GetAlpha());
if self.FillScroll2 then
self.FadeAnim.FillScroll2:SetFromAlpha(self.FillScroll2:GetAlpha());
end
local artifactDisabled = C_ArtifactUI.IsArtifactDisabled();
if artifactDisabled then
self.FillScroll1:SetDesaturated(true);
if self.FillScroll2 then
self.FillScroll2:SetDesaturated(true);
end
end
if lineAnimType == self.LINE_FADE_ANIM_TYPE_CONNECTED then
if artifactDisabled then
self.ScrollAnim:Stop();
else
self.ScrollAnim:Play(false, self.scrollElapsedOffset);
end
self.FadeAnim.Background:SetToAlpha(0.0);
self.FadeAnim.Fill:SetToAlpha(1.0);
self.FadeAnim.FillScroll1:SetToAlpha(1.0);
if self.FillScroll2 then
self.FadeAnim.FillScroll2:SetToAlpha(1.0);
end
elseif lineAnimType == self.LINE_FADE_ANIM_TYPE_UNLOCKED then
self.ScrollAnim:Stop();
self.FadeAnim.Background:SetToAlpha(1.0);
self.FadeAnim.Fill:SetToAlpha(1.0);
self.FadeAnim.FillScroll1:SetToAlpha(0.0);
if self.FillScroll2 then
self.FadeAnim.FillScroll2:SetToAlpha(0.0);
end
elseif lineAnimType == self.LINE_FADE_ANIM_TYPE_LOCKED then
self.ScrollAnim:Stop();
self.FadeAnim.Background:SetToAlpha(0.85);
self.FadeAnim.Fill:SetToAlpha(0.0);
self.FadeAnim.FillScroll1:SetToAlpha(0.0);
if self.FillScroll2 then
self.FadeAnim.FillScroll2:SetToAlpha(0.0);
end
end
self.animType = lineAnimType;
self.FadeAnim:Play();
end
function ArtifactLineMixin:SetEndPoints(fromButton, toButton)
if self.IsCurved then
self.Fill:SetSize(2, 2);
self.Fill:ClearAllPoints();
self.Fill:SetPoint("CENTER", fromButton);
self.Background:SetSize(2, 2);
self.Background:ClearAllPoints();
self.Background:SetPoint("CENTER", fromButton);
self.FillScroll1:SetSize(2, 2);
self.FillScroll1:ClearAllPoints();
self.FillScroll1:SetPoint("CENTER", fromButton);
else
self.Fill:SetStartPoint("CENTER", fromButton);
self.Fill:SetEndPoint("CENTER", toButton);
self.Background:SetStartPoint("CENTER", fromButton);
self.Background:SetEndPoint("CENTER", toButton);
self.FillScroll1:SetStartPoint("CENTER", fromButton);
self.FillScroll1:SetEndPoint("CENTER", toButton);
self.FillScroll2:SetStartPoint("CENTER", fromButton);
self.FillScroll2:SetEndPoint("CENTER", toButton);
end
end
function ArtifactLineMixin:SetConnectedColor(color)
self.connectedColor = color;
end
function ArtifactLineMixin:SetDisconnectedColor(color)
self.disconnectedColor = color;
end
do
local function OnLineRevealFinished(animGroup)
local lineContainer = animGroup:GetParent();
if lineContainer.animType then
lineContainer:PlayLineFadeAnim(lineContainer.animType);
end
end
function ArtifactLineMixin:BeginReveal(delay, duration)
if not self.RevealAnim then
return;
end
self:SetAlpha(0.0);
self.RevealAnim.Start1:SetEndDelay(delay);
self.RevealAnim.Start2:SetEndDelay(delay);
self.RevealAnim.LineScale:SetDuration(duration);
self.RevealAnim:SetScript("OnFinished", OnLineRevealFinished);
self.RevealAnim:Play();
end
end
function ArtifactLineMixin:IsRevealing()
return self.RevealAnim and self.RevealAnim:IsPlaying();
end
function ArtifactLineMixin:GetRevealDelay()
return self.RevealAnim and self.RevealAnim.Start1:GetEndDelay() or 0.0;
end
function ArtifactLineMixin:SetScrollAnimationProgressOffset(progress)
self.scrollElapsedOffset = (1 - progress) * self.ScrollAnim:GetDuration();
end
function ArtifactLineMixin:CalculateTiling(length)
local TEXTURE_WIDTH = 128;
local tileAmount = length / TEXTURE_WIDTH;
self.Fill:SetTexCoord(0, tileAmount, 0, 1);
self.Background:SetTexCoord(0, tileAmount, 0, 1);
self.FillScroll1:SetTexCoord(0, tileAmount, 0, 1);
if self.FillScroll2 then
self.FillScroll2:SetTexCoord(0, tileAmount, 0, 1);
end
end
function ArtifactLineMixin:SetVertexOffset(vertexIndex, x, y)
self.Fill:SetVertexOffset(vertexIndex, x, y);
self.Background:SetVertexOffset(vertexIndex, x, y);
self.FillScroll1:SetVertexOffset(vertexIndex, x, y);
if self.FillScroll2 then
self.FillScroll2:SetVertexOffset(vertexIndex, x, y);
end
end
function ArtifactLineMixin:SetAlpha(alpha, continueAnimating)
if not continueAnimating then
self.ScrollAnim:Stop();
self.FadeAnim:Stop();
if self.RevealAnim then
self.RevealAnim:Stop();
end
end
self.Background:SetAlpha(alpha);
self.Fill:SetAlpha(alpha);
self.FillScroll1:SetAlpha(alpha);
if self.FillScroll2 then
self.FillScroll2:SetAlpha(alpha);
end
end
ArtifactLineMixin = CreateFromMixins(PowerDependencyLineMixin)
function ArtifactLineMixin:OnReleased()
self.animType = nil;
self:SetAlpha(0.0);
function ArtifactLineMixin:IsDeprecated()
return C_ArtifactUI.IsArtifactDisabled();
end
local function OnUnusedLineHidden(lineContainer)
......@@ -825,12 +612,12 @@ function ArtifactPerksMixin:RefreshDependencies(powers)
local hasSpentAny = fromButton.hasSpentAny and toButton.hasSpentAny;
if hasSpentAny or (fromButton:IsActiveForLinks() and (toButton.hasEnoughPower or toButton:IsCompletelyPurchased())) or (toButton:IsActiveForLinks() and (fromButton.hasEnoughPower or fromButton:IsCompletelyPurchased())) then
if (fromButton:IsActiveForLinks() and toButton.hasSpentAny) or (toButton:IsActiveForLinks() and fromButton.hasSpentAny) then
state = ArtifactLineMixin.LINE_STATE_CONNECTED;
state = PowerDependencyLineMixin.LINE_STATE_CONNECTED;
else
state = ArtifactLineMixin.LINE_STATE_DISCONNECTED;
state = PowerDependencyLineMixin.LINE_STATE_DISCONNECTED;
end
else
state = ArtifactLineMixin.LINE_STATE_LOCKED;
state = PowerDependencyLineMixin.LINE_STATE_LOCKED;
end
end
......@@ -876,7 +663,7 @@ function ArtifactPerksMixin:RefreshDependencies(powers)
if lastTier2Power and lastTier2Power:IsCompletelyPurchased() and lastTier2Power:HasSpentAny() then
local startingTier2Power = self:GetStartingPowerButtonByTier(2);
if startingTier2Power and startingTier2Power:IsCompletelyPurchased() and not startingTier2Power.links[lastTier2Power:GetPowerID()] then
local lineContainer = self:GenerateCurvedLine(lastTier2Power, startingTier2Power, ArtifactLineMixin.LINE_STATE_CONNECTED, artifactArtInfo);
local lineContainer = self:GenerateCurvedLine(lastTier2Power, startingTier2Power, PowerDependencyLineMixin.LINE_STATE_CONNECTED, artifactArtInfo);
lastTier2Power.links[startingTier2Power:GetPowerID()] = lineContainer;
startingTier2Power.links[lastTier2Power:GetPowerID()] = lineContainer;
......@@ -1280,7 +1067,6 @@ end
function ArtifactPerksMixin:AnimateInCrest()
local forgingEffect = self.Tier2ForgingScene:GetActorByTag("effect");
if ( forgingEffect ) then
self.ForgingEffect = forgingEffect;
self:StartWithDelay(TIER_2_FORGE_EFFECT_FADE_OUT_DELAY, function ()
self.Tier2ForgingScene.ForgingEffectAnimOut:Play();
end);
......