Commit 610688c2 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-28938patch8.1.5_PTR

parent e3a6ae1a
......@@ -125,6 +125,7 @@ SummonInfoDocumentation.lua
SystemDocumentation.lua
TalkingHeadDocumentation.lua
TaxiMapDocumentation.lua
TextureUtilsDocumentation.lua
ToyBoxInfoDocumentation.lua
TradeInfoDocumentation.lua
TradeSkillUIDocumentation.lua
......
......@@ -164,7 +164,7 @@ local GuildInfo =
{ Name = "emblemColorR", Type = "number", Nilable = true },
{ Name = "emblemColorG", Type = "number", Nilable = true },
{ Name = "emblemColorB", Type = "number", Nilable = true },
{ Name = "emblemFilename", Type = "string", Nilable = true },
{ Name = "emblemFileID", Type = "number", Nilable = true },
},
},
{
......
......@@ -20,6 +20,20 @@ local MerchantFrame =
{ Name = "buybackItemID", Type = "number", Nilable = false },
},
},
{
Name = "IsMerchantItemRefundable",
Type = "Function",
Arguments =
{
{ Name = "index", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "refundable", Type = "bool", Nilable = false },
},
},
},
Events =
......
......@@ -21,20 +21,34 @@ local ReportSystem =
},
},
{
Name = "ReportPlayer",
Name = "InitiateReportPlayer",
Type = "Function",
Arguments =
{
{ Name = "complaintType", Type = "string", Nilable = false },
{ Name = "playerLocation", Type = "table", Mixin = "PlayerLocationMixin", Nilable = true },
{ Name = "comment", Type = "string", Nilable = true },
},
Returns =
{
{ Name = "token", Type = "number", Nilable = false },
},
},
{
Name = "ReportServerLag",
Type = "Function",
},
{
Name = "SendReportPlayer",
Type = "Function",
Arguments =
{
{ Name = "token", Type = "number", Nilable = false },
{ Name = "comment", Type = "string", Nilable = true },
},
},
{
Name = "SetPendingReportPetTarget",
Type = "Function",
......
local TextureUtils =
{
Name = "TextureUtils",
Type = "System",
Namespace = "C_Texture",
Functions =
{
{
Name = "GetAtlasInfo",
Type = "Function",
Arguments =
{
{ Name = "atlas", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "info", Type = "AtlasInfo", Nilable = false },
},
},
},
Events =
{
},
Tables =
{
{
Name = "AtlasInfo",
Type = "Structure",
Fields =
{
{ Name = "width", Type = "number", Nilable = false },
{ Name = "height", Type = "number", Nilable = false },
{ Name = "leftTexCoord", Type = "number", Nilable = false },
{ Name = "rightTexCoord", Type = "number", Nilable = false },
{ Name = "topTexCoord", Type = "number", Nilable = false },
{ Name = "bottomTexCoord", Type = "number", Nilable = false },
{ Name = "tilesHorizontally", Type = "bool", Nilable = false },
{ Name = "tilesVertically", Type = "bool", Nilable = false },
{ Name = "file", Type = "number", Nilable = true },
{ Name = "filename", Type = "string", Nilable = true },
},
},
},
};
APIDocumentation:AddDocumentationTable(TextureUtils);
\ No newline at end of file
......@@ -336,9 +336,9 @@ local UIWidgetManager =
{
Name = "StatusBarValueTextType",
Type = "Enumeration",
NumValues = 6,
NumValues = 7,
MinValue = 0,
MaxValue = 5,
MaxValue = 6,
Fields =
{
{ Name = "Hidden", Type = "StatusBarValueTextType", EnumValue = 0 },
......@@ -347,6 +347,19 @@ local UIWidgetManager =
{ Name = "Time", Type = "StatusBarValueTextType", EnumValue = 3 },
{ Name = "TimeShowOneLevelOnly", Type = "StatusBarValueTextType", EnumValue = 4 },
{ Name = "ValueOverMax", Type = "StatusBarValueTextType", EnumValue = 5 },
{ Name = "ValueOverMaxNormalized", Type = "StatusBarValueTextType", EnumValue = 6 },
},
},
{
Name = "WidgetCurrencyClass",
Type = "Enumeration",
NumValues = 2,
MinValue = 0,
MaxValue = 1,
Fields =
{
{ Name = "Currency", Type = "WidgetCurrencyClass", EnumValue = 0 },
{ Name = "Item", Type = "WidgetCurrencyClass", EnumValue = 1 },
},
},
{
......
......@@ -211,6 +211,20 @@ local Unit =
{ Name = "sex", Type = "number", Nilable = true },
},
},
{
Name = "UnitWidgetSet",
Type = "Function",
Arguments =
{
{ Name = "unit", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "uiWidgetSet", Type = "number", Nilable = false },
},
},
},
Events =
......
......@@ -116,7 +116,7 @@ function AdventureMapQuestChoiceDialogMixin:RefreshRewards()
for itemIndex = 1, GetNumQuestLogRewards(self.questID) do
local name, texture, count, quality, isUsable = GetQuestLogRewardInfo(itemIndex, self.questID);
self:AddReward(name, texture, nil, count, "GameFontHighlightSmall");
end
end
local money = GetQuestLogRewardMoney(self.questID);
if money > 0 then
......@@ -131,7 +131,8 @@ function AdventureMapQuestChoiceDialogMixin:RefreshRewards()
else
self.Rewards:Show();
self.RewardsHeader:Show();
local _, _, height = GetAtlasInfo("AdventureMapQuest-RewardsPanel");
local info = C_Texture.GetAtlasInfo("AdventureMapQuest-RewardsPanel");
local height = info and info.height or 1; -- prevent divide by 0
self.rewardsHeight = math.min(math.ceil(numActiveRewardFrames / 2) * (REWARD_FRAME_HEIGHT + REWARD_FRAME_PADDING) + 53, height);
self.Rewards:SetHeight(self.rewardsHeight);
self.Rewards:SetTexCoord(0, 1, 0, self.rewardsHeight / height);
......@@ -177,7 +178,7 @@ function AdventureMapQuestChoiceDialogMixin:RefreshDetails()
self.Details.Child.TitleHeader:SetText(questTitle);
self.Details.Child.DescriptionText:SetText(descriptionText);
self.Details.Child.ObjectivesText:SetText(objectiveText);
local height = 45;
for i, element in ipairs(self.Details.Child.Elements) do
height = height + element:GetHeight();
......
......@@ -45,7 +45,7 @@ function AdventureMap_QuestOfferDataProviderMixin:RefreshAllData(fromOnShow)
local mapAreaID = self:GetMap():GetMapID();
for offerIndex = 1, C_AdventureMap.GetNumQuestOffers() do
local questID, isTrivial, frequency, isLegendary, title, description, normalizedX, normalizedY, insetIndex = C_AdventureMap.GetQuestOfferInfo(offerIndex);
if AdventureMap_IsQuestValid(mapAreaID, questID, normalizedX, normalizedY) and not AdventureMap_IsPositionBlockedByZoneChoice(mapAreaID, normalizedX, normalizedY, insetIndex) then
if AdventureMap_IsQuestValid(questID, normalizedX, normalizedY) and not AdventureMap_IsPositionBlockedByZoneChoice(mapAreaID, normalizedX, normalizedY, insetIndex) then
self:AddQuest(questID, isTrivial, frequency, isLegendary, title, description, normalizedX, normalizedY, insetIndex);
end
end
......
......@@ -25,12 +25,14 @@ function AdventureMapInsetMixin:Initialize(mapCanvas, collapsed, insetIndex, map
self.CollapsedFrame:SetAlpha(self.collapsed and 1.0 or 0.0);
self.ExpandedFrame:SetShown(not self.collapsed);
self.CollapsedFrame:SetShown(self.collapsed);
local _, collapsedIconWidth, collapsedIconHeight = GetAtlasInfo(collapsedIcon);
self.CollapsedFrame.Text:SetText(string.upper(title));
self.CollapsedFrame.TextBackground:SetWidth(self.CollapsedFrame.Text:GetWidth() + 15);
self.CollapsedFrame.Icon:SetAtlas(collapsedIcon, true);
self.CollapsedFrame:SetSize(collapsedIconWidth or 0, collapsedIconHeight or 0);
local collapsedInfo = C_Texture.GetAtlasInfo(collapsedIcon);
local collapsedIconWidth = collapsedInfo and collapsedInfo.width or 0;
local collapsedIconHeight = collapsedInfo and collapsedInfo.height or 0;
self.CollapsedFrame:SetSize(collapsedIconWidth, collapsedIconHeight);
self.normalizedX = normalizedX;
self.normalizedY = normalizedY;
......@@ -99,7 +101,7 @@ function AdventureMapInsetMixin:SyncAnimation()
self.CollapseExpandAnim.ExpandedFrameAnim:SetFromAlpha(self.ExpandedFrame:GetAlpha());
self.CollapseExpandAnim.CollapsedFrameAnim:SetFromAlpha(self.CollapsedFrame:GetAlpha());
if self.collapsed then
self.CollapseExpandAnim.ExpandedFrameAnim:SetToAlpha(0.0);
self.CollapseExpandAnim.CollapsedFrameAnim:SetToAlpha(1.0);
......
......@@ -82,6 +82,10 @@ function Voice_GetGameErrorStringFromStatusCode(statusCode)
end
end
function Voice_IsConnectionError(statusCode)
return statusCode == Enum.VoiceChatStatusCode.ProxyConnectionTimeOut or statusCode == Enum.VoiceChatStatusCode.ProxyConnectionUnexpectedDisconnect;
end
local SUPPRESS_ALERT_MESSAGE = true;
local voiceChatStatusAlertBlacklist =
{
......
......@@ -995,7 +995,10 @@ function WardrobeItemsCollectionMixin:OnShow()
local needsUpdate = false; -- we don't need to update if we call WardrobeCollectionFrame_SetActiveSlot as that will do an update
if ( self.jumpToLatestCategoryID and self.jumpToLatestCategoryID ~= self.activeCategory ) then
local slot = WardrobeCollectionFrame_GetSlotFromCategoryID(self.jumpToLatestCategoryID);
self:SetActiveSlot(slot, LE_TRANSMOG_TYPE_APPEARANCE, self.jumpToLatestCategoryID);
-- The model got reset from OnShow, which restored all equipment.
-- But ChangeModelsSlot tries to be smart and only change the difference from the previous slot to the current slot, so some equipment will remain left on.
local ignorePreviousSlot = true;
self:SetActiveSlot(slot, LE_TRANSMOG_TYPE_APPEARANCE, self.jumpToLatestCategoryID, ignorePreviousSlot);
self.jumpToLatestCategoryID = nil;
elseif ( self.activeSlot ) then
-- redo the model for the active slot
......@@ -1293,8 +1296,8 @@ function WardrobeItemsCollectionMixin:IsValidWeaponCategoryForSlot(categoryID, s
return false;
end
function WardrobeItemsCollectionMixin:SetActiveSlot(slot, transmogType, category)
local previousSlot = self.activeSlot;
function WardrobeItemsCollectionMixin:SetActiveSlot(slot, transmogType, category, ignorePreviousSlot)
local previousSlot = ignorePreviousSlot and nil or self.activeSlot;
self.activeSlot = slot;
self.transmogType = transmogType;
......@@ -1951,7 +1954,7 @@ function WardrobeItemsModelMixin:OnMouseDown(button)
if ( transmogType == LE_TRANSMOG_TYPE_APPEARANCE ) then
local sourceID = self:GetParent():GetAnAppearanceSourceFromVisual(self.visualInfo.visualID, nil);
-- don't specify a slot for ranged weapons
if ( WardrobeUtils_IsCategoryRanged(self:GetParent():GetActiveCategory()) ) then
if ( WardrobeUtils_IsCategoryRanged(self:GetParent():GetActiveCategory()) or WardrobeUtils_IsCategoryLegionArtifact(self:GetParent():GetActiveCategory()) ) then
slot = nil;
end
DressUpVisual(sourceID, slot);
......
......@@ -6,4 +6,5 @@
## Version: 1.0
## LoadOnDemand: 0
Deprecated_8_1_0.lua
\ No newline at end of file
Deprecated_8_1_0.lua
Deprecated_8_1_5.lua
\ No newline at end of file
......@@ -131,8 +131,9 @@ do
-- Use C_FriendList.IsFriend instead. No longer accepts unit tokens.
IsCharacterFriend = C_FriendList.IsFriend;
-- Use C_FriendList.GetNumIngores instead
GetNumIngores = C_FriendList.GetNumIngores;
-- Use C_FriendList.GetNumIgnores instead
GetNumIgnores = C_FriendList.GetNumIgnores;
GetNumIngores = C_FriendList.GetNumIgnores;
-- Use C_FriendList.GetIgnoreName instead
GetIgnoreName = C_FriendList.GetIgnoreName;
......@@ -202,7 +203,10 @@ do
SetPendingReportTarget = C_ReportSystem.SetPendingReportTarget;
-- Moved to C_ReportSystem
C_ChatInfo.ReportPlayer = C_ReportSystem.ReportPlayer;
C_ChatInfo.ReportPlayer = function(complaintType, playerLocation, comment)
local reportToken = C_ReportSystem.InitiateReportPlayer(complaintType, playerLocation);
C_ReportSystem.SendReportPlayer(reportToken, comment);
end
C_ChatInfo.CanReportPlayer = C_ReportSystem.CanReportPlayer;
end
......@@ -251,6 +255,16 @@ do
end
end
-- Texture Utils
do
function GetAtlasInfo(atlas)
local info = C_Texture.GetAtlasInfo(atlas);
if info then
local file = info.filename or info.file;
return file, info.width, info.height, info.leftTexCoord, info.rightTexCoord, info.topTexCoord, info.bottomTexCoord, info.tilesHorizontally, info.tilesVertically;
end
end
end
-- Quest Choice
do
-- Use C_QuestChoice.GetQuestChoiceInfo instead
......
-- These are functions that were deprecated in 8.1.0, and will be removed in the next expansion.
-- Please upgrade to the updated APIs as soon as possible.
if not IsPublicBuild() then
return;
end
-- Tooltip Changes
do
-- Use GameTooltip instead.
WorldmapTooltip = GameTooltip;
end
\ No newline at end of file
......@@ -1685,6 +1685,23 @@ function EncounterJournal_SetTabEnabled(tab, enabled)
tab:SetEnabled(enabled);
tab:GetDisabledTexture():SetDesaturated(not enabled);
tab.unselected:SetDesaturated(not enabled);
if not enabled then
EncounterJournal_ValidateSelectedTab();
end
end
function EncounterJournal_ValidateSelectedTab()
local info = EncounterJournal.encounter.info;
local selectedTabButton = info[EJ_Tabs[info.tab].button];
if not selectedTabButton:IsEnabled() then
for index, data in ipairs(EJ_Tabs) do
local tabButton = info[data.button];
if tabButton:IsEnabled() then
EncounterJournal_SetTab(index);
break;
end
end
end
end
function EncounterJournal_SetLootButton(item)
......
......@@ -227,6 +227,12 @@
<BarColor r="1.0" g="0.7" b="0.0"/>
</StatusBar>
<Frame parentKey="WidgetContainer" hidden="true" scale="0.5">
<Anchors>
<Anchor point="TOP" relativeKey="$parent.castBar" relativePoint="BOTTOM"/>
</Anchors>
</Frame>
<Frame parentKey="BuffFrame" inherits="HorizontalLayoutFrame" mixin="NameplateBuffContainerMixin">
<Anchors>
<Anchor point="LEFT" relativeKey="$parent.healthBar" x="-1"/>
......
......@@ -485,6 +485,7 @@ function BonusObjectiveTracker_ShowRewardsTooltip(block)
end
GameTooltip:Show();
GameTooltip.recalculatePadding = true;
block.module.tooltipBlock = block;
end
......
......@@ -269,7 +269,7 @@ function OrderHallTalentFrameMixin:RefreshAllData()
if (uiTextureKit) then
self.Background:SetAtlas(uiTextureKit.."-background");
local atlas = uiTextureKit.."-logo";
if (GetAtlasInfo(atlas)) then
if (C_Texture.GetAtlasInfo(atlas)) then
PortraitFrameTemplate_SetPortraitAtlasRaw(self, atlas);
else
PortraitFrameTemplate_SetPortraitToUnit(self, "npc");
......
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