Commit 16879fb8 authored by TOM_RUS's avatar TOM_RUS

WOW-35978patch9.0.2_Beta

parent 00d2ff0f
......@@ -191,6 +191,11 @@ local BarberShop =
Type = "Event",
LiteralName = "BARBER_SHOP_APPEARANCE_APPLIED",
},
{
Name = "BarberShopCameraValuesUpdated",
Type = "Event",
LiteralName = "BARBER_SHOP_CAMERA_VALUES_UPDATED",
},
{
Name = "BarberShopClose",
Type = "Event",
......
......@@ -63,6 +63,11 @@ local Covenants =
{ Name = "ID", Type = "number", Nilable = false },
{ Name = "textureKit", Type = "string", Nilable = false },
{ Name = "celebrationSoundKit", Type = "number", Nilable = false },
{ Name = "animaChannelSelectSoundKit", Type = "number", Nilable = false },
{ Name = "animaChannelActiveSoundKit", Type = "number", Nilable = false },
{ Name = "animaGemsFullSoundKit", Type = "number", Nilable = false },
{ Name = "animaNewGemSoundKit", Type = "number", Nilable = false },
{ Name = "animaReinforceSelectSoundKit", Type = "number", Nilable = false },
{ Name = "name", Type = "string", Nilable = false },
{ Name = "soulbindIDs", Type = "table", InnerType = "number", Nilable = false },
},
......
......@@ -1013,6 +1013,7 @@ local GarrisonInfo =
{ Name = "currentHealth", Type = "number", Nilable = false },
{ Name = "maxHealth", Type = "number", Nilable = false },
{ Name = "attack", Type = "number", Nilable = false },
{ Name = "estimatedPowerLevel", Type = "number", Nilable = false },
{ Name = "healingTimestamp", Type = "number", Nilable = false },
},
},
......@@ -1104,6 +1105,7 @@ local GarrisonInfo =
{ Name = "health", Type = "number", Nilable = false },
{ Name = "maxHealth", Type = "number", Nilable = false },
{ Name = "attack", Type = "number", Nilable = false },
{ Name = "estimatedPowerLevel", Type = "number", Nilable = false },
{ Name = "boardIndex", Type = "number", Nilable = false },
},
},
......
......@@ -445,6 +445,20 @@ local Map =
{ Name = "hasUserWaypoint", Type = "bool", Nilable = false },
},
},
{
Name = "IsMapValidForNavBarDropDown",
Type = "Function",
Arguments =
{
{ Name = "uiMapID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "isValid", Type = "bool", Nilable = false },
},
},
{
Name = "MapHasArt",
Type = "Function",
......@@ -542,9 +556,9 @@ local Map =
{
Name = "UIMapFlag",
Type = "Enumeration",
NumValues = 15,
NumValues = 16,
MinValue = 1,
MaxValue = 16384,
MaxValue = 32768,
Fields =
{
{ Name = "NoHighlight", Type = "UIMapFlag", EnumValue = 1 },
......@@ -562,6 +576,7 @@ local Map =
{ Name = "ForceAllOverlayExplored", Type = "UIMapFlag", EnumValue = 4096 },
{ Name = "FlightMapShowZoomOut", Type = "UIMapFlag", EnumValue = 8192 },
{ Name = "FlightMapAutoZoom", Type = "UIMapFlag", EnumValue = 16384 },
{ Name = "ForceOnNavbar", Type = "UIMapFlag", EnumValue = 32768 },
},
},
{
......
......@@ -19,9 +19,9 @@ local QuestSessionConstants =
{
Name = "QuestSessionResult",
Type = "Enumeration",
NumValues = 32,
NumValues = 33,
MinValue = 0,
MaxValue = 31,
MaxValue = 32,
Fields =
{
{ Name = "Ok", Type = "QuestSessionResult", EnumValue = 0 },
......@@ -56,6 +56,7 @@ local QuestSessionConstants =
{ Name = "InPetBattle", Type = "QuestSessionResult", EnumValue = 29 },
{ Name = "InvalidPublicParty", Type = "QuestSessionResult", EnumValue = 30 },
{ Name = "Unknown", Type = "QuestSessionResult", EnumValue = 31 },
{ Name = "InCombat", Type = "QuestSessionResult", EnumValue = 32 },
},
},
},
......
......@@ -564,6 +564,7 @@ local Soulbinds =
{ Name = "cvarIndex", Type = "number", Nilable = false },
{ Name = "tree", Type = "SoulbindTree", Nilable = false },
{ Name = "modelSceneData", Type = "SoulbindModelSceneData", Nilable = false },
{ Name = "activationSoundKitID", Type = "number", Nilable = false },
},
},
{
......
......@@ -39,17 +39,30 @@ end
function AnimaDiversionDataProviderMixin:OnHide()
FrameUtil.UnregisterFrameForEvents(self, ANIMA_DIVERSION_DATA_PROVIDER_FRAME_EVENTS);
self:ResetModelScene();
self:StopChannelSound();
end
function AnimaDiversionDataProviderMixin:OnEvent(event, ...)
self:RefreshAllData();
end
function AnimaDiversionDataProviderMixin:StopChannelSound()
if self.channelSoundHandle then
StopSound(self.channelSoundHandle);
self.channelSoundHandle = nil;
end
end
function AnimaDiversionDataProviderMixin:SetupConnectionOnPin(pin)
local connection = self.connectionPool:Acquire();
connection:Setup(self.textureKit, self.origin, pin);
connection:Show();
if not self.channelSoundHandle then
local _, soundHandle = PlaySound(AnimaDiversionFrame.covenantData.animaChannelActiveSoundKit);
self.channelSoundHandle = soundHandle;
end
self.origin.IconBorder:Show();
end
......@@ -133,8 +146,17 @@ function AnimaDiversionDataProviderMixin:RefreshAllData(fromOnShow)
self:AddOrigin(originPosition);
local hasAnyChanneledNodes = false;
for _, nodeData in ipairs(animaNodes) do
self:AddNode(nodeData);
local wasChanneled = self:AddNode(nodeData);
if wasChanneled then
hasAnyChanneledNodes = true;
end
end
if not hasAnyChanneledNodes then
self:StopChannelSound();
end
end
......@@ -150,6 +172,7 @@ function AnimaDiversionDataProviderMixin:AddNode(nodeData)
if pin:IsConnected() then
self:SetupConnectionOnPin(pin);
return true;
end
end
......
......@@ -6,18 +6,25 @@ AnimaDiversionFrameMixin = { };
local fullGemsTextureKitAnimationEffectId = {
["Kyrian"] = 24,
["NightFae"] = 30,
["Venthyr"] = 27,
["NightFae"] = 30,
["Necrolord"] = 33,
};
local newGemTextureKitAnimationEffectId = {
["Kyrian"] = 23,
["NightFae"] = 29,
["Venthyr"] = 26,
["NightFae"] = 29,
["Necrolord"] = 32,
};
local textureKitToCovenantId = {
["Kyrian"] = 1,
["Venthyr"] = 2,
["NightFae"] = 3,
["Necrolord"] = 4,
};
local ANIMA_DIVERSION_FRAME_EVENTS = {
"ANIMA_DIVERSION_CLOSE",
"CURRENCY_DISPLAY_UPDATE",
......@@ -28,6 +35,7 @@ StaticPopupDialogs["ANIMA_DIVERSION_CONFIRM_CHANNEL"] = {
button1 = YES,
button2 = CANCEL,
OnAccept = function(self, selectedNode)
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CONFIRM_CHANNEL);
C_AnimaDiversion.SelectAnimaNode(selectedNode.nodeData.talentID, true);
HelpTip:Acknowledge(AnimaDiversionFrame, ANIMA_DIVERSION_TUTORIAL_SELECT_LOCATION);
HelpTip:Acknowledge(AnimaDiversionFrame.ReinforceProgressFrame, ANIMA_DIVERSION_TUTORIAL_FILL_BAR);
......@@ -47,6 +55,7 @@ StaticPopupDialogs["ANIMA_DIVERSION_CONFIRM_REINFORCE"] = {
button1 = YES,
button2 = CANCEL,
OnAccept = function(self, selectedNode)
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CONFIRM_REINFORCE);
C_AnimaDiversion.SelectAnimaNode(selectedNode.nodeData.talentID, false);
HelpTip:Acknowledge(AnimaDiversionFrame, ANIMA_DIVERSION_TUTORIAL_SELECT_LOCATION_PERMANENT);
end,
......@@ -79,7 +88,7 @@ function AnimaDiversionFrameMixin:OnShow()
MapCanvasMixin.OnShow(self);
self:ResetZoom();
PlaySound(SOUNDKIT.IG_MAINMENU_OPEN);
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_OPEN);
FrameUtil.RegisterFrameForEvents(self, ANIMA_DIVERSION_FRAME_EVENTS);
end
......@@ -88,6 +97,8 @@ function AnimaDiversionFrameMixin:OnHide()
FrameUtil.UnregisterFrameForEvents(self, ANIMA_DIVERSION_FRAME_EVENTS);
self.SelectPinInfoFrame:Hide();
self.ReinforceInfoFrame:Hide();
self:StopGemsFullSound();
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CLOSE);
end
function AnimaDiversionFrameMixin:OnEvent(event, ...)
......@@ -194,6 +205,13 @@ function AnimaDiversionFrameMixin:AddBolsterEffectToGem(gem, effectID, overlay)
modelScene:AddEffect(effectID, gem, gem);
end
function AnimaDiversionFrameMixin:StopGemsFullSound()
if self.gemsFullSoundHandle then
StopSound(self.gemsFullSoundHandle);
self.gemsFullSoundHandle = nil;
end
end
function AnimaDiversionFrameMixin:SetupBolsterProgressBar()
self.bolsterProgressGemPool:ReleaseAll();
self.ReinforceProgressFrame.ModelScene:ClearEffects();
......@@ -209,7 +227,17 @@ function AnimaDiversionFrameMixin:SetupBolsterProgressBar()
end
self.bolsterProgress = newBolsterProgress;
local isReinforceReady = self:CanReinforceNode();
local isReinforceReady = self:CanReinforceNode();
if isReinforceReady then
if not self.gemsFullSoundHandle then
local _, soundHandle = PlaySound(self.covenantData.animaGemsFullSoundKit);
self.gemsFullSoundHandle = soundHandle;
end
else
self:StopGemsFullSound();
end
local firstNewGem = (newBolsterProgress - numNewGems) + 1;
for i=1, newBolsterProgress do
......@@ -219,6 +247,10 @@ function AnimaDiversionFrameMixin:SetupBolsterProgressBar()
if isNewGem then
self:AddBolsterEffectToGem(self.lastGem, newGemEffectID, true);
if not isReinforceReady then
PlaySound(self.covenantData.animaNewGemSoundKit);
end
end
if isReinforceReady then
......@@ -277,6 +309,7 @@ function AnimaDiversionFrameMixin:TryShow(frameInfo)
end
self.uiTextureKit = frameInfo.textureKit;
self.covenantData = C_Covenants.GetCovenantData(textureKitToCovenantId[self.uiTextureKit]);
self.mapID = frameInfo.mapID;
self:SetupBolsterProgressBar();
self:SetupCurrencyFrame();
......@@ -357,6 +390,7 @@ function AnimaDiversionSelectionInfoMixin:SetupAndShow(node)
self:Layout();
self:Show();
PlaySound(AnimaDiversionFrame.covenantData.animaChannelSelectSoundKit);
end
function AnimaDiversionSelectionInfoMixin:GetSelectedNode()
......@@ -404,6 +438,7 @@ AnimaDiversionSelectButtonMixin = { };
function AnimaDiversionSelectButtonMixin:OnClick()
local selectedNode = self:GetParent():GetSelectedNode();
if selectedNode then
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CLICK_CHANNEL_BUTTON);
StaticPopup_Show("ANIMA_DIVERSION_CONFIRM_CHANNEL", selectedNode.nodeData.name, nil, selectedNode);
self:GetParent():Hide();
end
......@@ -488,12 +523,14 @@ function ReinforceInfoFrameMixin:SelectNodeToReinforce(node)
node:SetSelectedState(true);
self.Title:SetText(self.selectedNode.nodeData.name);
self.AnimaNodeReinforceButton:Enable();
PlaySound(AnimaDiversionFrame.covenantData.animaReinforceSelectSoundKit);
end
AnimaNodeReinforceButtonMixin = { };
function AnimaNodeReinforceButtonMixin:OnClick()
local selectedNode = self:GetParent():GetSelectedNode();
if selectedNode then
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CLICK_REINFORCE_BUTTON);
StaticPopup_Show("ANIMA_DIVERSION_CONFIRM_REINFORCE", selectedNode.nodeData.name, nil, selectedNode);
end
end
......
......@@ -24,6 +24,10 @@ function BarberShopMixin:OnEvent(event, ...)
self:UpdateCharCustomizationFrame();
elseif event == "BARBER_SHOP_APPEARANCE_APPLIED" then
self:Cancel();
elseif event == "BARBER_SHOP_CAMERA_VALUES_UPDATED" then
self:ResetCharacterRotation();
CharCustomizeFrame:UpdateCameraMode();
self:UnregisterEvent("BARBER_SHOP_CAMERA_VALUES_UPDATED");
end
end
......@@ -71,6 +75,8 @@ function BarberShopMixin:OnHide()
UIErrorsFrame:SetPoint(unpack(self.oldErrorFramePointInfo));
ActionStatus:SetParent(UIParent);
self:UnregisterEvent("BARBER_SHOP_CAMERA_VALUES_UPDATED");
end
function BarberShopMixin:OnKeyDown(key)
......@@ -178,10 +184,11 @@ function BarberShopMixin:SetCameraDistanceOffset(offset)
end
function BarberShopMixin:SetCharacterSex(sexID)
-- We need to reset the zoom and rotation, but only AFTER the model has completed loading and we have the new custom rotation values
self:RegisterEvent("BARBER_SHOP_CAMERA_VALUES_UPDATED");
C_BarberShop.SetSelectedSex(sexID);
self:UpdateSex();
self:ResetCharacterRotation();
CharCustomizeFrame:UpdateCameraMode();
end
BarberShopButtonMixin = {};
......
......@@ -140,6 +140,7 @@ end
function ChallengesFrame_OnShow(self)
self:RegisterEvent("BAG_UPDATE");
self:RegisterEvent("WEEKLY_REWARDS_UPDATE");
self:RegisterEvent("MYTHIC_PLUS_CURRENT_AFFIX_UPDATE");
PVEFrame:SetPortraitToAsset("Interface\\Icons\\achievement_bg_wineos_underxminutes");
PVEFrame.TitleText:SetText(CHALLENGES);
......@@ -160,6 +161,7 @@ function ChallengesFrame_OnHide(self)
PVEFrame_ShowLeftInset();
self:UnregisterEvent("BAG_UPDATE");
self:UnregisterEvent("WEEKLY_REWARDS_UPDATE");
self:UnregisterEvent("MYTHIC_PLUS_CURRENT_AFFIX_UPDATE");
end
function ChallengesFrame_Update(self)
......
......@@ -187,6 +187,7 @@ end
function CharacterCreateMixin:OnHide()
C_CharacterCreation.SetInCharacterCreate(false);
RaceAndClassFrame:StopClassAnimations();
self:ClearPaidServiceInfo();
self.creatingCharacter = false;
self.currentMode = 0;
......@@ -373,16 +374,14 @@ function CharacterCreateMixin:SetMode(mode, instantRotate)
end
if mode == CHAR_CREATE_MODE_CLASS_RACE then
RaceAndClassFrame.allowClassAnimationsAfterSeconds = CLASS_ANIM_WAIT_TIME_SECONDS;
C_CharacterCreation.SetViewingAlteredForm(false);
if self.currentMode == CHAR_CREATE_MODE_CUSTOMIZE then
local useBlending = true;
RaceAndClassFrame:PlayClassIdleAnimation(useBlending);
RaceAndClassFrame:PlayClassIdleAnimation(useBlending, CLASS_ANIM_WAIT_TIME_SECONDS);
else
RaceAndClassFrame.allowClassAnimationsAfterSeconds = CLASS_ANIM_WAIT_TIME_SECONDS;
end
RaceAndClassFrame:PlayClassAnimations();
C_CharacterCreation.SetBlurEnabled(false);
......@@ -1202,12 +1201,12 @@ function CharacterCreateRaceAndClassMixin:OnAnimKitFinished(animKitID, spellVisu
end
end
function CharacterCreateRaceAndClassMixin:PlayClassIdleAnimation(useBlending)
function CharacterCreateRaceAndClassMixin:PlayClassIdleAnimation(useBlending, overrideAnimLoopWaitTimeSeconds)
self:StopClassAnimations();
CharacterCreateFrame:ResetCharacterRotation(nil, true);
C_CharacterCreation.PlayClassIdleAnimationOnCharacter(not useBlending);
self.allowClassAnimationsAfterSeconds = self.selectedClassData.animLoopWaitTimeSeconds;
self.allowClassAnimationsAfterSeconds = overrideAnimLoopWaitTimeSeconds or self.selectedClassData.animLoopWaitTimeSeconds;
self:PlayClassAnimations();
end
......
......@@ -537,7 +537,6 @@ end
function CharCustomizeOptionSliderMixin:SetupOption(optionData)
self.optionData = optionData;
self.layoutIndex = optionData.orderIndex;
self.currentChoice = nil;
local minValue = 1;
......@@ -584,7 +583,6 @@ CharCustomizeOptionCheckButtonMixin = CreateFromMixins(CharCustomizeFrameWithToo
function CharCustomizeOptionCheckButtonMixin:SetupOption(optionData)
self.optionData = optionData;
self.layoutIndex = optionData.orderIndex;
self.checked = (optionData.currentChoiceIndex == 2);
if showDebugTooltipInfo then
......@@ -667,9 +665,7 @@ end
function CharCustomizeOptionSelectionPopoutMixin:SetupOption(optionData)
self.optionData = optionData;
self.layoutIndex = optionData.orderIndex;
self:SetPoint("TOPLEFT");
self:SetupSelections(optionData.choices, optionData.currentChoiceIndex, optionData.name);
self:ClearTooltipLines();
......@@ -938,6 +934,8 @@ function CharCustomizeMixin:UpdateOptionButtons(forceReset)
self.hasShapeshiftForms = false;
self.numNormalCategories = 0;
local optionsToSetup = {};
for _, categoryData in ipairs(self.categories) do
local showCategory = not self.selectedCategoryData.spellShapeshiftFormID or categoryData.spellShapeshiftFormID;
......@@ -966,7 +964,11 @@ function CharCustomizeMixin:UpdateOptionButtons(forceReset)
optionFrame = optionPool:Acquire();
end
optionFrame:SetupOption(optionData);
-- Just set layoutIndex on the option and add it to optionsToSetup for now.
-- Setup will be called on each one, but it needs to happen after self.Options:Layout() is called
optionFrame.layoutIndex = optionData.orderIndex;
optionsToSetup[optionFrame] = optionData;
optionFrame:Show();
end
end
......@@ -976,6 +978,11 @@ function CharCustomizeMixin:UpdateOptionButtons(forceReset)
self.Categories:Layout();
self.Options:Layout();
for optionFrame, optionData in pairs(optionsToSetup) do
optionFrame:SetupOption(optionData);
end
self:UpdateAlteredFormButtons();
if self.numNormalCategories > 1 then
......
......@@ -659,7 +659,9 @@ function MountJournal_SetSelected(selectedMountID, selectedSpellID)
local inView = MountJournal_GetMountButtonByMountID(selectedMountID) ~= nil;
if not inView then
local mountIndex = GetMountDisplayIndexByMountID(selectedMountID);
HybridScrollFrame_ScrollToIndex(MountJournal.ListScrollFrame, mountIndex, MountJournal_GetMountButtonHeight);
if mountIndex then
HybridScrollFrame_ScrollToIndex(MountJournal.ListScrollFrame, mountIndex, MountJournal_GetMountButtonHeight);
end
end
end
......
......@@ -290,7 +290,6 @@ function CommunitiesFrameMixin:OnEvent(event, ...)
end
end
end
self:ValidateDisplayMode();
elseif event == "CLUB_FINDER_ENABLED_OR_DISABLED" then
StaticPopup_Show("CLUB_FINDER_ENABLED_DISABLED");
HideUIPanel(self);
......@@ -992,8 +991,6 @@ function CommunitiesFrameMixin:SelectedClubHasApplicants()
end
function CommunitiesFrameMixin:CheckForTutorials()
HelpTip:HideAll(self);
if not C_ClubFinder.IsEnabled() then
return;
end
......
......@@ -19,6 +19,14 @@ function CovenantRenownToastMixin:OnHide()
TopBannerManager_BannerFinished();
end
function CovenantRenownToastMixin:AddSwirlEffects(covenantTextureKit) -- override
local swirlEffects = CovenantChoiceToasts.GetSwirlEffectsByTextureKit(covenantTextureKit);
for i, effect in ipairs(swirlEffects) do
local effectDescription = { effectID = effect, soundEnabled = false, };
self.IconSwirlModelScene:AddDynamicEffect(effectDescription, self);
end
end
function CovenantRenownToastMixin:ShowRenownLevelUpToast(covenantID, renownLevel)
local covenantData = C_Covenants.GetCovenantData(covenantID);
if covenantData then
......@@ -56,7 +64,7 @@ function CovenantRenownToastMixin:SetupRewardVisuals(covenantID, renownLevel)
for i, rewardInfo in ipairs(rewards) do
if rewardInfo.toastDescription then
if description then
description = COVENANT_RENOWN_TOAST_REWARD_COMBINER:format(description, rewardInfo.toastDescription);
description = description .. "|n" .. rewardInfo.toastDescription;
else
description = rewardInfo.toastDescription;
end
......@@ -73,6 +81,14 @@ function CovenantRenownToastMixin:SetupRewardVisuals(covenantID, renownLevel)
end
end
local SOUND_KIT_BY_TEXTURE_KIT =
{
Kyrian = { default = 172612, [20] = 172613, [40] = 172614, },
Venthyr = { default = 172642, [20] = 172645, [40] = 172649, },
NightFae = { default = 172643, [20] = 172646, [40] = 172650, },
Necrolord = { default = 172644, [20] = 172648, [40] = 172651, },
};
function CovenantRenownToastMixin:PlayBanner(data)
self.RenownLabel:SetFormattedText(COVENANT_RENOWN_LEVEL_TOAST, data.renownLevel);
self.RenownLabel:SetTextColor(data.covenantColor:GetRGB());
......@@ -98,6 +114,9 @@ function CovenantRenownToastMixin:PlayBanner(data)
self:SetupRewardVisuals(data.covenantID, data.renownLevel);
local soundKitData = SOUND_KIT_BY_TEXTURE_KIT[data.textureKit]
PlaySound(soundKitData[data.renownLevel] or soundKitData.default)
self.bannerData = data;
self:SetAlpha(1);
......
......@@ -78,6 +78,10 @@
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.RewardIcon" />
</Anchors>
<Scripts>
<OnLoad>
-- disabled by request
self:EnableMouse(false);
</OnLoad>
<OnEnter>
self:GetParent():OnMouseEnter();
</OnEnter>
......@@ -107,7 +111,7 @@
<Alpha childKey="RewardIcon" smoothing="OUT" duration="0.25" fromAlpha="0" toAlpha="1"/>
<Alpha childKey="RewardDescription" smoothing="OUT" duration="0.25" fromAlpha="0" toAlpha="1"/>
<Alpha parentKey="HoldAlpha" duration="2" fromAlpha="1" toAlpha="1" order="1">
<Alpha parentKey="HoldAlpha" duration="5" fromAlpha="1" toAlpha="1" order="1">
<Scripts>
<OnPlay>
self:GetParent():GetParent():OnHoldAnimStarted();
......
......@@ -33,8 +33,12 @@ function CovenantCelebrationBannerMixin:SetCovenantTextureKit(covenantTextureKit
self:CancelIconSwirlEffects();
self:AddSwirlEffects(covenantTextureKit);
end
function CovenantCelebrationBannerMixin:AddSwirlEffects(covenantTextureKit)