Commit 29a79907 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-27026patch8.0.1_Beta

parent c3621664
......@@ -313,15 +313,21 @@ function WardrobeTransmogFrame_UpdateWeaponModel(slot)
local existingCategoryID = C_TransmogCollection.GetAppearanceSourceInfo(existingAppearanceSourceID);
if ( WardrobeUtils_IsCategoryRanged(categoryID) or WardrobeUtils_IsCategoryRanged(existingCategoryID) ) then
slot = nil;
elseif ( WardrobeUtils_IsCategoryLegionArtifact(categoryID) or WardrobeUtils_IsCategoryLegionArtifact(existingCategoryID) ) then
slot = nil;
end
WardrobeTransmogFrame.Model:TryOn(appearanceSourceID, slot, illusionSourceID);
end
end
else
WardrobeTransmogFrame.Model:UndressSlot(slotID);
end
end
function WardrobeTransmogFrame_GetDisplayedSource(slotButton)
local baseSourceID, baseVisualID, appliedSourceID, appliedVisualID, pendingSourceID, pendingVisualID, hasPendingUndo = C_Transmog.GetSlotVisualInfo(GetInventorySlotInfo(slotButton.slot), slotButton.transmogType);
if ( pendingSourceID ~= REMOVE_TRANSMOG_ID ) then
local baseSourceID, baseVisualID, appliedSourceID, appliedVisualID, pendingSourceID, pendingVisualID, hasPendingUndo, hideVisual = C_Transmog.GetSlotVisualInfo(GetInventorySlotInfo(slotButton.slot), slotButton.transmogType);
if ( hideVisual ) then
return 0;
elseif ( pendingSourceID ~= REMOVE_TRANSMOG_ID ) then
return pendingSourceID;
elseif ( hasPendingUndo or appliedSourceID == NO_TRANSMOG_SOURCE_ID ) then
return baseSourceID;
......@@ -1206,6 +1212,10 @@ function WardrobeUtils_IsCategoryRanged(category)
return (category == LE_TRANSMOG_COLLECTION_TYPE_BOW) or (category == LE_TRANSMOG_COLLECTION_TYPE_GUN) or (category == LE_TRANSMOG_COLLECTION_TYPE_CROSSBOW);
end
function WardrobeUtils_IsCategoryLegionArtifact(category)
return (category == LE_TRANSMOG_COLLECTION_TYPE_PAIRED);
end
function WardrobeUtils_GetArmorCategoryIDFromSlot(slot)
for i = 1, #TRANSMOG_SLOTS do
if ( TRANSMOG_SLOTS[i].slot == slot ) then
......
......@@ -41,6 +41,9 @@ do
{
Horde =
{
portraitOffsetX = -27,
portraitOffsetY = 31,
closeButtonBorder = "talenttree-horde-exit",
Top = "_talenttree-horde-tiletop",
......@@ -58,6 +61,9 @@ do
Alliance =
{
portraitOffsetX = -22,
portraitOffsetY = 11,
closeButtonBorder = "talenttree-alliance-exit",
Top = "_talenttree-alliance-tiletop",
......@@ -85,36 +91,37 @@ do
self.BotTalentLeftCorner:SetAtlas(styleData.BotLeft, true);
self.BotTalentRightCorner:SetAtlas(styleData.BotRight, true);
self.CornerLogo:SetAtlas(styleData.Portrait, true);
self.CornerLogo:SetPoint("TOPLEFT", self.TopTalentLeftCorner, "TOPLEFT", styleData.portraitOffsetX, styleData.portraitOffsetY);
self.Background:SetAtlas(styleData.Background, true);
self.Background:ClearAllPoints();
self.Background:SetPoint("CENTER", self);
self.CurrencyBG:SetAtlas(styleData.CurrencyBG, true);
self:GetParent().CurrencyIcon:ClearAllPoints();
self:GetParent().CurrencyIcon:SetPoint("CENTER", self.CurrencyBG, "CENTER", 20, -1);
self:GetParent().CurrencyIcon:SetSize(17,16);
self:GetParent().CloseButton:ClearAllPoints();
self:GetParent().CloseButton:SetPoint("TOPRIGHT", self, "TOPRIGHT", 3, 3);
self:GetParent().CloseButton:SetPoint("TOPRIGHT", self, "TOPRIGHT", 4, 4);
self:GetParent().CloseButton:SetFrameLevel(self:GetFrameLevel() + 5);
self.CloseButtonBorder:SetAtlas(styleData.closeButtonBorder, true);
self.CloseButtonBorder:ClearAllPoints();
self.CloseButtonBorder:SetPoint("CENTER", self:GetParent().CloseButton);
self:SetFrameLevel(self:GetParent():GetFrameLevel() -1);
end
function OrderHallTalentFrameMixin:SetUseStyleTextures(shouldUseStyleTextures)
if (not shouldUseStyleTextures) then
self:SetPortraitFrameShown(true);
if (not shouldUseStyleTextures) then
self:SetPortraitFrameShown(true);
return;
end
local factionGroup = UnitFactionGroup("player");
local styleData = bfaTalentFrameStyleData[factionGroup];
self:SetPortraitFrameShown(false);
self:SetPortraitFrameShown(false);
SetupBorder(self.StyleFrame, styleData);
self.StyleFrame:Show();
end
......@@ -145,7 +152,7 @@ function OrderHallTalentFrameMixin:OnLoad()
end
function OrderHallTalentFrameMixin:SetGarrisonType(garrType)
self.garrisonType = garrType;
self.garrisonType = garrType;
local primaryCurrency, _ = C_Garrison.GetCurrencyTypes(garrType);
self.currency = primaryCurrency;
end
......@@ -239,11 +246,11 @@ function OrderHallTalentFrameMixin:RefreshAllData()
self.refreshing = false;
return;
end
self.StyleFrame:Hide();
self:SetUseStyleTextures(isThemed);
if (isThemed) then
self.TitleText:Hide();
self.BackButton:Hide();
......@@ -255,7 +262,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
self.TitleText:SetText(titleText);
self.TitleText:Show();
self.BackButton:Hide();
else
else
self.TitleText:SetText(ORDER_HALL_TALENT_TITLE);
self.TitleText:Show();
self.BackButton:Hide();
......@@ -272,7 +279,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
self.portrait:SetTexture("INTERFACE\\ICONS\\crest_"..className);
end
end
local friendshipFactionID = C_Garrison.GetCurrentGarrTalentTreeFriendshipFactionID();
if (friendshipFactionID and friendshipFactionID > 0) then
NPCFriendshipStatusBar_Update(self, friendshipFactionID);
......@@ -363,12 +370,12 @@ function OrderHallTalentFrameMixin:RefreshAllData()
local displayHeight = height - distance;
self:SetHeight(displayHeight);
self.Background:SetHeight(bgheight - distance);
self.StyleFrame.Background:SetHeight(displayHeight);
self.StyleFrame:SetHeight(displayHeight);
self.StyleFrame.Background:SetHeight(displayHeight);
self.StyleFrame:SetHeight(displayHeight);
self.LeftInset:ClearAllPoints();
self.LeftInset:SetHeight(insetheight - distance);
self.LeftInset:SetPoint("CENTER", self.Background, 0, 0);
local completeTalent = C_Garrison.GetCompleteTalent(self.garrisonType);
-- position talent buttons
......@@ -382,7 +389,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
local yOffset = borderY - (buttonSpacingY + buttonSizeY) * (talent.tier);
talentFrame.talent = talent;
if (talent.isBeingResearched and not talent.hasInstantResearch) then
talentFrame.Cooldown:SetCooldownUNIX(talent.researchStartTime, talent.researchDuration);
talentFrame.Cooldown:Show();
......@@ -407,12 +414,12 @@ function OrderHallTalentFrameMixin:RefreshAllData()
talentFrame.Border:SetAtlas("orderhalltalents-spellborder-yellow");
else
local isAvailable = talent.talentAvailability == LE_GARRISON_TALENT_AVAILABILITY_AVAILABLE;
-- We check for LE_GARRISON_TALENT_AVAILABILITY_UNAVAILABLE_ALREADY_HAVE to avoid a bug with
-- the Chromie UI (talents would flash grey when you switched to another talent in the same row).
local canDisplayAsAvailable = talent.talentAvailability == LE_GARRISON_TALENT_AVAILABILITY_UNAVAILABLE_ANOTHER_IS_RESEARCHING or talent.talentAvailability == LE_GARRISON_TALENT_AVAILABILITY_UNAVAILABLE_ALREADY_HAVE;
local shouldDisplayAsAvailable = canDisplayAsAvailable and talent.hasInstantResearch;
-- Show as available: this is a new tier which you don't have any talents from or and old tier that you could change.
-- Note: For instant talents, to support the Chromie UI, we display as available even when another talent is researching (Jeff wants it this way).
if (isAvailable or shouldDisplayAsAvailable) then
......@@ -423,7 +430,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
else
talentFrame.Border:SetAtlas("orderhalltalents-spellborder-green");
end
-- Show as unavailable: You have not unlocked this tier yet or you have unlocked it but another research is already in progress.
else
talentFrame.Border:SetAtlas("orderhalltalents-spellborder");
......@@ -432,7 +439,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
end
talentFrame:SetPoint("TOPLEFT", xOffset, yOffset);
talentFrame:Show();
if (talent.id == completeTalent) then
if (talent.selected and not talent.hasInstantResearch) then
PlaySound(SOUNDKIT.UI_ORDERHALL_TALENT_READY_CHECK);
......@@ -476,14 +483,14 @@ function GarrisonTalentButtonMixin:OnEnter()
GameTooltip:AddLine(NORMAL_FONT_COLOR_CODE..TIME_REMAINING..FONT_COLOR_CODE_CLOSE.." "..SecondsToTime(talent.researchTimeRemaining), 1, 1, 1);
elseif not talent.selected then
GameTooltip:AddLine(" ");
if (talent.researchDuration and talent.researchDuration > 0) then
GameTooltip:AddLine(RESEARCH_TIME_LABEL.." "..HIGHLIGHT_FONT_COLOR_CODE..SecondsToTime(talent.researchDuration)..FONT_COLOR_CODE_CLOSE);
end
if ((talent.researchCost and talent.researchCost > 0 and talent.researchCurrency) or (talent.researchGoldCost and talent.researchGoldCost > 0)) then
local str = NORMAL_FONT_COLOR_CODE..COSTS_LABEL..FONT_COLOR_CODE_CLOSE;
if (talent.researchCost and talent.researchCurrency) then
local _, _, currencyTexture = GetCurrencyInfo(talent.researchCurrency);
str = str.." "..BreakUpLargeNumbers(talent.researchCost).."|T"..currencyTexture..":0:0:2:0|t";
......
......@@ -211,30 +211,30 @@
<Frame parentKey="StyleFrame" hidden="true">
<Size x="336" y="566"/>
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="BORDER" textureSubLevel="2">
<Texture parentKey="TopTalentLeftCorner" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" x="-4" y="4" />
<Anchor point="TOPLEFT" x="-7" y="7" />
</Anchors>
</Texture>
<Texture parentKey="TopTalentRightCorner" useAtlasSize="true">
<Anchors>
<Anchor point="TOPRIGHT" x="4" y="4"/>
<Anchor point="TOPRIGHT" x="7" y="7"/>
</Anchors>
<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
</Texture>
<Texture parentKey="BotTalentLeftCorner" useAtlasSize="true">
<Anchors>
<Anchor point="BOTTOMLEFT" x="-4" y="-4"/>
<Anchor point="BOTTOMLEFT" x="-7" y="-7"/>
</Anchors>
<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
</Texture>
<Texture parentKey="BotTalentRightCorner" useAtlasSize="true">
<Anchors>
<Anchor point="BOTTOMRIGHT" x="4" y="-4"/>
<Anchor point="BOTTOMRIGHT" x="7" y="-7"/>
</Anchors>
<TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
</Texture>
......@@ -242,38 +242,38 @@
<Layer level="ARTWORK">
<Texture parentKey="CornerLogo" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent.TopTalentLeftCorner" x="-25" y="10"/>
<Anchor point="TOPLEFT" relativeKey="$parent.TopTalentLeftCorner" x="0" y="0"/>
</Anchors>
</Texture>
<Texture parentKey="CloseButtonBorder" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.CloseButton"/>
<Anchor point="CENTER" relativeKey="$parent.CloseButton" x="0" y="1"/>
</Anchors>
</Texture>
</Layer>
<Layer level="BACKGROUND" textureSubLevel="1">
<Texture parentKey="Top" horizTile="true" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" y="4"/>
<Anchor point="TOPRIGHT"/>
<Anchor point="TOPLEFT" relativeKey="$parent.TopTalentLeftCorner" relativePoint="TOPRIGHT"/>
<Anchor point="TOPRIGHT" relativeKey="$parent.TopTalentRightCorner" relativePoint="TOPLEFT"/>
</Anchors>
</Texture>
<Texture parentKey="Bottom" horizTile="true" useAtlasSize="true">
<Anchors>
<Anchor point="BOTTOMLEFT" y="-4"/>
<Anchor point="BOTTOMRIGHT"/>
<Anchor point="BOTTOMLEFT" relativeKey="$parent.BotTalentLeftCorner" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.BotTalentRightCorner" relativePoint="BOTTOMLEFT"/>
</Anchors>
</Texture>
<Texture parentKey="Left" vertTile="true" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" x="-4"/>
<Anchor point="BOTTOMLEFT" />
<Anchor point="TOPLEFT" relativeKey="$parent.TopTalentLeftCorner" relativePoint="BOTTOMLEFT"/>
<Anchor point="BOTTOMLEFT" relativeKey="$parent.BotTalentLeftCorner" relativePoint="TOPLEFT"/>
</Anchors>
</Texture>
<Texture parentKey="Right" vertTile="true" useAtlasSize="true">
<Anchors>
<Anchor point="TOPRIGHT" x="4"/>
<Anchor point="BOTTOMRIGHT" />
<Anchor point="TOPRIGHT" relativeKey="$parent.TopTalentRightCorner" relativePoint="BOTTOMRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeKey="$parent.BotTalentRightCorner" relativePoint="TOPRIGHT"/>
</Anchors>
</Texture>
<Texture parentKey="CurrencyBG" useAtlasSize="true">
......@@ -285,9 +285,9 @@
<Layer level="BACKGROUND">
<Texture parentKey="Background">
<Anchors>
<Anchor point="CENTER"/>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Texture>
</Layer>
</Layers>
</Frame>
......
......@@ -82,8 +82,9 @@ function VoiceChatHeadsetButtonMixin:ClearPendingState()
end
function VoiceChatHeadsetButtonMixin:OnVoiceChatPendingChannelJoinState(channelType, clubId, streamId, pendingState)
-- pass in false for the voiceChannelID so it never matches with voice chat channels that are not created yet
if self:VoiceChannelMatches(false, channelType, clubId, streamId) then
-- pass in false for the voiceChannelID so it never matches with voice chat channels that are not created yet.
-- A channelType of None indicates login failed, so clear all pending states in that case
if self:VoiceChannelMatches(false, channelType, clubId, streamId) or (channelType == Enum.ChatChannelType.None) then
self:GetParent():SetPendingState(pendingState);
end
end
......@@ -98,6 +99,7 @@ function VoiceChatHeadsetButtonMixin:ToggleActivateChannel()
C_VoiceChat.ActivateChannel(voiceChannel.channelID);
end
elseif self:IsCommunityChannel() then
self:GetParent():SetPendingState(true);
ChannelFrame:TryJoinCommunityStreamChannel(self.clubId, self.streamId);
end
......
......@@ -388,6 +388,7 @@ function WorldMapBountyBoardMixin:OnEnter()
elseif self.lockedType == WORLD_MAP_BOUNTY_BOARD_LOCK_TYPE_NO_BOUNTIES then
self:ShowLockedByNoBountiesTooltip(nil);
end
self.UpdateTooltip = self.OnEnter;
end
function WorldMapBountyBoardMixin:OnLeave()
......@@ -400,6 +401,7 @@ function WorldMapBountyBoardMixin:OnTabEnter(tab)
else
self:ShowBountyTooltip(tab.bountyIndex);
end
self.UpdateTooltip = function() self:OnTabEnter(tab) end;
end
function WorldMapBountyBoardMixin:OnTabLeave(tab)
......@@ -408,12 +410,13 @@ end
function WorldMapBountyBoardMixin:OnTabClick(tab)
if not tab.isEmpty then
if self:GetSelectedBountyIndex() ~= tab.bountyIndex then
local isNewTab = self:GetSelectedBountyIndex() ~= tab.bountyIndex;
if isNewTab then
self:InvalidateMapCache();
end
PlaySound(SOUNDKIT.UI_WORLDQUEST_MAP_SELECT);
self:SetSelectedBountyIndex(tab.bountyIndex);
self:SetNextMapForSelectedBounty();
self:SetNextMapForSelectedBounty(isNewTab);
end
end
......@@ -451,7 +454,7 @@ function WorldMapBountyBoardMixin:CacheMapsForSelectionBounty()
table.sort(self.cachedMapInfo, function(left, right) return right.count < left.count end);
end
function WorldMapBountyBoardMixin:SetNextMapForSelectedBounty()
function WorldMapBountyBoardMixin:SetNextMapForSelectedBounty(isNewTab)
self:CacheMapsForSelectionBounty();
if #self.cachedMapInfo == 0 then
......@@ -462,6 +465,11 @@ function WorldMapBountyBoardMixin:SetNextMapForSelectedBounty()
local mapID = self:GetMapID();
for i, cachedMapInfo in ipairs(self.cachedMapInfo) do
if mapID == cachedMapInfo.mapID then
if isNewTab then
-- if we just selected this tab and the map matches a quest then stay here until the next click
mapIndex = i;
break;
end
-- we want the next map after the current one
mapIndex = i + 1;
break;
......
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