Commit f58205a2 authored by TOM_RUS's avatar TOM_RUS

WOW-33084patch8.3.0_PTR

parent 40478f0c
......@@ -10,6 +10,10 @@ local ItemInteractionUI =
Name = "ClearPendingItem",
Type = "Function",
},
{
Name = "CloseUI",
Type = "Function",
},
{
Name = "GetItemInteractionInfo",
Type = "Function",
......
......@@ -146,6 +146,10 @@ function AlliedRacesBulletFrameMixin:SetUp(achievementID, criteriaIndex, objecti
local BULLET_SPACING = 14;
local TEXT_ANCHOR_POINT_X = 27; -- from XML
local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(achievementID, criteriaIndex);
local _, _, _, achievementCompleted = GetAchievementInfo(achievementID);
completed = completed or achievementCompleted;
if (criteriaString and criteriaString ~= "") then
self.achievementID = achievementID;
self.criteriaIndex = criteriaIndex;
......@@ -177,19 +181,22 @@ end
function AlliedRacesBulletFrameMixin:OnEnter()
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
local criteriaString, criteriaType, criteriaCompleted, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(self.achievementID, self.criteriaIndex);
local achievementID = self.achievementID;
local _, _, _, overallAchievementCompleted = GetAchievementInfo(achievementID);
local criteriaAchievementCompleted, month, day, year;
if criteriaCompleted then
if criteriaCompleted or overallAchievementCompleted then
-- check if the criteria is an achievement to use its completion date, otherwise try main achievement in case it's all complete
local achievementID = self.achievementID;
if AchievementUtil.IsCriteriaAchievementEarned(self.achievementID, self.criteriaIndex) then
achievementID = assetID;
_, _, _, criteriaAchievementCompleted, month, day, year = GetAchievementInfo(achievementID); --Grab the criteria completed info if we have earned it.
end
local id, name, points, achievementCompleted, month, day, year = GetAchievementInfo(achievementID);
if achievementCompleted then
if (criteriaAchieveCompleted) then
local completionDate = FormatShortDate(day, month, year);
GameTooltip_AddColoredLine(GameTooltip, CRITERIA_COMPLETED_DATE:format(completionDate), HIGHLIGHT_FONT_COLOR);
else
GameTooltip_AddColoredLine(GameTooltip, CRITERIA_COMPLETED, HIGHLIGHT_FONT_COLOR);
else
GameTooltip_AddColoredLine(GameTooltip, CRITERIA_COMPLETED, HIGHLIGHT_FONT_COLOR);
end
else
GameTooltip_SetTitle(GameTooltip, CRITERIA_NOT_COMPLETED, DISABLED_FONT_COLOR);
......
......@@ -404,6 +404,12 @@ function AuctionHouseSellFrameMixin:SetItem(itemLocation, fromItemDisplay)
local showQuantity = self:GetMaxQuantity() > 1;
self.QuantityInput:SetShown(showQuantity);
-- Hack fix for a spacing problem: Without this line, the edit box would be scrolled to
-- the left and the text would not be visible. This seems to be a problem with setting
-- the text on the edit box and showing it in the same frame.
self.QuantityInput.InputBox:SetCursorPosition(0);
self:MarkDirty();
self:UpdateFocusTabbing();
......
......@@ -141,10 +141,10 @@
</Texture>
<FontString parentKey="Text" inherits="Number14FontWhite" justifyH="LEFT" maxLines="1">
<Size x="0" y="1"/>
<Anchors>
<Anchor point="TOP"/>
<Anchor point="LEFT" relativeKey="$parent.Icon" relativePoint="RIGHT" x="4" y="-1"/>
<Anchor point="BOTTOMRIGHT"/>
<Anchor point="RIGHT" x="1"/>
</Anchors>
</FontString>
</Layer>
......
......@@ -228,15 +228,8 @@ function WardrobeTransmogFrame_UpdateSlotButton(slotButton)
local correspondingWeaponButton = WardrobeTransmogFrame_GetSlotButton(slotButton.slotID, LE_TRANSMOG_TYPE_APPEARANCE);
local sourceID = WardrobeTransmogFrame_GetDisplayedSource(correspondingWeaponButton);
if ( sourceID ~= NO_TRANSMOG_SOURCE_ID and not WardrobeCollectionFrame_CanEnchantSource(sourceID) ) then
local illusionSourceID = WardrobeTransmogFrame_GetDisplayedSource(slotButton);
if( illusionSourceID ~= REMOVE_TRANSMOG_ID ) then
if ( hasPending or hasUndo ) then
-- clear anything in the enchant slot, otherwise cost and Apply button state will still reflect anything pending
C_Transmog.ClearPending(slotButton.slotID, slotButton.transmogType);
else
C_Transmog.SetPending(slotButton.slotID, slotButton.transmogType, REMOVE_TRANSMOG_ID);
end
end
-- clear anything in the enchant slot, otherwise cost and Apply button state will still reflect anything pending
C_Transmog.SetPending(slotButton.slotID, slotButton.transmogType, REMOVE_TRANSMOG_ID);
isTransmogrified = false; -- handle legacy, this weapon could have had an illusion applied previously
canTransmogrify = false;
slotButton.invalidWeapon = true;
......
......@@ -107,8 +107,7 @@ function ItemInteractionMixin:OnHide()
FrameUtil.UnregisterFrameForEvents(self, ITEM_INTERACTION_UNIT_EVENTS);
CloseAllBags(self);
C_ItemInteraction.ClearPendingItem();
C_ItemInteraction.Reset();
C_ItemInteraction.CloseUI();
-- Greys out the items in your bag that don't match. If you need to add a new item interaction frame
-- Add a new type to ItemUtil.lua ItemButtonUtil.ItemContextEnum
......
......@@ -858,6 +858,7 @@ function ScenarioStage_CustomizeBlock(stageBlock, scenarioType, widgetSetID, tex
stageBlock.Stage:SetHeight(34);
stageBlock.NormalBG:Hide();
else
stageBlock.NormalBG:Show();
ScenarioStageBlock.CompleteLabel:SetPoint("LEFT", stageBlock, "LEFT", 15, 3);
if textureKitID then
......
......@@ -12,7 +12,8 @@ function GameMenuFrame_UpdateVisibleButtons(self)
local buttonToReanchor = GameMenuButtonWhatsNew;
local reanchorYOffset = -1;
if (not SplashFrameCanBeShown() or IsCharacterNewlyBoosted()) then
local forceShowSplash = true; -- not actually true, if there's no tag, then this won't be shown.
if not SplashFrame_GetShowTag(forceShowSplash) then
GameMenuButtonWhatsNew:Hide();
height = height - 20;
buttonToReanchor = GameMenuButtonOptions;
......
......@@ -42,7 +42,7 @@ SPLASH_SCREENS = {
},
},
["8_3_NEW_SEASON"] = {
id = SEASON_SPLASH_SCREEN_VERSION, -- 8.3 New season rollout.
id = SEASON_SPLASH_SCREEN_VERSION, -- 8.3 New season rollout.
expansion = LE_EXPANSION_BATTLE_FOR_AZEROTH,
header = SPLASH_NEW_HEADER_SEASON,
leftTex = "splash-8302-topleft",
......@@ -150,17 +150,15 @@ local function ShouldEnableStartButton( questID )
end
local function CheckSplashScreenShow()
if SplashFrameCanBeShown() and not IsCharacterNewlyBoosted() then
local shouldForceCurrent = false;
local tag = GetSplashFrameTag(shouldForceCurrent);
if tag then
-- check if they've seen this screen already
local lastScreenID = tonumber(GetCVar(SPLASH_SCREENS[tag].cVar)) or 0;
if lastScreenID < SPLASH_SCREENS[tag].id then
SplashFrame_Open(tag, shouldForceCurrent);
SplashFrame.firstTimeViewed = true;
SetCVar(SPLASH_SCREENS[tag].cVar, SPLASH_SCREENS[tag].id); -- update cVar value
end
local shouldForceCurrent = false;
local tag = SplashFrame_GetShowTag(shouldForceCurrent);
if tag then
-- check if they've seen this screen already
local lastScreenID = tonumber(GetCVar(SPLASH_SCREENS[tag].cVar)) or 0;
if lastScreenID < SPLASH_SCREENS[tag].id then
SplashFrame_Open(tag, shouldForceCurrent);
SplashFrame.firstTimeViewed = true;
SetCVar(SPLASH_SCREENS[tag].cVar, SPLASH_SCREENS[tag].id); -- update cVar value
end
end
......@@ -180,6 +178,14 @@ local function ApplyFactionOverrides()
end
end
function SplashFrame_GetShowTag(forceShow)
if SplashFrameCanBeShown() and not IsCharacterNewlyBoosted() then
return GetSplashFrameTag(forceShow);
end
return nil;
end
function SplashFrame_ShowCurrent()
local shouldForceCurrent = true;
tag = GetSplashFrameTag(shouldForceCurrent);
......
......@@ -15,16 +15,20 @@ function DropDownMenuButtonMixin:OnLeave(...)
end
function DropDownMenuButtonMixin:OnMouseDown(button)
ToggleDropDownMenu(nil, nil, self:GetParent());
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
if self:IsEnabled() then
ToggleDropDownMenu(nil, nil, self:GetParent());
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
end
end
LargeDropDownMenuButtonMixin = CreateFromMixins(DropDownMenuButtonMixin);
function LargeDropDownMenuButtonMixin:OnMouseDown(button)
local parent = self:GetParent();
ToggleDropDownMenu(nil, nil, parent, parent, -8, 8);
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
if self:IsEnabled() then
local parent = self:GetParent();
ToggleDropDownMenu(nil, nil, parent, parent, -8, 8);
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
end
end
DropDownExpandArrowMixin = {};
......@@ -43,7 +47,9 @@ function DropDownExpandArrowMixin:OnEnter()
end
function DropDownExpandArrowMixin:OnMouseDown(button)
ToggleDropDownMenu(self:GetParent():GetParent():GetID() + 1, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
if self:IsEnabled() then
ToggleDropDownMenu(self:GetParent():GetParent():GetID() + 1, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
end
end
UIDropDownCustomMenuEntryMixin = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment