Commit f5388295 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-21384patch7.0.3_Beta

parent 64dbd79c
......@@ -18,7 +18,6 @@ function AdventureMapMixin:OnLoad()
local mapInsetPool = CreateFramePool("FRAME", self:GetCanvas(), "AdventureMapInsetTemplate", function(pool, mapInset) mapInset:OnReleased(); end);
self:SetMapInsetPool(mapInsetPool);
self:RegisterEvent("ADVENTURE_MAP_CLOSE");
self:RegisterEvent("ADVENTURE_MAP_UPDATE_INSETS");
self:RegisterEvent("QUEST_LOG_UPDATE");
......@@ -28,10 +27,8 @@ function AdventureMapMixin:OnLoad()
end
function AdventureMapMixin:AddStandardDataProviders()
--self:AddDataProvider(CreateFromMixins(AdventureMap_ZoneSummaryProviderMixin));
self:AddDataProvider(CreateFromMixins(AdventureMap_QuestChoiceDataProviderMixin));
self:AddDataProvider(CreateFromMixins(AdventureMap_QuestOfferDataProviderMixin));
self:AddDataProvider(CreateFromMixins(AdventureMap_MissionDataProviderMixin));
end
function AdventureMapMixin:ClearAreaTableIDAvailableForInsets()
......@@ -59,19 +56,15 @@ end
-- Override
function AdventureMapMixin:OnEvent(event, ...)
if event == "ADVENTURE_MAP_CLOSE" then
HideUIPanel(self);
else
if event == "QUEST_LOG_UPDATE" then
if C_AdventureMap.ForceUpdate then
C_AdventureMap.ForceUpdate();
end
elseif event == "ADVENTURE_MAP_UPDATE_INSETS" then
self:RefreshInsets();
if event == "QUEST_LOG_UPDATE" then
if C_AdventureMap.ForceUpdate then
C_AdventureMap.ForceUpdate();
end
MapCanvasMixin.OnEvent(self, event, ...);
elseif event == "ADVENTURE_MAP_UPDATE_INSETS" then
self:RefreshInsets();
end
MapCanvasMixin.OnEvent(self, event, ...);
end
-- Override
......
......@@ -260,7 +260,7 @@
<OnLoad>
TextStatusBar_Initialize(self);
self.textLockable = 1;
self.cvar = "partyStatusText";
self.cvar = "statusText";
self.cvarLabel = "STATUS_TEXT_PARTY";
</OnLoad>
<OnMouseUp>
......@@ -281,7 +281,7 @@
<OnLoad>
TextStatusBar_Initialize(self);
self.textLockable = 1;
self.cvar = "partyStatusText";
self.cvar = "statusText";
self.cvarLabel = "STATUS_TEXT_PARTY";
</OnLoad>
<OnMouseUp>
......
......@@ -2,10 +2,16 @@ ArtifactPerksMixin = {}
function ArtifactPerksMixin:OnShow()
self.modelTransformElapsed = 0;
self:RegisterEvent("CURSOR_UPDATE");
end
if self.freezeAnim then
self.Model:FreezeAnimation(0);
self.AltModel:FreezeAnimation(0);
function ArtifactPerksMixin:OnHide()
self:UnregisterEvent("CURSOR_UPDATE");
end
function ArtifactPerksMixin:OnEvent(event, ...)
if event == "CURSOR_UPDATE" then
self:OnCursorUpdate();
end
end
......@@ -17,7 +23,7 @@ function ArtifactPerksMixin:RefreshModel()
local itemID, altItemID, _, _, _, _, _, appearanceID, appearanceModID, altOnTop = C_ArtifactUI.GetArtifactInfo();
local _, _, _, _, _, _, uiCameraID, altHandUICameraID, _, _, _, modelAlpha, modelDesaturation, freezeAnim = C_ArtifactUI.GetAppearanceInfoByID(appearanceID);
self.freezeAnim = freezeAnim;
self.Model.freezeAnim = freezeAnim;
self.Model.uiCameraID = uiCameraID;
self.Model.desaturation = modelDesaturation;
self.Model:SetItem(itemID, appearanceModID);
......@@ -28,6 +34,7 @@ function ArtifactPerksMixin:RefreshModel()
self.AltModel:SetModelDrawLayer(altOnTop and "ARTWORK" or "BORDER");
if altItemID and altHandUICameraID then
self.AltModel.freezeAnim = freezeAnim;
self.AltModel.uiCameraID = altHandUICameraID;
self.AltModel.desaturation = modelDesaturation;
self.AltModel:SetItem(altItemID, appearanceModID);
......@@ -36,10 +43,23 @@ function ArtifactPerksMixin:RefreshModel()
else
self.AltModel:Hide();
end
end
function ArtifactsModelTemplate_OnModelLoaded(self)
local CUSTOM_ANIMATION_SEQUENCE = 213;
local animationSequence = self:HasAnimation(CUSTOM_ANIMATION_SEQUENCE) and CUSTOM_ANIMATION_SEQUENCE or 0;
if self.uiCameraID then
Model_ApplyUICamera(self, self.uiCameraID);
end
self:SetLight(1, 0, 0, 0, 0, .7, 1.0, 1.0, 1.0);
self:SetDesaturation(self.desaturation or .5);
if self.freezeAnim then
self.Model:FreezeAnimation(0);
self.AltModel:FreezeAnimation(0);
self:FreezeAnimation(animationSequence, 0);
else
self:SetAnimation(animationSequence, 0);
end
end
......@@ -81,6 +101,8 @@ function ArtifactPerksMixin:RefreshPowers(newItem)
if powerButton:IsStart() then
self.startingPowerButton = powerButton;
end
powerButton:SetShown(powerButton:ShouldBeVisible());
end
self:HideUnusedWidgets(self.PowerButtons, #powers);
......@@ -91,7 +113,6 @@ end
function ArtifactPerksMixin:GetOrCreatePowerButton(powerIndex)
local button = self.PowerButtons and self.PowerButtons[powerIndex];
if button then
button:Show();
return button;
end
return CreateFrame("BUTTON", nil, self, "ArtifactPowerButtonTemplate");
......@@ -120,24 +141,6 @@ function ArtifactPerksMixin:HideUnusedWidgets(widgetTable, numUsed, customHideFu
end
end
function ArtifactPerksMixin:CanRespec()
if(C_ArtifactUI.GetPointsRemaining() < C_ArtifactUI.GetRespecCost()) then
return false;
end
if C_ArtifactUI.IsAtForge() and not self.numRevealsPlaying then
for i, powerID in ipairs(C_ArtifactUI.GetPowers()) do
local spellID, cost, currentRank, maxRank, bonusRanks, x, y, prereqsMet, isStart, isGoldMedal = C_ArtifactUI.GetPowerInfo(powerID);
if not isStart and currentRank > 0 then
return true;
end
end
end
return false;
end
function ArtifactPerksMixin:TryRefresh()
if self.perksDirty then
if self.newItem then
......@@ -296,16 +299,24 @@ function ArtifactPerksMixin:RefreshDependencies(powers)
self:HideUnusedWidgets(self.DependencyLines, numUsedLines, OnUnusedLineHidden);
end
local function RelicRefreshHelper(self, relicSlotIndex, ...)
local function RelicRefreshHelper(self, relicSlotIndex, powersAffected, ...)
for i = 1, select("#", ...) do
local powerID = select(i, ...);
powersAffected[powerID] = true;
self:AddRelicToPower(powerID, relicSlotIndex);
end
end
function ArtifactPerksMixin:RefreshRelics()
local powersAffected = {};
for relicSlotIndex = 1, C_ArtifactUI.GetNumRelicSlots() do
RelicRefreshHelper(self, relicSlotIndex, C_ArtifactUI.GetPowersAffectedByRelic(relicSlotIndex));
RelicRefreshHelper(self, relicSlotIndex, powersAffected, C_ArtifactUI.GetPowersAffectedByRelic(relicSlotIndex));
end
for powerID, button in pairs(self.powerIDToPowerButton) do
if not powersAffected[powerID] then
button:RemoveRelicType();
end
end
end
......@@ -313,7 +324,7 @@ function ArtifactPerksMixin:AddRelicToPower(powerID, relicSlotIndex)
local button = self.powerIDToPowerButton[powerID];
if button then
local relicType = C_ArtifactUI.GetRelicSlotType(relicSlotIndex);
local relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(relicSlotIndex);
local lockedReason, relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(relicSlotIndex);
button:ApplyRelicType(relicType, relicLink, self.newItem);
end
end
......@@ -325,17 +336,66 @@ local function RelicHighlightHelper(self, highlightEnabled, ...)
end
end
local function RelicMouseOverHighlightHelper(self, highlightEnabled, tempRelicType, tempRelicLink, ...)
for i = 1, select("#", ...) do
local powerID = select(i, ...);
self:SetRelicPowerHighlightEnabled(powerID, highlightEnabled, tempRelicType, tempRelicLink);
end
end
function ArtifactPerksMixin:OnRelicSlotMouseEnter(relicSlotIndex)
RelicHighlightHelper(self, true, C_ArtifactUI.GetPowersAffectedByRelic(relicSlotIndex));
end
function ArtifactPerksMixin:OnRelicSlotMouseLeave(relicSlotIndex)
RelicHighlightHelper(self, false, C_ArtifactUI.GetPowersAffectedByRelic(relicSlotIndex));
self:RefreshCursorHighlights();
end
function ArtifactPerksMixin:ShowHighlightForRelicItemID(itemID)
local couldFitInAnySlot = false;
for relicSlotIndex = 1, C_ArtifactUI.GetNumRelicSlots() do
if C_ArtifactUI.CanApplyRelicItemIDToSlot(itemID, relicSlotIndex) then
self.TitleContainer:SetRelicSlotHighlighted(relicSlotIndex, true);
couldFitInAnySlot = true;
end
end
if couldFitInAnySlot then
local relicName, relicIcon, relicType, relicLink = C_ArtifactUI.GetRelicInfoByItemID(itemID);
RelicMouseOverHighlightHelper(self, true, relicType, relicLink, C_ArtifactUI.GetPowersAffectedByRelicItemID(itemID));
end
end
function ArtifactPerksMixin:HideHighlightForRelicItemID(itemID)
RelicMouseOverHighlightHelper(self, false, nil, nil, C_ArtifactUI.GetPowersAffectedByRelicItemID(itemID));
self.TitleContainer:RefreshCursorRelicHighlights();
end
function ArtifactPerksMixin:RefreshCursorHighlights()
local type, itemID = GetCursorInfo();
if type == "item" and IsArtifactRelicItem(itemID) then
self.cursorItemID = itemID;
self:ShowHighlightForRelicItemID(self.cursorItemID);
elseif self.cursorItemID then
self:HideHighlightForRelicItemID(self.cursorItemID);
self.cursorItemID = nil;
end
end
function ArtifactPerksMixin:OnCursorUpdate()
self:RefreshCursorHighlights();
end
function ArtifactPerksMixin:SetRelicPowerHighlightEnabled(powerID, highlight)
function ArtifactPerksMixin:SetRelicPowerHighlightEnabled(powerID, highlight, tempRelicType, tempRelicLink)
local button = self.powerIDToPowerButton[powerID];
if button then
if highlight and tempRelicType and tempRelicLink then
button:ApplyTemporaryRelicType(tempRelicType, tempRelicLink);
else
button:RemoveTemporaryRelicType();
end
button:SetRelicHighlightEnabled(highlight);
end
end
......@@ -401,7 +461,7 @@ function ArtifactPerksMixin:PlayReveal()
QueueReveal(self, self.startingPowerButton, 0);
for powerID, powerButton in pairs(self.powerIDToPowerButton) do
if powerButton:PlayRevealAnimation(OnRevealFinished) then
if powerButton:ShouldBeVisible() and powerButton:PlayRevealAnimation(OnRevealFinished) then
powerButton:SetLocked(true);
self.numRevealsPlaying = self.numRevealsPlaying + 1;
end
......@@ -450,7 +510,6 @@ function ArtifactTitleTemplateMixin:OnShow()
self:RegisterEvent("ARTIFACT_UPDATE");
self:RegisterEvent("CURSOR_UPDATE");
end
function ArtifactTitleTemplateMixin:OnHide()
......@@ -473,28 +532,44 @@ function ArtifactTitleTemplateMixin:OnCursorUpdate()
StaticPopup_Hide("CONFIRM_RELIC_REPLACE");
end
for i, relicSlot in ipairs(self.RelicSlots) do
if relicSlot:IsShown() then
if C_ArtifactUI.CanApplyCursorRelicToSlot(i) then
relicSlot:LockHighlight();
relicSlot.HighlightTexture:Show();
relicSlot.CanSlotAnim:Play();
else
relicSlot:UnlockHighlight();
relicSlot.CanSlotAnim:Stop();
if CursorHasItem() then
relicSlot.HighlightTexture:Hide();
else
relicSlot.HighlightTexture:Show();
end
end
end
self:RefreshCursorRelicHighlights();
end
function ArtifactTitleTemplateMixin:RefreshCursorRelicHighlights()
for relicSlotIndex in ipairs(self.RelicSlots) do
self:SetRelicSlotHighlighted(relicSlotIndex, C_ArtifactUI.CanApplyCursorRelicToSlot(relicSlotIndex));
end
end
function ArtifactTitleTemplateMixin:SetRelicSlotHighlighted(relicSlotIndex, highlighted)
local relicSlot = self.RelicSlots[relicSlotIndex];
if relicSlot:IsShown() then
if highlighted then
relicSlot:LockHighlight();
relicSlot.HighlightTexture:Show();
relicSlot.CanSlotAnim:Play();
else
relicSlot:UnlockHighlight();
relicSlot.CanSlotAnim:Stop();
relicSlot.HighlightTexture:Hide();
end
end
end
function ArtifactTitleTemplateMixin:OnRelicSlotMouseEnter(relicSlot)
if relicSlot.relicLink then
if relicSlot.lockedReason then
GameTooltip:SetOwner(relicSlot, "ANCHOR_BOTTOMRIGHT", 0, 10);
local slotName = _G["RELIC_SLOT_TYPE_" .. relicSlot.relicType:upper()];
if slotName then
GameTooltip:SetText(LOCKED_RELIC_TOOLTIP_TITLE:format(slotName), 1, 1, 1);
if relicSlot.lockedReason == "" then
GameTooltip:AddLine(LOCKED_RELIC_TOOLTIP_BODY, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
else
GameTooltip:AddLine(relicSlot.lockedReason, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
end
GameTooltip:Show();
end
elseif relicSlot.relicLink then
GameTooltip:SetOwner(relicSlot, "ANCHOR_BOTTOMRIGHT", 0, 10);
GameTooltip:SetHyperlink(relicSlot.relicLink);
elseif relicSlot.relicType then
......@@ -572,19 +647,31 @@ function ArtifactTitleTemplateMixin:EvaluateRelics()
relicSlot:GetNormalTexture():SetAtlas(relicAtlasName, true);
relicSlot:GetHighlightTexture():SetAtlas(relicAtlasName, true);
local relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(i);
if relicIcon then
relicSlot.Icon:SetSize(34, 34);
relicSlot.Icon:SetTexture(relicIcon);
relicSlot.Icon:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask");
else
local lockedReason, relicName, relicIcon, relicLink = C_ArtifactUI.GetRelicInfo(i);
if lockedReason then
relicSlot:GetNormalTexture():SetAlpha(.5);
relicSlot:Disable();
relicSlot.LockedIcon:Show();
relicSlot.Icon:SetMask(nil);
relicSlot.Icon:SetAtlas("Relic-SlotBG", true);
else
relicSlot:GetNormalTexture():SetAlpha(1);
relicSlot:Enable();
relicSlot.LockedIcon:Hide();
if relicIcon then
relicSlot.Icon:SetSize(34, 34);
relicSlot.Icon:SetTexture(relicIcon);
relicSlot.Icon:SetMask("Interface\\CharacterFrame\\TempPortraitAlphaMask");
else
relicSlot.Icon:SetMask(nil);
relicSlot.Icon:SetAtlas("Relic-SlotBG", true);
end
end
relicSlot.relicLink = relicLink;
relicSlot.relicType = relicType;
relicSlot.relicSlotIndex = i;
relicSlot.lockedReason = lockedReason;
relicSlot:ClearAllPoints();
local PADDING = 0;
......
......@@ -38,7 +38,7 @@
</Animations>
</Frame>
<Button name="ArtifactsRelicSlotTemplate" virtual="true">
<Button name="ArtifactsRelicSlotTemplate" motionScriptsWhileDisabled="true" virtual="true">
<Size x="72" y="72" />
<Layers>
......@@ -49,6 +49,13 @@
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="LockedIcon" atlas="Forge-Lock" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<NormalTexture parentKey="NormalTexture" />
......@@ -94,14 +101,7 @@
Model_ApplyUICamera(self, self.uiCameraID);
end
</OnEvent>
<OnModelLoaded>
if self.uiCameraID then
Model_ApplyUICamera(self, self.uiCameraID);
end
self:SetLight(1, 0, 0, 0, 0, .7, 1.0, 1.0, 1.0);
self:SetDesaturation(self.desaturation or .5);
</OnModelLoaded>
<OnModelLoaded function="ArtifactsModelTemplate_OnModelLoaded" />
</Scripts>
</PlayerModel>
......@@ -186,6 +186,8 @@
</Frames>
<Scripts>
<OnShow method="OnShow" />
<OnHide method="OnHide" />
<OnEvent method="OnEvent" />
<OnUpdate method="OnUpdate" />
</Scripts>
</Frame>
......
......@@ -89,7 +89,10 @@ function ArtifactPowerButtonMixin:PlayPurchaseAnimation()
end
function ArtifactPowerButtonMixin:PlayUnlockAnimation()
if self.isGoldMedal == "gold" then
if self.isFinal then
self.FinalPowerUnlockedAnim:Stop();
self.FinalPowerUnlockedAnim:Play();
elseif self.isGoldMedal then
self.GoldPowerUnlockedAnim:Play();
elseif not self.isStart then
self.RingGlow:SetVertexColor(1, 0.81960784313725, 0.3921568627451);
......@@ -232,7 +235,28 @@ function ArtifactPowerButtonMixin:SetStyle(style)
end
end
function ArtifactPowerButtonMixin:ApplyTemporaryRelicType(relicType, relicLink)
if self.style ~= ARTIFACT_POWER_STYLE_RUNE and self.originalRelicType == nil and self.originalRelicLink == nil then
self.originalRelicType = self.relicType or false;
self.originalRelicLink = self.relicLink or false;
self:ApplyRelicType(relicType, relicLink, true);
end
end
function ArtifactPowerButtonMixin:RemoveTemporaryRelicType()
if self.style ~= ARTIFACT_POWER_STYLE_RUNE and self.originalRelicType ~= nil and self.originalRelicLink ~= nil then
self:ApplyRelicType(self.originalRelicType or nil, self.originalRelicLink or nil, true);
self.originalRelicType = nil;
self.originalRelicLink = nil;
end
end
function ArtifactPowerButtonMixin:ApplyRelicType(relicType, relicLink, suppressAnimation)
if self.style == ARTIFACT_POWER_STYLE_RUNE then
return;
end
if relicType then
local relicTraitBGAtlas = ("Relic-%s-TraitBG"):format(relicType);
self.RelicTraitBG:SetAtlas(relicTraitBGAtlas);
......@@ -258,7 +282,7 @@ function ArtifactPowerButtonMixin:ApplyRelicType(relicType, relicLink, suppressA
self:SetRelicHighlightEnabled(false);
if self.relicLink ~= relicLink and not suppressAnimation then
if self.wasBonusRankJustIncreased and not suppressAnimation then
self.RelicAppliedAnim:Play();
end
else
......@@ -266,15 +290,30 @@ function ArtifactPowerButtonMixin:ApplyRelicType(relicType, relicLink, suppressA
self.RelicTraitGlow:Hide();
self.RelicTraitGlowRing:Hide();
end
self.relicType = relicType;
self.relicLink = relicLink;
end
function ArtifactPowerButtonMixin:RemoveRelicType()
self.relicType = nil;
self.relicLink = nil;
self.originalRelicType = nil;
self.originalRelicLink = nil;
self.RelicTraitBG:Hide();
self.RelicTraitGlow:Hide();
self.RelicTraitGlowRing:Hide();
end
local HIGHLIGHT_ALPHA = 1.0;
local NO_HIGHLIGHT_ALPHA = .8;
function ArtifactPowerButtonMixin:SetRelicHighlightEnabled(enabled)
self.RelicTraitGlow:SetShown(enabled);
self.RelicTraitGlowRing:SetShown(enabled);
self.RelicTraitBG:SetAlpha(enabled and HIGHLIGHT_ALPHA or NO_HIGHLIGHT_ALPHA);
if self.style ~= ARTIFACT_POWER_STYLE_RUNE then
self.RelicTraitGlow:SetShown(enabled);
self.RelicTraitGlowRing:SetShown(enabled);
self.RelicTraitBG:SetAlpha(enabled and HIGHLIGHT_ALPHA or NO_HIGHLIGHT_ALPHA);
end
end
function ArtifactPowerButtonMixin:GetPowerID()
......@@ -306,7 +345,7 @@ function ArtifactPowerButtonMixin:CalculateDistanceTo(otherPowerButton)
end
function ArtifactPowerButtonMixin:SetupButton(powerID, anchorRegion)
local spellID, cost, currentRank, maxRank, bonusRanks, x, y, prereqsMet, isStart, isGoldMedal = C_ArtifactUI.GetPowerInfo(powerID);
local spellID, cost, currentRank, maxRank, bonusRanks, x, y, prereqsMet, isStart, isGoldMedal, isFinal = C_ArtifactUI.GetPowerInfo(powerID);
self:ClearAllPoints();
self:SetPoint("CENTER", anchorRegion, "TOPLEFT", x * anchorRegion:GetWidth(), -y * anchorRegion:GetHeight());
......@@ -317,28 +356,29 @@ function ArtifactPowerButtonMixin:SetupButton(powerID, anchorRegion)
local totalPurchasedRanks = C_ArtifactUI.GetTotalPurchasedRanks();
local wasJustUnlocked = prereqsMet and self.prereqsMet == false;
local wasRespecced = self.currentRank and currentRank < self.currentRank;
local wasBonusRankJustIncreased = self.bonusRanks and bonusRanks > self.bonusRanks;
if wasRespecced then
self:StopAllAnimations();
end
self.powerID = powerID;
self.spellID = spellID;
self.currentRank = currentRank;
self.bonusRanks = bonusRanks;
self.maxRank = maxRank;
self.isStart = isStart;
self.isGoldMedal = isGoldMedal;
self.isFinal = isFinal;
local isAtForge = C_ArtifactUI.IsAtForge();
--local isAtPointCap = totalPurchasedRanks >= C_ArtifactUI.GetMaxPurchasedRanks();
local isAtPointCap = false;
self.isCompletelyPurchased = currentRank == maxRank or self.isStart;
self.hasSpentAny = currentRank > bonusRanks;
self.couldSpendPoints = C_ArtifactUI.GetPointsRemaining() >= cost and isAtForge and not isAtPointCap;
self.isAtPointCap = isAtPointCap;
self.couldSpendPoints = C_ArtifactUI.GetPointsRemaining() >= cost and isAtForge;
self.isMaxRank = currentRank == maxRank;
self.prereqsMet = prereqsMet;
self.wasBonusRankJustIncreased = wasBonusRankJustIncreased;
self.cost = cost;
self:UpdatePowerType();
......@@ -348,10 +388,10 @@ function ArtifactPowerButtonMixin:SetupButton(powerID, anchorRegion)
if totalPurchasedRanks > 1 and wasJustUnlocked then
self:PlayUnlockAnimation();
end
end
self.RelicTraitBG:Hide();
self.RelicTraitGlow:Hide();
self.RelicTraitGlowRing:Hide();
function ArtifactPowerButtonMixin:ShouldBeVisible()
return not self.isFinal or self.prereqsMet;
end
function ArtifactPowerButtonMixin:EvaluateStyle()
......@@ -360,7 +400,7 @@ function ArtifactPowerButtonMixin:EvaluateStyle()
elseif C_ArtifactUI.IsAtForge() then
if self.isMaxRank then
self:SetStyle(ARTIFACT_POWER_STYLE_MAXED);
elseif self.prereqsMet and C_ArtifactUI.GetPointsRemaining() >= self.cost and not self.isAtPointCap then
elseif self.prereqsMet and C_ArtifactUI.GetPointsRemaining() >= self.cost then
self:SetStyle(ARTIFACT_POWER_STYLE_CAN_UPGRADE);
elseif self.currentRank > 0 then
self:SetStyle(ARTIFACT_POWER_STYLE_PURCHASED);
......@@ -384,19 +424,25 @@ function ArtifactPowerButtonMixin:ClearOldData()
self.powerID = nil;
self.spellID = nil;
self.currentRank = nil;
self.bonusRanks = nil;