Search Arguments UI
Wishlist and Search Categories
This commit is contained in:
@@ -169,7 +169,7 @@ AtlasLoot_Difficulty = {
|
||||
|
||||
["Search"] = {"Bloodforged", "Normal", "Heroic", "Mythic", "Mythic 1", "Mythic 2","Mythic 3","Mythic 4","Mythic 5", "Mythic 6","Mythic 7",
|
||||
"Mythic 8","Mythic 9", "Mythic 10", "Mythic 11", "Mythic 12","Mythic 13","Mythic 14","Mythic 15", "Mythic 16","Mythic 17","Mythic 18",
|
||||
"Mythic 19", "Mythic 20",};
|
||||
"Mythic 19", "Mythic 20", [99] = "Ascended"};
|
||||
|
||||
--Enums for comparisons in code
|
||||
Bloodforged = 1;
|
||||
|
||||
@@ -797,8 +797,15 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
||||
if (dataID == "SearchResult" or dataID == "WishList") and dataSource[dataID][i][8] then
|
||||
itemButton.sourcePage = dataSource[dataID][i][8];
|
||||
end
|
||||
if (dataID == "SearchResult" or dataID == "WishList") and dataSource[dataID][i][AtlasLoot_Difficulty.DIF_SEARCH] then
|
||||
if dataSource[dataID][i][AtlasLoot_Difficulty.DIF_SEARCH] then
|
||||
itemButton.difficulty = dataSource[dataID][i][AtlasLoot_Difficulty.DIF_SEARCH];
|
||||
else
|
||||
itemButton.difficulty = ItemindexID;
|
||||
if dataSource[dataID].Type then
|
||||
if string.find(dataSource[dataID].Type, "Raid") and ItemindexID == 4 then
|
||||
itemButton.difficulty = 99;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
itemButton.i = 1;
|
||||
|
||||
+315
-36
@@ -1749,38 +1749,7 @@
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Quality: ">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="30" y="-20"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parent_EquipText" inherits="GameFontNormal" text="Equip Type Info: ">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent_QualityText" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="-50"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parent_DifficultyText" inherits="GameFontNormal" text="Difficulty: ">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent_EquipText" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="-50"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Anchors>
|
||||
<Frames>
|
||||
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
|
||||
<Anchors>
|
||||
@@ -1799,6 +1768,7 @@
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Button name="$parent_Quality" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
@@ -1806,10 +1776,23 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="-160" y="-40"/>
|
||||
<AbsDimension x="-160" y="-60"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Quality: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Quality" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_QualityMenu:IsOpen() then
|
||||
@@ -1825,6 +1808,7 @@
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Button name="$parent_Equip" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
@@ -1832,10 +1816,23 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent_Quality" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension y="-40"/>
|
||||
<AbsDimension y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Equip Type Info: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Equip" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_EquipMenu:IsOpen() then
|
||||
@@ -1903,6 +1900,7 @@
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Button name="$parent_Difficulty" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
@@ -1910,10 +1908,23 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent_Equip" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension y="-40"/>
|
||||
<AbsDimension y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Difficulty: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Difficulty" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_DifficultyMenu:IsOpen() then
|
||||
@@ -1955,6 +1966,271 @@
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Button name="$parent_Argument1" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent_Difficulty" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension y="-40"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Extra Seach Options 1: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Argument1" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument1Menu:IsOpen() then
|
||||
AtlasLoot_Argument1Menu:Close();
|
||||
else
|
||||
AtlasLoot_Argument1Menu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Argument1Sub" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument1" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument1SubMenu:IsOpen() then
|
||||
AtlasLoot_Argument1SubMenu:Close();
|
||||
else
|
||||
AtlasLoot_Argument1SubMenu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="$parent_Argument1Value" inherits="InputBoxTemplate" letters="5">
|
||||
<Size>
|
||||
<AbsDimension x="65" y="35"></AbsDimension>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument1Sub" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetAutoFocus(false);
|
||||
this:SetTextInsets(0, 8, 0, 0);
|
||||
</OnLoad>
|
||||
<OnEnterPressed>
|
||||
this:ClearFocus();
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
<FontString name="$parent_Argument1String" inherits="GameFontNormal"></FontString>
|
||||
</EditBox>
|
||||
|
||||
<Button name="$parent_Argument2" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent_Argument1" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Extra Seach Options 2: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Argument2" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument2Menu:IsOpen() then
|
||||
AtlasLoot_Argument2Menu:Close();
|
||||
else
|
||||
AtlasLoot_Argument2Menu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Argument2Sub" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument2" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument2SubMenu:IsOpen() then
|
||||
AtlasLoot_Argument2SubMenu:Close();
|
||||
else
|
||||
AtlasLoot_Argument2SubMenu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="$parent_Argument2Value" inherits="InputBoxTemplate" letters="5">
|
||||
<Size>
|
||||
<AbsDimension x="65" y="35"></AbsDimension>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument2Sub" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetAutoFocus(false);
|
||||
this:SetTextInsets(0, 8, 0, 0);
|
||||
</OnLoad>
|
||||
<OnEnterPressed>
|
||||
this:ClearFocus();
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
<FontString name="$parent_Argument2String" inherits="GameFontNormal"></FontString>
|
||||
</EditBox>
|
||||
|
||||
<Button name="$parent_Argument3" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent_Argument2" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension y="-25"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parent_QualityText" inherits="GameFontNormal" text="Extra Seach Options 3: ">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AtlasLootAdvancedSearch_Argument3" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument3Menu:IsOpen() then
|
||||
AtlasLoot_Argument3Menu:Close();
|
||||
else
|
||||
AtlasLoot_Argument3Menu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Argument3Sub" inherits="OptionsButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument3" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if AtlasLoot_Argument3SubMenu:IsOpen() then
|
||||
AtlasLoot_Argument3SubMenu:Close();
|
||||
else
|
||||
AtlasLoot_Argument3SubMenu:Open(this);
|
||||
end
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
this:SetText("Select Option");
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="$parent_Argument3Value" inherits="InputBoxTemplate" letters="5">
|
||||
<Size>
|
||||
<AbsDimension x="65" y="35"></AbsDimension>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Argument3Sub" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="15"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetAutoFocus(false);
|
||||
this:SetTextInsets(0, 8, 0, 0);
|
||||
</OnLoad>
|
||||
<OnEnterPressed>
|
||||
this:ClearFocus();
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
<FontString name="$parent_Argument3String" inherits="GameFontNormal"></FontString>
|
||||
</EditBox>
|
||||
|
||||
<EditBox name="$parent_SearchBox" inherits="InputBoxTemplate" letters="100">
|
||||
<Size>
|
||||
<AbsDimension x="240" y="35"></AbsDimension>
|
||||
@@ -1996,8 +2272,11 @@
|
||||
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
AtlasLoot:AdvancedSearch(AtlasLootAdvancedSearch_SearchBox:GetText());
|
||||
AtlasLootAdvancedSearch_SearchBox:ClearFocus();
|
||||
AtlasLootAdvancedSearch_Argument1Value:ClearFocus();
|
||||
AtlasLootAdvancedSearch_Argument2Value:ClearFocus();
|
||||
AtlasLootAdvancedSearch_Argument3Value:ClearFocus();
|
||||
AtlasLoot:AdvancedSearch(AtlasLootAdvancedSearch_SearchBox:GetText(), AtlasLootAdvancedSearch_Argument1Value:GetText(), AtlasLootAdvancedSearch_Argument2Value:GetText(), AtlasLootAdvancedSearch_Argument3Value:GetText());
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
@@ -248,26 +248,19 @@ function AtlasLootItem_OnClick(arg1)
|
||||
if AtlasLootItemsFrame.refresh[1] == "WishList" then
|
||||
AtlasLoot_DeleteFromWishList(this.itemID);
|
||||
elseif AtlasLootItemsFrame.refresh[1] == "SearchResult" then
|
||||
AtlasLoot:GetOriginalDataFromSearchResult(this.itemID);
|
||||
if this.difficulty then
|
||||
AtlasLoot:GetOriginalDataFromSearchResult(this.itemID);
|
||||
end
|
||||
else
|
||||
AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2], this);
|
||||
if this.difficulty then
|
||||
AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2], this, nil, this.difficulty);
|
||||
else
|
||||
AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), AtlasLootItemsFrame.refreshOri[1].."|"..AtlasLootItemsFrame.refreshOri[2], this);
|
||||
end
|
||||
end
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and this.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", this.sourcePage);
|
||||
if(dataID and dataSource and AtlasLoot_IsLootTableAvailable(dataID)) then
|
||||
if (this.difficulty) then
|
||||
if(AtlasLoot_Data[dataID].Type) then
|
||||
AtlasLoot_DifficultyEnable(dataID, AtlasLoot_Data);
|
||||
lastType = AtlasLoot_Data[dataID].Type
|
||||
local dif_color = "";
|
||||
if this.difficulty == 1 or this.difficulty == 2 then
|
||||
dif_color = "";
|
||||
else
|
||||
dif_color = "=q4="
|
||||
end
|
||||
AtlasLoot_DewDropSubMenu2Click(dataID, this.difficulty, dif_color);
|
||||
end
|
||||
end
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, AtlasLoot_TableNames[dataID][1], AtlasLootItemsFrame.refresh[4]);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,6 +34,7 @@ STATFILTERS = {
|
||||
["spirit"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
["spir"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
["spi"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
["spr"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
|
||||
["health"] = "ITEM_MOD_HEALTH_SHORT",
|
||||
["mana"] = "ITEM_MOD_MANA_SHORT",
|
||||
@@ -136,7 +137,7 @@ STATFILTERS = {
|
||||
["resarc"] = "RESISTANCE6_NAME"
|
||||
};
|
||||
|
||||
local ITEMSOCKETSTATFILTERS = {
|
||||
ITEMSOCKETSTATFILTERS = {
|
||||
"EMPTY_SOCKET_BLUE",
|
||||
"EMPTY_SOCKET_RED",
|
||||
"EMPTY_SOCKET_YELLOW",
|
||||
@@ -144,7 +145,7 @@ local ITEMSOCKETSTATFILTERS = {
|
||||
"EMPTY_SOCKET_NO_COLOR"
|
||||
};
|
||||
|
||||
local ITEMINFOFILTERS = {
|
||||
ITEMINFOFILTERS = {
|
||||
["ilvl"] = "ilvl",
|
||||
["minlvl"] = "minlvl",
|
||||
["type"] = "type",
|
||||
@@ -152,50 +153,7 @@ local ITEMINFOFILTERS = {
|
||||
["quality"] = "quality"
|
||||
};
|
||||
|
||||
local ITEMINFOVALUEFILTERS = {
|
||||
["poor"] = 0,
|
||||
["common"] = 1,
|
||||
["uncommon"] = 2,
|
||||
["rare"] = 3,
|
||||
["epic"] = 4,
|
||||
["legendary"] = 5,
|
||||
["artifact"] = 6,
|
||||
["heirloom"] = 7
|
||||
};
|
||||
|
||||
local ITEMINFOEQUIPMENTLOC = {
|
||||
["INVTYPE_NON_EQUIP"] = "INVTYPE_NON_EQUIP",
|
||||
["INVTYPE_HEAD"] = "INVTYPE_HEAD",
|
||||
["INVTYPE_NECK"] = "INVTYPE_NECK",
|
||||
["INVTYPE_SHOULDER"] = "INVTYPE_SHOULDER",
|
||||
["INVTYPE_BODY"] = "INVTYPE_BODY",
|
||||
["INVTYPE_CHEST"] = "INVTYPE_CHEST",
|
||||
["INVTYPE_WAIST"] = "INVTYPE_WAIST",
|
||||
["INVTYPE_LEGS"] = "INVTYPE_LEGS",
|
||||
["INVTYPE_FEET"] = "INVTYPE_FEET",
|
||||
["INVTYPE_WRIST"] = "INVTYPE_WRIST",
|
||||
["INVTYPE_HAND"] = "INVTYPE_HAND",
|
||||
["INVTYPE_FINGER"] = "INVTYPE_FINGER",
|
||||
["INVTYPE_TRINKET"] = "INVTYPE_TRINKET",
|
||||
["INVTYPE_WEAPON"] = "INVTYPE_WEAPON",
|
||||
["INVTYPE_SHIELD"] = "INVTYPE_SHIELD",
|
||||
["INVTYPE_RANGED"] = "INVTYPE_RANGED",
|
||||
["INVTYPE_CLOAK"] = "INVTYPE_CLOAK",
|
||||
["INVTYPE_2HWEAPON"] = "INVTYPE_2HWEAPON",
|
||||
["INVTYPE_BAG"] = "INVTYPE_BAG",
|
||||
["INVTYPE_TABARD"] = "INVTYPE_TABARD",
|
||||
["INVTYPE_ROBE"] = "INVTYPE_ROBE",
|
||||
["INVTYPE_WEAPONMAINHAND"] = "INVTYPE_WEAPONMAINHAND",
|
||||
["INVTYPE_WEAPONOFFHAND"] = "INVTYPE_WEAPONOFFHAND",
|
||||
["INVTYPE_HOLDABLE"] = "INVTYPE_HOLDABLE",
|
||||
["INVTYPE_AMMO"] = "INVTYPE_AMMO",
|
||||
["INVTYPE_THROWN"] = "INVTYPE_THROWN",
|
||||
["INVTYPE_RANGEDRIGHT"] = "INVTYPE_RANGEDRIGHT",
|
||||
["INVTYPE_QUIVER"] = "INVTYPE_QUIVER",
|
||||
["INVTYPE_RELIC"] = "INVTYPE_RELIC"
|
||||
};
|
||||
|
||||
local ITEMLEVELGEAREQUIPFILTER = {
|
||||
ITEMLEVELGEAREQUIPFILTER = {
|
||||
["INVTYPE_NON_EQUIP"] = "INVTYPE_NON_EQUIP",
|
||||
["INVTYPE_BODY"] = "INVTYPE_BODY",
|
||||
["INVTYPE_BAG"] = "INVTYPE_BAG",
|
||||
@@ -626,7 +584,7 @@ end
|
||||
function AtlasLoot:GetOriginalDataFromSearchResult(itemID)
|
||||
for i, v in ipairs(AtlasLootCharDB["SearchResult"]) do
|
||||
if v[2] == itemID then
|
||||
AtlasLoot_ShowWishListDropDown(v[2], v[3], v[4], v[5], v[8], this);
|
||||
AtlasLoot_ShowWishListDropDown(v[2], v[3], v[4], v[5], v[8], this, nil, v[AtlasLoot_Difficulty.DIF_SEARCH]);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+396
-199
@@ -8,6 +8,15 @@ AtlasLoot_EquipMenu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_EquipSubMenu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_WeaponSubMenu = AceLibrary("Dewdrop-2.0");
|
||||
|
||||
AtlasLoot_Argument1Menu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_Argument1SubMenu = AceLibrary("Dewdrop-2.0");
|
||||
|
||||
AtlasLoot_Argument2Menu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_Argument2SubMenu = AceLibrary("Dewdrop-2.0");
|
||||
|
||||
AtlasLoot_Argument3Menu = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_Argument3SubMenu = AceLibrary("Dewdrop-2.0");
|
||||
|
||||
local GREY = "|cff999999";
|
||||
local RED = "|cffff0000";
|
||||
local WHITE = "|cffFFFFFF";
|
||||
@@ -15,155 +24,7 @@ local GREEN = "|cff1eff00";
|
||||
local PURPLE = "|cff9F3FFF";
|
||||
local BLUE = "|cff0070dd";
|
||||
local ORANGE = "|cffFF8400";
|
||||
|
||||
-- Supported Operators
|
||||
local BINARYOPERATORS = { "&" };
|
||||
local OPERATORS = { "<>", "<=", ">=", "=", "<", ">" };
|
||||
|
||||
-- Supported Stat Filters
|
||||
local STATFILTERS = {
|
||||
-- Base Stats
|
||||
["stamina"] = "ITEM_MOD_STAMINA_SHORT",
|
||||
["stam"] = "ITEM_MOD_STAMINA_SHORT",
|
||||
["sta"] = "ITEM_MOD_STAMINA_SHORT",
|
||||
|
||||
["strength"] = "ITEM_MOD_STRENGTH_SHORT",
|
||||
["str"] = "ITEM_MOD_STRENGTH_SHORT",
|
||||
|
||||
["agility"] = "ITEM_MOD_AGILITY_SHORT",
|
||||
["agi"] = "ITEM_MOD_AGILITY_SHORT",
|
||||
|
||||
["intellect"] = "ITEM_MOD_INTELLECT_SHORT",
|
||||
["int"] = "ITEM_MOD_INTELLECT_SHORT",
|
||||
|
||||
["spirit"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
["spir"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
["spi"] = "ITEM_MOD_SPIRIT_SHORT",
|
||||
|
||||
["health"] = "ITEM_MOD_HEALTH_SHORT",
|
||||
["mana"] = "ITEM_MOD_MANA_SHORT",
|
||||
|
||||
["mp5"] = "ITEM_MOD_POWER_REGEN0_SHORT",
|
||||
["mpr"] = "ITEM_MOD_POWER_REGEN0_SHORT",
|
||||
|
||||
["hp5"] = "ITEM_MOD_HEALTH_REGEN_SHORT",
|
||||
["hpr"] = "ITEM_MOD_HEALTH_REGEN_SHORT",
|
||||
|
||||
--Sockets
|
||||
["socketblue"] = "EMPTY_SOCKET_BLUE",
|
||||
["socketred"] = "EMPTY_SOCKET_RED",
|
||||
["socketyellow"] = "EMPTY_SOCKET_YELLOW",
|
||||
|
||||
["socketnocolor"] = "EMPTY_SOCKET_NO_COLOR",
|
||||
["socketwhite"] = "EMPTY_SOCKET_NO_COLOR",
|
||||
|
||||
["socketmeta"] = "EMPTY_SOCKET_META",
|
||||
["meta"] = "EMPTY_SOCKET_META",
|
||||
|
||||
--Secondary Stats
|
||||
["attackpowerferal"] = "ITEM_MOD_FERAL_ATTACK_POWER_SHORT",
|
||||
["attackpowferal"] = "ITEM_MOD_FERAL_ATTACK_POWER_SHORT",
|
||||
["apferal"] = "ITEM_MOD_FERAL_ATTACK_POWER_SHORT",
|
||||
|
||||
["attackpower"] = "ITEM_MOD_ATTACK_POWER_SHORT",
|
||||
["attackpow"] = "ITEM_MOD_ATTACK_POWER_SHORT",
|
||||
["ap"] = "ITEM_MOD_ATTACK_POWER_SHORT",
|
||||
|
||||
["spellpower"] = "ITEM_MOD_SPELL_POWER_SHORT",
|
||||
["spellpow"] = "ITEM_MOD_SPELL_POWER_SHORT",
|
||||
["sp"] = "ITEM_MOD_SPELL_POWER_SHORT",
|
||||
|
||||
["spellpenetration"] = "ITEM_MOD_SPELL_PENETRATION_SHORT",
|
||||
["spellpen"] = "ITEM_MOD_SPELL_PENETRATION_SHORT",
|
||||
["spp"] = "ITEM_MOD_SPELL_PENETRATION_SHORT",
|
||||
|
||||
["crit"] = "ITEM_MOD_CRIT_RATING_SHORT",
|
||||
["haste"] = "ITEM_MOD_HASTE_RATING_SHORT",
|
||||
|
||||
["hit"] = "ITEM_MOD_HIT_RATING_SHORT",
|
||||
|
||||
["armorpenetration"] = "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT",
|
||||
["armourpenetration"] = "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT",
|
||||
["armorpen"] = "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT",
|
||||
["armourpen"] = "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT",
|
||||
["arp"] = "ITEM_MOD_ARMOR_PENETRATION_RATING_SHORT",
|
||||
|
||||
["expertise"] = "ITEM_MOD_EXPERTISE_RATING_SHORT",
|
||||
["exp"] = "ITEM_MOD_EXPERTISE_RATING_SHORT",
|
||||
|
||||
["dps"] = "ITEM_MOD_DAMAGE_PER_SECOND_SHORT",
|
||||
|
||||
["resilience"] = "ITEM_MOD_RESILIENCE_RATING",
|
||||
["resil"] = "ITEM_MOD_RESILIENCE_RATING",
|
||||
["res"] = "ITEM_MOD_RESILIENCE_RATING",
|
||||
|
||||
["defense"] = "ITEM_MOD_DEFENSE_SKILL_RATING_SHORT",
|
||||
["def"] = "ITEM_MOD_DEFENSE_SKILL_RATING_SHORT",
|
||||
|
||||
["dodge"] = "ITEM_MOD_DODGE_RATING_SHORT",
|
||||
["dod"] = "ITEM_MOD_DODGE_RATING_SHORT",
|
||||
|
||||
["block"] = "ITEM_MOD_BLOCK_RATING_SHORT",
|
||||
|
||||
["blockvalue"] = "ITEM_MOD_BLOCK_VALUE_SHORT",
|
||||
["blockval"] = "ITEM_MOD_BLOCK_VALUE_SHORT",
|
||||
["bv"] = "ITEM_MOD_BLOCK_VALUE_SHORT",
|
||||
|
||||
["parry"] = "ITEM_MOD_PARRY_RATING_SHORT",
|
||||
|
||||
--Resistances
|
||||
["armor"] = "RESISTANCE0_NAME",
|
||||
["armour"] = "RESISTANCE0_NAME",
|
||||
["arm"] = "RESISTANCE0_NAME",
|
||||
["resistancephysical"] = "RESISTANCE0_NAME",
|
||||
["resistancephys"] = "RESISTANCE0_NAME",
|
||||
["resphys"] = "RESISTANCE0_NAME",
|
||||
|
||||
["resistanceholy"] = "RESISTANCE1_NAME",
|
||||
["resholy"] = "RESISTANCE1_NAME",
|
||||
|
||||
["resistancefire"] = "RESISTANCE2_NAME",
|
||||
["resfire"] = "RESISTANCE2_NAME",
|
||||
|
||||
["resistancenature"] = "RESISTANCE3_NAME",
|
||||
["resnature"] = "RESISTANCE3_NAME",
|
||||
["resnat"] = "RESISTANCE3_NAME",
|
||||
|
||||
["resistanceforst"] = "RESISTANCE4_NAME",
|
||||
["resfrost"] = "RESISTANCE4_NAME",
|
||||
|
||||
["resistanceshadow"] = "RESISTANCE5_NAME",
|
||||
["resshadow"] = "RESISTANCE5_NAME",
|
||||
["resshad"] = "RESISTANCE5_NAME",
|
||||
|
||||
["resistancearcane"] = "RESISTANCE6_NAME",
|
||||
["resarcane"] = "RESISTANCE6_NAME",
|
||||
["resarc"] = "RESISTANCE6_NAME"
|
||||
};
|
||||
|
||||
local ITEMSOCKETSTATFILTERS = {
|
||||
"EMPTY_SOCKET_BLUE",
|
||||
"EMPTY_SOCKET_RED",
|
||||
"EMPTY_SOCKET_YELLOW",
|
||||
"EMPTY_SOCKET_META",
|
||||
"EMPTY_SOCKET_NO_COLOR"
|
||||
};
|
||||
|
||||
local ITEMINFOFILTERS = {
|
||||
["ilvl"] = "ilvl",
|
||||
["minlvl"] = "minlvl",
|
||||
["type"] = "type",
|
||||
["subtype"] = "subtype",
|
||||
["quality"] = "quality"
|
||||
};
|
||||
|
||||
local ITEMLEVELGEAREQUIPFILTER = {
|
||||
["INVTYPE_NON_EQUIP"] = "INVTYPE_NON_EQUIP",
|
||||
["INVTYPE_BODY"] = "INVTYPE_BODY",
|
||||
["INVTYPE_BAG"] = "INVTYPE_BAG",
|
||||
["INVTYPE_AMMO"] = "INVTYPE_AMMO",
|
||||
["INVTYPE_QUIVER"] = "INVTYPE_QUIVER"
|
||||
};
|
||||
local DEFAULT = "|cffFFd200";
|
||||
|
||||
AtlasLoot_FrameMenuList = {
|
||||
["EquipSubMenu"] = {AtlasLoot_EquipSubMenu, "AtlasLootAdvancedSearch_EquipSub", "Select Option", "equipType", "", "AtlasLootAdvancedSearch_WeaponSub"};
|
||||
@@ -212,10 +73,7 @@ AtlasLoot_AdvancedSearchMenus = {
|
||||
},
|
||||
[6] = {
|
||||
{AtlasLoot_FixText("=q5=").."Legendary", "quality", "=q5="},
|
||||
},
|
||||
[7] = {
|
||||
{AtlasLoot_FixText("=q6=").."Artifact", "quality", "=q6="},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
["Equip"] = {
|
||||
@@ -354,6 +212,96 @@ AtlasLoot_AdvancedSearchMenus = {
|
||||
};
|
||||
}
|
||||
|
||||
AtlasLoot_AdvancedSearchArguments = {
|
||||
["Arguments"] = {
|
||||
[1] = {
|
||||
["Primary Stats"] = {
|
||||
{"Stamina", "sta"},
|
||||
{"Strength", "str"},
|
||||
{"Agility", "agi"};
|
||||
{"Intellect", "int"},
|
||||
{"Spirit", "spr"},
|
||||
}
|
||||
};
|
||||
[2] = {
|
||||
["Secondary Stats"] = {
|
||||
{"Attack Power", "ap"};
|
||||
{"Spell Power", "sp"};
|
||||
{"Crit", "crit"};
|
||||
{"Hit", "hit"};
|
||||
{"Haste", "haste"};
|
||||
{"Expertise", "exp"};
|
||||
{"Armor Pen", "arp"};
|
||||
{"Spell Pen", "spp"};
|
||||
}
|
||||
};
|
||||
[3] = {
|
||||
["Defensive Stats"] = {
|
||||
{"Defense", "def"};
|
||||
{"Dodge", "dodge"};
|
||||
{"Parry", "parry"};
|
||||
{"Block", "block"};
|
||||
{"Block Value", "bv"};
|
||||
{"Resilience", "res"};
|
||||
}
|
||||
};
|
||||
[4] = {
|
||||
["Resistances"] = {
|
||||
{"Armor", "armor"};
|
||||
{"Holy Resist", "resholy"};
|
||||
{"Fire Resist", "resfire"};
|
||||
{"Nature Resist", "resnat"};
|
||||
{"Frost Resist", "resfrost"};
|
||||
{"Shadow Resist", "resshad"};
|
||||
{"Arcane Resist", "resarc"};
|
||||
}
|
||||
};
|
||||
[5] = {
|
||||
["Sockets"] = {
|
||||
{"Any", "socket"};
|
||||
{"Red Socket", "socketred"};
|
||||
{"Blue Socket", "socketblue"};
|
||||
{"Yellow Socket", "socketyellow"};
|
||||
{"Meta Socket", "socketmeta"};
|
||||
}
|
||||
};
|
||||
[6] = {
|
||||
["Other"] = {
|
||||
{"Required Level", "minlvl"};
|
||||
{"Item Level", "ilvl"};
|
||||
}
|
||||
};
|
||||
|
||||
[7] = {
|
||||
{RED.."Reset", "reset"}
|
||||
}
|
||||
};
|
||||
|
||||
["Operators"] = {
|
||||
[1] = {
|
||||
{"Equals", "=", true};
|
||||
},
|
||||
[2] = {
|
||||
{"Greater Than", ">", true}
|
||||
},
|
||||
[3] = {
|
||||
{"Greater Than Or Equal", ">=", true}
|
||||
},
|
||||
[4] = {
|
||||
{"Less Than", "<", true}
|
||||
},
|
||||
[5] = {
|
||||
{"Less Than Or Equal", "<=", true}
|
||||
},
|
||||
[6] = {
|
||||
{"Not Equal", "<>", true}
|
||||
},
|
||||
[7] = {
|
||||
{RED.."Reset", "reset", true}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local findByQuality = false;
|
||||
local findByEquip = false;
|
||||
local findByEquipType = false;
|
||||
@@ -364,7 +312,13 @@ AdvancedSearchOptions = {
|
||||
["quality"] = "",
|
||||
["equip"] = "",
|
||||
["equipType"] = "",
|
||||
["difficulty"] = 2
|
||||
["difficulty"] = 0,
|
||||
["arg1"] = "",
|
||||
["arg1op"] = "",
|
||||
["arg2"] = "",
|
||||
["arg2op"] = "",
|
||||
["arg3"] = "",
|
||||
["arg3op"] = "",
|
||||
}
|
||||
|
||||
local AtlasLoot_AdvancedSearchQuality = {
|
||||
@@ -390,6 +344,14 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
AtlasLoot_AdvancedSearchRegister(AtlasLoot_EquipMenu, AtlasLootAdvancedSearch_Equip, AtlasLoot_AdvancedSearchMenus["Equip"]);
|
||||
AtlasLoot_AdvancedSearchRegister(AtlasLoot_DifficultyMenu, AtlasLootAdvancedSearch_Difficulty, AtlasLoot_AdvancedSearchMenus["Difficulty"]);
|
||||
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument1Menu, AtlasLootAdvancedSearch_Argument1, "1", AtlasLoot_AdvancedSearchArguments["Arguments"]);
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument2Menu, AtlasLootAdvancedSearch_Argument2, "2", AtlasLoot_AdvancedSearchArguments["Arguments"]);
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument3Menu, AtlasLootAdvancedSearch_Argument3, "3", AtlasLoot_AdvancedSearchArguments["Arguments"]);
|
||||
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument1SubMenu, AtlasLootAdvancedSearch_Argument1Sub, "1", AtlasLoot_AdvancedSearchArguments["Operators"]);
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument2SubMenu, AtlasLootAdvancedSearch_Argument2Sub, "2", AtlasLoot_AdvancedSearchArguments["Operators"]);
|
||||
AtlasLoot_AdvancedSearchArgumentRegister(AtlasLoot_Argument3SubMenu, AtlasLootAdvancedSearch_Argument3Sub, "3", AtlasLoot_AdvancedSearchArguments["Operators"]);
|
||||
|
||||
--Hide all elements that could be in the AtlasTable
|
||||
getglobal("AtlasLootItemsFrame_NEXT"):Hide();
|
||||
getglobal("AtlasLootItemsFrame_PREV"):Hide();
|
||||
@@ -427,25 +389,10 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
end
|
||||
|
||||
--Reset Search options
|
||||
AdvancedSearchOptions = { }
|
||||
AdvancedSearchOptions = {
|
||||
["quality"] = "",
|
||||
["equip"] = "",
|
||||
["equipType"] = "",
|
||||
["difficulty"] = 2
|
||||
}
|
||||
findByQuality = false;
|
||||
findByEquip = false;
|
||||
findByEquipType = false;
|
||||
findByName = false;
|
||||
findByDifficulty = false;
|
||||
AtlasLoot_AdvancedSearchReset();
|
||||
|
||||
AtlasLoot_BossName:SetText("Advanced Search");
|
||||
|
||||
AtlasLootAdvancedSearch_EquipSub:Disable();
|
||||
AtlasLootAdvancedSearch_MythicSub:Disable();
|
||||
AtlasLootAdvancedSearch_WeaponSub:Disable();
|
||||
|
||||
AtlasLootAdvancedSearch:ClearAllPoints();
|
||||
AtlasLootAdvancedSearch:SetParent(pFrame[2]);
|
||||
AtlasLootAdvancedSearch:ClearAllPoints();
|
||||
@@ -459,7 +406,13 @@ function AtlasLoot_AdvancedSearchReset()
|
||||
["quality"] = "",
|
||||
["equip"] = "",
|
||||
["equipType"] = "",
|
||||
["difficulty"] = 2
|
||||
["difficulty"] = 0,
|
||||
["arg1"] = "",
|
||||
["arg1op"] = "",
|
||||
["arg2"] = "",
|
||||
["arg2op"] = "",
|
||||
["arg3"] = "",
|
||||
["arg3op"] = "",
|
||||
}
|
||||
|
||||
findByQuality = false;
|
||||
@@ -471,6 +424,9 @@ function AtlasLoot_AdvancedSearchReset()
|
||||
AtlasLootAdvancedSearch_Quality:SetText("Select Quality");
|
||||
AtlasLootAdvancedSearch_Equip:SetText("Select Item Type");
|
||||
AtlasLootAdvancedSearch_Difficulty:SetText("Select Difficulty");
|
||||
AtlasLootAdvancedSearch_Argument1:SetText("Select Option");
|
||||
AtlasLootAdvancedSearch_Argument2:SetText("Select Option");
|
||||
AtlasLootAdvancedSearch_Argument3:SetText("Select Option");
|
||||
|
||||
AtlasLootAdvancedSearch_EquipSub:Disable();
|
||||
AtlasLootAdvancedSearch_EquipSub:SetText("Select Option")
|
||||
@@ -478,6 +434,19 @@ function AtlasLoot_AdvancedSearchReset()
|
||||
AtlasLootAdvancedSearch_MythicSub:SetText("Mythic+ 1");
|
||||
AtlasLootAdvancedSearch_WeaponSub:Disable();
|
||||
AtlasLootAdvancedSearch_WeaponSub:SetText("Select Weapon Type")
|
||||
|
||||
AtlasLootAdvancedSearch_Argument1Sub:Disable();
|
||||
AtlasLootAdvancedSearch_Argument1Sub:SetText("Select Option");
|
||||
AtlasLootAdvancedSearch_Argument1Value:Hide();
|
||||
AtlasLootAdvancedSearch_Argument1Value:SetText("");
|
||||
AtlasLootAdvancedSearch_Argument2Sub:Disable();
|
||||
AtlasLootAdvancedSearch_Argument2Sub:SetText("Select Option");
|
||||
AtlasLootAdvancedSearch_Argument2Value:Hide();
|
||||
AtlasLootAdvancedSearch_Argument2Value:SetText("");
|
||||
AtlasLootAdvancedSearch_Argument3Sub:Disable();
|
||||
AtlasLootAdvancedSearch_Argument3Sub:SetText("Select Option");
|
||||
AtlasLootAdvancedSearch_Argument3Value:Hide();
|
||||
AtlasLootAdvancedSearch_Argument3Value:SetText("");
|
||||
end
|
||||
|
||||
function AtlasLoot_AdvancedSearchClose()
|
||||
@@ -576,20 +545,195 @@ function AtlasLoot_AdvancedSearchRegister(DropDown, DropDownObject, MenuOption)
|
||||
)
|
||||
end
|
||||
|
||||
function AtlasLoot_AdvancedSearchArgumentClick(Object, VariableToSet, VariableValue, IsOperator)
|
||||
if IsOperator and VariableValue == "reset" then
|
||||
AdvancedSearchOptions["arg"..VariableToSet.."op"] = "";
|
||||
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):SetText("");
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):Hide();
|
||||
|
||||
Object[1]:SetText("Select Option");
|
||||
Object[2]:Close();
|
||||
elseif IsOperator then
|
||||
AdvancedSearchOptions["arg"..VariableToSet.."op"] = VariableValue;
|
||||
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):Show();
|
||||
|
||||
Object[1]:SetText(Object[3]);
|
||||
Object[2]:Close();
|
||||
elseif VariableValue == "reset" then
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Sub"):SetText("Select Option");
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Sub"):Disable();
|
||||
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):SetText("");
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):Hide();
|
||||
|
||||
AdvancedSearchOptions["arg"..VariableToSet] = "";
|
||||
AdvancedSearchOptions["arg"..VariableToSet.."op"] = "";
|
||||
|
||||
Object[1]:SetText("Select Option");
|
||||
Object[2]:Close();
|
||||
else
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Sub"):SetText("Select Option");
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Sub"):Enable();
|
||||
AdvancedSearchOptions["arg"..VariableToSet.."op"] = "";
|
||||
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):SetText("");
|
||||
getglobal("AtlasLootAdvancedSearch_Argument"..VariableToSet.."Value"):Hide();
|
||||
|
||||
AdvancedSearchOptions["arg"..VariableToSet] = VariableValue;
|
||||
Object[1]:SetText(Object[3]);
|
||||
Object[2]:Close();
|
||||
end
|
||||
end
|
||||
|
||||
function AtlasLoot_AdvancedSearchArgumentRegister(DropDown, DropDownObject, ArgumentCount, ArgumentMenu)
|
||||
DropDown:Register(DropDownObject,
|
||||
'point', function(parent)
|
||||
return "TOP", "BOTTOM"
|
||||
end,
|
||||
'children', function(level, value)
|
||||
if level == 1 then
|
||||
if AtlasLoot_AdvancedSearchArguments then
|
||||
for k,v in ipairs(ArgumentMenu) do
|
||||
--If a link to show a submenu
|
||||
if (type(v[1]) == "table") and (type(v[1][1]) == "string") then
|
||||
local checked = false;
|
||||
if v[1][3] == "Submenu" then
|
||||
DropDown:AddLine(
|
||||
'text', v[1][1],
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_AdvancedSearchArgumentClick,
|
||||
'arg1', {DropDownObject, DropDown, v[1][1]},
|
||||
'arg2', ArgumentCount,
|
||||
'arg3', v[1][2],
|
||||
'arg4', v[1][3],
|
||||
'notCheckable', true
|
||||
)
|
||||
elseif v[1][1] ~= "" then
|
||||
DropDown:AddLine(
|
||||
'text', v[1][1],
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_AdvancedSearchArgumentClick,
|
||||
'arg1', {DropDownObject, DropDown, v[1][1]},
|
||||
'arg2', ArgumentCount,
|
||||
'arg3', v[1][2],
|
||||
'arg4', v[1][3],
|
||||
'notCheckable', true
|
||||
)
|
||||
end
|
||||
else
|
||||
local lock=0;
|
||||
--If an entry linked to a subtable
|
||||
for i,j in pairs(v) do
|
||||
if lock==0 then
|
||||
DropDown:AddLine(
|
||||
'text', i,
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'hasArrow', true,
|
||||
'value', j,
|
||||
'notCheckable', true
|
||||
)
|
||||
lock=1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--Close button
|
||||
DropDown:AddLine(
|
||||
'text', AL["Close Menu"],
|
||||
'textR', 0,
|
||||
'textG', 1,
|
||||
'textB', 1,
|
||||
'func', function() DropDown:Close() end,
|
||||
'notCheckable', true
|
||||
)
|
||||
elseif level == 2 then
|
||||
if value then
|
||||
for k,v in ipairs(value) do
|
||||
if type(v) == "table" then
|
||||
if (type(v[1]) == "string") then
|
||||
local checked = false;
|
||||
--If an entry to show a submenu
|
||||
if v[4] == "Header" then
|
||||
DropDown:AddLine(
|
||||
'text', v[1],
|
||||
'textR', 0.2,
|
||||
'textG', 0.82,
|
||||
'textB', 0.5,
|
||||
'func', AtlasLoot_AdvancedSearchArgumentClick,
|
||||
'arg1', {DropDownObject, DropDown, v[1]},
|
||||
'arg2', ArgumentCount,
|
||||
'arg3', v[2],
|
||||
'arg4', v[3],
|
||||
'notCheckable', true
|
||||
)
|
||||
elseif v[3] == "Submenu" then
|
||||
DropDown:AddLine(
|
||||
'text', v[1],
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_AdvancedSearchArgumentClick,
|
||||
'arg1', {DropDownObject, DropDown, v[1]},
|
||||
'arg2', ArgumentCount,
|
||||
'arg3', v[2],
|
||||
'arg4', v[3],
|
||||
'notCheckable', true
|
||||
)
|
||||
else
|
||||
DropDown:AddLine(
|
||||
'text', v[1],
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_AdvancedSearchArgumentClick,
|
||||
'arg1', {DropDownObject, DropDown, v[1]},
|
||||
'arg2', ArgumentCount,
|
||||
'arg3', v[2],
|
||||
'arg4', v[3],
|
||||
'notCheckable', true
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
DropDown:AddLine(
|
||||
'text', AL["Close Menu"],
|
||||
'textR', 0,
|
||||
'textG', 1,
|
||||
'textB', 1,
|
||||
'func', function() DropDown:Close() end,
|
||||
'notCheckable', true
|
||||
)
|
||||
end
|
||||
end,
|
||||
'dontHook', true
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
function AtlasLoot:AdvancedSearch(Text)
|
||||
|
||||
function AtlasLoot:AdvancedSearch(Text, arg1, arg2, arg3)
|
||||
if not Text then return end
|
||||
Text = strtrim(Text);
|
||||
if Text == "" then findByName = false else findByName = true end
|
||||
local searchTitleString = Text
|
||||
|
||||
local dif = 2;
|
||||
|
||||
local dif = AdvancedSearchOptions["difficulty"];
|
||||
searchTitleString = searchTitleString.." "..WHITE..AtlasLoot_Difficulty.Search[dif];
|
||||
|
||||
if dif ~= 2 then
|
||||
if AdvancedSearchOptions["difficulty"] ~= 0 then
|
||||
findByDifficulty = true;
|
||||
dif = AdvancedSearchOptions["difficulty"]
|
||||
searchTitleString = searchTitleString.." "..WHITE..AtlasLoot_Difficulty.Search[dif];
|
||||
end
|
||||
|
||||
if AdvancedSearchOptions["quality"] ~= "" then
|
||||
@@ -607,7 +751,34 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
searchTitleString = searchTitleString.." "..WHITE..AtlasLoot_FixText(AdvancedSearchOptions["equip"]);
|
||||
end
|
||||
|
||||
|
||||
local advSearchString = "";
|
||||
|
||||
if AdvancedSearchOptions["arg1"] ~= "" and AdvancedSearchOptions["arg1op"] ~= "" and arg1 ~= "" then
|
||||
advSearchString = advSearchString..AdvancedSearchOptions["arg1"]..AdvancedSearchOptions["arg1op"]..arg1;
|
||||
searchTitleString = searchTitleString.." "..AdvancedSearchOptions["arg1"].." "..AdvancedSearchOptions["arg1op"].." "..arg1;
|
||||
end
|
||||
|
||||
if AdvancedSearchOptions["arg2"] ~= "" and AdvancedSearchOptions["arg2op"] ~= "" and arg2 ~= "" then
|
||||
if advSearchString == "" then
|
||||
advSearchString = advSearchString..AdvancedSearchOptions["arg2"]..AdvancedSearchOptions["arg2op"]..arg2;
|
||||
searchTitleString = searchTitleString.." "..AdvancedSearchOptions["arg2"].." "..AdvancedSearchOptions["arg2op"].." "..arg2;
|
||||
else
|
||||
advSearchString = advSearchString.."&"..AdvancedSearchOptions["arg2"]..AdvancedSearchOptions["arg2op"]..arg2;
|
||||
searchTitleString = searchTitleString.." & "..AdvancedSearchOptions["arg2"].." "..AdvancedSearchOptions["arg2op"].." "..arg2;
|
||||
end
|
||||
end
|
||||
|
||||
if AdvancedSearchOptions["arg3"] ~= "" and AdvancedSearchOptions["arg3op"] ~= "" and arg3 ~= "" then
|
||||
if advSearchString == "" then
|
||||
advSearchString = advSearchString..AdvancedSearchOptions["arg3"]..AdvancedSearchOptions["arg3op"]..arg3;
|
||||
searchTitleString = searchTitleString.." "..AdvancedSearchOptions["arg3"].." "..AdvancedSearchOptions["arg3op"].." "..arg3
|
||||
else
|
||||
advSearchString = advSearchString.."&"..AdvancedSearchOptions["arg3"]..AdvancedSearchOptions["arg3op"]..arg3;
|
||||
searchTitleString = searchTitleString.." & "..AdvancedSearchOptions["arg3"].." "..AdvancedSearchOptions["arg3op"].." "..arg3
|
||||
end
|
||||
end
|
||||
|
||||
advSearchString = string.lower(advSearchString);
|
||||
|
||||
-- Decide if we need load all modules or just specified ones
|
||||
local allDisabled = not self.db.profile.SearchOn.All;
|
||||
@@ -807,18 +978,37 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
local function IsMinLevelFilter (textValue)
|
||||
local itemLevelFilter = ITEMINFOFILTERS["minlvl"];
|
||||
if string.match(textValue, itemLevelFilter) then
|
||||
return true;
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
local function IsMinLevelFilterMatch(searchText, minLvl, operator)
|
||||
local searchedMinLevel = tonumber(string.match(searchText, "%d+"));
|
||||
local searchTerm = searchText.gsub(searchText, tostring(searchedMinLevel), "");
|
||||
searchTerm = string.gsub(searchTerm, operator, "");
|
||||
|
||||
local itemInfoFilter = HaveItemInfoFilter(searchTerm);
|
||||
if itemInfoFilter and minLvl ~= nil and minLvl > 0
|
||||
and IsMinLevelFilter(itemInfoFilter)
|
||||
then
|
||||
if CompareNumbersByOperator(operator, minLvl, searchedMinLevel) then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
return false;
|
||||
end
|
||||
-- EndRegion
|
||||
|
||||
-- Add item to Search Result
|
||||
local function AddItemToSearchResult(itemId, itemType, itemName, lootPage, dataId)
|
||||
table.insert(AtlasLootCharDB["SearchResult"], { 0, itemId, itemType, itemName, lootPage, "", "", dataId.."|".."\"\"" });
|
||||
end
|
||||
|
||||
-- Checks for Partial Matching
|
||||
local partial = self.db.profile.PartialMatching;
|
||||
|
||||
-- Checks for Item Filters by searching for an Operator in the search text
|
||||
local operator = HaveOperator(text);
|
||||
local operator = HaveOperator(advSearchString);
|
||||
|
||||
for dataID, data in pairs(AtlasLoot_Data) do
|
||||
for _, v in ipairs(data) do
|
||||
@@ -885,10 +1075,10 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
local stats = GetItemStats("item:"..tostring(_id));
|
||||
|
||||
-- Currently only supports "&"
|
||||
local binaryOperator = HaveBinaryOperator(text);
|
||||
local binaryOperator = HaveBinaryOperator(advSearchString);
|
||||
if binaryOperator ~= nil then
|
||||
local searchConditionsMet = true;
|
||||
local searchItems = SplitString(text, binaryOperator);
|
||||
local searchItems = SplitString(advSearchString, binaryOperator);
|
||||
|
||||
if searchItems then
|
||||
for _, searchTextItem in ipairs(searchItems) do
|
||||
@@ -899,6 +1089,8 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
IsItemStatMatch(searchTextItem, stats, localOperator)
|
||||
-- Item Level Filter
|
||||
or IsItemLevelFilterMatch(searchTextItem, itemLvl, itemEquipLoc, localOperator)
|
||||
-- Min Level Filter
|
||||
or IsMinLevelFilterMatch(searchTextItem, minLvl, localOperator)
|
||||
)
|
||||
then
|
||||
searchConditionsMet = false;
|
||||
@@ -906,25 +1098,20 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
end
|
||||
end
|
||||
|
||||
if searchConditionsMet then
|
||||
itemName = "=q"..quality.."="..itemName
|
||||
if AtlasLoot_TableNames[dataID] then lootpage = AtlasLoot_TableNames[dataID][1]; else lootpage = "Argh!"; end
|
||||
table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage.." ("..GREEN..AtlasLoot_Difficulty.Search[dif]..WHITE..")", "", "", dataID.."|".."\"\"", [AtlasLoot_Difficulty.DUPLICATE] = dup, [AtlasLoot_Difficulty.DIF_SEARCH] = dif});
|
||||
if not (searchConditionsMet) then
|
||||
found = false;
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Stat Filter
|
||||
if IsItemStatMatch(text, stats, operator)
|
||||
if not (IsItemStatMatch(advSearchString, stats, operator)
|
||||
-- Item Level Filter
|
||||
or IsItemLevelFilterMatch(text, itemLvl, itemEquipLoc, operator)
|
||||
or IsItemLevelFilterMatch(advSearchString, itemLvl, itemEquipLoc, operator)
|
||||
-- Min Level Filter
|
||||
or IsMinLevelFilterMatch(advSearchString, minLvl, operator))
|
||||
then
|
||||
itemName = "=q"..quality.."="..itemName
|
||||
if AtlasLoot_TableNames[dataID] then lootpage = AtlasLoot_TableNames[dataID][1]; else lootpage = "Argh!"; end
|
||||
table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage.." ("..GREEN..AtlasLoot_Difficulty.Search[dif]..WHITE..")", "", "", dataID.."|".."\"\"", [AtlasLoot_Difficulty.DUPLICATE] = dup, [AtlasLoot_Difficulty.DIF_SEARCH] = dif});
|
||||
found = false;
|
||||
end
|
||||
-- TODO itemQuality
|
||||
-- TODO minLvl
|
||||
-- TODO itemEquipLoc
|
||||
end
|
||||
|
||||
-- Stat Table Cleanup
|
||||
@@ -942,10 +1129,20 @@ function AtlasLoot:AdvancedSearch(Text)
|
||||
end
|
||||
end
|
||||
|
||||
if found and operator == nil then
|
||||
if found then
|
||||
|
||||
local difficultyName = AtlasLoot_Difficulty.Search[dif];
|
||||
local tempdif = dif
|
||||
if dif == 4 and data.Type then
|
||||
if string.find(data.Type, "Raid") then
|
||||
difficultyName = "Ascended";
|
||||
tempdif = 99;
|
||||
end
|
||||
end
|
||||
|
||||
itemName = "=q"..quality.."="..itemName
|
||||
if AtlasLoot_TableNames[dataID] then lootpage = AtlasLoot_TableNames[dataID][1]; else lootpage = "Argh!"; end
|
||||
table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage.." ("..GREEN..AtlasLoot_Difficulty.Search[dif]..WHITE..")", "", "", dataID.."|".."\"\"", [AtlasLoot_Difficulty.DUPLICATE] = dup, [AtlasLoot_Difficulty.DIF_SEARCH] = dif});
|
||||
table.insert(AtlasLootCharDB["SearchResult"], { 0, _id, v[3], itemName, lootpage.." ("..GREEN..difficultyName..DEFAULT..")", "", "", dataID.."|".."\"\"", [AtlasLoot_Difficulty.DUPLICATE] = dup, [AtlasLoot_Difficulty.DIF_SEARCH] = tempdif});
|
||||
end
|
||||
|
||||
--[[elseif (v[2] ~= nil) and (v[2] ~= "") and (string.sub(v[2], 1, 1) == "s") then
|
||||
|
||||
+20
-37
@@ -32,7 +32,7 @@ AtlasLoot_WishListDrop = AceLibrary("Dewdrop-2.0");
|
||||
AtlasLoot_WishList = nil;
|
||||
local currentPage = 1;
|
||||
local playerName = UnitName("player")
|
||||
local itemID, itemTexture, itemName, lootPage, sourcePage, lasttyp, xtyp, xarg2, xarg3
|
||||
local itemID, itemTexture, itemName, lootPage, sourcePage, lasttyp, xtyp, xarg2, xarg3, difficulty
|
||||
local lastWishListtyp, lastWishListarg2, lastWishListarg3
|
||||
local OptionsLoadet = false
|
||||
|
||||
@@ -110,7 +110,7 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4)
|
||||
return;
|
||||
end
|
||||
|
||||
table.insert(AtlasLootWishList["Own"][playerName][arg2], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage });
|
||||
table.insert(AtlasLootWishList["Own"][playerName][arg2], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage, [AtlasLoot_Difficulty.DIF_SEARCH] = difficulty});
|
||||
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Own"][playerName][arg2]["info"][1]..")");
|
||||
AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][playerName][arg2]);
|
||||
@@ -122,7 +122,7 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4)
|
||||
return;
|
||||
end
|
||||
|
||||
table.insert(AtlasLootWishList["Own"][arg2][arg3], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage });
|
||||
table.insert(AtlasLootWishList["Own"][arg2][arg3], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage, [AtlasLoot_Difficulty.DIF_SEARCH] = difficulty});
|
||||
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Own"][arg2][arg3]["info"][1].." - "..arg2..")");
|
||||
AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Own"][arg2][arg3]);
|
||||
@@ -134,7 +134,7 @@ function AtlasLoot_WishListAddDropClick(typ, arg2, arg3, arg4)
|
||||
return;
|
||||
end
|
||||
|
||||
table.insert(AtlasLootWishList["Shared"][arg2][arg3], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage });
|
||||
table.insert(AtlasLootWishList["Shared"][arg2][arg3], { 0, itemID, itemTexture, itemName, lootPage, "", "", sourcePage, [AtlasLoot_Difficulty.DIF_SEARCH] = difficulty});
|
||||
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot"]..": "..AtlasLoot_FixText(itemName)..GREY..AL[" added to the WishList."]..WHITE.." ("..AtlasLootWishList["Shared"][arg2][arg3]["info"][1].." - "..arg2..")");
|
||||
AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootWishList["Shared"][arg2][arg3]);
|
||||
@@ -148,8 +148,8 @@ end
|
||||
AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show)
|
||||
Show the dropdownlist with the wishlists
|
||||
]]
|
||||
function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show)
|
||||
itemID, itemTexture, itemName, lootPage, sourcePage = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage
|
||||
function AtlasLoot_ShowWishListDropDown(xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, button, show, xdifficulty)
|
||||
itemID, itemTexture, itemName, lootPage, sourcePage, difficulty = xitemID, xitemTexture, xitemName, xlootPage, xsourcePage, xdifficulty;
|
||||
if AtlasLootWishList["Options"][playerName]["UseDefaultWishlist"] == false then
|
||||
if AtlasLoot_WishListDrop:IsOpen(button) then
|
||||
AtlasLoot_WishListDrop:Close(1);
|
||||
@@ -499,40 +499,23 @@ function AtlasLoot_CategorizeWishList(wlTable)
|
||||
for _, v in pairs(wlTable) do
|
||||
if v[8] and v[8] ~= "" then
|
||||
local dataID = strsplit("|", v[8]);
|
||||
if v[AtlasLoot_Difficulty.DIF_SEARCH] then
|
||||
local name = AtlasLoot_GetWishListSubheading(dataID)
|
||||
dataID = dataID..AtlasLoot_Difficulty.Search[v[AtlasLoot_Difficulty.DIF_SEARCH]];
|
||||
if not subheadings[dataID] then
|
||||
subheadings[dataID] = name;
|
||||
if subheadings[dataID] then subheadings[dataID] = subheadings[dataID].." ("..AtlasLoot_Difficulty.Search[v[AtlasLoot_Difficulty.DIF_SEARCH]]..")" end
|
||||
end
|
||||
-- Build subheading table
|
||||
if not subheadings[dataID] then
|
||||
-- Heroic handling
|
||||
local HeroicCheck=string.sub(dataID, string.len(dataID)-10, string.len(dataID));
|
||||
local NonHeroicdataID=string.sub(dataID, 1, string.len(dataID)-6);
|
||||
local BigraidCheck=string.sub(dataID, string.len(dataID)-4, string.len(dataID));
|
||||
|
||||
if BigraidCheck == "25Man" or HeroicCheck == "25ManHEROIC" then
|
||||
HeroicCheck=string.sub(dataID, string.len(dataID)-10, string.len(dataID));
|
||||
NonHeroicdataID=string.sub(dataID, 1, string.len(dataID)-11);
|
||||
else
|
||||
HeroicCheck=string.sub(dataID, string.len(dataID)-5, string.len(dataID));
|
||||
NonHeroicdataID=string.sub(dataID, 1, string.len(dataID)-6);
|
||||
elseif not subheadings[dataID] then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(dataID);
|
||||
-- If search failed, replace ID like "Aldor2" to "Aldor1" and try again
|
||||
if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(strsub(dataID, 1, strlen(dataID) - 1).."1");
|
||||
end
|
||||
|
||||
if HeroicCheck == "HEROIC" then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(NonHeroicdataID);
|
||||
if subheadings[dataID] then subheadings[dataID] = subheadings[dataID].." ("..AL["Heroic"]..")" end
|
||||
elseif HeroicCheck == "25ManHEROIC" then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(NonHeroicdataID);
|
||||
if subheadings[dataID] then subheadings[dataID] = subheadings[dataID].." ("..AL["25 Man"].."-"..AL["Heroic"]..")" end
|
||||
elseif strsub(dataID, strlen(dataID) - 4) == "25Man" then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(strsub(dataID, 1, strlen(dataID) - 5));
|
||||
if subheadings[dataID] then subheadings[dataID] = subheadings[dataID].." ("..AL["25 Man"]..")" end
|
||||
else
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(dataID);
|
||||
-- If search failed, replace ID like "Aldor2" to "Aldor1" and try again
|
||||
if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(strsub(dataID, 1, strlen(dataID) - 1).."1");
|
||||
end
|
||||
end
|
||||
-- If still cant find it, mark it with Unknown
|
||||
if not subheadings[dataID] then subheadings[dataID] = AL["Unknown"] end
|
||||
end
|
||||
-- If still cant find it, mark it with Unknown
|
||||
if not subheadings[dataID] then subheadings[dataID] = AL["Unknown"] end
|
||||
-- Build category tables
|
||||
if not categories[subheadings[dataID]] then categories[subheadings[dataID]] = {} end
|
||||
table.insert(categories[subheadings[dataID]], v);
|
||||
|
||||
Reference in New Issue
Block a user