Commit d0a4cba6 authored by TOM_RUS's avatar TOM_RUS

WOW-32861patch8.3.0_PTR

parent b1584f7d
......@@ -52,15 +52,6 @@ local AuctionHouse =
{ Name = "canCancelAuction", Type = "bool", Nilable = false },
},
},
{
Name = "CanSetFavorite",
Type = "Function",
Returns =
{
{ Name = "canSetFavorite", Type = "bool", Nilable = false },
},
},
{
Name = "CancelAuction",
Type = "Function",
......@@ -92,6 +83,15 @@ local AuctionHouse =
{ Name = "quantity", Type = "number", Nilable = false },
},
},
{
Name = "FavoritesAreAvailable",
Type = "Function",
Returns =
{
{ Name = "favoritesAreAvailable", Type = "bool", Nilable = false },
},
},
{
Name = "GetAuctionItemSubClasses",
Type = "Function",
......@@ -557,6 +557,21 @@ local AuctionHouse =
{ Name = "timeLeft", Type = "number", Nilable = false },
},
},
{
Name = "GetTimeLeftBandInfo",
Type = "Function",
Arguments =
{
{ Name = "timeLeftBand", Type = "AuctionHouseTimeLeftBand", Nilable = false },
},
Returns =
{
{ Name = "timeLeftMinSeconds", Type = "number", Nilable = false },
{ Name = "timeLeftMaxSeconds", Type = "number", Nilable = false },
},
},
{
Name = "HasFavorites",
Type = "Function",
......@@ -621,6 +636,15 @@ local AuctionHouse =
{ Name = "hasFullOwnedAuctionResults", Type = "bool", Nilable = false },
},
},
{
Name = "HasMaxFavorites",
Type = "Function",
Returns =
{
{ Name = "hasMaxFavorites", Type = "bool", Nilable = false },
},
},
{
Name = "HasSearchResults",
Type = "Function",
......@@ -1242,7 +1266,8 @@ local AuctionHouse =
{ Name = "itemLink", Type = "string", Nilable = true },
{ Name = "status", Type = "AuctionStatus", Nilable = false },
{ Name = "quantity", Type = "number", Nilable = false },
{ Name = "timeLeftSeconds", Type = "number", Nilable = false },
{ Name = "timeLeftSeconds", Type = "number", Nilable = true },
{ Name = "timeLeft", Type = "AuctionHouseTimeLeftBand", Nilable = true },
{ Name = "bidAmount", Type = "number", Nilable = true },
{ Name = "buyoutAmount", Type = "number", Nilable = true },
{ Name = "bidder", Type = "string", Nilable = true },
......
......@@ -27,9 +27,9 @@ local CalendarConstants =
{
Name = "CalendarErrorType",
Type = "Enumeration",
NumValues = 47,
NumValues = 51,
MinValue = 0,
MaxValue = 46,
MaxValue = 50,
Fields =
{
{ Name = "CalendarErrorSuccess", Type = "CalendarErrorType", EnumValue = 0 },
......@@ -79,6 +79,10 @@ local CalendarConstants =
{ Name = "CalendarErrorInvalidDescription", Type = "CalendarErrorType", EnumValue = 44 },
{ Name = "CalendarErrorInvalidClub", Type = "CalendarErrorType", EnumValue = 45 },
{ Name = "CalendarErrorCreatorNotFound", Type = "CalendarErrorType", EnumValue = 46 },
{ Name = "CalendarErrorEventThrottled", Type = "CalendarErrorType", EnumValue = 47 },
{ Name = "CalendarErrorInviteThrottled", Type = "CalendarErrorType", EnumValue = 48 },
{ Name = "CalendarErrorInternal", Type = "CalendarErrorType", EnumValue = 49 },
{ Name = "CalendarErrorComplaintAdded", Type = "CalendarErrorType", EnumValue = 50 },
},
},
{
......@@ -156,13 +160,13 @@ local CalendarConstants =
Type = "Enumeration",
NumValues = 4,
MinValue = 0,
MaxValue = 3,
MaxValue = 2,
Fields =
{
{ Name = "Get", Type = "CalendarGetEventType", EnumValue = 0 },
{ Name = "Add", Type = "CalendarGetEventType", EnumValue = 1 },
{ Name = "Copy", Type = "CalendarGetEventType", EnumValue = 2 },
{ Name = "DefaultCalendarGetEventType", Type = "CalendarGetEventType", EnumValue = 3 },
{ Name = "DefaultCalendarGetEventType", Type = "CalendarGetEventType", EnumValue = 0 },
},
},
{
......
......@@ -442,6 +442,7 @@ local ClubFinder =
{ Name = "requestType", Type = "ClubFinderRequestType", Nilable = false },
{ Name = "playerName", Type = "string", Nilable = false },
{ Name = "forceAccept", Type = "bool", Nilable = false },
{ Name = "reported", Type = "bool", Nilable = true },
},
},
{
......@@ -686,13 +687,14 @@ local ClubFinder =
{
Name = "ClubFinderDisableReason",
Type = "Enumeration",
NumValues = 2,
NumValues = 3,
MinValue = 0,
MaxValue = 1,
MaxValue = 2,
Fields =
{
{ Name = "Muted", Type = "ClubFinderDisableReason", EnumValue = 0 },
{ Name = "Silenced", Type = "ClubFinderDisableReason", EnumValue = 1 },
{ Name = "VeteranTrial", Type = "ClubFinderDisableReason", EnumValue = 2 },
},
},
{
......
......@@ -351,6 +351,15 @@ local Item =
{ Name = "itemLocation", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
},
{
Name = "LockItemByGUID",
Type = "Function",
Arguments =
{
{ Name = "itemGUID", Type = "string", Nilable = false },
},
},
{
Name = "RequestLoadItemData",
Type = "Function",
......@@ -378,6 +387,15 @@ local Item =
{ Name = "itemLocation", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
},
{
Name = "UnlockItemByGUID",
Type = "Function",
Arguments =
{
{ Name = "itemGUID", Type = "string", Nilable = false },
},
},
},
Events =
......
......@@ -111,6 +111,7 @@ local ItemInteractionUI =
{ Name = "description", Type = "string", Nilable = true },
{ Name = "cost", Type = "number", Nilable = true },
{ Name = "currencyTypeId", Type = "number", Nilable = true },
{ Name = "dropInSlotSoundKitId", Type = "number", Nilable = true },
},
},
},
......
......@@ -57,6 +57,7 @@ local Loot =
{ Name = "personalLootToast", Type = "bool", Nilable = false },
{ Name = "currencyID", Type = "number", Nilable = true },
{ Name = "isSecondaryResult", Type = "bool", Nilable = false },
{ Name = "corrupted", Type = "bool", Nilable = false },
},
},
{
......@@ -207,6 +208,7 @@ local Loot =
Payload =
{
{ Name = "autoLoot", Type = "bool", Nilable = false },
{ Name = "isFromItem", Type = "bool", Nilable = false },
},
},
{
......@@ -303,6 +305,7 @@ local Loot =
{ Name = "toastMethod", Type = "number", Nilable = false },
{ Name = "lessAwesome", Type = "bool", Nilable = false },
{ Name = "upgraded", Type = "bool", Nilable = false },
{ Name = "corrupted", Type = "bool", Nilable = false },
},
},
{
......
......@@ -104,6 +104,11 @@ local WowTokenUI =
Type = "Event",
LiteralName = "TOKEN_SELL_CONFIRM_REQUIRED",
},
{
Name = "TokenSellConfirmed",
Type = "Event",
LiteralName = "TOKEN_SELL_CONFIRMED",
},
{
Name = "TokenSellResult",
Type = "Event",
......
......@@ -3819,7 +3819,7 @@ function AchievementFrameSearchBox_OnEnterPressed(self)
searchPreviewContainer.showAllSearchResults:Click();
end
else
local preview = AchievementFrame.searchPreview[self.selectedIndex];
local preview = searchPreviewContainer.searchPreviews[self.selectedIndex];
if ( preview:IsShown() ) then
preview:Click();
end
......
......@@ -124,6 +124,10 @@ function AuctionCategoryMixin:AddBulkInventoryTypeCategories(classID, subClassID
end
function AuctionCategoryMixin:AddFilter(classID, subClassID, inventoryType)
if not classID and not subClassID and not inventoryType then
return;
end
self.filters = self.filters or {};
self.filters[#self.filters + 1] = { classID = classID, subClassID = subClassID, inventoryType = inventoryType, };
......
......@@ -17,9 +17,11 @@ function AuctionHouseAuctionsSummaryListMixin:OnLoad()
AuctionHouseBackgroundMixin.OnLoad(self);
self.InsetFrame:Hide();
self.SelectedHighlight:SetAtlas("auctionhouse-ui-row-select", true);
self.SelectedHighlight:SetBlendMode("ADD");
self.SelectedHighlight:SetAlpha(0.8);
local selectedHighlight = self:GetSelectedHighlight();
selectedHighlight:SetAtlas("auctionhouse-ui-row-select", true);
selectedHighlight:SetBlendMode("ADD");
selectedHighlight:SetAlpha(0.8);
end
......@@ -50,8 +52,13 @@ function AuctionHouseAuctionsSummaryLineMixin:OnHide()
self:UnregisterEvent("ITEM_KEY_ITEM_INFO_RECEIVED");
end
function AuctionHouseAuctionsSummaryLineMixin:SetIconShown(shown)
self.Icon:SetShown(shown);
self.IconBorder:SetShown(shown);
end
function AuctionHouseAuctionsSummaryLineMixin:UpdateDisplay()
self.Icon:Hide();
self:SetIconShown(false);
local listIndex = self:GetListIndex();
local isDisplayingBids = self.auctionsFrame:IsDisplayingBids();
......@@ -71,7 +78,7 @@ function AuctionHouseAuctionsSummaryLineMixin:UpdateDisplay()
return;
end
self.Icon:Show();
self:SetIconShown(true);
self.Icon:SetTexture(itemKeyInfo.iconFileID);
self.Text:SetText(AuctionHouseUtil.GetItemDisplayTextFromItemKey(itemKey, itemKeyInfo));
end
......@@ -174,22 +181,14 @@ function AuctionHouseAuctionsFrameMixin:OnShow()
end
function AuctionHouseAuctionsFrameMixin:RefreshSeachResults()
if self:IsDisplayingBids() then
local displayMode = self:GetDisplayMode();
if self:IsDisplayingBids() and displayMode ~= AuctionsFrameDisplayMode.AllBids then
self:GetAuctionHouseFrame():QueryAll(AuctionHouseSearchContext.AllBids);
else
elseif displayMode ~= AuctionsFrameDisplayMode.AllAuctions then
self:GetAuctionHouseFrame():QueryAll(AuctionHouseSearchContext.AllAuctions);
end
local displayMode = self:GetDisplayMode();
local itemKey = self:GetItemKey();
if itemKey then
self:GetAuctionHouseFrame():QueryItem(self:GetSearchContext(), itemKey);
if displayMode == AuctionsFrameDisplayMode.Item then
self.ItemList:DirtyScrollFrame();
elseif displayMode == AuctionsFrameDisplayMode.Commodity then
self.CommoditiesList:DirtyScrollFrame();
end
end
self:UpdateCancelAuctionButton();
end
function AuctionHouseAuctionsFrameMixin:OnHide()
......@@ -198,6 +197,7 @@ end
function AuctionHouseAuctionsFrameMixin:OnEvent(event, ...)
if event == "OWNED_AUCTIONS_UPDATED" then
self.AllAuctionsList:SetSelectedEntry(nil);
self.AllAuctionsList:Reset();
self.SummaryList:RefreshScrollFrame();
self:ValidateDisplayMode();
......@@ -342,10 +342,7 @@ function AuctionHouseAuctionsFrameMixin:InitializeCommoditiesList()
return selectedRowData and currentRowData.auctionID == selectedRowData.auctionID;
end);
self.CommoditiesList:SetSelectionCallback(function(commoditySearchResult)
self:OnCommoditySearchResultSelected(commoditySearchResult);
return true;
end);
self.CommoditiesList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithLink(self, self.OnCommoditySearchResultSelected));
local function AuctionsCommoditiesList_GetAuctionHouseFrame(commoditiesList)
return commoditiesList:GetParent():GetAuctionHouseFrame();
......@@ -391,13 +388,11 @@ function AuctionHouseAuctionsFrameMixin:ValidateDisplayMode()
if displayMode == AuctionsFrameDisplayMode.Item or displayMode == AuctionsFrameDisplayMode.Commodity then
local itemKey = self:GetItemKey();
if self:IsDisplayingBids() then
if not AuctionHouseUtil.HasBidType(itemKey) then
self.SummaryList:SetSelectedListIndex(1);
end
local hasType, typeIndex = AuctionHouseUtil.HasBidType(itemKey);
self.SummaryList:SetSelectedListIndex(hasType and (typeIndex + 1) or 1);
else
if not AuctionHouseUtil.HasOwnedAuctionType(itemKey) then
self.SummaryList:SetSelectedListIndex(1);
end
local hasType, typeIndex = AuctionHouseUtil.HasOwnedAuctionType(itemKey);
self.SummaryList:SetSelectedListIndex(hasType and (typeIndex + 1) or 1);
end
end
end
......@@ -471,7 +466,11 @@ end
function AuctionHouseAuctionsFrameMixin:SelectAuction(searchResult)
self.selectedAuctionID = searchResult and searchResult.auctionID or nil;
self.CancelAuctionButton:SetEnabled(self.selectedAuctionID ~= nil and searchResult.status ~= Enum.AuctionStatus.Sold);
self:UpdateCancelAuctionButton(searchResult);
end
function AuctionHouseAuctionsFrameMixin:UpdateCancelAuctionButton(searchResult)
self.CancelAuctionButton:SetEnabled(self.selectedAuctionID ~= nil and (self.selectedAuctionID > 0) and (searchResult and searchResult.status ~= Enum.AuctionStatus.Sold));
end
function AuctionHouseAuctionsFrameMixin:OnAllAuctionsSearchResultSelected(ownedAuctionInfo)
......
......@@ -10,7 +10,7 @@
<Button name="AuctionHouseAuctionsSummaryLineTemplate" mixin="AuctionHouseAuctionsSummaryLineMixin" inherits="ScrollListLineTextTemplate, TruncatedTooltipScriptTemplate" virtual="true">
<Layers>
<Layer level="ARTWORK">
<Layer level="BORDER">
<Texture parentKey="Icon">
<Size x="14" y="14"/>
<Anchors>
......@@ -18,6 +18,14 @@
</Anchors>
</Texture>
</Layer>
<Layer level="ARTWORK">
<Texture parentKey="IconBorder" atlas="auctionhouse-itemicon-small-border" useAtlasSize="false">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="CENTER" relativeKey="$parent.Icon"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad method="OnLoad"/>
......
......@@ -211,6 +211,11 @@ function AuctionHouseCategoriesListMixin:OnShow()
AuctionFrameFilters_Update(self);
end
function AuctionHouseCategoriesListMixin:IsWoWTokenCategorySelected()
local categoryInfo = AuctionHouseCategory_FindDeepest(self.selectedCategoryIndex, self.selectedSubCategoryIndex, self.selectedSubSubCategoryIndex);
return categoryInfo and categoryInfo:HasFlag("WOW_TOKEN_FLAG");
end
function AuctionHouseCategoriesListMixin:SetSelectedCategory(selectedCategoryIndex, selectedSubCategoryIndex, selectedSubSubCategoryIndex)
self.selectedCategoryIndex = selectedCategoryIndex;
self.selectedSubCategoryIndex = selectedSubCategoryIndex;
......@@ -218,13 +223,14 @@ function AuctionHouseCategoriesListMixin:SetSelectedCategory(selectedCategoryInd
self:GetAuctionHouseFrame():TriggerEvent(AuctionHouseFrameMixin.Event.CategorySelected, selectedCategoryIndex, selectedSubCategoryIndex, selectedSubSubCategoryIndex);
local categoryInfo = AuctionHouseCategory_FindDeepest(selectedCategoryIndex, selectedSubCategoryIndex, selectedSubSubCategoryIndex);
local displayMode = self:GetAuctionHouseFrame():GetDisplayMode();
if categoryInfo and categoryInfo:HasFlag("WOW_TOKEN_FLAG") and displayMode ~= AuctionHouseFrameDisplayMode.WoWTokenBuy then
if self:IsWoWTokenCategorySelected() and displayMode ~= AuctionHouseFrameDisplayMode.WoWTokenBuy then
self:GetAuctionHouseFrame():SetDisplayMode(AuctionHouseFrameDisplayMode.WoWTokenBuy);
elseif displayMode ~= AuctionHouseFrameDisplayMode.Buy and displayMode ~= AuctionHouseFrameDisplayMode.ItemBuy and displayMode ~= AuctionHouseFrameDisplayMode.CommoditiesBuy then
self:GetAuctionHouseFrame():SetDisplayMode(AuctionHouseFrameDisplayMode.Buy);
end
AuctionFrameFilters_Update(self);
end
function AuctionHouseCategoriesListMixin:GetSelectedCategory()
......
......@@ -49,6 +49,16 @@ function AuctionHouseCommoditiesBuyDisplayMixin:OnShow()
self:GetAuctionHouseFrame():RegisterCallback(AuctionHouseFrameMixin.Event.CommoditiesQuantitySelectionChanged, self.quantitySelectionChangedCallback);
end
function AuctionHouseCommoditiesBuyDisplayMixin:UpdateBuyButton()
if self.TotalPrice:GetAmount() > GetMoney() then
self.BuyButton:SetDisableTooltip(AUCTION_HOUSE_TOOLTIP_TITLE_NOT_ENOUGH_MONEY);
elseif self.QuantityInput:GetQuantity() <= 0 then
self.BuyButton:SetDisableTooltip(AUCTION_HOUSE_TOOLTIP_TITLE_NONE_AVAILABLE);
else
self.BuyButton:SetDisableTooltip(nil);
end
end
function AuctionHouseCommoditiesBuyDisplayMixin:SetItemIDAndPrice(itemID, minPrice)
if itemID then
self.ItemDisplay:SetItem(itemID);
......@@ -65,11 +75,7 @@ function AuctionHouseCommoditiesBuyDisplayMixin:SetPrice(unitPrice, totalPrice)
self.UnitPrice:SetAmount(unitPrice);
self.TotalPrice:SetAmount(totalPrice);
if totalPrice > GetMoney() then
self.BuyButton:SetDisableTooltip(AUCTION_HOUSE_TOOLTIP_TITLE_NOT_ENOUGH_MONEY);
else
self.BuyButton:SetDisableTooltip(nil);
end
self:UpdateBuyButton();
end
function AuctionHouseCommoditiesBuyDisplayMixin:GetItemID()
......@@ -138,10 +144,7 @@ function AuctionHouseCommoditiesBuyFrameMixin:OnLoad()
self:SetSearchContext(AuctionHouseSearchContext.BuyCommodities);
self.ItemList:SetSelectionCallback(function(auctionData)
self:OnAuctionSelected(auctionData);
return true;
end);
self.ItemList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithLink(self, self.OnAuctionSelected));
end
function AuctionHouseCommoditiesBuyFrameMixin:GetItemID()
......
......@@ -105,11 +105,6 @@ AuctionHouseCommoditiesBuyListMixin = CreateFromMixins(AuctionHouseCommoditiesLi
function AuctionHouseCommoditiesBuyListMixin:OnLoad()
AuctionHouseCommoditiesListMixin.OnLoad(self);
self:SetSelectionCallback(function(auctionData)
self:OnAuctionSelected(auctionData);
return true;
end);
self:SetTableBuilderLayout(AuctionHouseTableBuilder.GetCommoditiesBuyListLayout(self));
local function QuantitySelectionChangedCallback(event, quantity)
......
......@@ -15,10 +15,7 @@ function AuctionHouseCommoditiesSellFrameMixin:Init()
self:SetSearchContext(AuctionHouseSearchContext.SellCommodities);
local commoditiesSellList = self:GetCommoditiesSellList();
commoditiesSellList:SetSelectionCallback(function(commoditySearchResult)
self:OnAuctionSelected(commoditySearchResult);
return true;
end);
commoditiesSellList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithLink(self, self.OnAuctionSelected));
commoditiesSellList:RefreshScrollFrame();
end
......
......@@ -60,6 +60,12 @@ StaticPopupDialogs["CANCEL_AUCTION"] = {
hideOnEscape = 1
};
AUCTION_HOUSE_STATIC_POPUPS = {
"BUYOUT_AUCTION",
"BID_AUCTION",
"CANCEL_AUCTION",
};
local AuctionHouseSortVersion = 1;
local MaxNumAuctionHouseSortTypes = 2;
......@@ -283,6 +289,8 @@ function AuctionHouseFrameMixin:OnLoad()
if tab == self.SellTab then
self.tabsForDisplayMode[AuctionHouseFrameDisplayMode.CommoditiesSell] = i;
self.tabsForDisplayMode[AuctionHouseFrameDisplayMode.WoWTokenSell] = i;
elseif tab == self.BuyTab then
self.tabsForDisplayMode[AuctionHouseFrameDisplayMode.WoWTokenBuy] = i;
end
end
end
......@@ -339,16 +347,23 @@ function AuctionHouseFrameMixin:OnHide()
self.BrowseResultsFrame:Reset();
self.WoWTokenSellFrame:SetItem(nil);
self.CommoditiesSellFrame:SetItem(nil);
self.CommoditiesSellList:SetItemID(nil);
self.ItemSellFrame:SetItem(nil);
self:ClearPostItem();
C_AuctionHouse.CloseAuctionHouse();
self:CloseStaticPopups();
PlaySound(SOUNDKIT.AUCTION_WINDOW_CLOSE);
end
function AuctionHouseFrameMixin:CloseStaticPopups()
for i, popup in ipairs(AUCTION_HOUSE_STATIC_POPUPS) do
if StaticPopup_Visible(popup) then
StaticPopup_Hide(popup);
end
end
end
function AuctionHouseFrameMixin:ClearMaxWidthCaches()
self.maxBidPriceWidth = {};
self.maxBuyoutPriceWidth = {};
......@@ -428,6 +443,10 @@ function AuctionHouseFrameMixin:SetDisplayMode(displayMode)
elseif self.WoWTokenSellFrame:GetItem() then
displayMode = AuctionHouseFrameDisplayMode.WoWTokenSell;
end
elseif displayMode == AuctionHouseFrameDisplayMode.Buy then
if self:GetCategoriesList():IsWoWTokenCategorySelected() then
displayMode = AuctionHouseFrameDisplayMode.WoWTokenBuy;
end
end
if self.displayMode == displayMode then
......@@ -483,7 +502,6 @@ function AuctionHouseFrameMixin:SetPostItem(itemLocation)
return;
end
local displayMode = self:GetDisplayMode();
local itemCommodityStatus = C_AuctionHouse.GetItemCommodityStatus(itemLocation);
if itemCommodityStatus == Enum.ItemCommodityStatus.Unknown then
return; -- No item data, bail out.
......@@ -505,15 +523,10 @@ function AuctionHouseFrameMixin:SetPostItem(itemLocation)
end
function AuctionHouseFrameMixin:ClearPostItem()
local displayMode = self:GetDisplayMode();
if displayMode == AuctionHouseFrameDisplayMode.WoWTokenSell then
self.WoWTokenSellFrame:SetItem(nil);
elseif displayMode == AuctionHouseFrameDisplayMode.CommoditiesSell then
self.CommoditiesSellFrame:SetItem(nil);
self.CommoditiesSellList:SetItemID(nil);
elseif displayMode == AuctionHouseFrameDisplayMode.ItemSell then
self.ItemSellFrame:SetItem(nil);
end
self.WoWTokenSellFrame:SetItem(nil);
self.CommoditiesSellFrame:SetItem(nil);
self.CommoditiesSellList:SetItemID(nil);
self.ItemSellFrame:SetItem(nil);
end
function AuctionHouseFrameMixin:UpdateTitle()
......@@ -550,9 +563,13 @@ function AuctionHouseFrameMixin:GetFavoriteDropDown()
end
function AuctionHouseFrameMixin:GetBrowseSearchContext()
local selectedCategoryIndex = self:GetCategoriesList():GetSelectedCategory();
local browseSearchContext = AuctionHouseUtil.ConvertCategoryToSearchContext(selectedCategoryIndex);
return browseSearchContext;
if self.isDisplayingFavorites then