Commit 3234e434 authored by TOM_RUS's avatar TOM_RUS

WOW-36294patch9.0.2_Beta

parent a23866ad
......@@ -68,7 +68,7 @@ local AlliedRacesFrame =
{ Name = "raceID", Type = "number", Nilable = false },
{ Name = "maleModelID", Type = "number", Nilable = false },
{ Name = "femaleModelID", Type = "number", Nilable = false },
{ Name = "achievementID", Type = "number", Nilable = false },
{ Name = "achievementIds", Type = "table", InnerType = "number", Nilable = false },
{ Name = "maleName", Type = "string", Nilable = false },
{ Name = "femaleName", Type = "string", Nilable = false },
{ Name = "description", Type = "string", Nilable = false },
......
......@@ -70,18 +70,17 @@ local CovenantSanctum =
},
},
{
Name = "GetRenownMilestones",
Name = "GetRenownLevels",
Type = "Function",
Arguments =
{
{ Name = "covenantID", Type = "number", Nilable = false },
{ Name = "renownLevel", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "milestones", Type = "table", InnerType = "CovenantSanctumRenownMilestoneInfo", Nilable = false },
{ Name = "levels", Type = "table", InnerType = "CovenantSanctumRenownLevelInfo", Nilable = false },
},
},
{
......@@ -121,6 +120,16 @@ local CovenantSanctum =
Events =
{
{
Name = "CovenantRenownInteractionEnded",
Type = "Event",
LiteralName = "COVENANT_RENOWN_INTERACTION_ENDED",
},
{
Name = "CovenantRenownInteractionStarted",
Type = "Event",
LiteralName = "COVENANT_RENOWN_INTERACTION_STARTED",
},
{
Name = "CovenantSanctumInteractionEnded",
Type = "Event",
......@@ -156,12 +165,13 @@ local CovenantSanctum =
},
},
{
Name = "CovenantSanctumRenownMilestoneInfo",
Name = "CovenantSanctumRenownLevelInfo",
Type = "Structure",
Fields =
{
{ Name = "level", Type = "number", Nilable = false },
{ Name = "locked", Type = "bool", Nilable = false },
{ Name = "isMilestone", Type = "bool", Nilable = false },
{ Name = "isCapstone", Type = "bool", Nilable = false },
},
},
......
......@@ -94,9 +94,9 @@ local CurrencyConstants =
{
Name = "CurrencySource",
Type = "Enumeration",
NumValues = 49,
NumValues = 46,
MinValue = 0,
MaxValue = 48,
MaxValue = 45,
Fields =
{
{ Name = "ConvertOldItem", Type = "CurrencySource", EnumValue = 0 },
......@@ -144,10 +144,7 @@ local CurrencyConstants =
{ Name = "AccountCopy", Type = "CurrencySource", EnumValue = 42 },
{ Name = "WeeklyRewardChest", Type = "CurrencySource", EnumValue = 43 },
{ Name = "GarrisonTalentTreeReset", Type = "CurrencySource", EnumValue = 44 },
{ Name = "DailyReset", Type = "CurrencySource", EnumValue = 45 },
{ Name = "AddConduitToCollection", Type = "CurrencySource", EnumValue = 46 },
{ Name = "Last", Type = "CurrencySource", EnumValue = 47 },
{ Name = "Barbershop", Type = "CurrencySource", EnumValue = 48 },
{ Name = "Last", Type = "CurrencySource", EnumValue = 45 },
},
},
{
......@@ -196,7 +193,7 @@ local CurrencyConstants =
Type = "Constants",
Values =
{
{ Name = "PLAYER_CURRENCY_CLIENT_FLAGS", Type = "number", Value = Enum.PlayerCurrencyFlagsDbFlags.InBackpack + Enum.PlayerCurrencyFlagsDbFlags.UnusedInUI },
{ Name = "PLAYER_CURRENCY_CLIENT_FLAGS", Type = "number", Value = PLAYER_CURRENCY_PDB_IN_BACKPACK|PLAYER_CURRENCY_PDB_UNUSED_IN_UI },
{ Name = "MAX_CURRENCY_QUANTITY", Type = "number", Value = 100000000 },
{ Name = "CONQUEST_ARENA_AND_BG_META_CURRENCY_ID", Type = "number", Value = 483 },
{ Name = "CONQUEST_RATED_BG_META_CURRENCY_ID", Type = "number", Value = 484 },
......
......@@ -62,6 +62,7 @@ local Cursor =
{ Name = "isDefault", Type = "bool", Nilable = false },
{ Name = "newCursorType", Type = "UICursorType", Nilable = false },
{ Name = "oldCursorType", Type = "UICursorType", Nilable = false },
{ Name = "oldCursorVirtualID", Type = "number", Nilable = false },
},
},
{
......
......@@ -66,6 +66,42 @@ local GarrisonConstants =
{ Name = "EnemyRightBack", Type = "GarrAutoBoardIndex", EnumValue = 12 },
},
},
{
Name = "GarrAutoCombatSpellTutorialFlag",
Type = "Enumeration",
NumValues = 5,
MinValue = 0,
MaxValue = 4,
Fields =
{
{ Name = "None", Type = "GarrAutoCombatSpellTutorialFlag", EnumValue = 0 },
{ Name = "Single", Type = "GarrAutoCombatSpellTutorialFlag", EnumValue = 1 },
{ Name = "Column", Type = "GarrAutoCombatSpellTutorialFlag", EnumValue = 2 },
{ Name = "Row", Type = "GarrAutoCombatSpellTutorialFlag", EnumValue = 3 },
{ Name = "All", Type = "GarrAutoCombatSpellTutorialFlag", EnumValue = 4 },
},
},
{
Name = "GarrAutoCombatTutorial",
Type = "Enumeration",
NumValues = 11,
MinValue = 1,
MaxValue = 1024,
Fields =
{
{ Name = "SelectMission", Type = "GarrAutoCombatTutorial", EnumValue = 1 },
{ Name = "PlaceCompanion", Type = "GarrAutoCombatTutorial", EnumValue = 2 },
{ Name = "HealCompanion", Type = "GarrAutoCombatTutorial", EnumValue = 4 },
{ Name = "LevelHeal", Type = "GarrAutoCombatTutorial", EnumValue = 8 },
{ Name = "BeneficialEffect", Type = "GarrAutoCombatTutorial", EnumValue = 16 },
{ Name = "AttackSingle", Type = "GarrAutoCombatTutorial", EnumValue = 32 },
{ Name = "AttackColumn", Type = "GarrAutoCombatTutorial", EnumValue = 64 },
{ Name = "AttackRow", Type = "GarrAutoCombatTutorial", EnumValue = 128 },
{ Name = "AttackAll", Type = "GarrAutoCombatTutorial", EnumValue = 256 },
{ Name = "TroopTutorial", Type = "GarrAutoCombatTutorial", EnumValue = 512 },
{ Name = "EnvironmentalEffect", Type = "GarrAutoCombatTutorial", EnumValue = 1024 },
},
},
{
Name = "GarrAutoCombatantRole",
Type = "Enumeration",
......
......@@ -352,6 +352,15 @@ local GarrisonInfo =
{ Name = "worldQuestID", Type = "number", Nilable = false },
},
},
{
Name = "HasAdventures",
Type = "Function",
Returns =
{
{ Name = "hasAdventures", Type = "bool", Nilable = false },
},
},
{
Name = "IsAtGarrisonMissionNPC",
Type = "Function",
......@@ -978,6 +987,7 @@ local GarrisonInfo =
{ Name = "schoolMask", Type = "number", Nilable = false },
{ Name = "previewMask", Type = "number", Nilable = false },
{ Name = "icon", Type = "number", Nilable = false },
{ Name = "spellTutorialFlag", Type = "number", Nilable = false },
},
},
{
......
......@@ -272,6 +272,20 @@ local Item =
{ Name = "isBound", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemConduit",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isConduit", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorrupted",
Type = "Function",
......
......@@ -54,6 +54,15 @@ local Soulbinds =
{ Name = "errorDescription", Type = "string", Nilable = true },
},
},
{
Name = "CanSwitchActiveSoulbindTreeBranch",
Type = "Function",
Returns =
{
{ Name = "result", Type = "bool", Nilable = false },
},
},
{
Name = "CloseUI",
Type = "Function",
......@@ -168,6 +177,15 @@ local Soulbinds =
{ Name = "collectionData", Type = "table", InnerType = "ConduitCollectionData", Nilable = false },
},
},
{
Name = "GetConduitCollectionCount",
Type = "Function",
Returns =
{
{ Name = "count", Type = "number", Nilable = false },
},
},
{
Name = "GetConduitCollectionData",
Type = "Function",
......@@ -191,6 +209,20 @@ local Soulbinds =
{ Name = "collectionData", Type = "ConduitCollectionData", Nilable = true },
},
},
{
Name = "GetConduitCollectionDataByVirtualID",
Type = "Function",
Arguments =
{
{ Name = "virtualID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "collectionData", Type = "ConduitCollectionData", Nilable = true },
},
},
{
Name = "GetConduitDisplayed",
Type = "Function",
......
......@@ -860,6 +860,15 @@ local Unit =
{ Name = "unitTarget", Type = "string", Nilable = false },
},
},
{
Name = "UnitAreaChanged",
Type = "Event",
LiteralName = "UNIT_AREA_CHANGED",
Payload =
{
{ Name = "unitTarget", Type = "string", Nilable = false },
},
},
{
Name = "UnitAttack",
Type = "Event",
......
......@@ -70,7 +70,7 @@ function AlliedRacesFrameMixin:LoadRaceData(raceID)
self:SetPortraitAtlasRaw(raceInfo.crestAtlas);
self:UpdatedBannerColor(raceInfo.bannerColor);
self:RacialAbilitiesData(raceID);
self.RaceInfoFrame.ScrollFrame.Child.ObjectivesFrame:SetAchievement(raceInfo.achievementID);
self.RaceInfoFrame.ScrollFrame.Child.ObjectivesFrame:SetAchievements(raceInfo.achievementIds);
end
function AlliedRacesFrameMixin:SetRaceNameForGender(gender)
......
......@@ -413,6 +413,7 @@ function ChallengeModeLegacyWeeklyChestMixin:Update(bestMapID)
self.RunStatus:SetPoint("TOP", 0, 87);
self.RunStatus:SetText(MYTHIC_PLUS_CLAIM_REWARD_MESSAGE);
self:GetParent():GetParent():HideAffixes();
elseif self.level > 0 then
chestState = CHEST_STATE_COMPLETE;
......
......@@ -1026,7 +1026,7 @@ function CharacterCreateRaceAndClassMixin:OnShow()
self.ClassTrialCheckButton:ClearTooltipLines();
self.ClassTrialCheckButton:AddTooltipLine(CHARACTER_TYPE_FRAME_TRIAL_BOOST_CHARACTER_TOOLTIP:format(C_CharacterCreation.GetTrialBoostStartingLevel()));
self.ClassTrialCheckButton:SetShown(not isNewPlayerRestricted and not CharacterCreateFrame.paidServiceType and (C_CharacterCreation.GetCharacterCreateType() ~= Enum.CharacterCreateType.Boost));
self.ClassTrialCheckButton:SetShown(C_CharacterServices.IsTrialBoostEnabled() and not isNewPlayerRestricted and not CharacterCreateFrame.paidServiceType and (C_CharacterCreation.GetCharacterCreateType() ~= Enum.CharacterCreateType.Boost));
end
function CharacterCreateRaceAndClassMixin:OnHide()
......
......@@ -235,7 +235,7 @@ function ContributeButtonMixin:SetContributionID(contributionID)
self:UnregisterEvent("CURRENCY_DISPLAY_UPDATE");
return;
end
-- failed to find anything
self.requiredCurrencyID = nil;
self:UnregisterEvent("CURRENCY_DISPLAY_UPDATE");
......@@ -252,7 +252,7 @@ function ContributeButtonMixin:Update()
self.questID = C_ContributionCollector.GetRewardQuestID(self.contributionID);
if canContribute or (result == Enum.ContributionResult.FailedConditionCheck) then
local colorCode = canContribute and HIGHLIGHT_FONT_COLOR_CODE or DISABLED_FONT_COLOR_CODE;
local colorCode = canContribute and HIGHLIGHT_FONT_COLOR_CODE or DISABLED_FONT_COLOR_CODE;
local currencyID, currencyAmount = C_ContributionCollector.GetRequiredContributionCurrency(self.contributionID);
local itemID, itemCount = C_ContributionCollector.GetRequiredContributionItem(self.contributionID);
if currencyID then
......@@ -400,7 +400,7 @@ function ContributionCollectionMixin:OnLoad()
self.rewardPool = CreateFramePool("FRAME", self, "ContributionRewardTemplate");
end
function ContributionCollectionMixin:OnShow()
function ContributionCollectionMixin:OnShowCollection()
PlaySound(SOUNDKIT.UI_72_BUILDING_CONTRIBUTION_TABLE_OPEN);
self:RegisterEvent("CONTRIBUTION_COLLECTOR_UPDATE");
......
......@@ -274,7 +274,7 @@
</Frames>
<Scripts>
<OnLoad method="OnLoad"/>
<OnShow inherit="append" method="OnShow"/>
<OnShow inherit="append" method="OnShowCollection"/>
<OnHide method="OnHide"/>
<OnEvent method="OnEvent"/>
</Scripts>
......
local mainTextureKitRegions = {
["Background"] = "CovenantSanctum-Renown-Background-%s",
["TitleDivider"] = "CovenantSanctum-Renown-Title-Divider-%s",
["Divider"] = "CovenantSanctum-Renown-Divider-%s",
["Anima"] = "CovenantSanctum-Renown-Anima-%s",
["FinalToastSlabTexture"] = "CovenantSanctum-Renown-FinalToast-%s",
}
local rewardTextureKitRegions = {
["Toast"] = "CovenantSanctum-Renown-Toast-%s",
["IconBorder"] = "CovenantSanctum-Icon-Border-%s",
}
local milestonesTextureKitRegions = {
["Left"] = "UI-Frame-%s-TitleLeft",
["Right"] = "UI-Frame-%s-TitleRight",
["Middle"] = "_UI-Frame-%s-TitleMiddle",
};
local finalToastSwirlEffects =
{
Kyrian = {119},
Venthyr = {120},
NightFae = {121, 123},
Necrolord = {122},
}
local finalToastSounds =
{
Kyrian = SOUNDKIT.UI_COVENANT_SANCTUM_RENOWN_MAX_KYRIAN,
Venthyr = SOUNDKIT.UI_COVENANT_SANCTUM_RENOWN_MAX_VENTHYR,
NightFae = SOUNDKIT.UI_COVENANT_SANCTUM_RENOWN_MAX_NIGHTFAE,
Necrolord = SOUNDKIT.UI_COVENANT_SANCTUM_RENOWN_MAX_NECROLORD,
}
local g_sanctumTextureKit;
local function SetupTextureKit(frame, regions)
SetupTextureKitOnRegions(g_sanctumTextureKit, frame, regions, TextureKitConstants.SetVisibility, TextureKitConstants.UseAtlasSize);
end
local CovenantRenownEvents = {
"COVENANT_RENOWN_INTERACTION_ENDED",
"COVENANT_SANCTUM_RENOWN_LEVEL_CHANGED",
};
CovenantRenownMixin = {};
function CovenantRenownMixin:OnLoad()
local attributes =
{
area = "left",
pushable = 0,
allowOtherPanels = 1,
width = 755,
height = 540,
};
RegisterUIPanel(CovenantRenownFrame, attributes);
self:RegisterEvent("COVENANT_RENOWN_INTERACTION_STARTED");
self.FinalToastSlabTexture = self.FinalToast.SlabTexture;
self.rewardsPool = CreateFramePool("FRAME", self, "CovenantRenownRewardTemplate");
end
function CovenantRenownMixin:OnShow()
self:SetUpTextureKits();
self:Refresh();
self.TrackFrame:Init();
FrameUtil.RegisterFrameForEvents(self, CovenantRenownEvents);
PlaySound(SOUNDKIT.UI_COVENANT_SANCTUM_OPEN_WINDOW, nil, SOUNDKIT_ALLOW_DUPLICATES);
end
function CovenantRenownMixin:OnHide()
FrameUtil.UnregisterFrameForEvents(self, CovenantRenownEvents);
self:SetCelebrationSwirlEffects(nil);
self:CancelFinalToastSound();
C_CovenantSanctumUI.EndInteraction();
PlaySound(SOUNDKIT.UI_COVENANT_SANCTUM_CLOSE_WINDOW, nil, SOUNDKIT_ALLOW_DUPLICATES);
end
function CovenantRenownMixin:OnEvent(event, ...)
if event == "COVENANT_SANCTUM_RENOWN_LEVEL_CHANGED" then
self:Refresh();
elseif event == "COVENANT_RENOWN_INTERACTION_STARTED" then
ShowUIPanel(self);
elseif event == "COVENANT_RENOWN_INTERACTION_ENDED" then
HideUIPanel(self);
end
end
function CovenantRenownMixin:OnMouseWheel(direction)
local track = self.TrackFrame;
track:StartScroll(direction * -1);
-- stop immediately so it only moves by 1 in direction
track:StopScroll();
end
function CovenantRenownMixin:SetUpTextureKits()
local covenantID = C_Covenants.GetActiveCovenantID();
local covenantData = C_Covenants.GetCovenantData(covenantID);
local textureKit = covenantData.textureKit;
if g_sanctumTextureKit ~= textureKit then
g_sanctumTextureKit = textureKit;
NineSliceUtil.ApplyUniqueCornersLayout(self.NineSlice, textureKit);
NineSliceUtil.DisableSharpening(self.NineSlice);
local atlas = "CovenantSanctum-RenownLevel-Border-%s";
self.HeaderFrame.Background:SetAtlas(atlas:format(textureKit), TextureKitConstants.UseAtlasSize);
UIPanelCloseButton_SetBorderAtlas(self.CloseButton, "UI-Frame-%s-ExitButtonBorder", -1, 1, textureKit);
SetupTextureKit(self, mainTextureKitRegions);
end
end
function CovenantRenownMixin:Refresh()
local renownLevel = C_CovenantSanctumUI.GetRenownLevel();
self.HeaderFrame.Level:SetText(renownLevel);
local covenantID = C_Covenants.GetActiveCovenantID();
local covenantData = C_Covenants.GetCovenantData(covenantID);
self.CovenantName:SetText(covenantData.name);
self:SetRewards(renownLevel + 1);
end
function CovenantRenownMixin:SetCelebrationSwirlEffects(swirlEffects)
if swirlEffects == nil then
self.CelebrationModelScene:ClearEffects();
else
for i, swirlEffect in ipairs(swirlEffects) do
self.CelebrationModelScene:AddEffect(swirlEffect, self.FinalToast.SlabTexture);
end
end
end
function CovenantRenownMixin:SetRewards(level)
self.rewardsPool:ReleaseAll();
local rewards = C_CovenantSanctumUI.GetRenownRewardsForLevel(C_Covenants.GetActiveCovenantID(), level);
local numRewards = #rewards;
local renownLevel = C_CovenantSanctumUI.GetRenownLevel();
local rewardUnlocked = level <= renownLevel;
for i, rewardInfo in ipairs(rewards) do
if i <= 2 then -- TODO: remove
local rewardFrame = self.rewardsPool:Acquire();
if numRewards == 1 then
rewardFrame:SetPoint("TOP", 0, -299);
else
if i == 1 then
rewardFrame:SetPoint("TOP", 0, -254);
elseif i == 2 then
rewardFrame:SetPoint("TOP", 0, -364);
end
end
rewardFrame:SetReward(rewardInfo, rewardUnlocked);
end
end
if numRewards > 0 then
--self.Header:SetText(COVENANT_SANCTUM_TAB_RENOWN);
self.FinalToast:Hide();
self:SetCelebrationSwirlEffects(nil);
self:CancelFinalToastSound()
else
-- TODO: Remove this block
self.Header:SetText(COVENANT_SANCTUM_RENOWN_REWARD_TITLE_COMPLETE);
local covenantData = C_Covenants.GetCovenantData(C_Covenants.GetActiveCovenantID());
self.PreviewText:SetFormattedText(COVENANT_SANCTUM_RENOWN_REWARD_DESC_COMPLETE, covenantData and covenantData.name or "");
self.FinalToast:Show();
self.FinalToast:SetCovenantTextureKit(covenantData.textureKit);
self:SetCelebrationSwirlEffects(finalToastSwirlEffects[covenantData.textureKit]);
if not self.finalToastSoundHandle then
local soundKitID = finalToastSounds[covenantData.textureKit];
local _, soundHandle = PlaySound(soundKitID, nil, SOUNDKIT_ALLOW_DUPLICATES);
self.finalToastSoundHandle = soundHandle;
end
end
if level <= renownLevel then
self.PreviewText:SetFormattedText(COVENANT_SANCTUM_RENOWN_LEVEL_UNLOCKED, level);
self.PreviewText:SetTextColor(GREEN_FONT_COLOR:GetRGB());
else
self.PreviewText:SetFormattedText(COVENANT_SANCTUM_RENOWN_LEVEL_LOCKED, level);
self.PreviewText:SetTextColor(HIGHLIGHT_FONT_COLOR:GetRGB());
end
end
function CovenantRenownMixin:CancelFinalToastSound()
if self.finalToastSoundHandle then
StopSound(self.finalToastSoundHandle);
self.finalToastSoundHandle = nil;
end
end
CovenantRenownLevelMixin = { };
function CovenantRenownLevelMixin:SetInfo(info)
self.info = info;
self.init = false;
end
function CovenantRenownLevelMixin:GetLevel()
return self.info and self.info.level or 0;
end
function CovenantRenownLevelMixin:TryInit()
if self.init then
return;
end
self.init = true;