Skip to content

Commit

Permalink
WOW-25826patch7.3.5_PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrus88 committed Jan 9, 2018
1 parent acb57b6 commit 53c9d32
Show file tree
Hide file tree
Showing 19 changed files with 126 additions and 40 deletions.
Expand Up @@ -68,9 +68,9 @@ local ConfigurationWarningsLua =
{
Name = "ConfigurationWarning",
Type = "Enumeration",
NumValues = 6,
NumValues = 8,
MinValue = 0,
MaxValue = 5,
MaxValue = 7,
Fields =
{
{ Name = "ShaderModelWillBeOutdated", Type = "ConfigurationWarning", EnumValue = 0 },
Expand All @@ -79,6 +79,8 @@ local ConfigurationWarningsLua =
{ Name = "DriverBlacklisted", Type = "ConfigurationWarning", EnumValue = 3 },
{ Name = "DriverOutOfDate", Type = "ConfigurationWarning", EnumValue = 4 },
{ Name = "DeviceBlacklisted", Type = "ConfigurationWarning", EnumValue = 5 },
{ Name = "GraphicsApiwIllBeOutdated", Type = "ConfigurationWarning", EnumValue = 6 },
{ Name = "OsBitsWillBeOutdated", Type = "ConfigurationWarning", EnumValue = 7 },
},
},
},
Expand Down
Expand Up @@ -95,7 +95,7 @@
</Scripts>
</Frame>

<Frame name="AlliedRacesFrame" toplevel="true" parent="UIParent" inherits="ButtonFrameTemplate" mixin="AlliedRacesFrameMixin" hidden="true">
<Frame name="AlliedRacesFrame" toplevel="true" parent="UIParent" inherits="ButtonFrameTemplate" mixin="AlliedRacesFrameMixin" enableMouse="true" hidden="true">
<Size x="704" y="607"/>
<Anchors>
<Anchor point="LEFT" x="20" y="40"/>
Expand Down
41 changes: 37 additions & 4 deletions Interface/AddOns/Blizzard_ArtifactUI/Blizzard_ArtifactPerks.lua
Expand Up @@ -225,8 +225,12 @@ function ArtifactPerksMixin:RefreshModel()
self.AltModel:SetFrameLevel(baseAltModelFrameLevel);
self.AltInstabilityShakeModel:SetFrameLevel(baseAltModelFrameLevel + 1);
self.AltInstabilityEffectModel:SetFrameLevel(baseAltModelFrameLevel + 2);
self.AltInstabilityShakeModel:Show();
self.AltInstabilityEffectModel:Show();
else
self.AltModel:Hide();
self.AltInstabilityShakeModel:Hide();
self.AltInstabilityEffectModel:Hide();
end
end

Expand Down Expand Up @@ -324,6 +328,9 @@ function ArtifactPerksMixin:RefreshPowers(newItem)
if newItem or not self.powerIDToPowerButton then
self.powerButtonPool:ReleaseAll();
self.powerIDToPowerButton = {};
if (self.TitleContainer.InstabilityPointsRemainingPool) then
self.TitleContainer.InstabilityPointsRemainingPool:ReleaseAll();
end
end

local currentTier = C_ArtifactUI.GetArtifactTier();
Expand Down Expand Up @@ -524,7 +531,11 @@ function ArtifactPerksMixin:TryRefresh()
local finalTier2WasUnlocked = self.wasFinalPowerButtonUnlockedByTier[2];
self:RefreshPowers(self.newItem);

self.TitleContainer:SetPointsRemaining(C_ArtifactUI.GetPointsRemaining());
if (self.inInstabilityMode) then
self:SetupInstabilityPoints();
else
self.TitleContainer:SetPointsRemaining(C_ArtifactUI.GetPointsRemaining());
end

self.perksDirty = false;
self.newItem = nil;
Expand Down Expand Up @@ -1240,6 +1251,27 @@ function ArtifactPerksMixin:CancelAllTimedAnimations()
end
end

function ArtifactPerksMixin:CalculateInstabilityPoints(time)
time = time - 1514764800;

local y = 3e-12 * (time * time) - 2e-5 * time - 8e-13;
y = math.pow(y, 6) + 4e13;
return y;
end

function ArtifactPerksMixin:SetupInstabilityPoints()
local duration = 3600;
self.TitleContainer.PointsRemainingLabel:SetAnimatedDurationTimeSec(duration);

local time = GetServerTime();
local startingValue = self:CalculateInstabilityPoints(time);
local endingValue = self:CalculateInstabilityPoints(time + duration);
self.TitleContainer.PointsRemainingLabel:SetAnimatedValue(startingValue);
self.TitleContainer.PointsRemainingLabel:SnapToTarget();

self.TitleContainer.PointsRemainingLabel:SetAnimatedValue(endingValue);
end

function ArtifactPerksMixin:BeginInstability()
self.inInstabilityMode = true;
self.CrestFrame.InstabilityRunesAnim:Play();
Expand All @@ -1255,16 +1287,17 @@ function ArtifactPerksMixin:BeginInstability()
end
end
self.Tier2ForgingScene:SetFrameLevel(powerButtonFrameLevel);
self.Tier2ForgingScene.ForgingEffect:SetAlpha(1);
if (self.Tier2ForgingScene.ForgingEffect) then
self.Tier2ForgingScene.ForgingEffect:SetAlpha(1);
end
for i, scene in ipairs(self.InstabilityForgingScenes) do
scene:SetAlpha(1);
scene:SetFrameLevel(powerButtonFrameLevel);
end
self:RefreshNextInstabilityTime();

self.TitleContainer.InstabilityPointsRemainingPool = CreateFontStringPool(self, "OVERLAY", 0, "ArtifactInstabilityPointsRemainingTemplate");
self.TitleContainer.PointsRemainingLabel:SetAnimatedDurationTimeSec(3600);
self.TitleContainer.PointsRemainingLabel:SetAnimatedValue(C_ArtifactUI.GetPointsRemaining() + 1000000000000);
self:SetupInstabilityPoints();

self.shakeCooldown = math.random(2, 4);
self.InstabilityShakeModel:Show();
Expand Down
Expand Up @@ -650,6 +650,11 @@ function ArtifactPowerButtonMixin:StopAllAnimations()
self.FinalPowerUnlockedAnim:Stop();
self.FirstPointWaitingAnimation:Stop();
self.Tier2FinalPowerSparks:Stop();
self.InstabilityAnim:Stop();

if self.FloatingNumbers and self.FloatingNumbers[1] then
self.FloatingNumbers[1].InstabilityMoveAndFade:Stop();
end
end

function ArtifactPowerButtonMixin:SetNextInstabilityTime(baseTime)
Expand Down Expand Up @@ -693,6 +698,12 @@ local function OnInstabilityLightHit(self)
end
end

local function OnInstabilityPointsRemainingAnimFinished(self)
local label = self:GetParent();
local pool = label:GetParent().InstabilityPointsRemainingPool;
pool:Release(label);
end

function ArtifactPowerButtonMixin:TriggerInstability()
local perksTab = self:GetParent();
local sourceX = perksTab:GetWidth() / 2;
Expand All @@ -709,6 +720,7 @@ function ArtifactPowerButtonMixin:TriggerInstability()
local deltaY = targetY - sourceY;
label.Anim.Move:SetOffset(deltaX * 0.3, deltaY * 0.3);
label:SetText(perksTab.TitleContainer.PointsRemainingLabel:GetText());
label.Anim:SetScript("OnFinished", OnInstabilityPointsRemainingAnimFinished);
label.Anim:Play();

local orbSoundKit = self:GetParent():GetInstabilityOrbSoundKit();
Expand Down
Expand Up @@ -9,6 +9,10 @@ function Outbound.ShowUpgradeConfirmation(guid, boostType)
securecall("StaticPopup_Show", "CONFIRM_UNLOCK_TRIAL_CHARACTER", nil, nil, data);
end

function Outbound.ShowUpgradeLogoutConfirmation(boostType)
securecall("StaticPopup_Show", "CLASS_TRIAL_CHOOSE_BOOST_LOGOUT_PROMPT", nil, nil, boostType);
end

function Outbound.ShowStoreServices(guid, boostType)
securecall("ClassTrial_ShowStoreServices", guid, boostType);
end
Expand Down
12 changes: 10 additions & 2 deletions Interface/AddOns/Blizzard_ClassTrial/Blizzard_ClassTrialSecure.lua
Expand Up @@ -20,9 +20,17 @@ local function ClassTrialDoCharacterUpgrade(guid, boostType, confirmed)
local upgradeDistributions = C_SharedCharacterServices.GetUpgradeDistributions();
if upgradeDistributions[boostType] and upgradeDistributions[boostType].amount >= 1 then
if confirmed then
C_CharacterServices.AssignUpgradeDistribution(guid, 0, 0, 0, boostType);
if boostType == C_CharacterServices.GetActiveClassTrialBoostType() then
C_CharacterServices.AssignUpgradeDistribution(guid, 0, 0, 0, boostType);
else
Outbound.ShowUpgradeLogoutConfirmation(boostType);
end
else
Outbound.ShowUpgradeConfirmation(guid, boostType);
if boostType == C_CharacterServices.GetActiveClassTrialBoostType() then
Outbound.ShowUpgradeConfirmation(guid, boostType);
else
Outbound.ShowUpgradeLogoutConfirmation(boostType);
end
end
else
Outbound.ShowStoreServices(guid, boostType);
Expand Down
Expand Up @@ -153,21 +153,29 @@ function ACHIEVEMENT_TRACKER_MODULE:Update()
end
else
-- single criteria type of achievement
local colorStyle = IsAchievementEligible(achievementID) and OBJECTIVE_TRACKER_COLOR["Normal"] or OBJECTIVE_TRACKER_COLOR["Failed"];
local line = ACHIEVEMENT_TRACKER_MODULE:AddObjective(block, 1, description, nil, nil, OBJECTIVE_DASH_STYLE_SHOW, colorStyle);
-- check if we're supposed to show a timer bar for this
local timerShown = false;
local timerFailed = false;
local timerCriteriaDuration = 0;
local timerCriteriaStartTime = 0;
for timedCriteriaID, timedCriteria in next, TIMED_CRITERIA do
if ( timedCriteria.achievementID == achievementID ) then
local elapsed = GetTime() - timedCriteria.startTime;
if ( elapsed <= timedCriteria.duration ) then
ACHIEVEMENT_TRACKER_MODULE:AddTimerBar(block, line, timedCriteria.duration, timedCriteria.startTime);
timerCriteriaDuration = timedCriteria.duration;
timerCriteriaStartTime = timedCriteria.startTime;
timerShown = true;
else
timerFailed = true;
end
break;
end
end
if ( not timerShown and line.TimerBar ) then
local colorStyle = (not timerFailed and IsAchievementEligible(achievementID)) and OBJECTIVE_TRACKER_COLOR["Normal"] or OBJECTIVE_TRACKER_COLOR["Failed"];
local line = ACHIEVEMENT_TRACKER_MODULE:AddObjective(block, 1, description, nil, nil, OBJECTIVE_DASH_STYLE_SHOW, colorStyle);
if ( timerShown ) then
ACHIEVEMENT_TRACKER_MODULE:AddTimerBar(block, line, timerCriteriaDuration, timerCriteriaStartTime);
elseif ( line.TimerBar ) then
ACHIEVEMENT_TRACKER_MODULE:FreeTimerBar(block, line);
end
end
Expand All @@ -189,8 +197,6 @@ end
function AchievementObjectiveTracker_OnAchievementUpdate(achievementID, criteriaID, elapsed, duration)
if ( not elapsed or not duration ) then
-- Don't do anything
elseif ( elapsed >= duration ) then
TIMED_CRITERIA[criteriaID] = nil;
else
-- we're already handling timer bars for achievements with visible criteria
-- we use this system to handle timer bars for the rest
Expand All @@ -205,5 +211,7 @@ function AchievementObjectiveTracker_OnAchievementUpdate(achievementID, criteria
end
if ( IsTrackedAchievement(achievementID) ) then
ObjectiveTracker_Update(OBJECTIVE_TRACKER_UPDATE_ACHIEVEMENT);
else
TIMED_CRITERIA[criteriaID] = nil;
end
end
16 changes: 5 additions & 11 deletions Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUI.xml
Expand Up @@ -1719,7 +1719,10 @@
<Frame name="StoreDialog" parent="UIParent" frameStrata="DIALOG" toplevel="true" enableMouse="true" hidden="true">
<Size x="434" y="100" />
<!-- Anchors are set in lua -->
<Backdrop edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="11" bottom="11"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="32" />
</TileSize>
Expand All @@ -1728,18 +1731,9 @@
</EdgeSize>
</Backdrop>
<Layers>
<Layer level="BACKGROUND">
<Texture>
<Anchors>
<Anchor point="TOPLEFT" x="5" y="-5" />
<Anchor point="BOTTOMRIGHT" x="-5" y="5" />
</Anchors>
<Color r="0" g="0" b="0" a="1" />
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Description" inherits="GameFontNormalMed2">
<Size x="400" y="0"/>
<Size x="380" y="0"/>
<Anchors>
<Anchor point="TOP" x="0" y="-26"/>
</Anchors>
Expand Down
6 changes: 4 additions & 2 deletions Interface/AddOns/Blizzard_StoreUI/Blizzard_StoreUISecure.lua
Expand Up @@ -1491,13 +1491,15 @@ function StoreFrame_UpdateCard(card, entryID, discountReset, forceModelUpdate)
card.BannerFadeIn:Show();
end

card:Enable();
if (entryInfo.alreadyOwned and StoreFrame_DoesProductGroupShowOwnedAsDisabled(selectedCategoryID)) then
card:Disable();
card.Card:SetDesaturated(true);
if card.Checkmark then
card.Checkmark:Hide();
end
else
card:Enable();
card.Card:SetDesaturated(false);
end

if (card.DisabledOverlay) then
Expand Down Expand Up @@ -1955,7 +1957,7 @@ function StoreFrame_OnLoad(self)
background:SetColorTexture(0, 0, 0, 0.75);
end
self:SetPoint("CENTER", nil, "CENTER", 0, 20); --Intentionally not anchored to UIParent.
StoreDialog:SetPoint("CENTER", nil, "CENTER", 0, 40);
StoreDialog:SetPoint("CENTER", nil, "CENTER", 0, 150);
StoreFrame_CreateCards(self, NUM_STORE_PRODUCT_CARDS, NUM_STORE_PRODUCT_CARDS_PER_ROW);
StoreFrame_HideAllSplashFrames(self);
Expand Down
5 changes: 5 additions & 0 deletions Interface/AddOns/Blizzard_WarboardUI/Blizzard_WarboardUI.lua
Expand Up @@ -18,6 +18,10 @@ function WarboardQuestChoiceFrameMixin:OnLoad()
self.initOptionBackgroundHeight = 337;
self.initOptionHeaderTextHeight = 20;

for _, option in pairs(self.Options) do
option.Header.Text:SetFontObjectsToTry("Game20Font", "Game18Font", "Game16Font", "Game13Font");
end

QuestChoiceFrameMixin.OnLoad(self);
end

Expand Down Expand Up @@ -60,6 +64,7 @@ function WarboardQuestChoiceFrameMixin:Update()

local newWidth = (neededWidth*2)+430;
self.fixedWidth = math.max(600, newWidth);
self.leftPadding = ((self.fixedWidth - self.Option1:GetWidth()) / 2) - 4;
self.Title:SetPoint("LEFT", self.Option1, "LEFT", -neededWidth, 0);
self.Title:SetPoint("RIGHT", self.Option1, "RIGHT", neededWidth, 0);
else
Expand Down
Expand Up @@ -63,7 +63,7 @@
</Texture>
</Layer>
<Layer level="ARTWORK">
<FontString parentKey="Text" font="Game20Font" justifyH="CENTER" justifyV="MIDDLE">
<FontString parentKey="Text" font="Game20Font" mixin="ShrinkUntilTruncateFontStringMixin" justifyH="CENTER" justifyV="MIDDLE">
<Size x="180"/>
<Anchors>
<Anchor point="TOP" relativeKey="$parent.$parent.Artwork" relativePoint="BOTTOM" x="0" y="-21"/>
Expand Down
2 changes: 0 additions & 2 deletions Interface/FrameXML/Constants.lua
Expand Up @@ -878,8 +878,6 @@ ITEMSUBCLASSTYPES = {
}

-- MINIMAP
MINIMAP_TRACK_HIDDEN_QUESTS = 13;

TYPEID_DUNGEON = 1;
TYPEID_RANDOM_DUNGEON = 6;

Expand Down
3 changes: 1 addition & 2 deletions Interface/FrameXML/WorldMapFrame.lua
Expand Up @@ -1540,8 +1540,7 @@ function WorldMapFrame_Update()
local questLineName, questName, x, y, isHidden, floorLocation, isLegendary = C_Questline.GetQuestlineInfoByIndex(i);
local showQuest = questLineName and x > 0 and y > 0;
if ( showQuest and isHidden ) then
local _, _, active = GetTrackingInfo(MINIMAP_TRACK_HIDDEN_QUESTS);
showQuest = active;
showQuest = IsTrackingHiddenQuests();
end
if ( showQuest ) then
numUsedStoryLineFrames = numUsedStoryLineFrames + 1;
Expand Down
2 changes: 2 additions & 0 deletions Interface/GlueXML/AccountReactivate.lua
Expand Up @@ -199,6 +199,8 @@ function ReactivateAccountDialog_CanOpen()
return false;
elseif (not CharacterSelect_HasVeteranEligibilityInfo()) then
return false;
elseif (GlueDialog:IsShown()) then
return false;
end

return true;
Expand Down
4 changes: 2 additions & 2 deletions Interface/GlueXML/CharacterCreate.lua
Expand Up @@ -1627,10 +1627,10 @@ function CharCreate_PrepPreviewModels(reloadModels)

-- need to reload models class was swapped to or from DK
local classInfo = C_CharacterCreation.GetSelectedClass();
if ( classInfo.fileName == "DEATHKNIGHT" or displayFrame.lastClass == "DEATHKNIGHT" ) and ( classInfo.classID ~= displayFrame.lastClass ) then
if ( classInfo.fileName == "DEATHKNIGHT" or displayFrame.lastClassID == CLASS_NAME_BUTTON_ID_MAP["DEATHKNIGHT"] ) and ( classInfo.classID ~= displayFrame.lastClassID ) then
reloadModels = true;
end
displayFrame.lastClass = classInfo.classID;
displayFrame.lastClassID = classInfo.classID;

-- always clear the featureType
for index, previewFrame in pairs(displayFrame.previews) do
Expand Down
4 changes: 1 addition & 3 deletions Interface/GlueXML/CharacterSelect.lua
Expand Up @@ -2116,9 +2116,7 @@ function DisplayBattlepayTokenFreeFrame(freeFrame)
popupFrame.Bottom:SetAtlas(popupData.textureKitPrefix.."-boostpopup-bottom", true);
popupFrame.CloseButtonBG:SetAtlas(popupData.textureKitPrefix.."-boostpopup-exit-frame", true);

popupFrame:ClearAllPoints();
popupFrame:SetPoint("CENTER");
popupFrame:SetHeight( popupFrame:GetTop() - popupFrame.LaterButton:GetBottom() + 45 );
popupFrame:SetHeight(180 + popupFrame.Description:GetHeight() + popupFrame.Title:GetHeight());
popupFrame:Show();
end
end
Expand Down
8 changes: 6 additions & 2 deletions Interface/GlueXML/CharacterServices.lua
Expand Up @@ -925,14 +925,18 @@ function CharacterUpgradeCharacterSelectBlock:ShouldShowPopup()
local seenPopupBefore = self.seenPopup;
self.seenPopup = true;
local isTrialBoost = select(22, GetCharacterInfo(self.charid));
return not isTrialBoost and raceData.isAlliedRace and not raceData.heritageArmorUnlocked and not seenPopupBefore;
return not isTrialBoost and raceData.isAlliedRace and not raceData.hasHeritageArmor and not seenPopupBefore;
end

function CharacterUpgradeCharacterSelectBlock:GetPopupText()
local _, _, raceFilename, _, _, _, _, _, _, _, _, _, _, _, _, _, _, gender = GetCharacterInfo(self.charid);
local raceData = C_CharacterCreation.GetRaceDataByID(RACE_NAME_BUTTON_ID_MAP[strupper(raceFilename)]);

return formatDescription(BOOST_ALLIED_RACE_HERITAGE_ARMOR_WARNING:format(raceData.name), gender+1);
if GetCurrentRegionName() == "CN" then
return formatDescription(BOOST_ALLIED_RACE_HERITAGE_ARMOR_WARNING_CN:format(raceData.name), gender+1);
else
return formatDescription(BOOST_ALLIED_RACE_HERITAGE_ARMOR_WARNING:format(raceData.name), gender+1);
end
end

function CharacterUpgradeCharacterSelectBlock:IsFinished()
Expand Down

0 comments on commit 53c9d32

Please sign in to comment.