Commit 97a8ce98 authored by TOM_RUS's avatar TOM_RUS

WOW-32272patch8.3.0_PTR

parent ce8aa805
......@@ -1147,6 +1147,7 @@ local AuctionHouse =
Fields =
{
{ Name = "itemKey", Type = "ItemKey", Nilable = false },
{ Name = "appearanceLink", Type = "string", Nilable = true },
{ Name = "totalQuantity", Type = "number", Nilable = false },
{ Name = "minPrice", Type = "number", Nilable = false },
{ Name = "containsOwnerItem", Type = "bool", Nilable = false },
......
......@@ -321,6 +321,7 @@ local AzeriteEssence =
{ Name = "requiredLevel", Type = "number", Nilable = false },
{ Name = "canUnlock", Type = "bool", Nilable = false },
{ Name = "unlocked", Type = "bool", Nilable = false },
{ Name = "rank", Type = "number", Nilable = true },
{ Name = "slot", Type = "AzeriteEssence", Nilable = true },
},
},
......
......@@ -156,4 +156,27 @@ WorldStateInfoDocumentation.lua
WowEntitlementInfoDocumentation.lua
WowTokenUIDocumentation.lua
ZoneAbilityDocumentation.lua
ActionDocumentation.lua
AppearanceSourceDocumentation.lua
AuctionHouseEnumsDocumentation.lua
BaseDocumentation.lua
CalendarConstantsDocumentation.lua
ChatDocumentation.lua
ClubSharedDocumentation.lua
ColorDocumentation.lua
GarrisonConstantsDocumentation.lua
GarrisonSharedDocumentation.lua
GuildInfoSharedDocumentation.lua
ItemLocationSharedDocumentation.lua
ItemSharedDocumentation.lua
ModelSceneDocumentation.lua
NamePlateDocumentation.lua
PlayerDocumentation.lua
QuestSessionConstantsDocumentation.lua
QueueSpecificDocumentation.lua
RecruitAFriendSharedDocumentation.lua
TextureSharedDocumentation.lua
TimeDocumentation.lua
UnitSharedDocumentation.lua
VectorSharedDocumentation.lua
# End documentation files here
......@@ -141,6 +141,20 @@ local ClubFinder =
{ Name = "focusCount", Type = "number", Nilable = false },
},
},
{
Name = "GetPostingIDFromClubFinderGUID",
Type = "Function",
Arguments =
{
{ Name = "clubFinderGUID", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "postingID", Type = "number", Nilable = true },
},
},
{
Name = "GetRecruitingClubInfoFromClubID",
Type = "Function",
......
local GarrisonConstants =
{
Tables =
{
{
Name = "GarrTalentResearchCostSource",
Type = "Enumeration",
NumValues = 2,
MinValue = 0,
MaxValue = 1,
Fields =
{
{ Name = "Talent", Type = "GarrTalentResearchCostSource", EnumValue = 0 },
{ Name = "Tree", Type = "GarrTalentResearchCostSource", EnumValue = 1 },
},
},
{
Name = "GarrTalentTreeType",
Type = "Enumeration",
NumValues = 2,
MinValue = 0,
MaxValue = 1,
Fields =
{
{ Name = "Tiers", Type = "GarrTalentTreeType", EnumValue = 0 },
{ Name = "Classic", Type = "GarrTalentTreeType", EnumValue = 1 },
},
},
{
Name = "GarrTalentType",
Type = "Enumeration",
NumValues = 3,
MinValue = 0,
MaxValue = 2,
Fields =
{
{ Name = "Standard", Type = "GarrTalentType", EnumValue = 0 },
{ Name = "Minor", Type = "GarrTalentType", EnumValue = 1 },
{ Name = "Major", Type = "GarrTalentType", EnumValue = 2 },
},
},
},
};
APIDocumentation:AddDocumentationTable(GarrisonConstants);
\ No newline at end of file
local GuildInfoShared =
{
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(GuildInfoShared);
\ No newline at end of file
......@@ -258,6 +258,48 @@ local Item =
{ Name = "isBound", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorrupted",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isCorrupted", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorruptionRelated",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isCorruptionRelated", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemCorruptionResistant",
Type = "Function",
Arguments =
{
{ Name = "itemLoc", Type = "table", Mixin = "ItemLocationMixin", Nilable = false },
},
Returns =
{
{ Name = "isCorruptionResistant", Type = "bool", Nilable = false },
},
},
{
Name = "IsItemDataCached",
Type = "Function",
......
......@@ -16,15 +16,16 @@ local ZoneAbility =
{
Name = "ZoneAbilityType",
Type = "Enumeration",
NumValues = 4,
NumValues = 5,
MinValue = 0,
MaxValue = 3,
MaxValue = 4,
Fields =
{
{ Name = "Garrison", Type = "ZoneAbilityType", EnumValue = 0 },
{ Name = "OrderHall", Type = "ZoneAbilityType", EnumValue = 1 },
{ Name = "Argus", Type = "ZoneAbilityType", EnumValue = 2 },
{ Name = "WarEffort", Type = "ZoneAbilityType", EnumValue = 3 },
{ Name = "Visions", Type = "ZoneAbilityType", EnumValue = 4 },
},
},
},
......
......@@ -250,12 +250,9 @@ function AuctionHouseAuctionsFrameMixin:InitializeSummaryList()
end
function AuctionHouseAuctionsFrameMixin:InitializeAllAuctionsList()
self.AllAuctionsList:SetSelectionCallback(function(searchResult)
self:OnAllAuctionsSearchResultSelected(searchResult);
end);
self.AllAuctionsList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithInspect(self, self.OnAllAuctionsSearchResultSelected));
self.AllAuctionsList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
self.AllAuctionsList:SetLineOnLeaveCallback(GameTooltip_Hide);
self.AllAuctionsList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
self.AllAuctionsList:SetHighlightCallback(function(currentRowData, selectedRowData)
return selectedRowData and currentRowData.auctionID == selectedRowData.auctionID;
......@@ -281,12 +278,9 @@ function AuctionHouseAuctionsFrameMixin:InitializeAllAuctionsList()
end
function AuctionHouseAuctionsFrameMixin:InitializeBidsList()
self.BidsList:SetSelectionCallback(function(searchResult)
self:OnBidsListSearchResultSelected(searchResult);
end);
self.BidsList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithInspect(self, self.OnBidsListSearchResultSelected));
self.BidsList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
self.BidsList:SetLineOnLeaveCallback(GameTooltip_Hide);
self.BidsList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
self.BidsList:SetHighlightCallback(function(currentRowData, selectedRowData)
return selectedRowData and currentRowData.auctionID == selectedRowData.auctionID;
......@@ -314,16 +308,14 @@ end
function AuctionHouseAuctionsFrameMixin:InitializeItemList()
self.ItemList:SetTableBuilderLayout(AuctionHouseTableBuilder.GetAuctionsItemListLayout(self, self.ItemList));
self.ItemList:SetSelectionCallback(function(searchResult)
self:OnItemSearchResultSelected(searchResult);
end);
self.ItemList:SetHighlightCallback(function(currentRowData, selectedRowData)
return selectedRowData and currentRowData.auctionID == selectedRowData.auctionID;
end);
self.ItemList:SetLineOnEnterCallback(AuctionHouseUtil.SetAuctionHouseTooltip);
self.ItemList:SetLineOnLeaveCallback(GameTooltip_Hide);
self.ItemList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithInspect(self, self.OnItemSearchResultSelected));
self.ItemList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
self.ItemList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
local function AuctionsItemListSearchStarted()
return self.itemKey ~= nil;
......@@ -366,6 +358,7 @@ function AuctionHouseAuctionsFrameMixin:InitializeCommoditiesList()
self.CommoditiesList:SetSelectionCallback(function(commoditySearchResult)
self:OnCommoditySearchResultSelected(commoditySearchResult);
return true;
end);
end
......
......@@ -28,11 +28,11 @@ function AuctionHouseBrowseResultsFrameMixin:OnLoad()
self.ItemList:SetSelectionCallback(function(browseResult)
self:OnBrowseResultSelected(browseResult);
return false; -- browse lines are never selected.
end);
self.ItemList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
self.ItemList:SetLineOnLeaveCallback(GameTooltip_Hide);
self.ItemList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
local extraInfoColumn = nil;
self:SetupTableBuilder(extraInfoColumn);
......@@ -152,5 +152,15 @@ function AuctionHouseBrowseResultsFrameMixin:GetSortOrderState(sortOrder)
end
function AuctionHouseBrowseResultsFrameMixin:OnBrowseResultSelected(browseResult)
self:GetAuctionHouseFrame():SelectBrowseResult(browseResult);
if IsModifiedClick("DRESSUP") then
if browseResult.appearanceLink then
local _, _, hyperlinkString = ExtractHyperlinkString(browseResult.appearanceLink);
DressUpTransmogLink(hyperlinkString);
else
local _, itemLink = GetItemInfo(browseResult.itemKey.itemID);
DressUpLink(itemLink);
end
else
self:GetAuctionHouseFrame():SelectBrowseResult(browseResult);
end
end
......@@ -132,6 +132,7 @@ function AuctionHouseCommoditiesBuyFrameMixin:OnLoad()
self.ItemList:SetSelectionCallback(function(auctionData)
self:OnAuctionSelected(auctionData);
return true;
end);
end
......@@ -142,6 +143,7 @@ end
function AuctionHouseCommoditiesBuyFrameMixin:OnAuctionSelected(searchResultInfo)
local totalQuantity = AuctionHouseUtil.AggregateCommoditySearchResultsByMaxPrice(self:GetItemID(), searchResultInfo.unitPrice);
self:GetAuctionHouseFrame():TriggerEvent(AuctionHouseFrameMixin.Event.CommoditiesQuantitySelectionChanged, totalQuantity);
return true;
end
function AuctionHouseCommoditiesBuyFrameMixin:SetItemIDAndPrice(itemID, price)
......
......@@ -104,6 +104,7 @@ function AuctionHouseCommoditiesBuyListMixin:OnLoad()
self:SetSelectionCallback(function(auctionData)
self:OnAuctionSelected(auctionData);
return true;
end);
self:SetTableBuilderLayout(AuctionHouseTableBuilder.GetCommoditiesBuyListLayout(self));
......
......@@ -17,6 +17,7 @@ function AuctionHouseCommoditiesSellFrameMixin:Init()
local commoditiesSellList = self:GetCommoditiesSellList();
commoditiesSellList:SetSelectionCallback(function(commoditySearchResult)
self:OnAuctionSelected(commoditySearchResult);
return true;
end);
commoditiesSellList:RefreshScrollFrame();
......
......@@ -21,16 +21,14 @@ function AuctionHouseItemBuyFrameMixin:OnLoad()
self:ResetPrice();
self.ItemList:SetSelectionCallback(function(auctionData)
self:OnAuctionSelected(auctionData);
end);
self.ItemList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithInspect(self, self.OnAuctionSelected));
self.ItemList:SetHighlightCallback(function(currentRowData, selectedRowData)
return selectedRowData and (currentRowData.auctionID == selectedRowData.auctionID);
end);
self.ItemList:SetLineOnEnterCallback(AuctionHouseUtil.SetAuctionHouseTooltip);
self.ItemList:SetLineOnLeaveCallback(GameTooltip_Hide);
self.ItemList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
self.ItemList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
self.ItemList:SetTableBuilderLayout(AuctionHouseTableBuilder.GetItemBuyListLayout(self, self.ItemList));
......
......@@ -181,12 +181,14 @@ function AuctionHouseItemListMixin:OnLeaveListLine(line, rowData)
end
function AuctionHouseItemListMixin:SetSelectedEntry(rowData)
self.selectedRowData = rowData;
self:DirtyScrollFrame();
if self.selectionCallback then
self.selectionCallback(rowData);
if not self.selectionCallback(rowData) then
return;
end
end
self.selectedRowData = rowData;
self:DirtyScrollFrame();
end
function AuctionHouseItemListMixin:GetSelectedEntry()
......
......@@ -143,16 +143,14 @@ function AuctionHouseItemSellFrameMixin:InitializeItemSellList()
local itemSellList = self:GetItemSellList();
itemSellList:SetSelectionCallback(function(searchResult)
self:OnSearchResultSelected(searchResult);
end);
itemSellList:SetSelectionCallback(AuctionHouseUtil.GenerateRowSelectedCallbackWithInspect(self, self.OnSearchResultSelected));
itemSellList:SetHighlightCallback(function(currentRowData, selectedRowData)
return selectedRowData and currentRowData.auctionID == selectedRowData.auctionID;
end);
itemSellList:SetLineOnEnterCallback(AuctionHouseUtil.SetAuctionHouseTooltip);
itemSellList:SetLineOnLeaveCallback(GameTooltip_Hide);
itemSellList:SetLineOnEnterCallback(AuctionHouseUtil.LineOnEnterCallback);
itemSellList:SetLineOnLeaveCallback(AuctionHouseUtil.LineOnLeaveCallback);
local isEquipment = false;
local isPet = false;
......
......@@ -44,7 +44,22 @@ function AuctionHouseItemDisplayMixin:OnEvent(event, ...)
end
end
-- Set and cleared dynamically in OnEnter and OnLeave
function AuctionHouseItemDisplayMixin:OnUpdate()
if IsModifiedClick("DRESSUP") then
ShowInspectCursor();
else
ResetCursor();
end
end
function AuctionHouseItemDisplayMixin:OnEnter()
self:SetScript("OnUpdate", AuctionHouseItemDisplayMixin.OnUpdate);
if IsModifiedClick("DRESSUP") then
ShowInspectCursor();
end
if self:IsPet() then
local itemLocation = self:GetItemLocation();
if itemLocation then
......@@ -60,24 +75,39 @@ function AuctionHouseItemDisplayMixin:OnEnter()
else
BattlePetTooltip:Hide();
local itemLink = self:GetItemLink();
if itemLink then
local itemKey = self:GetItemKey();
if itemKey then
GameTooltip:SetOwner(self.ItemButton, "ANCHOR_RIGHT");
GameTooltip:SetHyperlink(itemLink);
GameTooltip:SetItemKey(itemKey.itemID, itemKey.itemLevel, itemKey.itemSuffix);
GameTooltip:Show();
else
local itemLink = self:GetItemLink();
if itemLink then
GameTooltip:SetOwner(self.ItemButton, "ANCHOR_RIGHT");
GameTooltip:SetHyperlink(itemLink);
GameTooltip:Show();
end
end
end
end
function AuctionHouseItemDisplayMixin:OnLeave()
self:SetScript("OnUpdate", nil);
ResetCursor();
GameTooltip:Hide();
BattlePetTooltip:Hide();
end
function AuctionHouseItemDisplayMixin:OnClick(button)
local itemKey = self:GetItemKey();
if itemKey and self.auctionHouseFrame and button == "RightButton" then
local favoriteDropDown = self.auctionHouseFrame:GetFavoriteDropDown();
AuctionHouseFavoriteDropDownCallback(favoriteDropDown, itemKey, C_AuctionHouse.IsFavoriteItem(itemKey));
if itemKey and self.auctionHouseFrame then
if button == "RightButton" then
local favoriteDropDown = self.auctionHouseFrame:GetFavoriteDropDown();
AuctionHouseFavoriteDropDownCallback(favoriteDropDown, itemKey, C_AuctionHouse.IsFavoriteItem(itemKey));
elseif button == "LeftButton" and IsModifiedClick("DRESSUP") then
DressUpLink(self:GetItemLink());
end
end
end
......@@ -325,11 +355,11 @@ function AuctionHouseInteractableItemDisplayItemButtonMixin:SwitchItemWithCursor
itemDisplay:SwitchItemWithCursor();
end
function AuctionHouseInteractableItemDisplayItemButtonMixin:OnClick(button)
function AuctionHouseInteractableItemDisplayItemButtonMixin:OnClick(button, ...)
if button == "RightButton" then
self:GetParent():SetItemLocation(nil);
self:SetItemLocation(nil);
else
self:SwitchItemWithCursor();
self:GetParent():OnClick(button, ...);
end
end
......@@ -378,14 +408,16 @@ function AuctionHouseInteractableItemDisplayMixin:OnLeave()
self:SetHighlightLocked(false);
end
function AuctionHouseInteractableItemDisplayMixin:OnClick(button)
if button == "LeftButton" then
local item = C_Cursor.GetCursorItem();
if item then
self:SwitchItemWithCursor();
function AuctionHouseInteractableItemDisplayMixin:OnClick(button, ...)
AuctionHouseItemDisplayMixin.OnClick(self, button, ...);
if button == "LeftButton" and not IsModifiedClick("DRESSUP") then
self:SwitchItemWithCursor();
if self:GetItemLocation() or self:GetItemLink() then
self:OnEnter();
else
self:OnLeave();
end
else
AuctionHouseItemDisplayMixin.OnClick(self, button);
end
end
......
......@@ -33,7 +33,7 @@
</Scripts>
</Frame>
<Button name="AuctionHouseItemDisplayBaseTemplate" mixin="AuctionHouseItemDisplayMixin" inherits="AuctionHouseBackgroundTemplate" useParentLevel="false" registerForClicks="RightButtonUp" virtual="true">
<Button name="AuctionHouseItemDisplayBaseTemplate" mixin="AuctionHouseItemDisplayMixin" inherits="AuctionHouseBackgroundTemplate" useParentLevel="false" registerForClicks="RightButtonUp, LeftButtonUp" virtual="true">
<KeyValues>
<!--
itemButtonXOffset: X Offset for the item button relative to the background's left.
......
......@@ -221,19 +221,25 @@ end
function AuctionHouseTableCellFavoriteButtonMixin:SetFavoriteState(isFavorite)
self.isFavorite = isFavorite;
self.NormalTexture:SetAtlas(isFavorite and "auctionhouse-icon-favorite" or nil);
local defaultTexture = self.textureLocked and "auctionhouse-icon-favorite-off" or nil;
self.NormalTexture:SetAtlas(isFavorite and "auctionhouse-icon-favorite" or defaultTexture);
self.HighlightTexture:SetAtlas(isFavorite and "auctionhouse-icon-favorite" or "auctionhouse-icon-favorite-off");
self.HighlightTexture:SetBlendMode(isFavorite and "ADD" or "ADD");
self.HighlightTexture:SetAlpha(isFavorite and 0.2 or 0.4);
end
function AuctionHouseTableCellFavoriteButtonMixin:LockTexture()
self.textureLocked = true;
if not self:IsFavorite() then
self.NormalTexture:SetAtlas("auctionhouse-icon-favorite-off");
end
end
function AuctionHouseTableCellFavoriteButtonMixin:UnlockTexture()
self.textureLocked = false;
if not self:IsFavorite() then
self.NormalTexture:SetAtlas(nil);
end
......@@ -628,23 +634,23 @@ end
AuctionHouseTableHeaderStringMixin = CreateFromMixins(TableBuilderElementMixin);
function AuctionHouseTableHeaderStringMixin:OnClick()
self.owner:SetSortOrder(self.sortOrder);
self:UpdateArrow();
end
function AuctionHouseTableHeaderStringMixin:Init(owner, headerText, sortOrder)
self:SetText(headerText);
if owner.RegisterHeader and sortOrder ~= nil then
self.owner = owner;
owner:RegisterHeader(self);
self.sortOrder = sortOrder;
self:SetScript("OnClick", function(...)
self.owner:SetSortOrder(self.sortOrder);
self:UpdateArrow();
end);
local interactiveHeader = owner.RegisterHeader and sortOrder ~= nil;
self:SetEnabled(interactiveHeader);
self.owner = owner;
self.sortOrder = sortOrder;
if interactiveHeader then
owner:RegisterHeader(self);
self:UpdateArrow();
else
self:SetEnabled(false);
self.Arrow:Hide();
end
end
......
......@@ -189,5 +189,8 @@
</Texture>
</Layer>
</Layers>
<Scripts>
<OnClick method="OnClick"/>
</Scripts>
</Button>
</Ui>
\ No newline at end of file
......@@ -289,21 +289,18 @@ function AuctionHouseUtil.GetTooltipTimeLeftBandText(timeLeftBand)
end
function AuctionHouseUtil.AddSellersToTooltip(tooltip, sellers)
local sellersString = sellers[1] == "player" and GREEN_FONT_COLOR:WrapTextInColorCode(AUCTION_HOUSE_SELLER_YOU) or sellers[1];
local numSellers = #sellers;
if numSellers > 1 then
local otherSellers = "";
sellersString = sellersString..HIGHLIGHT_FONT_COLOR_CODE;
for i = 2, numSellers do
otherSellers = otherSellers..PLAYER_LIST_DELIMITER..sellers[i];
end
local sellersString = sellers[1] == "player" and GREEN_FONT_COLOR:WrapTextInColorCode(AUCTION_HOUSE_SELLER_YOU) or sellers[1];
if otherSellers ~= "" then
sellersString = sellersString..WHITE_FONT_COLOR:WrapTextInColorCode(otherSellers);
sellersString = sellersString..PLAYER_LIST_DELIMITER..sellers[i];
end