Skip to content

Commit

Permalink
11.0.2 (56313)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 27, 2024
1 parent c0f3b4f commit 703e072
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,17 @@ function CharacterSelectBlockBase:Initialize(results)
end

function CharacterSelectBlockBase:ShouldShowPopup()
-- Heritage armor restriction has been removed.
-- Re-enable this if needed
--[[
local characterInfo = CharacterSelectUtil.GetCharacterInfoTable(self.charid);
if characterInfo then
local raceData = C_CharacterCreation.GetRaceDataByID(C_CharacterCreation.GetRaceIDFromName(characterInfo.raceFilename));
local seenPopupBefore = self.seenPopup;
self.seenPopup = true;
return characterInfo.isTrialBoost == false and raceData.isAlliedRace and not raceData.hasHeritageArmor and not seenPopupBefore;
end
--]]
return false;
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ function ClassTalentButtonArtMixin:HideActionBarHighlights()
ActionBarController_UpdateAllSpellHighlights();
end

-- Returns true if this node is in an inactive SubTree that is being previewed
function ClassTalentButtonArtMixin:IsInPreviewedSubTree()
-- If the Base check tells us we're not in an inactive SubTree at all, then false
if not TalentButtonBaseMixin.IsInDeactivatedSubTree(self) then
return false;
end

local nodeInfo = self:GetNodeInfo();
-- Otherwise check if we are in a SubTree being previewed
return nodeInfo and nodeInfo.subTreeID and self:GetTalentFrame():IsPreviewingSubTree(nodeInfo.subTreeID);
end

--------------------------------------------------
-- Base mixin for the standard talent Buttons.
-- Should contain functionality for all BUT the Selection Choice mixin.
Expand Down Expand Up @@ -99,18 +111,6 @@ function ClassTalentButtonBaseMixin:FrameHasAnyPendingChanges()
return self:GetTalentFrame():HasAnyPendingChanges();
end

-- Returns true if this node is in an inactive SubTree that is being previewed
function ClassTalentButtonArtMixin:IsInPreviewedSubTree()
-- If the Base check tells us we're not in an inactive SubTree at all, then false
if not TalentButtonBaseMixin.IsInDeactivatedSubTree(self) then
return false;
end

local nodeInfo = self:GetNodeInfo();
-- Otherwise check if we are in a SubTree being previewed
return nodeInfo and nodeInfo.subTreeID and self:GetTalentFrame():IsPreviewingSubTree(nodeInfo.subTreeID);
end

function ClassTalentButtonBaseMixin:IsInDeactivatedSubTree()
-- Overrides TalentButtonBaseMixin.

Expand All @@ -131,6 +131,17 @@ function ClassTalentButtonBaseMixin:IsInspecting()
return baseIsInspecting or self:IsInPreviewedSubTree();
end

function ClassTalentButtonBaseMixin:ShouldShowTooltipErrors()
-- Overrides TalentDisplayMixin

-- Checking the base value of IsInspecting because talents should still show errors if they're in the previewed sub tree.
if TalentDisplayMixin.IsInspecting(self) then
return false;
end

return true;
end

function ClassTalentButtonBaseMixin:IsSearchMatchTypeAllowed(matchType)
-- Don't display the missing from action bar results for talents that belong to inactive Hero
-- specs. It's not expected that players have these talents on their action bars and can be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ function HeroTalentSpecContentMixin:Setup(subTreeID, index, numSpecs, specConten
end

function HeroTalentSpecContentMixin:UpdateCurrency()
local currencyAvailable = self.subTreeInfo and TalentFrameUtil.GetSubTreeCurrencyAvailable(self:GetTalentFrame(), self.subTreeInfo.ID) or 0;
-- Don't show points available until the player has picked a spec and we have this spec's info available.
local currencyAvailable = self.isAnySpecActive and self.subTreeInfo and TalentFrameUtil.GetSubTreeCurrencyAvailable(self:GetTalentFrame(), self.subTreeInfo.ID) or 0;

if currencyAvailable > 0 then
self.CurrencyFrame.AmountText:SetText(HERO_TALENTS_POINTS_AMOUNT:format(currencyAvailable));
Expand Down Expand Up @@ -500,8 +501,8 @@ function HeroTalentSpecContentMixin:SetIsAnySpecActive(isAnySpecActive)
GlowEmitterFactory:Show(self.ActivateButton, GlowEmitterMixin.Anims.NPE_RedButton_GreenGlow);
end

-- Don't show points available until the player has picked a spec.
self.CurrencyFrame:SetShown(self.isAnySpecActive);
-- Update currency frame as it should be hidden if no spec has been chosen yet
self:UpdateCurrency();
end

function HeroTalentSpecContentMixin:SetActivationFlashPlaying(playFlash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ function TalentDisplayMixin:OnRelease()
self:ResetActiveVisuals();
end

function TalentDisplayMixin:ShouldShowTooltipInstructions()
return not self:IsInspecting();
end

function TalentDisplayMixin:ShouldShowTooltipErrors()
return not self:IsInspecting();
end

function TalentDisplayMixin:SetTooltipInternal(ignoreTooltipInfo)
local tooltip = self:AcquireTooltip();
self:AddTooltipTitle(tooltip);
Expand All @@ -93,8 +101,11 @@ function TalentDisplayMixin:SetTooltipInternal(ignoreTooltipInfo)
self:AddTooltipDescription(tooltip, ignoreTooltipInfo);
self:AddTooltipCost(tooltip);

if not self:IsInspecting() then
if self:ShouldShowTooltipInstructions() then
self:AddTooltipInstructions(tooltip);
end

if self:ShouldShowTooltipErrors() then
self:AddTooltipErrors(tooltip);
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,19 @@ end
function TalentSelectionChoiceMixin:GetNodeInfo()
local selectionBaseButton = self:GetBaseButton();
return selectionBaseButton and selectionBaseButton:GetNodeInfo() or nil;
end
end

function TalentSelectionChoiceMixin:IsInDeactivatedSubTree()
local selectionBaseButton = self:GetBaseButton();
return selectionBaseButton:IsInDeactivatedSubTree();
end

function TalentSelectionChoiceMixin:IsInspecting()
local selectionBaseButton = self:GetBaseButton();
return selectionBaseButton:IsInspecting();
end

function TalentSelectionChoiceMixin:ShouldShowTooltipErrors()
local selectionBaseButton = self:GetBaseButton();
return selectionBaseButton:ShouldShowTooltipErrors();
end

0 comments on commit 703e072

Please sign in to comment.