Commit 30ace150 authored by TOM_RUS's avatar TOM_RUS

WOW-32489patch8.3.0_PTR

parent ffbd8a3f
......@@ -65,6 +65,14 @@ local AuctionHouse =
Name = "CancelCommoditiesPurchase",
Type = "Function",
},
{
Name = "CancelSell",
Type = "Function",
},
{
Name = "CloseAuctionHouse",
Type = "Function",
},
{
Name = "ConfirmCommoditiesPurchase",
Type = "Function",
......@@ -75,6 +83,20 @@ local AuctionHouse =
{ Name = "quantity", Type = "number", Nilable = false },
},
},
{
Name = "GetAuctionItemSubClasses",
Type = "Function",
Arguments =
{
{ Name = "classID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "subClasses", Type = "table", InnerType = "number", Nilable = false },
},
},
{
Name = "GetAvailablePostCount",
Type = "Function",
......@@ -725,6 +747,7 @@ local AuctionHouse =
{
Name = "ReplicateItems",
Type = "Function",
Documentation = { "This function should be used in place of an 'allItem' QueryAuctionItems call to query the entire auction house." },
},
{
Name = "RequestMoreBrowseResults",
......@@ -789,6 +812,7 @@ local AuctionHouse =
{
Name = "SendSearchQuery",
Type = "Function",
Documentation = { "Search queries are restricted to 100 calls per minute. These should not be used to query the entire auction house. See ReplicateItems" },
Arguments =
{
......@@ -800,6 +824,7 @@ local AuctionHouse =
{
Name = "SendSellSearchQuery",
Type = "Function",
Documentation = { "Search queries are restricted to 100 calls per minute. These should not be used to query the entire auction house. See ReplicateItems" },
Arguments =
{
......@@ -1158,8 +1183,8 @@ local AuctionHouse =
Fields =
{
{ Name = "itemID", Type = "number", Nilable = false },
{ Name = "itemLevel", Type = "number", Nilable = false },
{ Name = "itemSuffix", Type = "number", Nilable = false },
{ Name = "itemLevel", Type = "number", Nilable = false, Default = 0 },
{ Name = "itemSuffix", Type = "number", Nilable = false, Default = 0 },
{ Name = "battlePetSpeciesID", Type = "number", Nilable = false, Default = 0 },
},
},
......
......@@ -165,6 +165,19 @@ local CalendarConstants =
{ Name = "DefaultCalendarGetEventType", Type = "CalendarGetEventType", EnumValue = 3 },
},
},
{
Name = "CalendarHolidayFilterType",
Type = "Enumeration",
NumValues = 3,
MinValue = 0,
MaxValue = 2,
Fields =
{
{ Name = "Weekly", Type = "CalendarHolidayFilterType", EnumValue = 0 },
{ Name = "Darkmoon", Type = "CalendarHolidayFilterType", EnumValue = 1 },
{ Name = "Battleground", Type = "CalendarHolidayFilterType", EnumValue = 2 },
},
},
{
Name = "CalendarInviteBits",
Type = "Enumeration",
......@@ -274,6 +287,20 @@ local CalendarConstants =
{ Name = "TentativeSignup", Type = "CalendarWebActionType", EnumValue = 6 },
},
},
{
Name = "HolidayFlags",
Type = "Enumeration",
NumValues = 4,
MinValue = 1,
MaxValue = 8,
Fields =
{
{ Name = "IsRegionwide", Type = "HolidayFlags", EnumValue = 1 },
{ Name = "DontShowInCalendar", Type = "HolidayFlags", EnumValue = 2 },
{ Name = "DontDisplayEnd", Type = "HolidayFlags", EnumValue = 4 },
{ Name = "DontDisplayBanner", Type = "HolidayFlags", EnumValue = 8 },
},
},
},
};
......
......@@ -737,6 +737,15 @@ local Calendar =
{ Name = "actionPending", Type = "bool", Nilable = false },
},
},
{
Name = "IsEventOpen",
Type = "Function",
Returns =
{
{ Name = "isOpen", Type = "bool", Nilable = false },
},
},
{
Name = "MassInviteCommunity",
Type = "Function",
......
......@@ -837,7 +837,6 @@ local ClubFinder =
{ Name = "lastPosterGUID", Type = "string", Nilable = false },
{ Name = "clubId", Type = "string", Nilable = false },
{ Name = "lastUpdatedTime", Type = "number", Nilable = false },
{ Name = "clubForceRemoved", Type = "bool", Nilable = false },
},
},
},
......
......@@ -1138,6 +1138,15 @@ local CommentatorFrame =
Type = "Event",
LiteralName = "COMMENTATOR_ENTER_WORLD",
},
{
Name = "CommentatorImmediateFovUpdate",
Type = "Event",
LiteralName = "COMMENTATOR_IMMEDIATE_FOV_UPDATE",
Payload =
{
{ Name = "fov", Type = "number", Nilable = false },
},
},
{
Name = "CommentatorMapUpdate",
Type = "Event",
......
......@@ -384,6 +384,20 @@ local Map =
Type = "Event",
LiteralName = "NEW_WMO_CHUNK",
},
{
Name = "WorldMapClose",
Type = "Event",
LiteralName = "WORLD_MAP_CLOSE",
},
{
Name = "WorldMapOpen",
Type = "Event",
LiteralName = "WORLD_MAP_OPEN",
Payload =
{
{ Name = "uiMapID", Type = "number", Nilable = false },
},
},
{
Name = "ZoneChanged",
Type = "Event",
......
......@@ -5,6 +5,15 @@ local Unit =
Functions =
{
{
Name = "GetNegativeCorruptionEffectInfo",
Type = "Function",
Returns =
{
{ Name = "corruptionEffects", Type = "table", InnerType = "CorruptionEffectInfo", Nilable = false },
},
},
{
Name = "GetUnitPowerBarInfo",
Type = "Function",
......@@ -104,6 +113,20 @@ local Unit =
{ Name = "colorA", Type = "number", Nilable = false },
},
},
{
Name = "IsUnitModelReadyForUI",
Type = "Function",
Arguments =
{
{ Name = "unitToken", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "isReady", Type = "bool", Nilable = false },
},
},
{
Name = "PlayerVehicleHasComboPoints",
Type = "Function",
......@@ -1390,6 +1413,16 @@ local Unit =
{ Name = "OrbCarrierPurple", Type = "PvpUnitClassification", EnumValue = 10 },
},
},
{
Name = "CorruptionEffectInfo",
Type = "Structure",
Fields =
{
{ Name = "name", Type = "string", Nilable = false },
{ Name = "description", Type = "string", Nilable = false },
{ Name = "minCorruption", Type = "number", Nilable = false },
},
},
{
Name = "UnitPowerBarInfo",
Type = "Structure",
......
......@@ -133,15 +133,15 @@ function AuctionCategoryMixin:AddFilter(classID, subClassID, inventoryType)
end
do
local function GenerateSubClassesHelper(self, classID, ...)
for i = 1, select("#", ...) do
local subClassID = select(i, ...);
local function GenerateSubClassesHelper(self, classID, subClasses)
for i = 1, #subClasses do
local subClassID = subClasses[i];
self:CreateSubCategoryAndFilter(classID, subClassID);
end
end
function AuctionCategoryMixin:GenerateSubCategoriesAndFiltersFromSubClass(classID)
GenerateSubClassesHelper(self, classID, GetAuctionItemSubClasses(classID));
GenerateSubClassesHelper(self, classID, C_AuctionHouse.GetAuctionItemSubClasses(classID));
end
end
......
......@@ -328,7 +328,7 @@ function AuctionHouseAuctionsFrameMixin:InitializeItemList()
local function AuctionsItemListRefreshResults()
if self.itemKey ~= nil then
C_AuctionHouse.RefreshItemSearchResults(self.itemKey);
self:GetAuctionHouseFrame():RefreshSearchResults(self:GetSearchContext(), self.itemKey);
end
end
......@@ -346,6 +346,12 @@ function AuctionHouseAuctionsFrameMixin:InitializeCommoditiesList()
self:OnCommoditySearchResultSelected(commoditySearchResult);
return true;
end);
local function AuctionsCommoditiesList_GetAuctionHouseFrame(commoditiesList)
return commoditiesList:GetParent():GetAuctionHouseFrame();
end
self.CommoditiesList.GetAuctionHouseFrame = AuctionsCommoditiesList_GetAuctionHouseFrame;
end
function AuctionHouseAuctionsFrameMixin:SetItemKey(itemKey)
......
......@@ -139,6 +139,7 @@
<Frame parentKey="CommoditiesList" inherits="AuctionHouseCommoditiesListTemplate" hidden="true">
<KeyValues>
<KeyValue key="backgroundAtlas" value="auctionhouse-background-auctions" type="string"/>
<KeyValue key="searchContext" value="AuctionHouseSearchContext.AuctionsCommodities" type="global"/>
<KeyValue key="refreshFrameXOffset" value="-4" type="number"/>
<KeyValue key="refreshFrameYOffset" value="133" type="number"/>
</KeyValues>
......
......@@ -157,8 +157,13 @@ function AuctionHouseBrowseResultsFrameMixin:OnBrowseResultSelected(browseResult
local _, _, hyperlinkString = ExtractHyperlinkString(browseResult.appearanceLink);
DressUpTransmogLink(hyperlinkString);
else
local _, itemLink = GetItemInfo(browseResult.itemKey.itemID);
DressUpLink(itemLink);
local itemKeyInfo = C_AuctionHouse.GetItemKeyInfo(browseResult.itemKey);
if itemKeyInfo and itemKeyInfo.battlePetLink then
DressUpBattlePetLink(itemKeyInfo.battlePetLink);
else
local _, itemLink = GetItemInfo(browseResult.itemKey.itemID);
DressUpLink(itemLink);
end
end
else
self:GetAuctionHouseFrame():SelectBrowseResult(browseResult);
......
......@@ -107,7 +107,7 @@ function AuctionHouseBuyDialogMixin:OnHide()
C_AuctionHouse.CancelCommoditiesPurchase();
C_AuctionHouse.RefreshCommoditySearchResults(self.itemID);
self:GetParent():GetAuctionHouseFrame():RefreshSearchResults(AuctionHouseSearchContext.BuyCommodities, AuctionHouseUtil.GetCommoditiesItemKey(self.itemID));
end
function AuctionHouseBuyDialogMixin:OnUpdate()
......
......@@ -19,7 +19,7 @@ function AuctionHouseCommoditiesListMixin:OnLoad()
local function CommoditiesListRefreshResults()
if self.itemID then
C_AuctionHouse.RefreshCommoditySearchResults(self.itemID);
self:GetAuctionHouseFrame():RefreshSearchResults(self.searchContext, AuctionHouseUtil.GetCommoditiesItemKey(self.itemID));
end
end
......
......@@ -4,6 +4,11 @@
<Frame name="AuctionHouseCommoditiesListTemplate" mixin="AuctionHouseCommoditiesListMixin" inherits="AuctionHouseItemListTemplate" virtual="true">
<KeyValues>
<!--
searchContext: What search context should be used for this list when refreshing search results.
<KeyValue key="searchContext" value="AuctionHouseSearchContext.BuyCommodities" type="global"/>
-->
<KeyValue key="refreshFrameXOffset" value="-4" type="number"/>
<KeyValue key="refreshFrameYOffset" value="30" type="number"/>
</KeyValues>
......@@ -20,12 +25,14 @@
<KeyValues>
<KeyValue key="backgroundAtlas" value="auctionhouse-background-buy-commodities-market" type="string"/>
<KeyValue key="backgroundYOffset" value="0" type="number"/>
<KeyValue key="searchContext" value="AuctionHouseSearchContext.BuyCommodities" type="global"/>
</KeyValues>
</Frame>
<Frame name="AuctionHouseCommoditiesSellListTemplate" mixin="AuctionHouseCommoditiesSellListMixin" inherits="AuctionHouseCommoditiesListTemplate" virtual="true">
<KeyValues>
<KeyValue key="backgroundAtlas" value="auctionhouse-background-sell-right" type="string"/>
<KeyValue key="searchContext" value="AuctionHouseSearchContext.SellCommodities" type="global"/>
<KeyValue key="refreshFrameXOffset" value="-8" type="number"/>
<KeyValue key="refreshFrameYOffset" value="30" type="number"/>
</KeyValues>
......
local MaxNumActiveBidsTracked = 100;
UIPanelWindows["AuctionHouseFrame"] = { area = "doublewide", pushable = 0, xoffset = 20, yoffset = -0, showFailedFunc = CloseAuctionHouse, };
UIPanelWindows["AuctionHouseFrame"] = { area = "doublewide", pushable = 0, xoffset = 20, yoffset = -0, showFailedFunc = C_AuctionHouse.CloseAuctionHouse, };
StaticPopupDialogs["BUYOUT_AUCTION"] = {
text = BUYOUT_AUCTION_CONFIRMATION,
......@@ -344,7 +344,7 @@ function AuctionHouseFrameMixin:OnHide()
self.CommoditiesSellList:SetItemID(nil);
self.ItemSellFrame:SetItem(nil);
CloseAuctionHouse();
C_AuctionHouse.CloseAuctionHouse();
PlaySound(SOUNDKIT.AUCTION_WINDOW_CLOSE);
end
......@@ -566,8 +566,6 @@ function AuctionHouseFrameMixin:SelectBrowseResult(browseResult)
self.ItemBuyFrame:SetItemKey(itemKey);
self:SetDisplayMode(AuctionHouseFrameDisplayMode.ItemBuy);
end
self:RefreshSearchResults(searchContext, itemKey);
end
function AuctionHouseFrameMixin:GetSortOrderState(searchContext, sortOrder)
......
......@@ -39,7 +39,7 @@ function AuctionHouseItemBuyFrameMixin:OnLoad()
local function ItemBuyListRefreshResults()
if self.itemKey ~= nil then
C_AuctionHouse.RefreshItemSearchResults(self.itemKey);
self:GetAuctionHouseFrame():RefreshSearchResults(AuctionHouseSearchContext.BuyItems, self.itemKey);
end
end
......@@ -54,6 +54,7 @@ function AuctionHouseItemBuyFrameMixin:OnHide()
FrameUtil.UnregisterFrameForEvents(self, AUCTION_HOUSE_ITEM_BUY_FRAME_EVENTS);
self.ItemList:SetSelectedEntry(nil);
self:SetAuction(nil);
end
function AuctionHouseItemBuyFrameMixin:OnEvent(event, ...)
......
......@@ -82,6 +82,7 @@ end
-- refreshResultsFunc: Function to call when the fresh button is pressed to refresh results.
function AuctionHouseItemListMixin:SetRefreshFrameFunctions(totalQuantityFunc, refreshResultsFunc)
self.totalQuantityFunc = totalQuantityFunc;
self.refreshResultsFunc = refreshResultsFunc;
self.RefreshFrame:SetRefreshCallback(refreshResultsFunc);
end
......@@ -200,8 +201,9 @@ function AuctionHouseItemListMixin:OnShow()
self:UpdateTableBuilderLayout();
self:RefreshScrollFrame();
self.updateTime = 0;
self.dotCount = 0;
if self.refreshResultsFunc then
self.refreshResultsFunc();
end
end
function AuctionHouseItemListMixin:OnUpdate()
......
......@@ -59,8 +59,6 @@ function AuctionHouseItemSellFrameMixin:OnLoad()
self.SecondaryPriceInput:SetOnValueChangedCallback(function()
self:UpdatePostState();
end);
self.SecondaryPriceInput:SetNextEditBox(self.PriceInput.MoneyInputFrame.GoldBox);
end
function AuctionHouseItemSellFrameMixin:OnShow()
......@@ -181,7 +179,7 @@ function AuctionHouseItemSellFrameMixin:InitializeItemSellList()
local function ItemSellListRefreshResults()
if self.listDisplayedItemKey ~= nil then
C_AuctionHouse.RefreshItemSearchResults(self.listDisplayedItemKey);
self:GetAuctionHouseFrame():RefreshSearchResults(self:GetSearchContext(), self.listDisplayedItemKey);
end
end
......@@ -283,6 +281,7 @@ end
function AuctionHouseItemSellFrameMixin:UpdateFocusTabbing()
if self.SecondaryPriceInput:IsShown() then
self.QuantityInput:SetNextEditBox(self.SecondaryPriceInput.MoneyInputFrame.GoldBox);
self.SecondaryPriceInput:SetNextEditBox(self.PriceInput.MoneyInputFrame.GoldBox);
self.PriceInput:SetNextEditBox(self.QuantityInput:IsShown() and self.QuantityInput.InputBox or self.SecondaryPriceInput.MoneyInputFrame.GoldBox);
else
self.QuantityInput:SetNextEditBox(self.PriceInput.MoneyInputFrame.GoldBox);
......
......@@ -75,7 +75,7 @@
<HitRectInsets left="9" right="7" top="-7" bottom="10"/>
<Scripts>
<OnClick>
CancelSell();
C_AuctionHouse.CancelSell();
</OnClick>
</Scripts>
<NormalTexture file="Interface\Buttons\CancelButton-Up"/>
......
......@@ -45,6 +45,10 @@ end
function AuctionHouseAlignedQuantityInputBoxMixin:SetNextEditBox(nextEditBox)
self.nextEditBox = nextEditBox;
if nextEditBox then
nextEditBox.previousEditBox = self;
end
end
......
......@@ -119,7 +119,12 @@ function AuctionHouseItemDisplayMixin:OnClick(button)
local favoriteDropDown = self.auctionHouseFrame:GetFavoriteDropDown();
AuctionHouseFavoriteDropDownCallback(favoriteDropDown, itemKey, C_AuctionHouse.IsFavoriteItem(itemKey));
elseif button == "LeftButton" and IsModifiedClick("DRESSUP") then
DressUpLink(self:GetItemLink());
local itemKeyInfo = C_AuctionHouse.GetItemKeyInfo(itemKey);
if itemKeyInfo and itemKeyInfo.battlePetLink then
DressUpBattlePetLink(itemKeyInfo.battlePetLink);
else
DressUpLink(self:GetItemLink());
end
end
end
end
......
......@@ -2,7 +2,8 @@
## Title: Blizzard Auction House UI
## Secure: 1
## LoadOnDemand: 1
## SavedVariables: g_auctionHouseSortsBySearchContext, g_activeBidAuctionIDs
## SavedVariables: g_auctionHouseSortsBySearchContext
## SavedVariablesPerCharacter: g_activeBidAuctionIDs
Blizzard_AuctionData.lua
Blizzard_AuctionHouseUtil.lua
Blizzard_AuctionHouseTableBuilder.xml
......
......@@ -537,3 +537,7 @@ function AuctionHouseUtil.IsOwnedAuction(rowData)
return (#rowData.owners == 1 and (rowData.containsOwnerItem or rowData.containsAccountItem)) or
(#rowData.owners == 2 and (rowData.containsOwnerItem and rowData.containsAccountItem));
end
function AuctionHouseUtil.GetCommoditiesItemKey(commoditiesID)
return { itemID = commoditiesID };
end
......@@ -70,17 +70,17 @@ local AZERITE_ESSENCE_FRAME_EVENTS = {
};
local MILESTONE_LOCATIONS = {
[1] = { left = 237, top = -235 },
[2] = { left = 100, top = -280 },
[3] = { left = 140, top = -350 },
[4] = { left = 235, top = -380 },
[5] = { left = 320, top = -355 },
[6] = { left = 370, top = -280 },
[7] = { left = 370, top = -185 },
[8] = { left = 320, top = -115 },
[9] = { left = 240, top = -94 },
[10] = { left = 150, top = -115 },
[11] = { left = 100, top = -185 },
[1] = { left = 238, top = -235 },
[2] = { left = 110, top = -292 },
[3] = { left = 155, top = -349 },
[4] = { left = 237, top = -375 },
[5] = { left = 321, top = -349 },
[6] = { left = 372, top = -277 },
[7] = { left = 372, top = -191 },
[8] = { left = 322, top = -121 },
[9] = { left = 238, top = -92 },
[10] = { left = 156, top = -121 },
[11] = { left = 103, top = -191 },
};
local LOCKED_RUNE_ATLASES = { "heartofazeroth-slot-minor-unlearned-bottomleft", "heartofazeroth-slot-minor-unlearned-topright", "heartofazeroth-slot-minor-unlearned-3" };
......
......@@ -515,10 +515,14 @@ function MountJournalMountButton_UpdateTooltip(self)
GameTooltip:SetMountBySpellID(self.spellID);
end
function MountJournalMountButton_ChooseFallbackMountToDisplay(mountID)
function MountJournalMountButton_ChooseFallbackMountToDisplay(mountID, random)
local allCreatureDisplays = C_MountJournal.GetMountAllCreatureDisplayInfoByID(mountID);
if allCreatureDisplays and #allCreatureDisplays > 0 then
return allCreatureDisplays[math.random(1, #allCreatureDisplays)].creatureDisplayID;
if random then
return allCreatureDisplays[math.random(1, #allCreatureDisplays)].creatureDisplayID;
else
return allCreatureDisplays[1].creatureDisplayID;
end
end
return 0;
end
......@@ -530,7 +534,8 @@ function MountJournal_UpdateMountDisplay(forceSceneChange)
if ( MountJournal.MountDisplay.lastDisplayed ~= spellID or forceSceneChange ) then
local creatureDisplayID, descriptionText, sourceText, isSelfMount, _, modelSceneID, animID, spellVisualKitID, disablePlayerMountPreview = C_MountJournal.GetMountInfoExtraByID(MountJournal.selectedMountID);
if not creatureDisplayID then
creatureDisplayID = MountJournalMountButton_ChooseFallbackMountToDisplay(MountJournal.selectedMountID);
local randomSelection = false;
creatureDisplayID = MountJournalMountButton_ChooseFallbackMountToDisplay(MountJournal.selectedMountID, randomSelection);
end
MountJournal.MountDisplay.InfoButton.Name:SetText(creatureName);
......
......@@ -83,7 +83,7 @@ function WardrobeTransmogFrame_OnEvent(self, event, ...)
end
elseif ( event == "UNIT_MODEL_CHANGED" ) then
local unit = ...;
if ( unit == "player" and WardrobeTransmogFrame.ModelScene:CanSetUnit("player") ) then
if ( unit == "player" and IsUnitModelReadyForUI("player") ) then
local hasAlternateForm, inAlternateForm = HasAlternateForm();
if ( self.inAlternateForm ~= inAlternateForm ) then
self.inAlternateForm = inAlternateForm;
......@@ -107,6 +107,7 @@ function WardrobeTransmogFrame_OnShow(self)
end
local FORCE_RESET_MODEL = true;
local RESET_SETTINGS = true;
WardrobeTransmogFrame.ModelScene:TransitionToModelSceneID(290, CAMERA_TRANSITION_TYPE_IMMEDIATE, CAMERA_MODIFICATION_TYPE_DISCARD, true);
WardrobeTransmogFrame_EvaluateModel(FORCE_RESET_MODEL, RESET_SETTINGS);
end
......@@ -128,8 +129,6 @@ function WardrobeTransmogFrame_OnUpdate(self)
end
function WardrobeTransmogFrame_EvaluateModel(forceResetModel, resetSettings)
WardrobeTransmogFrame.ModelScene:TransitionToModelSceneID(290, CAMERA_TRANSITION_TYPE_IMMEDIATE, CAMERA_MODIFICATION_TYPE_DISCARD, true);
local creatureDisplayID;
local slotButton = WardrobeTransmogFrame.selectedSlotButton;
if slotButton and (slotButton.slot == "MAINHANDSLOT" or slotButton.slot == "SECONDARYHANDSLOT") then
......@@ -1171,7 +1170,7 @@ function WardrobeItemsCollectionMixin:ChangeModelsSlot(oldSlot, newSlot)
end
end
if ( reloadModel and not self.Models[1]:CanSetUnit("player") ) then
if ( reloadModel and not IsUnitModelReadyForUI("player") ) then
WardrobeCollectionFrame.updateOnModelChanged = true;
for i = 1, #self.Models do
self.Models[i]:ClearModel();
......@@ -1221,7 +1220,7 @@ function WardrobeItemsCollectionMixin:RefreshCameras()
end
function WardrobeItemsCollectionMixin:OnUnitModelChangedEvent()
if ( self.Models[1]:CanSetUnit("player") ) then
if ( IsUnitModelReadyForUI("player") ) then
self:ChangeModelsSlot(nil, self:GetActiveSlot());