Commit 4f7261bc authored by TOM_RUS's avatar TOM_RUS

WOW-30827patch8.2.0_PTR

parent 86da2430
...@@ -31,6 +31,20 @@ local AzeriteEssence = ...@@ -31,6 +31,20 @@ local AzeriteEssence =
{ Name = "canActivate", Type = "bool", Nilable = false }, { Name = "canActivate", Type = "bool", Nilable = false },
}, },
}, },
{
Name = "CanDeactivateEssence",
Type = "Function",
Arguments =
{
{ Name = "milestoneID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "canDeactivate", Type = "bool", Nilable = false },
},
},
{ {
Name = "CanOpenUI", Name = "CanOpenUI",
Type = "Function", Type = "Function",
......
...@@ -24,6 +24,20 @@ local ChatInfo = ...@@ -24,6 +24,20 @@ local ChatInfo =
{ Name = "guid", Type = "string", Nilable = false }, { Name = "guid", Type = "string", Nilable = false },
}, },
}, },
{
Name = "GetClubStreamIDs",
Type = "Function",
Arguments =
{
{ Name = "clubID", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "ids", Type = "table", InnerType = "string", Nilable = false },
},
},
{ {
Name = "GetNumActiveChannels", Name = "GetNumActiveChannels",
Type = "Function", Type = "Function",
......
...@@ -249,9 +249,7 @@ function AzeriteEssenceUIMixin:TryShow() ...@@ -249,9 +249,7 @@ function AzeriteEssenceUIMixin:TryShow()
if C_AzeriteEssence.CanOpenUI() then if C_AzeriteEssence.CanOpenUI() then
ShowUIPanel(AzeriteEssenceUI); ShowUIPanel(AzeriteEssenceUI);
if not C_AzeriteEssence.IsAtForge() then if not C_AzeriteEssence.IsAtForge() then
if C_AzeriteEssence.GetNumUnlockedEssences() > 1 then AzeriteEssenceUtil.TryAcknowledgeEssenceSwapTutorial();
SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_CHANGE_AZERITE_ESSENCES, true);
end
end end
return true; return true;
end end
......
...@@ -58,32 +58,18 @@ ...@@ -58,32 +58,18 @@
<Anchor point="TOPLEFT" relativeKey="$parent.NoteLabel" relativePoint="BOTTOMLEFT" x="0" y="-43"/> <Anchor point="TOPLEFT" relativeKey="$parent.NoteLabel" relativePoint="BOTTOMLEFT" x="0" y="-43"/>
</Anchors> </Anchors>
</FontString> </FontString>
<Texture file="Interface\FriendsFrame\UI-GuildMember-Patch">
<Size x="256" y="32"/>
<Anchors>
<Anchor point="BOTTOMLEFT" x="12" y="3"/>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="Corner" file="Interface\DialogFrame\UI-DialogBox-Corner">
<Size x="32" y="32"/>
<Anchors>
<Anchor point="TOPRIGHT" x="-6" y="-7"/>
</Anchors>
</Texture>
</Layer> </Layer>
</Layers> </Layers>
<Frames> <Frames>
<Frame parentKey="Border" inherits="DialogBorderDarkTemplate"> <Frame parentKey="Border" inherits="DialogBorderDarkTemplate">
<Anchors> <Anchors>
<Anchor point="TOPLEFT" x="6" y="-6"/> <Anchor point="TOPLEFT" x="4" y="0"/>
<Anchor point="BOTTOMRIGHT" x="-6" y="6"/> <Anchor point="BOTTOMRIGHT" x="6" y="1"/>
</Anchors> </Anchors>
</Frame> </Frame>
<Button parentKey="CloseButton" inherits="UIPanelCloseButton"> <Button parentKey="CloseButton" inherits="UIPanelCloseButton">
<Anchors> <Anchors>
<Anchor point="TOPRIGHT" x="-3" y="-3"/> <Anchor point="TOPRIGHT" x="3" y="-4"/>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnClick> <OnClick>
...@@ -95,7 +81,7 @@ ...@@ -95,7 +81,7 @@
<Button parentKey="RemoveButton" inherits="UIPanelButtonTemplate" text="REMOVE"> <Button parentKey="RemoveButton" inherits="UIPanelButtonTemplate" text="REMOVE">
<Size x="96" y="22"/> <Size x="96" y="22"/>
<Anchors> <Anchors>
<Anchor point="BOTTOMLEFT" x="10" y="12"/> <Anchor point="BOTTOMLEFT" x="16" y="12"/>
</Anchors> </Anchors>
<Scripts> <Scripts>
<OnClick> <OnClick>
......
...@@ -722,10 +722,12 @@ function GarrisonFollowerButton_SetCounterButton(button, followerID, index, info ...@@ -722,10 +722,12 @@ function GarrisonFollowerButton_SetCounterButton(button, followerID, index, info
counter = button.Counters[index]; counter = button.Counters[index];
end end
local numPerRow, innerSpacing, outerSpacingX, outerSpacingY, scale = GetFollowerButtonCounterSpacings(followerTypeID); local numPerRow, innerSpacing, outerSpacingX, outerSpacingY, scale = GetFollowerButtonCounterSpacings(followerTypeID);
if ((index - 1) % numPerRow ~= 0) then if index > 1 then
counter:SetPoint("RIGHT", button.Counters[index-1], "LEFT", -innerSpacing, 0); if ((index - 1) % numPerRow ~= 0) then
else counter:SetPoint("RIGHT", button.Counters[index-1], "LEFT", -innerSpacing, 0);
counter:SetPoint("TOP", button.Counters[index-2], "BOTTOM", 0, -innerSpacing); else
counter:SetPoint("TOP", button.Counters[index-numPerRow], "BOTTOM", 0, -innerSpacing);
end
end end
counter:SetScale(scale); counter:SetScale(scale);
counter.info = info; counter.info = info;
......
...@@ -138,10 +138,6 @@ end ...@@ -138,10 +138,6 @@ end
function BonusObjectiveTracker_OnBlockLeave(block) function BonusObjectiveTracker_OnBlockLeave(block)
block.module:OnBlockHeaderLeave(block); block.module:OnBlockHeaderLeave(block);
GameTooltipTextLeft1:SetFontObject(GameTooltipHeaderText);
for i = 2, 4 do
_G["GameTooltipTextLeft"..i]:SetFontObject(GameTooltipText);
end
GameTooltip:Hide(); GameTooltip:Hide();
block.module.tooltipBlock = nil; block.module.tooltipBlock = nil;
end end
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</Anchors> </Anchors>
</Button> </Button>
<Frame name="PVPMatchResults" mixin="PVPMatchResultsMixin" toplevel="true" parent="UIParent" enableMouse="true" hidden="true"> <Frame name="PVPMatchResults" mixin="PVPMatchResultsMixin" toplevel="true" frameStrata="DIALOG" parent="UIParent" enableMouse="true" hidden="true">
<Size x="1024" y="620"/> <Size x="1024" y="620"/>
<Anchors> <Anchors>
<Anchor point="CENTER"/> <Anchor point="CENTER"/>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
..\FrameXML\UI.xsd"> ..\FrameXML\UI.xsd">
<Script file="PVPMatchScoreboard.lua"/> <Script file="PVPMatchScoreboard.lua"/>
<Frame name="PVPMatchScoreboard" mixin="PVPMatchScoreboardMixin" toplevel="true" parent="UIParent" enableMouse="true" hidden="true"> <Frame name="PVPMatchScoreboard" mixin="PVPMatchScoreboardMixin" frameStrata="DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true">
<Size x="1024" y="420"/> <Size x="1024" y="420"/>
<Anchors> <Anchors>
<Anchor point="CENTER"/> <Anchor point="CENTER"/>
......
...@@ -1533,10 +1533,22 @@ local SEASON_REWARD_ACHIEVEMENTS = { ...@@ -1533,10 +1533,22 @@ local SEASON_REWARD_ACHIEVEMENTS = {
[PLAYER_FACTION_GROUP[0]] = 13227, [PLAYER_FACTION_GROUP[0]] = 13227,
[PLAYER_FACTION_GROUP[1]] = 13228, [PLAYER_FACTION_GROUP[1]] = 13228,
}, },
[BFA_START_SEASON + 2] = {
[PLAYER_FACTION_GROUP[0]] = 13636,
[PLAYER_FACTION_GROUP[1]] = 13637,
},
}; };
function PVPUISeasonRewardFrameMixin:GetAchievementID() function PVPUISeasonRewardFrameMixin:GetAchievementID()
local seasonAchievements = SEASON_REWARD_ACHIEVEMENTS[GetCurrentArenaSeason()]; local seasonID = GetCurrentArenaSeason();
if seasonID == NO_ARENA_SEASON then
seasonID = GetPreviousArenaSeason();
end
if seasonID and seasonID < BFA_START_SEASON then
return nil;
end
local seasonAchievements = SEASON_REWARD_ACHIEVEMENTS[seasonID];
local achievementID = seasonAchievements and seasonAchievements[UnitFactionGroup("player")]; local achievementID = seasonAchievements and seasonAchievements[UnitFactionGroup("player")];
if achievementID then if achievementID then
local id, name, points, completed = GetAchievementInfo(achievementID); local id, name, points, completed = GetAchievementInfo(achievementID);
......
...@@ -51,4 +51,49 @@ function AzeriteEssenceUtil.HasAnyEmptySlots() ...@@ -51,4 +51,49 @@ function AzeriteEssenceUtil.HasAnyEmptySlots()
end end
end end
return false; return false;
end
local ESSENCE_SWAP_TUTORIAL_STATE_NOT_SEEN = 0;
local ESSENCE_SWAP_TUTORIAL_STATE_SEEN = 1;
local ESSENCE_SWAP_TUTORIAL_STATE_ACKNOWLEDGED = 2;
local function GetEssenceSwapTutorialState()
return tonumber(GetCVar("azeriteEssenceSwapTutorial"));
end
function AzeriteEssenceUtil.ShouldShowEssenceSwapTutorial()
if GetEssenceSwapTutorialState() == ESSENCE_SWAP_TUTORIAL_STATE_ACKNOWLEDGED then
return false;
end
if not C_AzeriteEssence.CanOpenUI() then
return false;
end
if C_AzeriteEssence.GetNumUnlockedEssences() < 2 then
return false;
end
local milestones = C_AzeriteEssence.GetMilestones();
if milestones then
for i, milestoneInfo in ipairs(milestones) do
if milestoneInfo.slot and C_AzeriteEssence.CanDeactivateEssence(milestoneInfo.ID) then
return true;
end
end
end
return false;
end
function AzeriteEssenceUtil.SetEssenceSwapTutorialSeen()
if GetEssenceSwapTutorialState() ~= ESSENCE_SWAP_TUTORIAL_STATE_ACKNOWLEDGED then
SetCVar("azeriteEssenceSwapTutorial", ESSENCE_SWAP_TUTORIAL_STATE_SEEN);
end
end
function AzeriteEssenceUtil.TryAcknowledgeEssenceSwapTutorial()
if GetEssenceSwapTutorialState() == ESSENCE_SWAP_TUTORIAL_STATE_SEEN then
SetCVar("azeriteEssenceSwapTutorial", ESSENCE_SWAP_TUTORIAL_STATE_ACKNOWLEDGED);
end
end end
\ No newline at end of file
...@@ -2731,6 +2731,7 @@ function ChatFrame_OnLoad(self) ...@@ -2731,6 +2731,7 @@ function ChatFrame_OnLoad(self)
self:RegisterEvent("UPDATE_CHAT_WINDOWS"); self:RegisterEvent("UPDATE_CHAT_WINDOWS");
self:RegisterEvent("CHAT_MSG_CHANNEL"); self:RegisterEvent("CHAT_MSG_CHANNEL");
self:RegisterEvent("CHAT_MSG_COMMUNITIES_CHANNEL"); self:RegisterEvent("CHAT_MSG_COMMUNITIES_CHANNEL");
self:RegisterEvent("CLUB_REMOVED");
self:RegisterEvent("UPDATE_INSTANCE_INFO"); self:RegisterEvent("UPDATE_INSTANCE_INFO");
self:RegisterEvent("UPDATE_CHAT_COLOR_NAME_BY_CLASS"); self:RegisterEvent("UPDATE_CHAT_COLOR_NAME_BY_CLASS");
self:RegisterEvent("VARIABLES_LOADED"); self:RegisterEvent("VARIABLES_LOADED");
...@@ -2905,11 +2906,14 @@ function ChatFrame_GetCommunitiesChannelLocalID(clubId, streamId) ...@@ -2905,11 +2906,14 @@ function ChatFrame_GetCommunitiesChannelLocalID(clubId, streamId)
return localID; return localID;
end end
function ChatFrame_RemoveCommunitiesChannel(chatFrame, clubId, streamId) function ChatFrame_RemoveCommunitiesChannel(chatFrame, clubId, streamId, omitMessage)
local channelName = Chat_GetCommunitiesChannelName(clubId, streamId); local channelName = Chat_GetCommunitiesChannelName(clubId, streamId);
local channelIndex = ChatFrame_RemoveChannel(chatFrame, channelName); local channelIndex = ChatFrame_RemoveChannel(chatFrame, channelName);
local r, g, b = Chat_GetCommunitiesChannelColor(clubId, streamId);
chatFrame:AddMessage(COMMUNITIES_CHANNEL_REMOVED_FROM_CHAT_WINDOW:format(channelIndex, ChatFrame_ResolveChannelName(channelName)), r, g, b); if not omitMessage then
local r, g, b = Chat_GetCommunitiesChannelColor(clubId, streamId);
chatFrame:AddMessage(COMMUNITIES_CHANNEL_REMOVED_FROM_CHAT_WINDOW:format(channelIndex, ChatFrame_ResolveChannelName(channelName)), r, g, b);
end
end end
function ChatFrame_RemoveChannel(chatFrame, channel) function ChatFrame_RemoveChannel(chatFrame, channel)
...@@ -3180,6 +3184,19 @@ function ChatFrame_SystemEventHandler(self, event, ...) ...@@ -3180,6 +3184,19 @@ function ChatFrame_SystemEventHandler(self, event, ...)
local guid = ...; local guid = ...;
FCF_RemoveAllMessagesFromChanSender(self, guid); FCF_RemoveAllMessagesFromChanSender(self, guid);
return true; return true;
elseif ( event == "CLUB_REMOVED" ) then
local clubId = ...;
local streamIDs = C_ChatInfo.GetClubStreamIDs(clubId);
for k, streamID in pairs(streamIDs) do
local channelName = Chat_GetCommunitiesChannelName(clubId, streamID);
for i = 1, FCF_GetNumActiveChatFrames() do
local chatWindow = _G["ChatFrame"..i];
if ChatFrame_ContainsChannel(chatWindow, channelName) then
local omitMessage = true;
ChatFrame_RemoveCommunitiesChannel(chatWindow, clubId, streamID, omitMessage);
end
end
end
end end
end end
......
...@@ -74,72 +74,81 @@ function CompactUnitFrame_OnEvent(self, event, ...) ...@@ -74,72 +74,81 @@ function CompactUnitFrame_OnEvent(self, event, ...)
CompactUnitFrame_UpdateMaxPower(self); CompactUnitFrame_UpdateMaxPower(self);
CompactUnitFrame_UpdatePower(self); CompactUnitFrame_UpdatePower(self);
CompactUnitFrame_UpdatePowerColor(self); CompactUnitFrame_UpdatePowerColor(self);
elseif ( arg1 == self.unit or arg1 == self.displayedUnit ) then else
if ( event == "UNIT_MAXHEALTH" ) then local unitMatches = arg1 == self.unit or arg1 == self.displayedUnit;
CompactUnitFrame_UpdateMaxHealth(self); if ( unitMatches ) then
CompactUnitFrame_UpdateHealth(self); if ( event == "UNIT_MAXHEALTH" ) then
CompactUnitFrame_UpdateHealPrediction(self); CompactUnitFrame_UpdateMaxHealth(self);
elseif ( event == "UNIT_HEALTH" or event == "UNIT_HEALTH_FREQUENT" ) then CompactUnitFrame_UpdateHealth(self);
CompactUnitFrame_UpdateHealth(self); CompactUnitFrame_UpdateHealPrediction(self);
CompactUnitFrame_UpdateStatusText(self); elseif ( event == "UNIT_HEALTH" or event == "UNIT_HEALTH_FREQUENT" ) then
CompactUnitFrame_UpdateHealPrediction(self); CompactUnitFrame_UpdateHealth(self);
elseif ( event == "UNIT_MAXPOWER" ) then CompactUnitFrame_UpdateStatusText(self);
CompactUnitFrame_UpdateMaxPower(self); CompactUnitFrame_UpdateHealPrediction(self);
CompactUnitFrame_UpdatePower(self); elseif ( event == "UNIT_MAXPOWER" ) then
elseif ( event == "UNIT_POWER_UPDATE" ) then CompactUnitFrame_UpdateMaxPower(self);
CompactUnitFrame_UpdatePower(self); CompactUnitFrame_UpdatePower(self);
elseif ( event == "UNIT_DISPLAYPOWER" or event == "UNIT_POWER_BAR_SHOW" or event == "UNIT_POWER_BAR_HIDE" ) then elseif ( event == "UNIT_POWER_UPDATE" ) then
CompactUnitFrame_UpdateMaxPower(self); CompactUnitFrame_UpdatePower(self);
CompactUnitFrame_UpdatePower(self); elseif ( event == "UNIT_DISPLAYPOWER" or event == "UNIT_POWER_BAR_SHOW" or event == "UNIT_POWER_BAR_HIDE" ) then
CompactUnitFrame_UpdatePowerColor(self); CompactUnitFrame_UpdateMaxPower(self);
elseif ( event == "UNIT_NAME_UPDATE" ) then CompactUnitFrame_UpdatePower(self);
CompactUnitFrame_UpdateName(self); CompactUnitFrame_UpdatePowerColor(self);
CompactUnitFrame_UpdateHealthColor(self); --This may signify that we now have the unit's class (the name cache entry has been received). elseif ( event == "UNIT_NAME_UPDATE" ) then
elseif ( event == "UNIT_AURA" ) then
CompactUnitFrame_UpdateAuras(self);
elseif ( event == "UNIT_THREAT_SITUATION_UPDATE" ) then
CompactUnitFrame_UpdateAggroHighlight(self);
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_THREAT_LIST_UPDATE" ) then
if ( self.optionTable.considerSelectionInCombatAsHostile ) then
CompactUnitFrame_UpdateHealthColor(self);
CompactUnitFrame_UpdateName(self); CompactUnitFrame_UpdateName(self);
CompactUnitFrame_UpdateHealthColor(self); --This may signify that we now have the unit's class (the name cache entry has been received).
elseif ( event == "UNIT_AURA" ) then
CompactUnitFrame_UpdateAuras(self);
elseif ( event == "UNIT_THREAT_SITUATION_UPDATE" ) then
CompactUnitFrame_UpdateAggroHighlight(self);
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_THREAT_LIST_UPDATE" ) then
if ( self.optionTable.considerSelectionInCombatAsHostile ) then
CompactUnitFrame_UpdateHealthColor(self);
CompactUnitFrame_UpdateName(self);
end
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_CONNECTION" ) then
--Might want to set the health/mana to max as well so it's easily visible? This happens unless the player is out of AOI.
CompactUnitFrame_UpdateHealthColor(self);
CompactUnitFrame_UpdatePowerColor(self);
CompactUnitFrame_UpdateStatusText(self);
elseif ( event == "UNIT_HEAL_PREDICTION" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "UNIT_PET" ) then
CompactUnitFrame_UpdateAll(self);
elseif ( event == "READY_CHECK_CONFIRM" ) then
CompactUnitFrame_UpdateReadyCheck(self);
elseif ( event == "INCOMING_RESURRECT_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "UNIT_OTHER_PARTY_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "UNIT_ABSORB_AMOUNT_CHANGED" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "UNIT_HEAL_ABSORB_AMOUNT_CHANGED" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
CompactUnitFrame_UpdateStatusText(self);
elseif ( event == "UNIT_PHASE" or event == "UNIT_FLAGS" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "GROUP_JOINED" ) then
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "GROUP_LEFT" ) then
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_CLASSIFICATION_CHANGED" ) then
CompactUnitFrame_UpdateClassificationIndicator(self);
elseif ( event == "INCOMING_SUMMON_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
end
end
if ( unitMatches or arg1 == "player" ) then
if ( event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE" ) then
CompactUnitFrame_UpdateAll(self);
end end
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_CONNECTION" ) then
--Might want to set the health/mana to max as well so it's easily visible? This happens unless the player is out of AOI.
CompactUnitFrame_UpdateHealthColor(self);
CompactUnitFrame_UpdatePowerColor(self);
CompactUnitFrame_UpdateStatusText(self);
elseif ( event == "UNIT_HEAL_PREDICTION" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE" or event == "UNIT_PET" ) then
CompactUnitFrame_UpdateAll(self);
elseif ( event == "READY_CHECK_CONFIRM" ) then
CompactUnitFrame_UpdateReadyCheck(self);
elseif ( event == "INCOMING_RESURRECT_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "UNIT_OTHER_PARTY_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "UNIT_ABSORB_AMOUNT_CHANGED" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "UNIT_HEAL_ABSORB_AMOUNT_CHANGED" ) then
CompactUnitFrame_UpdateHealPrediction(self);
elseif ( event == "PLAYER_FLAGS_CHANGED" ) then
CompactUnitFrame_UpdateStatusText(self);
elseif ( event == "UNIT_PHASE" or event == "UNIT_FLAGS" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
elseif ( event == "GROUP_JOINED" ) then
CompactUnitFrame_UpdateAggroFlash(self);
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "GROUP_LEFT" ) then
CompactUnitFrame_UpdateHealthBorder(self);
elseif ( event == "UNIT_CLASSIFICATION_CHANGED" ) then
CompactUnitFrame_UpdateClassificationIndicator(self);
elseif ( event == "INCOMING_SUMMON_CHANGED" ) then
CompactUnitFrame_UpdateCenterStatusIcon(self);
end end
end end
end end
......
...@@ -484,15 +484,7 @@ function CharacterMicroButtonMixin:ShouldShowAzeriteEssenceSwapAlert() ...@@ -484,15 +484,7 @@ function CharacterMicroButtonMixin:ShouldShowAzeriteEssenceSwapAlert()
return false; return false;
end end
if GetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_CHANGE_AZERITE_ESSENCES) then return AzeriteEssenceUtil.ShouldShowEssenceSwapTutorial();
return false;
end
if IsPlayerInWorld() and C_AzeriteEssence.GetNumUnlockedEssences() > 1 then
return true;
end
return false;
end end
function CharacterMicroButtonMixin:EvaluateAlertVisibility() function CharacterMicroButtonMixin:EvaluateAlertVisibility()
...@@ -504,8 +496,10 @@ function CharacterMicroButtonMixin:EvaluateAlertVisibility() ...@@ -504,8 +496,10 @@ function CharacterMicroButtonMixin:EvaluateAlertVisibility()
end end
end end
if self:ShouldShowAzeriteEssenceSwapAlert() then if not self.seenAzeriteEssenceSwapAlert and self:ShouldShowAzeriteEssenceSwapAlert() then
if MainMenuMicroButton_ShowAlert(CharacterMicroButtonAlert, CHARACTER_SHEET_MICRO_BUTTON_AZERITE_ESSENCE_CHANGE_ESSENCES) then if MainMenuMicroButton_ShowAlert(CharacterMicroButtonAlert, CHARACTER_SHEET_MICRO_BUTTON_AZERITE_ESSENCE_CHANGE_ESSENCES) then
self.seenAzeriteEssenceSwapAlert = true;
AzeriteEssenceUtil.SetEssenceSwapTutorialSeen();
return; return;
end end
end end
......
...@@ -2853,6 +2853,7 @@ do ...@@ -2853,6 +2853,7 @@ do
AzeriteEssenceUnlockTipClosed = 0x0004, AzeriteEssenceUnlockTipClosed = 0x0004,
AzeriteEssenceSlotTipClosed = 0x0008, AzeriteEssenceSlotTipClosed = 0x0008,
AzeriteEssenceUIShown = 0x0010, AzeriteEssenceUIShown = 0x0010,
AzeriteEssenceSwapTipClosed = 0x0020,
}; };
function PaperDollItemsMixin:OnLoad() function PaperDollItemsMixin:OnLoad()
...@@ -2863,7 +2864,7 @@ do ...@@ -2863,7 +2864,7 @@ do
self.helpFlags = CreateFromMixins(FlagsMixin); self.helpFlags = CreateFromMixins(FlagsMixin);
self.helpFlags:OnLoad(); self.helpFlags:OnLoad();
self.helpFlags:AddNamedFlagsFromTable(helpFlags); self.helpFlags:AddNamedFlagsFromTable(helpFlags);
self.clearableFlags = Flags_CreateMaskFromTable(helpFlags) - self.helpFlags.AzeriteEssenceUnlockTipClosed; self.clearableFlags = Flags_CreateMaskFromTable(helpFlags) - self.helpFlags.AzeriteEssenceUnlockTipClosed - self.helpFlags.AzeriteEssenceSwapTipClosed;
end end
end end
...@@ -2994,6 +2995,18 @@ function PaperDollItemsMixin:ShouldShowAzeriteEssenceSlotHelpTip() ...@@ -2994,6 +2995,18 @@ function PaperDollItemsMixin:ShouldShowAzeriteEssenceSlotHelpTip()
return true; return true;
end end
function PaperDollItemsMixin:ShouldShowAzeriteEssenceSwapHelpTip()
if self.helpFlags:IsSet(self.helpFlags.AzeriteEssenceSwapTipClosed) then
return false;
end
if self.helpFlags:IsSet(self.helpFlags.AzeriteEssenceUIShown) then
return false;
end
return AzeriteEssenceUtil.ShouldShowEssenceSwapTutorial();
end
function PaperDollItemsMixin:OnHelpTipManuallyClosed(closeFlag) function PaperDollItemsMixin:OnHelpTipManuallyClosed(closeFlag)
self.helpFlags:Set(closeFlag); self.helpFlags:Set(closeFlag);
self:MarkDirty(); self:MarkDirty();
...@@ -3018,6 +3031,13 @@ function PaperDollItemsMixin:EvaluateHelpTip() ...@@ -3018,6 +3031,13 @@ function PaperDollItemsMixin:EvaluateHelpTip()
helpCloseFlag = self.helpFlags.AzeriteEssenceSlotTipClosed; helpCloseFlag = self.helpFlags.AzeriteEssenceSlotTipClosed;
end end
end