Commit 49c105d0 authored by TOM_RUS's avatar TOM_RUS

WOW-36165patch9.0.2_Beta

parent 63fae122
......@@ -188,6 +188,7 @@ ClubSharedDocumentation.lua
ColorDocumentation.lua
CovenantCallingsConstantsDocumentation.lua
CovenantsConstantsDocumentation.lua
CurrencyConstantsDocumentation.lua
DamageConstantsDocumentation.lua
GarrisonConstantsDocumentation.lua
GarrisonSharedDocumentation.lua
......
......@@ -42,6 +42,15 @@ local CovenantSanctum =
{ Name = "maxDisplayableValue", Type = "number", Nilable = false },
},
},
{
Name = "GetCurrentTalentTreeID",
Type = "Function",
Returns =
{
{ Name = "currentTalentTreeID", Type = "number", Nilable = true },
},
},
{
Name = "GetFeatures",
Type = "Function",
......
......@@ -338,6 +338,20 @@ local GarrisonInfo =
{ Name = "durationSecs", Type = "number", Nilable = false },
},
},
{
Name = "GetTalentUnlockWorldQuest",
Type = "Function",
Arguments =
{
{ Name = "talentID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "worldQuestID", Type = "number", Nilable = false },
},
},
{
Name = "IsAtGarrisonMissionNPC",
Type = "Function",
......@@ -385,6 +399,17 @@ local GarrisonInfo =
{ Name = "missionID", Type = "number", Nilable = false },
},
},
{
Name = "RemoveFollowerFromMission",
Type = "Function",
Arguments =
{
{ Name = "missionID", Type = "number", Nilable = false },
{ Name = "followerID", Type = "string", Nilable = false },
{ Name = "boardIndex", Type = "number", Nilable = true },
},
},
{
Name = "RushHealAllFollowers",
Type = "Function",
......@@ -838,6 +863,11 @@ local GarrisonInfo =
{ Name = "garrTalentID", Type = "number", Nilable = false },
},
},
{
Name = "GarrisonTalentUnlocksResult",
Type = "Event",
LiteralName = "GARRISON_TALENT_UNLOCKS_RESULT",
},
{
Name = "GarrisonTalentUpdate",
Type = "Event",
......
......@@ -91,6 +91,24 @@ local Soulbinds =
{ Name = "soulbindID", Type = "number", Nilable = false },
},
},
{
Name = "GetConduitCharges",
Type = "Function",
Returns =
{
{ Name = "charges", Type = "number", Nilable = false },
},
},
{
Name = "GetConduitChargesCapacity",
Type = "Function",
Returns =
{
{ Name = "charges", Type = "number", Nilable = false },
},
},
{
Name = "GetConduitCollection",
Type = "Function",
......@@ -409,6 +427,15 @@ local Soulbinds =
{ Name = "nodeID", Type = "number", Nilable = false },
},
},
{
Name = "SetConduitCharges",
Type = "Function",
Arguments =
{
{ Name = "charges", Type = "number", Nilable = false },
},
},
},
Events =
......@@ -422,6 +449,15 @@ local Soulbinds =
{ Name = "soulbindID", Type = "number", Nilable = false },
},
},
{
Name = "SoulbindConduitChargesUpdated",
Type = "Event",
LiteralName = "SOULBIND_CONDUIT_CHARGES_UPDATED",
Payload =
{
{ Name = "charges", Type = "number", Nilable = false },
},
},
{
Name = "SoulbindConduitCollectionCleared",
Type = "Event",
......
......@@ -23,6 +23,7 @@ local ANIMA_DIVERSION_DATA_PROVIDER_FRAME_EVENTS = {
"CURRENCY_DISPLAY_UPDATE",
"GARRISON_TALENT_COMPLETE",
"GARRISON_TALENT_EVENT_UPDATE",
"GARRISON_TALENT_UNLOCKS_RESULT",
};
local ANIMA_DIVERSION_ORIGIN_PIN_BORDER = "AnimaChannel-Icon-Device-%s-Border";
......@@ -39,30 +40,17 @@ 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
......@@ -154,10 +142,6 @@ function AnimaDiversionDataProviderMixin:RefreshAllData(fromOnShow)
hasAnyChanneledNodes = true;
end
end
if not hasAnyChanneledNodes then
self:StopChannelSound();
end
end
function AnimaDiversionDataProviderMixin:AddNode(nodeData)
......@@ -222,7 +206,7 @@ function AnimaDiversionPinMixin:SetupOrigin()
end
function AnimaDiversionPinMixin:IsConnected()
return (self.nodeData.state == Enum.AnimaDiversionNodeState.SelectedTemporary) or (self.nodeData.state == Enum.AnimaDiversionNodeState.SelectedPermanent);
return AnimaDiversionUtil.IsNodeActive(self.nodeData.state);
end
function AnimaDiversionPinMixin:SetupNode()
......@@ -240,6 +224,12 @@ function AnimaDiversionPinMixin:SetupNode()
self:SetSelectedState(true, true);
end
local worldQuestID = C_Garrison.GetTalentUnlockWorldQuest(self.nodeData.talentID);
if worldQuestID then
-- prime the data;
HaveQuestRewardData(worldQuestID);
end
self:SetVisualState(useState);
self.IconBorder:Hide();
......@@ -289,10 +279,16 @@ function AnimaDiversionPinMixin:OnMouseEnter()
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
self:RefreshTooltip();
end
function AnimaDiversionPinMixin:RefreshTooltip()
GameTooltip:ClearLines();
self.UpdateTooltip = nil;
if not self.nodeData then -- If we are the origin pin we want to show a special tooltip.
GameTooltip_AddHighlightLine(GameTooltip, ANIMA_DIVERSION_ORIGIN_TOOLTIP);
else
else
GameTooltip_AddNormalLine(GameTooltip, self.nodeData.name);
GameTooltip_AddHighlightLine(GameTooltip, self.nodeData.description);
if self.nodeData.state == Enum.AnimaDiversionNodeState.Unavailable then
......@@ -314,6 +310,14 @@ function AnimaDiversionPinMixin:OnMouseEnter()
end
end
end
local worldQuestID = C_Garrison.GetTalentUnlockWorldQuest(self.nodeData.talentID);
if worldQuestID then
GameTooltip_AddQuestRewardsToTooltip(GameTooltip, worldQuestID);
GameTooltip.recalculatePadding = true;
if not HaveQuestRewardData(worldQuestID) then
self.UpdateTooltip = self.RefreshTooltip;
end
end
end
GameTooltip:Show();
......
......@@ -9,21 +9,28 @@ local fullGemsTextureKitAnimationEffectId = {
["Venthyr"] = 27,
["NightFae"] = 30,
["Necrolord"] = 33,
};
};
local newGemTextureKitAnimationEffectId = {
["Kyrian"] = 23,
["Venthyr"] = 26,
["NightFae"] = 29,
["Necrolord"] = 32,
};
};
local textureKitToCovenantId = {
["Kyrian"] = 1,
["Venthyr"] = 2,
["NightFae"] = 3,
["Necrolord"] = 4,
};
};
local textureKitToConfirmSound = {
["Kyrian"] = SOUNDKIT.UI_9_0_ANIMA_DIVERSION_BASTION_CONFIRM_CHANNEL,
["Venthyr"] = SOUNDKIT.UI_9_0_ANIMA_DIVERSION_REVENDRETH_CONFIRM_CHANNEL,
["NightFae"] = SOUNDKIT.UI_9_0_ANIMA_DIVERSION_ARDENWEALD_CONFIRM_CHANNEL,
["Necrolord"] = SOUNDKIT.UI_9_0_ANIMA_DIVERSION_MALDRAXXUS_CONFIRM_CHANNEL,
};
local ANIMA_DIVERSION_FRAME_EVENTS = {
"ANIMA_DIVERSION_CLOSE",
......@@ -35,13 +42,14 @@ StaticPopupDialogs["ANIMA_DIVERSION_CONFIRM_CHANNEL"] = {
button1 = YES,
button2 = CANCEL,
OnAccept = function(self, selectedNode)
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_CONFIRM_CHANNEL, nil, SOUNDKIT_ALLOW_DUPLICATES);
PlaySound(textureKitToConfirmSound[selectedNode.textureKit], nil, SOUNDKIT_ALLOW_DUPLICATES);
C_AnimaDiversion.SelectAnimaNode(selectedNode.nodeData.talentID, true);
HelpTip:Acknowledge(AnimaDiversionFrame, ANIMA_DIVERSION_TUTORIAL_SELECT_LOCATION);
HelpTip:Acknowledge(AnimaDiversionFrame.ReinforceProgressFrame, ANIMA_DIVERSION_TUTORIAL_FILL_BAR);
end,
OnShow = function(self, selectedNode)
AnimaDiversionFrame:SetExclusiveSelectionNode(selectedNode);
self.timeleft = C_DateAndTime.GetSecondsUntilDailyReset();
end,
OnHide = function(self, selectedNode)
AnimaDiversionFrame.SelectPinInfoFrame:ClearSelectedNode();
......@@ -88,8 +96,13 @@ function AnimaDiversionFrameMixin:OnShow()
MapCanvasMixin.OnShow(self);
self:ResetZoom();
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_OPEN, nil, SOUNDKIT_ALLOW_DUPLICATES);
FrameUtil.RegisterFrameForEvents(self, ANIMA_DIVERSION_FRAME_EVENTS);
PlaySound(SOUNDKIT.UI_COVENANT_ANIMA_DIVERSION_OPEN, nil, SOUNDKIT_ALLOW_DUPLICATES);
if AnimaDiversionUtil.IsAnyNodeActive() then
PlaySound(self.covenantData.animaChannelActiveSoundKit, nil, SOUNDKIT_ALLOW_DUPLICATES);
end
end
function AnimaDiversionFrameMixin:OnHide()
......
......@@ -2,6 +2,7 @@
## Author: Blizzard Entertainment
## Version: 1.0
## LoadOnDemand: 1
Blizzard_AnimaDiversionUtil.lua
AnimaDiversionDataProvider.xml
AD_WorldQuestDataProvider.xml
Blizzard_AnimaDiversionUI.xml
\ No newline at end of file
......@@ -204,6 +204,7 @@
</Anchors>
<Scripts>
<OnClick>
PlaySound(SOUNDKIT.UI_9_0_ANIMA_DIVERSION_GENERAL_EXIT, nil, SOUNDKIT_ALLOW_DUPLICATES);
self:GetParent():ClearSelectedNode();
self:GetParent():Hide();
</OnClick>
......
AnimaDiversionUtil = {};
function AnimaDiversionUtil.IsNodeActive(nodeState)
return (nodeState == Enum.AnimaDiversionNodeState.SelectedTemporary) or (nodeState == Enum.AnimaDiversionNodeState.SelectedPermanent);
end
function AnimaDiversionUtil.IsAnyNodeActive()
local animaNodes = C_AnimaDiversion.GetAnimaDiversionNodes();
if (not animaNodes) then
return false;
end
for i, animaNode in ipairs(animaNodes) do
if (AnimaDiversionUtil.IsNodeActive(animaNode.state)) then
return true;
end
end
return false;
end
\ No newline at end of file
......@@ -105,7 +105,14 @@ function BarberShopMixin:ApplyChanges()
end
function BarberShopMixin:UpdatePrice()
self.PriceFrame:SetAmount(C_BarberShop.GetCurrentCost());
local currentCost = C_BarberShop.GetCurrentCost();
local copperCost = currentCost % 100;
if copperCost > 0 then
-- Round any copper cost up to the next silver
currentCost = currentCost - copperCost + 100;
end
self.PriceFrame:SetAmount(currentCost);
local hasAnyChanges = C_BarberShop.HasAnyChanges();
self.AcceptButton:SetEnabled(hasAnyChanges);
......
......@@ -182,9 +182,30 @@ function CharacterCreateMixin:OnShow()
local instantRotate = true;
self:SetMode(CHAR_CREATE_MODE_CLASS_RACE, instantRotate);
self:UpdateRecruitInfo();
RaceAndClassFrame:UpdateState(selectedFaction);
end
local rafHelpTipInfo = {
buttonStyle = HelpTip.ButtonStyle.Okay,
offsetY = 100,
autoEdgeFlipping = true,
};
function CharacterCreateMixin:UpdateRecruitInfo()
local active, faction = C_RecruitAFriend.GetRecruitInfo();
if active and not self.paidServiceType and C_CharacterCreation.IsNewPlayerRestricted() then
local recruiterIsHorde = (PLAYER_FACTION_GROUP[faction] == "Horde");
rafHelpTipInfo.text = recruiterIsHorde and RECRUIT_A_FRIEND_FACTION_SUGGESTION_HORDE or RECRUIT_A_FRIEND_FACTION_SUGGESTION_ALLIANCE;
rafHelpTipInfo.targetPoint = recruiterIsHorde and HelpTip.Point.RightEdgeCenter or HelpTip.Point.LeftEdgeCenter;
rafHelpTipInfo.offsetX = recruiterIsHorde and 10 or -10;
local anchorFrame = recruiterIsHorde and RaceAndClassFrame.HordeRaces or RaceAndClassFrame.AllianceRaces;
HelpTip:Show(anchorFrame, rafHelpTipInfo);
end
end
function CharacterCreateMixin:OnHide()
C_CharacterCreation.SetInCharacterCreate(false);
RaceAndClassFrame:StopClassAnimations();
......@@ -255,7 +276,8 @@ function CharacterCreateMixin:UpdateBackgroundModel()
end
local classBGAlphaValues = {
DEATHKNIGHT = 0.5,
DEMONHUNTER = 0.7,
DEATHKNIGHT = 0.8,
};
local raceBGAlphaValues = {
......
local MAX_ABILITIES_IN_ROW = 2;
local PLAYER_CHOICE_TEXTURE_KIT = "Oribos";
......@@ -40,10 +39,19 @@ local titleTextureKitRegions = {
};
local abilityButtonTextureKitRegions = {
["Background"] = "CovenantChoice-Offering-Ability-Frame-%s",
["IconBorder"] = "CovenantChoice-Offering-Ability-Ring-%s",
["IconBorder"] = "CovenantSanctum-Upgrade-Icon-Border-%s",
};
local abilityFrameTextureKitRegions = {
["Border"] = "covenantchoice-offering-ability-frame-%s",
}
local featureButtonTextureKitRegions = {
["NormalTexture"] = "covenantsanctum-icon-border-%s",
};
local soulbindAtlasTexture = "covenantchoice-offering-portrait-%s-%s";
local infoPanelTextureKitRegions = {
["Parchment"] = "CovenantChoice-Offering-Parchment-%s",
["Crest"] = "CovenantChoice-Offering-Sigil-%s",
......@@ -62,6 +70,7 @@ local abilityTypeText = {
CovenantPreviewFrameMixin = { };
function CovenantPreviewFrameMixin:OnLoad()
self.AbilityButtonsPool = CreateFramePool("BUTTON", self.InfoPanel, "CovenantAbilityButtonTemplate");
self.SoulbindButtonsPool = CreateFramePool("BUTTON", self.InfoPanel, "CovenantSoulbindButtonTemplate");
end
function CovenantPreviewFrameMixin:OnShow()
......@@ -95,7 +104,6 @@ end
function CovenantPreviewFrameMixin:Reset()
self.lastAbility = nil;
self.previousRowOption = nil;
self.uiTextureKit = nil;
self.showingFromPlayerChoice = nil;
end
......@@ -161,11 +169,20 @@ function CovenantPreviewFrameMixin:TryShow(covenantInfo)
end
self:SetupAbilityButtons(covenantInfo.covenantAbilities);
self:SetupSoulbindButtons(covenantInfo.covenantSoulbinds);
self:SetupCovenantInfoPanel(covenantInfo);
self:SetupCovenantFeature(covenantInfo.featureInfo)
ShowUIPanel(self);
end
function CovenantPreviewFrameMixin:SetupCovenantFeature(covenantFeatureInfo)
local featureButton = self.InfoPanel.CovenantFeatureFrame.CovenantFeatureButton
self:SetupTextureKits(featureButton, featureButtonTextureKitRegions);
featureButton:Setup(covenantFeatureInfo);
end
function CovenantPreviewFrameMixin:SetupAbilityButtons(covenantAbilities)
self:SetupTextureKits(self.InfoPanel.AbilitiesFrame, abilityFrameTextureKitRegions);
self.lastAbility = nil;
self.AbilityButtonsPool:ReleaseAll();
for abilityIndex, ability in ipairs(covenantAbilities) do
......@@ -177,13 +194,9 @@ function CovenantPreviewFrameMixin:SetupAndGetAbilityButton(index, abilityInfo)
local abilityButton = self.AbilityButtonsPool:Acquire();
if(not self.lastAbility) then
abilityButton:SetPoint("TOPLEFT", self.InfoPanel.AbilitiesLabel, "BOTTOMLEFT", -5, -15);
self.previousRowOption = abilityButton;
elseif (mod(index - 1, MAX_ABILITIES_IN_ROW) == 0) then
abilityButton:SetPoint("TOP", self.previousRowOption, "BOTTOM", 0, -20);
self.previousRowOption = abilityButton;
abilityButton:SetPoint("TOP", self.InfoPanel.AbilitiesFrame.Border, "TOP", 0, -23);
else
abilityButton:SetPoint("LEFT", self.lastAbility, "RIGHT", 30, 0);
abilityButton:SetPoint("TOP", self.lastAbility, "BOTTOM", 0, -3);
end
self:SetupTextureKits(abilityButton, abilityButtonTextureKitRegions);
......@@ -191,6 +204,31 @@ function CovenantPreviewFrameMixin:SetupAndGetAbilityButton(index, abilityInfo)
return abilityButton;
end
function CovenantPreviewFrameMixin:SetupSoulbindButtons(soulbinds)
self.lastSoulbind = nil;
self.SoulbindButtonsPool:ReleaseAll();
for soulbindIndex, soulbind in ipairs(soulbinds) do
self.lastSoulbind = self:SetupAndGetSoulbindButton(soulbindIndex, soulbind);
end
end
function CovenantPreviewFrameMixin:SetupAndGetSoulbindButton(index, soulbindInfo)
local soulbindButton = self.SoulbindButtonsPool:Acquire();
if(not self.lastSoulbind) then
soulbindButton:SetPoint("LEFT", self.InfoPanel.SoulbindsFrame, "LEFT", 0, 10);
else
soulbindButton:SetPoint("LEFT", self.lastSoulbind, "RIGHT", -20, 0);
end
local soulbindButtonAtlas = soulbindAtlasTexture:format(self.uiTextureKit, soulbindInfo.uiTextureKit);
if(soulbindButtonAtlas) then
soulbindButton.Icon:SetAtlas(soulbindAtlasTexture:format(self.uiTextureKit, soulbindInfo.uiTextureKit))
end
soulbindButton:SetupButton(soulbindInfo);
return soulbindButton;
end
function CovenantPreviewFrameMixin:SetupModelSceneFrame(transmogSetID, mountID)
self:SetupTextureKits(self.ModelSceneContainer, modelSceneContainerTextureKitRegions);
SetUpTransmogAndMountDressupFrame(self.ModelSceneContainer, transmogSetID, mountID, 414, 432, "CENTER", "CENTER", 0 , 0, true);
......@@ -222,8 +260,53 @@ function CovenantAbilityButtonMixin:SetupButton(abilityInfo)
self.spellID = abilityInfo.spellID;
local spellName, _, spellIcon = GetSpellInfo(self.spellID);
self.Name:SetText(spellName);
self.Icon:SetTexture(spellIcon);
self.Type:SetText(abilityTypeText[abilityInfo.type]);
self:Show();
end
CovenantFeatureButtonMixin = { };
function CovenantFeatureButtonMixin:Setup(covenantFeatureInfo)
self.Icon:SetTexture(covenantFeatureInfo.texture);
self.name = covenantFeatureInfo.name;
self.description = covenantFeatureInfo.description;
end
function CovenantFeatureButtonMixin:OnEnter()
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -30, -30);
GameTooltip_AddHighlightLine(GameTooltip, self.name);
GameTooltip_AddNormalLine(GameTooltip, self.description);
GameTooltip:Show();
end
function CovenantFeatureButtonMixin:OnLeave()
GameTooltip:Hide();
end
CovenantSoulbindButtonMixin = { };
function CovenantSoulbindButtonMixin:SetupButton(soulbindInfo)
self.spellID = soulbindInfo.spellID;
self.name = soulbindInfo.name
self:Show();
end
function CovenantSoulbindButtonMixin:OnEnter()
if(not self:IsMouseOver()) then
return;
end
local spell = Spell:CreateFromSpellID(self.spellID);
spell:ContinueOnSpellLoad(function()
EmbeddedItemTooltip:SetOwner(self, "ANCHOR_RIGHT", -12, -10);
GameTooltip_AddHighlightLine(EmbeddedItemTooltip, self.name);
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
GameTooltip_AddNormalLine(EmbeddedItemTooltip, COVENANT_PREVIEW_SOULBIND_SPELL_INTRO);
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
EmbeddedItemTooltip_SetSpellWithTextureByID(EmbeddedItemTooltip.ItemTooltip, self.spellID, spell:GetSpellTexture());
EmbeddedItemTooltip:Show();
end);
end
function CovenantSoulbindButtonMixin:OnLeave()
EmbeddedItemTooltip:Hide();
end
\ No newline at end of file
......@@ -3,50 +3,49 @@
<Script file="Blizzard_CovenantPreviewUI.lua"/>
<Button name="CovenantAbilityButtonTemplate" mixin="CovenantAbilityButtonMixin" motionScriptsWhileDisabled="true" virtual="true">
<Size x="228" y="77"/>
<Size x="40" y="40"/>