Commit f71c6707 authored by TOM_RUS's avatar TOM_RUS
Browse files

WOW-22722patch7.1.0_PTR

parent c9d5cf53
......@@ -387,8 +387,8 @@ function ArtifactPerksMixin:ShowHighlightForRelicItemID(itemID)
local couldFitInAnySlot = false;
for relicSlotIndex = 1, C_ArtifactUI.GetNumRelicSlots() do
if C_ArtifactUI.CanApplyRelicItemIDToSlot(itemID, relicSlotIndex) then
self.TitleContainer:SetRelicSlotHighlighted(relicSlotIndex, true);
couldFitInAnySlot = true;
break;
end
end
......@@ -400,17 +400,12 @@ end
function ArtifactPerksMixin:HideHighlightForRelicItemID(itemID)
RelicMouseOverHighlightHelper(self, false, nil, nil, C_ArtifactUI.GetPowersAffectedByRelicItemID(itemID));
self.TitleContainer:RefreshCursorRelicHighlights();
end
function ArtifactPerksMixin:RefreshCursorHighlights()
local type, itemID = GetCursorInfo();
if type == "item" and IsArtifactRelicItem(itemID) then
self.cursorItemID = itemID;
self:ShowHighlightForRelicItemID(self.cursorItemID);
elseif self.cursorItemID then
self:HideHighlightForRelicItemID(self.cursorItemID);
self.cursorItemID = nil;
self:HideHighlightForRelicItemID(itemID);
end
end
......@@ -572,8 +567,13 @@ function ArtifactTitleTemplateMixin:OnCursorUpdate()
end
function ArtifactTitleTemplateMixin:RefreshCursorRelicHighlights()
local type, itemID = GetCursorInfo();
self:RefreshRelicHighlights(itemID);
end
function ArtifactTitleTemplateMixin:RefreshRelicHighlights(itemID)
for relicSlotIndex in ipairs(self.RelicSlots) do
self:SetRelicSlotHighlighted(relicSlotIndex, C_ArtifactUI.CanApplyCursorRelicToSlot(relicSlotIndex));
self:SetRelicSlotHighlighted(relicSlotIndex, itemID and C_ArtifactUI.CanApplyRelicItemIDToSlot(itemID, relicSlotIndex));
end
end
......@@ -583,10 +583,11 @@ function ArtifactTitleTemplateMixin:SetRelicSlotHighlighted(relicSlotIndex, high
if highlighted then
relicSlot:LockHighlight();
relicSlot.CanSlotAnim:Play();
relicSlot.HighlightTexture:Show();
else
relicSlot:UnlockHighlight();
relicSlot.CanSlotAnim:Stop();
relicSlot.HighlightTexture:SetAlpha(1);
relicSlot.HighlightTexture:Hide();
end
end
end
......@@ -688,6 +689,7 @@ function ArtifactTitleTemplateMixin:EvaluateRelics()
local relicAtlasName = ("Relic-%s-Slot"):format(relicType);
relicSlot:GetNormalTexture():SetAtlas(relicAtlasName, true);
relicSlot:GetHighlightTexture():SetAtlas(relicAtlasName, true);
relicSlot.GlowBorder1:SetAtlas(relicAtlasName, true);
relicSlot.GlowBorder2:SetAtlas(relicAtlasName, true);
relicSlot.GlowBorder3:SetAtlas(relicAtlasName, true);
......
......@@ -78,14 +78,17 @@
</Anchors>
</Texture>
</Layer>
<Layer level="HIGHLIGHT">
<Texture parentKey="InnerHighlightTexture" atlas="bags-roundhighlight" useAtlasSize="true" alphaMode="ADD">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<NormalTexture parentKey="NormalTexture" />
<HighlightTexture parentKey="HighlightTexture" atlas="bags-roundhighlight" useAtlasSize="true" alphaMode="ADD">
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</HighlightTexture>
<HighlightTexture parentKey="HighlightTexture" alphaMode="ADD" />
<Scripts>
<OnEnter>
......
......@@ -40,6 +40,11 @@ end
function ArtifactPowerButtonMixin:OnEnter()
if self.style ~= ARTIFACT_POWER_STYLE_RUNE and not self.locked then
local _, cursorItemID = GetCursorInfo();
if cursorItemID and IsArtifactRelicItem(cursorItemID) then
-- no tooltip
return;
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetArtifactPowerByID(self:GetPowerID());
......
......@@ -251,6 +251,7 @@ function ArtifactUIMixin:OnInventoryItemMouseEnter(bag, slot)
local itemID = select(10, GetContainerItemInfo(bag, slot));
if itemID and IsArtifactRelicItem(itemID) and not CursorHasItem() then
self.PerksTab:ShowHighlightForRelicItemID(itemID);
self.PerksTab.TitleContainer:RefreshRelicHighlights(itemID);
end
end
end
......@@ -259,6 +260,7 @@ function ArtifactUIMixin:OnInventoryItemMouseLeave(bag, slot)
local itemID = select(10, GetContainerItemInfo(bag, slot));
if itemID and IsArtifactRelicItem(itemID) and not CursorHasItem() then
self.PerksTab:HideHighlightForRelicItemID(itemID);
self.PerksTab.TitleContainer:RefreshRelicHighlights();
end
end
......
......@@ -122,7 +122,7 @@ AuctionSort["bidder_duration"] = {
-- list sorts
AuctionSort["list_level"] = {
{ column = "duration", reverse = true },
{ column = "bid", reverse = true },
{ column = "unitprice", reverse = false },
{ column = "quantity", reverse = false },
{ column = "minbidbuyout", reverse = true },
{ column = "name", reverse = true },
......@@ -130,7 +130,7 @@ AuctionSort["list_level"] = {
{ column = "level", reverse = false },
};
AuctionSort["list_duration"] = {
{ column = "bid", reverse = false },
{ column = "unitprice", reverse = false },
{ column = "quantity", reverse = true },
{ column = "minbidbuyout", reverse = false },
{ column = "name", reverse = false },
......@@ -140,7 +140,7 @@ AuctionSort["list_duration"] = {
};
AuctionSort["list_seller"] = {
{ column = "duration", reverse = false },
{ column = "bid", reverse = false },
{ column = "unitprice", reverse = false },
{ column = "quantity", reverse = true },
{ column = "minbidbuyout", reverse = false },
{ column = "name", reverse = false },
......@@ -148,18 +148,18 @@ AuctionSort["list_seller"] = {
{ column = "quality", reverse = false },
{ column = "seller", reverse = false },
};
AuctionSort["list_bid"] = {
AuctionSort["list_unitprice"] = {
{ column = "duration", reverse = false },
{ column = "quantity", reverse = true },
{ column = "name", reverse = false },
{ column = "level", reverse = true },
{ column = "quality", reverse = false },
{ column = "bid", reverse = false },
{ column = "unitprice", reverse = false },
};
AuctionSort["list_quality"] = {
{ column = "duration", reverse = false },
{ column = "bid", reverse = false },
{ column = "unitprice", reverse = false },
{ column = "quantity", reverse = true },
{ column = "minbidbuyout", reverse = false },
{ column = "name", reverse = false },
......
......@@ -258,7 +258,7 @@ function AuctionFrameBrowse_UpdateArrows()
SortButton_UpdateArrow(BrowseLevelSort, "list", "level");
SortButton_UpdateArrow(BrowseDurationSort, "list", "duration");
SortButton_UpdateArrow(BrowseHighBidderSort, "list", "seller");
SortButton_UpdateArrow(BrowseCurrentBidSort, "list", "bid");
SortButton_UpdateArrow(BrowseCurrentBidSort, "list", "unitprice");
end
function AuctionFrameBrowse_OnEvent(self, event, ...)
......@@ -820,6 +820,7 @@ function AuctionFrameBrowse_Update()
button.bidAmount = displayedPrice;
button.buyoutPrice = buyoutPrice;
button.itemCount = count;
button.itemIndex = index;
-- Set highlight
if ( GetSelectedAuctionItem("list") and (offset + i) == GetSelectedAuctionItem("list") ) then
......@@ -1785,6 +1786,64 @@ function AuctionFrame_GetTimeLeftTooltipText(id, isToken)
return text;
end
local function SetupUnitPriceTooltip(tooltip, auctionItem, insertNewline)
if ( auctionItem and auctionItem.itemCount > 1 ) then
local hasBid = auctionItem.bidAmount > 0;
local hasBuyout = auctionItem.buyoutPrice > 0;
if ( hasBid ) then
if ( insertNewline ) then
tooltip:AddLine("|n");
end
SetTooltipMoney(tooltip, ceil(auctionItem.bidAmount / auctionItem.itemCount), "STATIC", AUCTION_TOOLTIP_BID_PREFIX);
end
if ( hasBuyout ) then
SetTooltipMoney(tooltip, ceil(auctionItem.buyoutPrice / auctionItem.itemCount), "STATIC", AUCTION_TOOLTIP_BUYOUT_PREFIX);
end
-- This is necessary to update the extents of the tooltip
tooltip:Show();
end
end
local function GetAuctionButton(buttonType, id)
if ( buttonType == "owner" ) then
return _G["AuctionsButton"..id];
elseif ( buttonType == "bidder" ) then
return _G["BidButton"..id];
elseif ( buttonType == "list" ) then
return _G["BrowseButton"..id];
end
end
function AuctionBrowseFrame_CheckUnlockHighlight(self, selectedType, offset)
local selected = GetSelectedAuctionItem(selectedType);
if ( not selected or (selected ~= self:GetParent():GetID() + offset) ) then
self:GetParent():UnlockHighlight();
end
end
function AuctionPriceTooltipFrame_OnLoad(self)
self:SetMouseClickEnabled(false);
self:SetMouseMotionEnabled(true);
end
function AuctionPriceTooltipFrame_OnEnter(self)
self:GetParent():LockHighlight();
-- Unit price is only supported on the list tab, no need to pass in buttonType argument
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
local button = GetAuctionButton("list", self:GetParent():GetID());
SetupUnitPriceTooltip(GameTooltip, button, false);
end
function AuctionPriceTooltipFrame_OnLeave(self)
AuctionBrowseFrame_CheckUnlockHighlight(self, "list", FauxScrollFrame_GetOffset(BrowseScrollFrame));
GameTooltip_Hide();
end
function AuctionFrameItem_OnEnter(self, type, index)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
......@@ -1801,25 +1860,9 @@ function AuctionFrameItem_OnEnter(self, type, index)
end
-- add price per unit info
local button;
if ( type == "owner" ) then
button = _G["AuctionsButton"..self:GetParent():GetID()];
elseif ( type == "bidder" ) then
button = _G["BidButton"..self:GetParent():GetID()];
elseif ( type == "list" ) then
button = _G["BrowseButton"..self:GetParent():GetID()];
end
if ( button and button.itemCount > 1 ) then
if ( button.bidAmount > 0 ) then
GameTooltip:AddLine("|n");
SetTooltipMoney(GameTooltip, ceil(button.bidAmount / button.itemCount), "STATIC", AUCTION_TOOLTIP_BID_PREFIX);
end
if ( button.buyoutPrice > 0 ) then
SetTooltipMoney(GameTooltip, ceil(button.buyoutPrice / button.itemCount), "STATIC", AUCTION_TOOLTIP_BUYOUT_PREFIX);
end
GameTooltip:Show();
end
local button = GetAuctionButton(type, self:GetParent():GetID());
SetupUnitPriceTooltip(GameTooltip, button, true);
GameTooltip_ShowCompareItem();
if ( IsModifiedClick("DRESSUP") ) then
......@@ -1933,18 +1976,13 @@ end
-- SortButton functions
function SortButton_UpdateArrow(button, type, sort)
local primaryColumn, reversed = GetAuctionSort(type, 1);
button.Arrow:SetShown(sort == primaryColumn);
if (sort == primaryColumn) then
-- primary column, show the sort arrow
if (reversed) then
_G[button:GetName().."Arrow"]:Show();
_G[button:GetName().."Arrow"]:SetTexCoord(0, 0.5625, 1.0, 0);
button.Arrow:SetTexCoord(0, 0.5625, 0, 1);
else
_G[button:GetName().."Arrow"]:Show();
_G[button:GetName().."Arrow"]:SetTexCoord(0, 0.5625, 0, 1.0);
button.Arrow:SetTexCoord(0, 0.5625, 1, 0);
end
else
-- hide sort arrows for non-primary column
_G[button:GetName().."Arrow"]:Hide();
end
end
......
......@@ -805,7 +805,7 @@
</OnClick>
</Scripts>
</Button>
<Button name="BrowseCurrentBidSort" inherits="AuctionSortButtonTemplate" text="CURRENT_BID">
<Button name="BrowseCurrentBidSort" inherits="AuctionSortButtonTemplate" text="AUCTION_BROWSE_UNIT_PRICE_SORT">
<Size>
<AbsDimension x="207" y="19"/>
</Size>
......@@ -818,7 +818,7 @@
</Anchors>
<Scripts>
<OnClick>
AuctionFrame_OnClickSortColumn("list", "bid");
AuctionFrame_OnClickSortColumn("list", "unitprice");
</OnClick>
</Scripts>
</Button>
......
......@@ -88,7 +88,7 @@
</Anchors>
</ButtonText>
<NormalFont style="GameFontHighlightSmall"/>
<NormalTexture name="$parentArrow" file="Interface\Buttons\UI-SortArrow">
<NormalTexture name="$parentArrow" file="Interface\Buttons\UI-SortArrow" parentKey="Arrow">
<Size>
<AbsDimension x="9" y="8"/>
</Size>
......@@ -333,12 +333,7 @@
AuctionFrameItem_OnEnter(self, "list", self:GetParent():GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame));
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("list");
if ( selected and ( selected == self:GetParent():GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "list", FauxScrollFrame_GetOffset(BrowseScrollFrame));
GameTooltip_Hide();
ResetCursor();
</OnLeave>
......@@ -404,12 +399,7 @@
GameTooltip:SetText(self.tooltip);
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("list");
if ( selected and ( selected == self:GetParent():GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "list", FauxScrollFrame_GetOffset(BrowseScrollFrame));
GameTooltip:Hide();
</OnLeave>
</Scripts>
......@@ -509,6 +499,19 @@
</Frame>
</Frames>
</Frame>
<Frame parentKey="PriceTooltipFrame">
<Anchors>
<Anchor point="RIGHT" relativeTo="$parentMoneyFrame" x="-10"/>
<Anchor point="BOTTOM" relativeTo="$parent" y="4"/>
<Anchor point="LEFT" relativeTo="$parentBuyoutFrame"/>
<Anchor point="TOP" relativeTo="$parent" y="-2"/>
</Anchors>
<Scripts>
<OnLoad function="AuctionPriceTooltipFrame_OnLoad"/>
<OnEnter function="AuctionPriceTooltipFrame_OnEnter"/>
<OnLeave function="AuctionPriceTooltipFrame_OnLeave"/>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnClick>
......@@ -674,12 +677,7 @@
AuctionFrameItem_OnEnter(self, "bidder", self:GetParent():GetID() + FauxScrollFrame_GetOffset(BidScrollFrame));
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("bidder");
if ( selected and ( selected == self:GetParent():GetID() + FauxScrollFrame_GetOffset(BidScrollFrame) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "bidder", FauxScrollFrame_GetOffset(BidScrollFrame));
GameTooltip_Hide();
ResetCursor();
</OnLeave>
......@@ -745,12 +743,7 @@
GameTooltip:SetText(self.tooltip);
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("bidder");
if ( selected and ( selected == self:GetParent():GetID() + FauxScrollFrame_GetOffset(BidScrollFrame) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "bidder", FauxScrollFrame_GetOffset(BidScrollFrame));
GameTooltip:Hide();
</OnLeave>
</Scripts>
......@@ -926,12 +919,7 @@
AuctionFrameItem_OnEnter(self, "owner", self:GetParent():GetID() + GetEffectiveAuctionsScrollFrameOffset());
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("owner");
if ( selected and ( selected == ( self:GetParent():GetID() + GetEffectiveAuctionsScrollFrameOffset() ) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "owner", GetEffectiveAuctionsScrollFrameOffset());
GameTooltip_Hide();
ResetCursor();
</OnLeave>
......@@ -997,12 +985,7 @@
GameTooltip:SetText(self.tooltip);
</OnEnter>
<OnLeave>
local selected = GetSelectedAuctionItem("owner");
if ( selected and ( selected == ( self:GetParent():GetID() + GetEffectiveAuctionsScrollFrameOffset() ) ) ) then
<!-- Do nothing -->
else
self:GetParent():UnlockHighlight();
end
AuctionBrowseFrame_CheckUnlockHighlight(self, "owner", GetEffectiveAuctionsScrollFrameOffset());
GameTooltip:Hide();
</OnLeave>
</Scripts>
......
......@@ -78,6 +78,7 @@
</Layer>
<Layer level="OVERLAY">
<FontString parentKey="DungeonName" inherits="QuestFont_Enormous">
<Size x="350" y="0"/>
<Anchors>
<Anchor point="BOTTOM" relativeKey="$parent.Divider" relativePoint="TOP" x="0" y="4"/>
</Anchors>
......
......@@ -259,7 +259,10 @@
</Layers>
<Frames>
<Frame parentKey="ShadowOverlay" inherits="ShadowOverlayTemplate" useParentLevel="true" setAllPoints="true"/>
<Button parentKey="InfoButton" motionScriptsWhileDisabled="true">
<Button parentKey="InfoButton" motionScriptsWhileDisabled="true" inherits="InlineHyperlinkFrameTemplate">
<KeyValues>
<KeyValue key="hasIconHyperlinks" value="true" type="boolean"/>
</KeyValues>
<Size x="208" y="46"/>
<Anchors>
<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="6" y="-6"/>
......
-- C_TransmogCollection.GetItemInfo(itemID, [itemModID]/itemLink/itemName) = appearanceID, sourceID
-- C_TransmogCollection.GetAllAppearanceSources(appearanceID) = { sourceID } This is cross-class, but no guarantee a source is actually attainable
-- C_TransmogCollection.GetSourceInfo(sourceID) = { data }
-- 15th (going for a record here) return of GetItemInfo is expansionID
-- 15th return of GetItemInfo is expansionID
-- new events: TRANSMOG_COLLECTION_SOURCE_ADDED and TRANSMOG_COLLECTION_SOURCE_REMOVED, parameter is sourceID, can be cross-class (wand unlocked from ensemble while on warrior)
local REMOVE_TRANSMOG_ID = 0;
......@@ -100,7 +100,7 @@ function WardrobeTransmogFrame_OnShow(self)
self:RegisterEvent("PLAYER_EQUIPMENT_CHANGED");
local hasAlternateForm, inAlternateForm = HasAlternateForm();
if ( hasAlternateForm ) then
self:RegisterEvent("UNIT_MODEL_CHANGED");
self:RegisterUnitEvent("UNIT_MODEL_CHANGED", "player");
self.inAlternateForm = inAlternateForm;
end
WardrobeTransmogFrame.Model:SetUnit("player");
......@@ -698,8 +698,9 @@ function WardrobeCollectionFrame_OnEvent(self, event, ...)
WardrobeCollectionFrame_RestartSearchTracking();
elseif ( event == "UNIT_MODEL_CHANGED" ) then
local hasAlternateForm, inAlternateForm = HasAlternateForm();
if ( self.inAlternateForm ~= inAlternateForm and self.ModelsFrame.Models[1]:CanSetUnit("player") ) then
if ( (self.inAlternateForm ~= inAlternateForm or self.updateOnModelChanged) and self.ModelsFrame.Models[1]:CanSetUnit("player") ) then
self.inAlternateForm = inAlternateForm;
self.updateOnModelChanged = nil;
WardrobeCollectionFrame_ChangeModelsSlot(nil, WardrobeCollectionFrame.activeSlot);
WardrobeCollectionFrame_Update();
end
......@@ -736,9 +737,9 @@ function WardrobeCollectionFrame_OnShow(self)
self:RegisterEvent("TRANSMOG_COLLECTION_CAMERA_UPDATE");
self:RegisterEvent("APPEARANCE_SEARCH_UPDATED");
self:RegisterEvent("SEARCH_DB_LOADED");
self:RegisterUnitEvent("UNIT_MODEL_CHANGED", "player");
local hasAlternateForm, inAlternateForm = HasAlternateForm();
if ( hasAlternateForm ) then
self:RegisterUnitEvent("UNIT_MODEL_CHANGED", "player");
self.inAlternateForm = inAlternateForm;
end
......@@ -869,6 +870,8 @@ function WardrobeCollectionFrame_OnKeyDown(self, key)
end
function WardrobeCollectionFrame_ChangeModelsSlot(oldSlot, newSlot)
WardrobeCollectionFrame.updateOnModelChanged = nil;
local undressSlot, reloadModel;
local newSlotIsArmor = WardrobeCollectionFrame_GetArmorCategoryIDFromSlot(newSlot);
if ( newSlotIsArmor ) then
......@@ -883,6 +886,15 @@ function WardrobeCollectionFrame_ChangeModelsSlot(oldSlot, newSlot)
reloadModel = true;
end
end
if ( reloadModel and not WardrobeCollectionFrame.ModelsFrame.Models[1]:CanSetUnit("player") ) then
WardrobeCollectionFrame.updateOnModelChanged = true;
for i = 1, #WardrobeCollectionFrame.ModelsFrame.Models do
WardrobeCollectionFrame.ModelsFrame.Models[i]:ClearModel();
end
return;
end
for i = 1, #WardrobeCollectionFrame.ModelsFrame.Models do
local model = WardrobeCollectionFrame.ModelsFrame.Models[i];
if ( undressSlot ) then
......
......@@ -30,7 +30,7 @@ function CompactRaidFrameManager_OnLoad(self)
self:RegisterEvent("RAID_TARGET_UPDATE");
self:RegisterEvent("PLAYER_TARGET_CHANGED");
self.containerResizeFrame:SetMinResize(self.container:GetWidth(), MINIMUM_RAID_CONTAINER_HEIGHT + RESIZE_VERTICAL_OUTSETS * 2);
self.containerResizeFrame:SetMinResize(self.container:GetWidth(), MINIMUM_RAID_CONTAINER_HEIGHT + RESIZE_VERTICAL_OUTSETS * 2 + 1);
self.dynamicContainerPosition = true;
CompactRaidFrameContainer_SetFlowFilterFunction(self.container, CRFFlowFilterFunc)
......
......@@ -22,6 +22,8 @@ local EJ_MAX_SECTION_MOVE = 320;
local EJ_NUM_SEARCH_PREVIEWS = 5;
local EJ_SHOW_ALL_SEARCH_RESULTS_INDEX = EJ_NUM_SEARCH_PREVIEWS + 1;
local NO_INV_TYPE_FILTER = 0;
AJ_MAX_NUM_SUGGESTIONS = 3;
-- Priority list for *not my spec*
......@@ -96,6 +98,24 @@ ExpansionEnumToEJTierDataTableId = {
[LE_EXPANSION_LEGION] = 7,
}
local EncounterJournalSlotFilters = {
{ invType = LE_ITEM_FILTER_TYPE_HEAD, invTypeName = INVTYPE_HEAD },
{ invType = LE_ITEM_FILTER_TYPE_NECK, invTypeName = INVTYPE_NECK },
{ invType = LE_ITEM_FILTER_TYPE_SHOULDER, invTypeName = INVTYPE_SHOULDER },
{ invType = LE_ITEM_FILTER_TYPE_CLOAK, invTypeName = INVTYPE_CLOAK },
{ invType = LE_ITEM_FILTER_TYPE_CHEST, invTypeName = INVTYPE_CHEST },
{ invType = LE_ITEM_FILTER_TYPE_WRIST, invTypeName = INVTYPE_WRIST },
{ invType = LE_ITEM_FILTER_TYPE_HAND, invTypeName = INVTYPE_HAND },
{ invType = LE_ITEM_FILTER_TYPE_WAIST, invTypeName = INVTYPE_WAIST },
{ invType = LE_ITEM_FILTER_TYPE_LEGS, invTypeName = INVTYPE_LEGS },
{ invType = LE_ITEM_FILTER_TYPE_FEET, invTypeName = INVTYPE_FEET },
{ invType = LE_ITEM_FILTER_TYPE_MAIN_HAND, invTypeName = INVTYPE_WEAPONMAINHAND },
{ invType = LE_ITEM_FILTER_TYPE_OFF_HAND, invTypeName = INVTYPE_WEAPONOFFHAND },
{ invType = LE_ITEM_FILTER_TYPE_FINGER, invTypeName = INVTYPE_FINGER },
{ invType = LE_ITEM_FILTER_TYPE_TRINKET, invTypeName = INVTYPE_TRINKET },
{ invType = LE_ITEM_FILTER_TYPE_ARTIFACT_RELIC, invTypeName = EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC },
}
local BOSS_LOOT_BUTTON_HEIGHT = 45;
local INSTANCE_LOOT_BUTTON_HEIGHT = 64;
......@@ -147,6 +167,7 @@ function EncounterJournal_OnLoad(self)
}
NavBar_Initialize(self.navBar, "NavButtonTemplate", homeData, self.navBar.home, self.navBar.overflow);
UIDropDownMenu_Initialize(self.encounter.info.lootScroll.lootFilter, EncounterJournal_InitLootFilter, "MENU");
UIDropDownMenu_Initialize(self.encounter.info.lootScroll.lootSlotFilter, EncounterJournal_InitLootSlotFilter, "MENU");
-- initialize tabs
local instanceSelect = EncounterJournal.instanceSelect;
......@@ -2343,13 +2364,40 @@ function EncounterJournal_TierDropDown_Select(_, tier)
end
function EncounterJournal_SetFilter(self, classID, specID)
EJ_SetLootFilter(classID, specID);
function EncounterJournal_OnFilterChanged(self)
CloseDropDownMenus(1);
EncounterJournal_LootUpdate();
end
function EncounterJournal_SetClassAndSpecFilter(self, classID, specID)
EJ_SetLootFilter(classID, specID);
EncounterJournal_OnFilterChanged(self);
end
function EncounterJournal_RefreshSlotFilterText(self)
local text = ALL_INVENTORY_SLOTS;
local slotFilter = EJ_GetSlotFilter();