diff --git a/Core.lua b/Core.lua index 9a92ad2..9bd8d4d 100644 --- a/Core.lua +++ b/Core.lua @@ -222,7 +222,7 @@ local function GetSortedFriendIndex(sortType, sortDir) --Build a numerical index to sort on - if MainTabFrame.tabType == 10 then --Friends + if MainTabFrame.tabType == "friend" then --Friends --Include Friends for source, list in pairs(addon.db.global.friends[myserver]) do if addon.db.global.hiddenFriendLists[myserver][source] then @@ -270,7 +270,7 @@ local function GetSortedFriendIndex(sortType, sortDir) end end end - elseif MainTabFrame.tabType == 11 then --Ignores + elseif MainTabFrame.tabType == "ignore" then --Ignores --Include Ignores for source, list in pairs(addon.db.global.ignores[myserver]) do if addon.db.global.hiddenFriendLists[myserver][source] then @@ -342,7 +342,7 @@ local function filterListings() local sorted = GetSortedListingIndex(sortType, sortDir) - if MainTabFrame.tabType == 7 then --PVP + if MainTabFrame.tabType == "pvp" then --PVP for key, listing in pairs(sorted) do if listing.lootType ~= L["Filters"].Loot_Styles.PVP then --Wrong tab @@ -364,7 +364,7 @@ local function filterListings() end total = total + 1 end - elseif MainTabFrame.tabType == 8 then --Other + elseif MainTabFrame.tabType == "other" then --Other for key, listing in pairs(sorted) do if listing.lootType ~= L["Filters"].Loot_Styles.Other then --Wrong tab @@ -404,7 +404,7 @@ local function filterListings() end total = total + 1 end - elseif MainTabFrame.tabType == 9 then --All + elseif MainTabFrame.tabType == "all" then --All for key, listing in pairs(sorted) do if now - listing.timestamp > addon.db.global.minsToPreserve * 60 then --Expired based on user settings @@ -667,7 +667,7 @@ local function DrawFriends(self) button.groupieNote:SetText(listing.groupieNote) button.userNote:SetText(listing.userNote) button.btn:SetScript("OnClick", function() - if MainTabFrame.tabType == 10 then + if MainTabFrame.tabType == "friend" then addon.db.global.groupieFriends[myserver][listing.name] = nil else addon.db.global.groupieIgnores[myserver][listing.name] = nil @@ -995,7 +995,7 @@ local function TimerListingUpdate() --Draw the listings if (now - addon.lastUpdate) > 0.1 then addon.lastUpdate = now - if MainTabFrame.tabType ~= 10 and MainTabFrame.tabType ~= 11 then + if MainTabFrame.tabType ~= "friend" and MainTabFrame.tabType ~= "ignore" then DrawListings(LFGScrollFrame) else DrawFriends(FriendScrollFrame) @@ -1012,7 +1012,7 @@ local function TabSwap(isHeroic, size, tabType, tabNum) --Reset environment values MainTabFrame.isHeroic = isHeroic MainTabFrame.size = size - MainTabFrame.tabType = tabNum + MainTabFrame.tabType = tabType MainTabFrame.sortType = -1 MainTabFrame.sortDir = false --Reset dropdowns @@ -1031,7 +1031,7 @@ local function TabSwap(isHeroic, size, tabType, tabNum) end addon.selectedListing = nil - if tabNum == 10 then --Friends + if tabType == "friend" then --Friends for i = 1, 6 do --Hide group listing columns _G["GroupieFrame1Header" .. i]:Hide() end @@ -1053,7 +1053,7 @@ local function TabSwap(isHeroic, size, tabType, tabNum) SetNoteButton:Show() DrawFriends(FriendScrollFrame) - elseif tabNum == 11 then --Ignores + elseif tabType == "ignore" then --Ignores for i = 1, 6 do --Hide group listing columns _G["GroupieFrame1Header" .. i]:Hide() end @@ -1091,21 +1091,21 @@ local function TabSwap(isHeroic, size, tabType, tabNum) end --Only show level dropdown on normal dungeon tab --Show no filters on pvp tab - if tabNum == 1 then --Normal dungeons + if tabType == "dungeon" then --Normal dungeons GroupieLangDropdown:SetPoint("TOPLEFT", DROPDOWN_LEFTOFFSET + (DROPDOWN_WIDTH + DROPDOWN_PAD) * 2, 55) GroupieLevelDropdown:Show() GroupieRoleDropdown:Show() GroupieLootDropdown:Show() GroupieLangDropdown:Show() ShowingFontStr:Show() - elseif tabNum == 8 then --Other + elseif tabType == "other" then --Other GroupieLangDropdown:SetPoint("TOPLEFT", DROPDOWN_LEFTOFFSET + (DROPDOWN_WIDTH + DROPDOWN_PAD) * 1, 55) GroupieLevelDropdown:Hide() GroupieRoleDropdown:Show() GroupieLootDropdown:Hide() GroupieLangDropdown:Show() ShowingFontStr:Show() - elseif tabNum == 7 then --PVP + elseif tabType == "pvp" then --PVP GroupieLangDropdown:SetPoint("TOPLEFT", DROPDOWN_LEFTOFFSET + (DROPDOWN_WIDTH + DROPDOWN_PAD) * 2, 55) GroupieLevelDropdown:Hide() GroupieRoleDropdown:Hide() @@ -1150,7 +1150,7 @@ local function BuildGroupieWindow() -------------- --Main Frame-- -------------- - GroupieFrame = CreateFrame("Frame", "Groupie", UIParent, "PortraitFrameTemplate") + GroupieFrame = GroupieFrame or CreateFrame("Frame", "Groupie", UIParent, "PortraitFrameTemplate") GroupieFrame:Hide() --Allow the frame to close when ESC is pressed tinsert(UISpecialFrames, "Groupie") @@ -1191,103 +1191,119 @@ local function BuildGroupieWindow() ------------------------ --Category Tab Buttons-- ------------------------ - local DungeonTabButton = CreateFrame("Button", "GroupieTab1", GroupieFrame, "CharacterFrameTabButtonTemplate") + local numTabs = 0 + numTabs = numTabs + 1 + local DungeonTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") DungeonTabButton:SetPoint("TOPLEFT", GroupieFrame, "BOTTOMLEFT", 20, 1) DungeonTabButton:SetText(L["UI_tabs"].Dungeon) - DungeonTabButton:SetID("1") + DungeonTabButton:SetID(numTabs) DungeonTabButton:SetScript("OnClick", function(self) - TabSwap(false, 5, 0, 1) + TabSwap(false, 5, "dungeon", self:GetID()) end) - local DungeonHTabButton = CreateFrame("Button", "GroupieTab2", GroupieFrame, "CharacterFrameTabButtonTemplate") - DungeonHTabButton:SetPoint("LEFT", "GroupieTab1", "RIGHT", -16, 0) - DungeonHTabButton:SetText(L["UI_tabs"].Dungeon .. ' (' .. L["UI_tabs"].ShortHeroic .. ')') - DungeonHTabButton:SetID("2") - DungeonHTabButton:SetScript("OnClick", - function(self) - TabSwap(true, 5, 0, 2) - end) + if addon.wow_project == "wrath" then + numTabs = numTabs + 1 + local DungeonHTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + DungeonHTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) + DungeonHTabButton:SetText(L["UI_tabs"].Dungeon .. ' (' .. L["UI_tabs"].ShortHeroic .. ')') + DungeonHTabButton:SetID(numTabs) + DungeonHTabButton:SetScript("OnClick", + function(self) + TabSwap(true, 5, "dungeon_h", self:GetID()) + end) + end - local Raid10TabButton = CreateFrame("Button", "GroupieTab3", GroupieFrame, "CharacterFrameTabButtonTemplate") - Raid10TabButton:SetPoint("LEFT", "GroupieTab2", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local Raid10TabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + Raid10TabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) Raid10TabButton:SetText(L["UI_tabs"].Raid .. " (10)") - Raid10TabButton:SetID("3") + Raid10TabButton:SetID(numTabs) Raid10TabButton:SetScript("OnClick", function(self) - TabSwap(false, 10, 0, 3) + TabSwap(false, 10, "raid10", self:GetID()) end) - local Raid25TabButton = CreateFrame("Button", "GroupieTab4", GroupieFrame, "CharacterFrameTabButtonTemplate") - Raid25TabButton:SetPoint("LEFT", "GroupieTab3", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local Raid25TabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + Raid25TabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) Raid25TabButton:SetText(L["UI_tabs"].Raid .. " (25)") - Raid25TabButton:SetID("4") + Raid25TabButton:SetID(numTabs) Raid25TabButton:SetScript("OnClick", function(self) - TabSwap(false, 25, 0, 4) + TabSwap(false, 25, "raid25", self:GetID()) end) - local RaidH10TabButton = CreateFrame("Button", "GroupieTab5", GroupieFrame, "CharacterFrameTabButtonTemplate") - RaidH10TabButton:SetPoint("LEFT", "GroupieTab4", "RIGHT", -16, 0) - RaidH10TabButton:SetText(L["UI_tabs"].Raid .. ' (10' .. L["UI_tabs"].ShortHeroic .. ')') - RaidH10TabButton:SetID("5") - RaidH10TabButton:SetScript("OnClick", - function(self) - TabSwap(true, 10, 0, 5) - end) + if addon.wow_project == "wrath" then + numTabs = numTabs + 1 + local RaidH10TabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + RaidH10TabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) + RaidH10TabButton:SetText(L["UI_tabs"].Raid .. ' (10' .. L["UI_tabs"].ShortHeroic .. ')') + RaidH10TabButton:SetID(numTabs) + RaidH10TabButton:SetScript("OnClick", + function(self) + TabSwap(true, 10, "raid10_h", self:GetID()) + end) - local RaidH25TabButton = CreateFrame("Button", "GroupieTab6", GroupieFrame, "CharacterFrameTabButtonTemplate") - RaidH25TabButton:SetPoint("LEFT", "GroupieTab5", "RIGHT", -16, 0) - RaidH25TabButton:SetText(L["UI_tabs"].Raid .. ' (25' .. L["UI_tabs"].ShortHeroic .. ')') - RaidH25TabButton:SetID("6") - RaidH25TabButton:SetScript("OnClick", - function(self) - TabSwap(true, 25, 0, 6) - end) + numTabs = numTabs + 1 + local RaidH25TabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + RaidH25TabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) + RaidH25TabButton:SetText(L["UI_tabs"].Raid .. ' (25' .. L["UI_tabs"].ShortHeroic .. ')') + RaidH25TabButton:SetID(numTabs) + RaidH25TabButton:SetScript("OnClick", + function(self) + TabSwap(true, 25, "raid25_h", self:GetID()) + end) + end - local PVPTabButton = CreateFrame("Button", "GroupieTab7", GroupieFrame, "CharacterFrameTabButtonTemplate") - PVPTabButton:SetPoint("LEFT", "GroupieTab6", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local PVPTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + PVPTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) PVPTabButton:SetText(L["UI_tabs"].PVP) - PVPTabButton:SetID("7") + PVPTabButton:SetID(numTabs) PVPTabButton:SetScript("OnClick", function(self) - TabSwap(nil, nil, 3, 7) + TabSwap(nil, nil, "pvp", self:GetID()) end) - local OtherTabButton = CreateFrame("Button", "GroupieTab8", GroupieFrame, "CharacterFrameTabButtonTemplate") - OtherTabButton:SetPoint("LEFT", "GroupieTab7", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local OtherTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + OtherTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) OtherTabButton:SetText(L["UI_tabs"].Other) - OtherTabButton:SetID("8") + OtherTabButton:SetID(numTabs) OtherTabButton:SetScript("OnClick", function(self) - TabSwap(nil, nil, 1, 8) + TabSwap(nil, nil, "other", self:GetID()) end) - local AllTabButton = CreateFrame("Button", "GroupieTab9", GroupieFrame, "CharacterFrameTabButtonTemplate") - AllTabButton:SetPoint("LEFT", "GroupieTab8", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local AllTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + AllTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) AllTabButton:SetText(L["UI_tabs"].All) - AllTabButton:SetID("9") + AllTabButton:SetID(numTabs) AllTabButton:SetScript("OnClick", function(self) - TabSwap(nil, nil, 2, 9) + TabSwap(nil, nil, "all", self:GetID()) end) - local FriendsTabButton = CreateFrame("Button", "GroupieTab10", GroupieFrame, "CharacterFrameTabButtonTemplate") - FriendsTabButton:SetPoint("LEFT", "GroupieTab9", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local FriendsTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + FriendsTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) FriendsTabButton:SetText("Friends") - FriendsTabButton:SetID("10") + FriendsTabButton:SetID(numTabs) FriendsTabButton:SetScript("OnClick", function(self) - TabSwap(nil, nil, nil, 10) + TabSwap(nil, nil, "friend", self:GetID()) end) - local IgnoresTabButton = CreateFrame("Button", "GroupieTab11", GroupieFrame, "CharacterFrameTabButtonTemplate") - IgnoresTabButton:SetPoint("LEFT", "GroupieTab10", "RIGHT", -16, 0) + numTabs = numTabs + 1 + local IgnoresTabButton = CreateFrame("Button", "GroupieTab"..numTabs, GroupieFrame, "CharacterFrameTabButtonTemplate") + IgnoresTabButton:SetPoint("LEFT", "GroupieTab"..(numTabs-1), "RIGHT", -16, 0) IgnoresTabButton:SetText("Ignores") - IgnoresTabButton:SetID("11") + IgnoresTabButton:SetID(numTabs) IgnoresTabButton:SetScript("OnClick", function(self) - TabSwap(nil, nil, nil, 11) + TabSwap(nil, nil, "ignore", self:GetID()) end) @@ -1314,7 +1330,7 @@ local function BuildGroupieWindow() MainTabFrame.isHeroic = false MainTabFrame.size = 5 - MainTabFrame.tabType = 0 + MainTabFrame.tabType = "dungeon" MainTabFrame.animFrame = 0 --Listing Columns @@ -1521,7 +1537,7 @@ local function BuildGroupieWindow() FriendScrollFrame:Hide() - PanelTemplates_SetNumTabs(GroupieFrame, 11) + PanelTemplates_SetNumTabs(GroupieFrame, numTabs) PanelTemplates_SetTab(GroupieFrame, 1) ------------------- @@ -1535,7 +1551,7 @@ local function BuildGroupieWindow() if addon.selectedListing then MainTabFrame.selectedFriend = addon.friendBoardButtons[addon.selectedListing].listing.name if MainTabFrame.selectedFriend then - if MainTabFrame.tabType == 10 then --Friend + if MainTabFrame.tabType == "friend" then --Friend StaticPopupDialogs["GroupieAddFriendNote"] = { text = "Set Note for " .. MainTabFrame.selectedFriend, hasEditBox = 1, @@ -1599,7 +1615,7 @@ local function BuildGroupieWindow() AddButton:SetText("Add Groupie Friend") AddButton:SetPoint("RIGHT", SetNoteButton, "LEFT", -24, 0) AddButton:SetScript("OnClick", function(self) - if MainTabFrame.tabType == 10 then --Friend + if MainTabFrame.tabType == "friend" then --Friend StaticPopupDialogs["GroupieAddFriend"] = { text = "Add Groupie Global Friend", hasEditBox = 1, @@ -1733,7 +1749,8 @@ local function BuildGroupieWindow() --]] GroupieFrame:SetScale(addon.db.global.UIScale) - GroupieFrame:Show() + --GroupieFrame:Show() + return GroupieFrame end --Minimap Icon Creation @@ -1980,7 +1997,7 @@ function addon:OnInitialize() addon.icon:Hide("GroupieLDB") --Build the main UI - BuildGroupieWindow() + --BuildGroupieWindow() --Debug variable defaults to false addon.debugMenus = false @@ -2074,6 +2091,17 @@ end -- AceConfig Setup -- --------------------- function addon.SetupConfig() + addon.wow_project = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) and "retail" or (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC) and "wrath" or (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC) and "vanilla" or "unknown" + local wowver, wowbuild, wowbuildate, wowtoc = GetBuildInfo() + if addon.wow_project == "vanilla" then + if C_Seasons and C_Seasons.HasActiveSeason and C_Seasons.HasActiveSeason() then + addon.wow_classic_sod = C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery or false + end + if addon.wow_classic_sod then + local levelcap = GetEffectivePlayerMaxLevel() + addon.wow_sod_phase = (levelcap == 25) and {1,25} or (levelcap == 40) and {2,40} or (levelcap == 50) and {3,50} or (levelcap == 60) and {4,60} or {wowtoc, 60} + end + end addon.options = { name = "|TInterface\\AddOns\\" .. addonName .. "\\Images\\icon64:16:16:0:4|t " .. addonName .. " - v" .. tostring(addon.version), @@ -2221,6 +2249,7 @@ function addon.SetupConfig() width = "double", inline = false, order = 13, + hidden = function() return addon.wow_project ~= "wrath" end, args = { header1 = { type = "description", @@ -2238,6 +2267,7 @@ function addon.SetupConfig() width = "double", inline = false, order = 14, + hidden = function() return addon.wow_project ~= "wrath" end, args = { header1 = { type = "description", @@ -2852,15 +2882,18 @@ function addon.SetupConfig() --------------------------------------- -- Generate Instance Filter Controls -- --------------------------------------- - addon.GenerateInstanceToggles(1, "Wrath of the Lich King Heroic Raids - 25", false, "instancefiltersWrath") - addon.GenerateInstanceToggles(101, "Wrath of the Lich King Heroic Raids - 10", false, "instancefiltersWrath") - addon.GenerateInstanceToggles(201, "Wrath of the Lich King Raids - 25", false, "instancefiltersWrath") - addon.GenerateInstanceToggles(301, "Wrath of the Lich King Raids - 10", false, "instancefiltersWrath") - addon.GenerateInstanceToggles(401, "Wrath of the Lich King Heroic Dungeons", false, "instancefiltersWrath") - addon.GenerateInstanceToggles(501, "Wrath of the Lich King Dungeons", true, "instancefiltersWrath") - addon.GenerateInstanceToggles(601, "The Burning Crusade Raids", false, "instancefiltersTBC") - addon.GenerateInstanceToggles(701, "The Burning Crusade Heroic Dungeons", true, "instancefiltersTBC") - addon.GenerateInstanceToggles(801, "The Burning Crusade Dungeons", true, "instancefiltersTBC") + if addon.wow_project == "wrath" then + addon.GenerateInstanceToggles(1, "Wrath of the Lich King Heroic Raids - 25", false, "instancefiltersWrath") + addon.GenerateInstanceToggles(101, "Wrath of the Lich King Heroic Raids - 10", false, "instancefiltersWrath") + addon.GenerateInstanceToggles(201, "Wrath of the Lich King Raids - 25", false, "instancefiltersWrath") + addon.GenerateInstanceToggles(301, "Wrath of the Lich King Raids - 10", false, "instancefiltersWrath") + addon.GenerateInstanceToggles(401, "Wrath of the Lich King Heroic Dungeons", false, "instancefiltersWrath") + addon.GenerateInstanceToggles(501, "Wrath of the Lich King Dungeons", true, "instancefiltersWrath") + + addon.GenerateInstanceToggles(601, "The Burning Crusade Raids", false, "instancefiltersTBC") + addon.GenerateInstanceToggles(701, "The Burning Crusade Heroic Dungeons", true, "instancefiltersTBC") + addon.GenerateInstanceToggles(801, "The Burning Crusade Dungeons", true, "instancefiltersTBC") + end addon.GenerateInstanceToggles(901, "Classic Raids", false, "instancefiltersClassic") addon.GenerateInstanceToggles(1001, "Classic Dungeons", true, "instancefiltersClassic") ----------------------------------- @@ -2896,7 +2929,7 @@ function addon.SetupConfig() addon.db.global.lastServer = currentServer - if addon.db.global.lastShowedInfoPopup < addon.version then + if not addon.db.global.lastShowedInfoPopup or (addon.db.global.lastShowedInfoPopup < addon.version) then addon.db.global.lastShowedInfoPopup = addon.version local PopupFrame = nil local POPUP_WINDOW_WIDTH = 400 @@ -2939,7 +2972,7 @@ function addon.SetupConfig() local PopupMsg = PopupFrame:CreateFontString("FontString", "OVERLAY", "GameFontHighlight") PopupMsg:SetPoint("TOPLEFT", PopupFrame, "TOPLEFT", 16, -64) PopupMsg:SetWidth(POPUP_WINDOW_WIDTH - 32) - PopupMsg:SetText("1.64\n\nHey Everyone,\n\nGroupie is switching to a new \"Charm Validation\" technique and getting rid of the ugly hashes -- like \"[#Ag4f]\" at the end of messages.\n\nInstead we're using 3 target markers. The idea came from user Haste on our Discord.\n\nYou may see some \"Fake News\" responses from people who haven't updated yet. Hopefully it won't take too long to get everyone updated.\n\nCheers!") + PopupMsg:SetText(L.VersionMessage) PopupMsg:SetJustifyH("LEFT") --Edit Box for Discord Link local PopupEditBox = CreateFrame("EditBox", "GroupieEditBoxPopup", PopupFrame, "InputBoxTemplate") @@ -3208,8 +3241,11 @@ function addon:OnEnable() --Update player's saved instances on boss kill and login --The api is very slow to populate saved instance data, so we need a delay on these events addon:RegisterEvent("PLAYER_ENTERING_WORLD", function(...) - addon.SetupConfig() local event, isInitialLogin, isReloadingUi = ... + if isInitialLogin or isReloadingUi then + addon.SetupConfig() + BuildGroupieWindow() + end C_Timer.After(3, function() addon.UpdateFriends() addon.UpdateSavedInstances() diff --git a/DBs/InstanceData.lua b/DBs/InstanceData.lua index 91b167e..4cf3cfe 100644 --- a/DBs/InstanceData.lua +++ b/DBs/InstanceData.lua @@ -335,3 +335,30 @@ addon.groupieInstanceData = { ["Ragefire Chasm"] = { Active = true, Expac = "World of Warcraft", InstanceType = "Classic Dungeons", InstanceID = 389, MinLevel = 13, MaxLevel = 20, GroupSize = 5, Order = 1000, ActivityID = 798, Icon = "RFC.tga" }, } +if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + if C_Seasons and C_Seasons.HasActiveSeason and C_Seasons.HasActiveSeason() then + if C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery then + addon.groupieInstanceData["Blackfathom Deeps"] = { Active = true, Expac = "World of Warcraft", InstanceType = "Classic Raids", + InstanceID = 48, MinLevel = 25, MaxLevel = 30, GroupSize = 10, Order = 1040, ActivityID = 801, Icon = "BFD.tga" } + addon.groupieInstanceData["Gnomeregan"] = { Active = true, Expac = "World of Warcraft", InstanceType = "Classic Raids", InstanceID = 90, + MinLevel = 40, MaxLevel = 45, GroupSize = 10, Order = 1070, ActivityID = 803, Icon = "GNOMER.tga" } + addon.instanceVersions = addon.instanceVersions or {} + addon.instanceVersions["Blackfathom Deeps"] = { { 10, false } } + addon.instanceVersions["Gnomeregan"] = { { 10, false } } + + addon.instanceConfigData = addon.instanceConfigData or {} + -- BFD + addon.instanceConfigData[1040] = addon.instanceConfigData[1040] or {} + addon.instanceConfigData[1040].InstanceType = "Classic Raids" + addon.instanceConfigData[1040].MinLevel = 25 + addon.instanceConfigData[1040].MaxLevel = 30 + addon.instanceConfigData[1040].GroupSize = 10 + -- Gnomer + addon.instanceConfigData[1070] = addon.instanceConfigData[1070] or {} + addon.instanceConfigData[1070].InstanceType = "Classic Raids" + addon.instanceConfigData[1070].MinLevel = 40 + addon.instanceConfigData[1070].MaxLevel = 45 + addon.instanceConfigData[1070].GroupSize = 10 + end + end +end \ No newline at end of file diff --git a/Globals.lua b/Globals.lua index 38f6192..cbe6006 100644 --- a/Globals.lua +++ b/Globals.lua @@ -3,7 +3,8 @@ local L = LibStub('AceLocale-3.0'):GetLocale('Groupie') local GetAddOnMetadata = GetAddOnMetadata or (C_AddOns and C_AddOns.GetAddOnMetadata) --Update this with each push to curse, this will be used for version checks -addon.version = tonumber(GetAddOnMetadata(addonName, "Version")) +addon.version = GetAddOnMetadata(addonName, "Version") +addon.version = tonumber(addon.version:match("%d+%.%d+")) --Used for storing the merged friend and ignore lists of all characters addon.friendList = {} @@ -288,102 +289,101 @@ addon.classColors = { addon.edgeCasePatterns = { "mt", "os", "up", "dk", "eye", "st", "mh", "an" } --instanceVersions[instance] = {{size, isHeroic}, ...} -addon.instanceVersions = { - ["Ragefire Chasm"] = { { 5, false } }, - ["Wailing Caverns"] = { { 5, false } }, - ["Deadmines"] = { { 5, false } }, - ["Shadowfang Keep"] = { { 5, false } }, - ["Stormwind Stockades"] = { { 5, false } }, - ["Blackfathom Deeps"] = { { 5, false } }, - ["Gnomeregan"] = { { 5, false } }, - ["Razorfen Kraul"] = { { 5, false } }, - ["Scarlet Graveyard"] = { { 5, false } }, - ["Scarlet Library"] = { { 5, false } }, - ["Scarlet Armory"] = { { 5, false } }, - ["Scarlet Cathedral"] = { { 5, false } }, - ["Razorfen Downs"] = { { 5, false } }, - ["Uldaman"] = { { 5, false } }, - ["Zul'Farrak"] = { { 5, false } }, - ["Maraudon"] = { { 5, false } }, - ["Sunken Temple"] = { { 5, false } }, - ["Blackrock Depths"] = { { 5, false } }, - ["Dire Maul East"] = { { 5, false } }, - ["Dire Maul North"] = { { 5, false } }, - ["Dire Maul West"] = { { 5, false } }, - ["Lower Blackrock Spire"] = { { 5, false } }, - ["Stratholme"] = { { 5, false } }, - ["Scholomance"] = { { 5, false } }, - - ["Upper Blackrock Spire"] = { { 10, false } }, - ["Zul'Gurub"] = { { 20, false } }, - ["Ruins of Ahn'Qiraj"] = { { 20, false } }, - ["Onyxia's Lair"] = { { 40, false } }, - ["Molten Core"] = { { 40, false } }, - ["Blackwing Lair"] = { { 40, false } }, - ["Temple of Ahn'Qiraj"] = { { 40, false } }, +addon.instanceVersions = addon.instanceVersions or {} +addon.instanceVersions["Ragefire Chasm"] = { { 5, false } } +addon.instanceVersions["Wailing Caverns"] = { { 5, false } } +addon.instanceVersions["Deadmines"] = { { 5, false } } +addon.instanceVersions["Shadowfang Keep"] = { { 5, false } } +addon.instanceVersions["Stormwind Stockades"] = { { 5, false } } +addon.instanceVersions["Blackfathom Deeps"] = addon.instanceVersions["Blackfathom Deeps"] or { { 5, false } } +addon.instanceVersions["Gnomeregan"] = addon.instanceVersions["Gnomeregan"] or { { 5, false } } +addon.instanceVersions["Razorfen Kraul"] = { { 5, false } } +addon.instanceVersions["Scarlet Graveyard"] = { { 5, false } } +addon.instanceVersions["Scarlet Library"] = { { 5, false } } +addon.instanceVersions["Scarlet Armory"] = { { 5, false } } +addon.instanceVersions["Scarlet Cathedral"] = { { 5, false } } +addon.instanceVersions["Razorfen Downs"] = { { 5, false } } +addon.instanceVersions["Uldaman"] = { { 5, false } } +addon.instanceVersions["Zul'Farrak"] = { { 5, false } } +addon.instanceVersions["Maraudon"] = { { 5, false } } +addon.instanceVersions["Sunken Temple"] = { { 5, false } } +addon.instanceVersions["Blackrock Depths"] = { { 5, false } } +addon.instanceVersions["Dire Maul East"] = { { 5, false } } +addon.instanceVersions["Dire Maul North"] = { { 5, false } } +addon.instanceVersions["Dire Maul West"] = { { 5, false } } +addon.instanceVersions["Lower Blackrock Spire"] = { { 5, false } } +addon.instanceVersions["Stratholme"] = { { 5, false } } +addon.instanceVersions["Scholomance"] = { { 5, false } } + +addon.instanceVersions["Upper Blackrock Spire"] = { { 10, false } } +addon.instanceVersions["Zul'Gurub"] = { { 20, false } } +addon.instanceVersions["Ruins of Ahn'Qiraj"] = { { 20, false } } +addon.instanceVersions["Onyxia's Lair"] = { { 40, false } } +addon.instanceVersions["Molten Core"] = { { 40, false } } +addon.instanceVersions["Blackwing Lair"] = { { 40, false } } +addon.instanceVersions["Temple of Ahn'Qiraj"] = { { 40, false } } --["Naxxramas"] = { { 40, false } }, - ["Hellfire Ramparts"] = { { 5, false }, { 5, true } }, - ["Blood Furnace"] = { { 5, false }, { 5, true } }, - ["Slave Pens"] = { { 5, false }, { 5, true } }, - ["Underbog"] = { { 5, false }, { 5, true } }, - ["Mana-Tombs"] = { { 5, false }, { 5, true } }, - ["Auchenai Crypts"] = { { 5, false }, { 5, true } }, - ["Sethekk Halls"] = { { 5, false }, { 5, true } }, - ["Old Hillsbrad Foothills"] = { { 5, false }, { 5, true } }, - ["Shadow Labyrinth"] = { { 5, false }, { 5, true } }, - ["Mechanar"] = { { 5, false }, { 5, true } }, - ["Shattered Halls"] = { { 5, false }, { 5, true } }, - ["Steamvault"] = { { 5, false }, { 5, true } }, - ["Botanica"] = { { 5, false }, { 5, true } }, - ["Arcatraz"] = { { 5, false }, { 5, true } }, - ["Black Morass"] = { { 5, false }, { 5, true } }, - ["Magisters' Terrace"] = { { 5, false }, { 5, true } }, - - ["Karazhan"] = { { 10, false } }, - ["Zul'Aman"] = { { 10, false } }, - ["Gruul's Lair"] = { { 25, false } }, - ["Magtheridon's Lair"] = { { 25, false } }, - ["Serpentshrine Cavern"] = { { 25, false } }, - ["Tempest Keep"] = { { 25, false } }, - ["Mount Hyjal"] = { { 25, false } }, - ["Black Temple"] = { { 25, false } }, - ["Sunwell Plateau"] = { { 25, false } }, - - ["Utgarde Keep"] = { { 5, false }, { 5, true } }, - ["Nexus"] = { { 5, false }, { 5, true } }, - ["Azjol-Nerub"] = { { 5, false }, { 5, true } }, - ["Old Kingdom"] = { { 5, false }, { 5, true } }, - ["Drak'Tharon Keep"] = { { 5, false }, { 5, true } }, - ["Violet Hold"] = { { 5, false }, { 5, true } }, - ["Gundrak"] = { { 5, false }, { 5, true } }, - ["Halls of Stone"] = { { 5, false }, { 5, true } }, - ["Culling of Stratholme"] = { { 5, false }, { 5, true } }, - ["Halls of Lightning"] = { { 5, false }, { 5, true } }, - ["Utgarde Pinnacle"] = { { 5, false }, { 5, true } }, - ["Oculus"] = { { 5, false }, { 5, true } }, - ["Trial of the Champion"] = { { 5, false }, { 5, true } }, - ["Forge of Souls"] = { { 5, false }, { 5, true } }, - ["Pit of Saron"] = { { 5, false }, { 5, true } }, - ["Halls of Reflection"] = { { 5, false }, { 5, true } }, - - ["Naxxramas"] = { { 25, false }, { 10, false } }, - ["Obsidian Sanctum"] = { { 25, false }, { 10, false } }, - ["Vault of Archavon"] = { { 25, false }, { 10, false } }, - ["Eye of Eternity"] = { { 25, false }, { 10, false } }, +addon.instanceVersions["Hellfire Ramparts"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Blood Furnace"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Slave Pens"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Underbog"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Mana-Tombs"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Auchenai Crypts"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Sethekk Halls"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Old Hillsbrad Foothills"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Shadow Labyrinth"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Mechanar"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Shattered Halls"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Steamvault"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Botanica"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Arcatraz"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Black Morass"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Magisters' Terrace"] = { { 5, false }, { 5, true } } + +addon.instanceVersions["Karazhan"] = { { 10, false } } +addon.instanceVersions["Zul'Aman"] = { { 10, false } } +addon.instanceVersions["Gruul's Lair"] = { { 25, false } } +addon.instanceVersions["Magtheridon's Lair"] = { { 25, false } } +addon.instanceVersions["Serpentshrine Cavern"] = { { 25, false } } +addon.instanceVersions["Tempest Keep"] = { { 25, false } } +addon.instanceVersions["Mount Hyjal"] = { { 25, false } } +addon.instanceVersions["Black Temple"] = { { 25, false } } +addon.instanceVersions["Sunwell Plateau"] = { { 25, false } } + +addon.instanceVersions["Utgarde Keep"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Nexus"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Azjol-Nerub"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Old Kingdom"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Drak'Tharon Keep"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Violet Hold"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Gundrak"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Halls of Stone"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Culling of Stratholme"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Halls of Lightning"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Utgarde Pinnacle"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Oculus"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Trial of the Champion"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Forge of Souls"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Pit of Saron"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Halls of Reflection"] = { { 5, false }, { 5, true } } + +addon.instanceVersions["Naxxramas"] = { { 25, false }, { 10, false } } +addon.instanceVersions["Obsidian Sanctum"] = { { 25, false }, { 10, false } } +addon.instanceVersions["Vault of Archavon"] = { { 25, false }, { 10, false } } +addon.instanceVersions["Eye of Eternity"] = { { 25, false }, { 10, false } } --["Onyxia's Lair"] = { { 10, false }, { 25, false } }, - ["Ulduar"] = { { 25, false }, { 10, false } }, +addon.instanceVersions["Ulduar"] = { { 25, false }, { 10, false } } - ["Trial of the Crusader"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } }, - ["Icecrown Citadel"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } }, - ["Ruby Sanctum"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } }, - ["Trial of the Grand Crusader"] = { { 25, true }, { 10, true } }, +addon.instanceVersions["Trial of the Crusader"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } } +addon.instanceVersions["Icecrown Citadel"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } } +addon.instanceVersions["Ruby Sanctum"] = { { 25, false }, { 10, false }, { 25, true }, { 10, true } } +addon.instanceVersions["Trial of the Grand Crusader"] = { { 25, true }, { 10, true } } - ["Coren Direbrew"] = { { 5, false } }, - ["Ahune"] = { { 5, false }, { 5, true } }, - ["Headless Horseman"] = { { 5, false } }, - ["Apothecary Hummel"] = { { 5, false } }, -} +addon.instanceVersions["Coren Direbrew"] = { { 5, false } } +addon.instanceVersions["Ahune"] = { { 5, false }, { 5, true } } +addon.instanceVersions["Headless Horseman"] = { { 5, false } } +addon.instanceVersions["Apothecary Hummel"] = { { 5, false } } --For use in generating config controls, get all instance orders in order diff --git a/Groupie.toc b/Groupie.toc index b56782c..f2e8f42 100644 --- a/Groupie.toc +++ b/Groupie.toc @@ -1,7 +1,7 @@ ## Interface: 30403 ## Title: Groupie ## Notes: A better LFG tool for Classic WoW. -## Version: 1.74-alpha +## Version: 1.75-alpha ## Author: Gogo, LemonDrake, Kynura, Raegen ## SavedVariables: GroupieDB ## X-Curse-Project-ID: 661450 diff --git a/Groupie_Vanilla.toc b/Groupie_Vanilla.toc new file mode 100644 index 0000000..449b1d4 --- /dev/null +++ b/Groupie_Vanilla.toc @@ -0,0 +1,26 @@ +## Interface: 11501 +## Title: Groupie +## Notes: A better LFG tool for Classic WoW. +## Version: 1.75-alpha +## Author: Gogo, LemonDrake, Kynura, Raegen +## SavedVariables: GroupieDB +## X-Curse-Project-ID: 661450 + +embeds.xml + +Localization\enUS.lua +Localization\frFR.lua +UI/minimap.xml +UI/listingtemplate.xml +UI/friendlistingtemplate.xml +Helpers.lua +DBs/AchievementData.lua +DBs/InstanceData.lua +Globals.lua +Core.lua +#GroupBrowser.lua +RightClick.lua +Listener.lua +AutoResponse.lua +AnnounceReset.lua +AfterParty.lua diff --git a/Groupie_Wrath.toc b/Groupie_Wrath.toc new file mode 100644 index 0000000..f2e8f42 --- /dev/null +++ b/Groupie_Wrath.toc @@ -0,0 +1,26 @@ +## Interface: 30403 +## Title: Groupie +## Notes: A better LFG tool for Classic WoW. +## Version: 1.75-alpha +## Author: Gogo, LemonDrake, Kynura, Raegen +## SavedVariables: GroupieDB +## X-Curse-Project-ID: 661450 + +embeds.xml + +Localization\enUS.lua +Localization\frFR.lua +UI/minimap.xml +UI/listingtemplate.xml +UI/friendlistingtemplate.xml +Helpers.lua +DBs/AchievementData.lua +DBs/InstanceData.lua +Globals.lua +Core.lua +#GroupBrowser.lua +RightClick.lua +Listener.lua +AutoResponse.lua +AnnounceReset.lua +AfterParty.lua diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua index d57b008..ec811d0 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- ColorPicker Widget -------------------------------------------------------------------------------]] -local Type, Version = "ColorPicker", 25 +local Type, Version = "ColorPicker", 28 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -11,13 +11,24 @@ local pairs = pairs -- WoW APIs local CreateFrame, UIParent = CreateFrame, UIParent +-- Unfortunately we have no way to realistically detect if a client uses inverted alpha +-- as no API will tell you. Wrath uses the old colorpicker, era uses the new one, both are inverted +local INVERTED_ALPHA = (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE) + --[[----------------------------------------------------------------------------- Support functions -------------------------------------------------------------------------------]] local function ColorCallback(self, r, g, b, a, isAlpha) + if INVERTED_ALPHA and a then + a = 1 - a + end if not self.HasAlpha then a = 1 end + -- no change, skip update + if r == self.r and g == self.g and b == self.b and a == self.a then + return + end self:SetColor(r, g, b, a) if ColorPickerFrame:IsVisible() then --colorpicker is still open @@ -50,30 +61,63 @@ local function ColorSwatch_OnClick(frame) ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10) ColorPickerFrame:SetClampedToScreen(true) - ColorPickerFrame.func = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = 1 - OpacitySliderFrame:GetValue() - ColorCallback(self, r, g, b, a) - end - - ColorPickerFrame.hasOpacity = self.HasAlpha - ColorPickerFrame.opacityFunc = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = 1 - OpacitySliderFrame:GetValue() - ColorCallback(self, r, g, b, a, true) - end - - local r, g, b, a = self.r, self.g, self.b, self.a - if self.HasAlpha then - ColorPickerFrame.opacity = 1 - (a or 0) - end - ColorPickerFrame:SetColorRGB(r, g, b) - - ColorPickerFrame.cancelFunc = function() - ColorCallback(self, r, g, b, a, true) + if ColorPickerFrame.SetupColorPickerAndShow then -- 10.2.5 color picker overhaul + local r2, g2, b2, a2 = self.r, self.g, self.b, (self.a or 1) + if INVERTED_ALPHA then + a2 = 1 - a2 + end + + local info = { + swatchFunc = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = ColorPickerFrame:GetColorAlpha() + ColorCallback(self, r, g, b, a) + end, + + hasOpacity = self.HasAlpha, + opacityFunc = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = ColorPickerFrame:GetColorAlpha() + ColorCallback(self, r, g, b, a, true) + end, + opacity = a2, + + cancelFunc = function() + ColorCallback(self, r2, g2, b2, a2, true) + end, + + r = r2, + g = g2, + b = b2, + } + + ColorPickerFrame:SetupColorPickerAndShow(info) + else + ColorPickerFrame.func = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + ColorCallback(self, r, g, b, a) + end + + ColorPickerFrame.hasOpacity = self.HasAlpha + ColorPickerFrame.opacityFunc = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + ColorCallback(self, r, g, b, a, true) + end + + local r, g, b, a = self.r, self.g, self.b, 1 - (self.a or 1) + if self.HasAlpha then + ColorPickerFrame.opacity = a + end + ColorPickerFrame:SetColorRGB(r, g, b) + + ColorPickerFrame.cancelFunc = function() + ColorCallback(self, r, g, b, a, true) + end + + ColorPickerFrame:Show() end - - ColorPickerFrame:Show() end AceGUI:ClearFocus() end diff --git a/Libs/LibGearScore-1.0/CHANGES.txt b/Libs/LibGearScore-1.0/CHANGES.txt index 3175270..3ecf8b5 100644 --- a/Libs/LibGearScore-1.0/CHANGES.txt +++ b/Libs/LibGearScore-1.0/CHANGES.txt @@ -1,14 +1,14 @@ -tag d887963e455626d6f0b000318dd63d498cf002ad 1.0.r7 +tag 70fa74dc72aa809d79deac1f5b3994ef4bd713d1 1.0.r8 Author: Road-block -Date: Thu Jan 19 19:01:41 2023 +0200 +Date: Sun Oct 15 17:22:24 2023 +0300 -3.4.1 update +wrath P4 updates -commit d180f5388f684b3ed5b62c998efd843898e7f494 +commit 0e4798c3e201e0beea8002dda3f5b9735b4bd8e9 Author: Road-block -Date: Thu Jan 19 18:58:40 2023 +0200 +Date: Sun Oct 15 17:19:30 2023 +0300 - add a friendly :HeraldCheck(unit) method that returns pass/fail and failed slots - better cleanup when the instance replaces an older revision - up revision and update interface numbers for 3.4.1 + add blizzard itemlevel calculation where available (player only) + add speculative dedicated insanity report (not 100% trusted it's not purely itemlevel check) + update embedded libs and interface versions for wrath P4 diff --git a/Libs/LibGearScore-1.0/LibGearScore-1.0.toc b/Libs/LibGearScore-1.0/LibGearScore-1.0.toc index 99f4f8c..fe111ba 100644 --- a/Libs/LibGearScore-1.0/LibGearScore-1.0.toc +++ b/Libs/LibGearScore-1.0/LibGearScore-1.0.toc @@ -1,5 +1,5 @@ -## Interface: 30401 -## Version: 1.0.r7 +## Interface: 30403 +## Version: 1.0.r9 ## Title: Lib: GearScore-1.0 ## Notes: Uses the original GearScore Formula by Mirrikat45 (based on: ItemLevel, ItemRarity and PlayerClass/ItemSlot) ## Author: Road-block diff --git a/Libs/LibGearScore-1.0/LibGearScore-1.0_Vanilla.toc b/Libs/LibGearScore-1.0/LibGearScore-1.0_Vanilla.toc new file mode 100644 index 0000000..f828a98 --- /dev/null +++ b/Libs/LibGearScore-1.0/LibGearScore-1.0_Vanilla.toc @@ -0,0 +1,14 @@ +## Interface: 11501 +## Version: 1.0.r9 +## Title: Lib: GearScore-1.0 +## Notes: Uses the original GearScore Formula by Mirrikat45 (based on: ItemLevel, ItemRarity and PlayerClass/ItemSlot) +## Author: Road-block +## X-Website: https://github.com/Road-block/LibGearScore-1.0 +## X-Category: Library +## X-License: Limited BSD +## X-Credits: Mirrikat45 +## X-Curse-Project-ID: 724320 + +Libs\LibStub\LibStub.lua +Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml +LibGearScore.lua diff --git a/Libs/LibGearScore-1.0/LibGearScore-1.0_Wrath.toc b/Libs/LibGearScore-1.0/LibGearScore-1.0_Wrath.toc index 99f4f8c..fe111ba 100644 --- a/Libs/LibGearScore-1.0/LibGearScore-1.0_Wrath.toc +++ b/Libs/LibGearScore-1.0/LibGearScore-1.0_Wrath.toc @@ -1,5 +1,5 @@ -## Interface: 30401 -## Version: 1.0.r7 +## Interface: 30403 +## Version: 1.0.r9 ## Title: Lib: GearScore-1.0 ## Notes: Uses the original GearScore Formula by Mirrikat45 (based on: ItemLevel, ItemRarity and PlayerClass/ItemSlot) ## Author: Road-block diff --git a/Libs/LibGearScore-1.0/LibGearScore.lua b/Libs/LibGearScore-1.0/LibGearScore.lua index d06df3a..7a657aa 100644 --- a/Libs/LibGearScore-1.0/LibGearScore.lua +++ b/Libs/LibGearScore-1.0/LibGearScore.lua @@ -14,12 +14,16 @@ -- PlayerRealm = PlayerRealm, -- Normalized Realm Name -- GearScore = GearScore, -- Number -- AvgItemLevel = AvgItemLevel, -- Number +-- LFGItemLevel = AvgItemLevelWithBags -- Number +-- LFGItemLevelPVP = AvrItemLevelPvP -- Number -- FLOPScore = FLOPScore, -- Number (bonus or minus itemlevels for Flame Leviathan vehicles) -- HeraldFails = hashTable, -- {slotName = itemlevel} +-- InsanityFails = hashTable, -- {slotName = itemLevel} -- RawTime = RawTime, -- nilable: unixtime (can feed to date(fmt,RawTime) to get back human readable datetime) -- Color = color, -- nilable: ColorMixin -- FLOPColor = color, -- ColorMixin -- HeraldColor = color, -- ColorMixin +-- InsanityColor = color, -- ColorMixin -- Description = description -- nilable: String -- } -- PlayerName / PlayerRealm == _G.UKNOWNOBJECT or GearScore = 0 indicates failure to calculate @@ -54,7 +58,7 @@ -- LibGearScore-1.0 does NOT initiate Inspects, it only passively monitors inspect results. ----------------------------------------------------------------------------------------------------------------------- -local MAJOR, MINOR = "LibGearScore.1000", 7 +local MAJOR, MINOR = "LibGearScore.1000", 9 assert(LibStub, format("%s requires LibStub.", MAJOR)) local lib, oldMinor = LibStub:NewLibrary(MAJOR, MINOR) @@ -65,12 +69,21 @@ local GetPlayerInfoByGUID = _G.GetPlayerInfoByGUID local GetNormalizedRealmName = _G.GetNormalizedRealmName local GetItemInfoInstant = _G.GetItemInfoInstant local CanInspect = _G.CanInspect -local CheckInteractDistance = _G.CheckInteractDistance +local InCombatLockdown = _G.InCombatLockdown +local CheckInteractDistance = function(unit, distIdx) + if InCombatLockdown() then + return false + else + return _G.CheckInteractDistance(unit, distIdx) + end +end local UnitIsVisible = _G.UnitIsVisible local GetServerTime = _G.GetServerTime local UnitGUID = _G.UnitGUID local UnitLevel = _G.UnitLevel local UnitIsPlayer = _G.UnitIsPlayer +local UnitIsUnit = _G.UnitIsUnit +local GetAverageItemLevel = _G.GetAverageItemLevel local Item = _G.Item local After = _G.C_Timer.After local CreateColor = _G.CreateColor @@ -97,8 +110,9 @@ elseif WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then end local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL_TABLE[LE_EXPANSION_LEVEL_CURRENT] local MAX_SCORE = BRACKET_SIZE*6-1 -local BASELINE, ARMOR_MAX, WEAPON_MAX = 200, 239, 245 +local BASELINE, ARMOR_MAX, WEAPON_MAX, CLOAK_MAX = 200, 239, 245, 258 local FLOPBASE, FLOPMAX, SCALING_FACTOR = 3000, 4225, 6 +local myGUID = UnitGUID("player") local AllSlots = { _G.INVSLOT_HEAD, @@ -198,6 +212,26 @@ local Herald_ItemSlots = { [_G.INVSLOT_RANGED] = WEAPON_MAX, -- check if INVTYPE_RELIC needs special handling } +local DedInsaniy_ItemSlots = { + [_G.INVSLOT_HEAD] = WEAPON_MAX, + [_G.INVSLOT_NECK] = WEAPON_MAX, + [_G.INVSLOT_SHOULDER] = WEAPON_MAX, + [_G.INVSLOT_CHEST] = WEAPON_MAX, + [_G.INVSLOT_WAIST] = WEAPON_MAX, + [_G.INVSLOT_LEGS] = WEAPON_MAX, + [_G.INVSLOT_FEET] = WEAPON_MAX, + [_G.INVSLOT_WRIST] = WEAPON_MAX, + [_G.INVSLOT_HAND] = WEAPON_MAX, + [_G.INVSLOT_FINGER1] = WEAPON_MAX, + [_G.INVSLOT_FINGER2] = WEAPON_MAX, + [_G.INVSLOT_TRINKET1] = WEAPON_MAX, + [_G.INVSLOT_TRINKET2] = WEAPON_MAX, + [_G.INVSLOT_BACK] = CLOAK_MAX, + [_G.INVSLOT_MAINHAND] = WEAPON_MAX, + [_G.INVSLOT_OFFHAND] = WEAPON_MAX, + [_G.INVSLOT_RANGED] = WEAPON_MAX, +} + local GS_ItemTypes = { ["INVTYPE_RELIC"] = { ["SlotMOD"] = 0.3164, ["ItemSlot"] = 18, ["Enchantable"] = false}, ["INVTYPE_TRINKET"] = { ["SlotMOD"] = 0.5625, ["ItemSlot"] = 33, ["Enchantable"] = false }, @@ -471,7 +505,7 @@ local function CacheScore(guid, unit, level) if PlayerRealm == "" then PlayerRealm = GetNormalizedRealmName() end local GearScore = 0 local FLOPScore - local HeraldFails = {} + local HeraldFails, DedInsanityFails = {}, {} local ItemCount = 0 local LevelTotal = 0 local TitanGrip = 1 @@ -479,7 +513,13 @@ local function CacheScore(guid, unit, level) local ItemLevel = 0 local ItemQuality = 0 local AvgItemLevel = 0 + local AvgItemLevelWithBags, AvgItemLevelEquip, AvgItemLevelPvP local Description + if GetAverageItemLevel then + if (guid and guid == myGUID) or (unit and UnitIsUnit("player",unit)) then + AvgItemLevelWithBags, AvgItemLevelEquip, AvgItemLevelPvP = GetAverageItemLevel() + end + end local mainHandLink = GetUnitSlotLink(unit, _G.INVSLOT_MAINHAND) local offHandLink = GetUnitSlotLink(unit, _G.INVSLOT_OFFHAND) if mainHandLink and offHandLink then @@ -555,6 +595,16 @@ local function CacheScore(guid, unit, level) end end end + if DedInsaniy_ItemSlots[slot] then + local slotName = SlotMap[slot] + if ItemLevel > DedInsaniy_ItemSlots[slot] then + DedInsanityFails[slotName] = ItemLevel + else + if DedInsanityFails[slotName] then + DedInsanityFails[slotName] = nil + end + end + end else if Flop_ItemSlots[slot] then FLOPScore = (FLOPScore or 0) - BASELINE @@ -563,7 +613,11 @@ local function CacheScore(guid, unit, level) end if GearScore > 0 and ItemCount > 0 then GearScore = floor(GearScore) - AvgItemLevel = floor(LevelTotal/ItemCount) + if AvgItemLevelWithBags then + AvgItemLevel = floor(AvgItemLevelEquip) -- LFG tools use WithBags for PvE and PvP for PvP activities + else + AvgItemLevel = floor(LevelTotal/ItemCount) + end local RawTime = GetServerTime() local TimeStamp = date("%Y%m%d%H%M%S",RawTime) -- 20221017133545 (YYYYMMDDHHMMSS) local r,g,b, description = GetScoreColor(GearScore) @@ -576,13 +630,18 @@ local function CacheScore(guid, unit, level) flopColor = ColorGradient(FLOPScore/(FLOPMAX-FLOPBASE)) end end - local heraldColor + local heraldColor, dedInsanityColor if tCount(HeraldFails) > 0 then heraldColor = colorFail else heraldColor = colorPass end - local scoreData = {TimeStamp = TimeStamp, PlayerName = PlayerName, PlayerRealm = PlayerRealm, GearScore = GearScore, AvgItemLevel = AvgItemLevel, FLOPScore = FLOPScore, HeraldFails = HeraldFails, RawTime = RawTime, Color = color, FLOPColor = flopColor, HeraldColor = heraldColor, Description = description} + if tCount(DedInsanityFails) > 0 then + dedInsanityColor = colorFail + else + dedInsanityColor = colorPass + end + local scoreData = {TimeStamp = TimeStamp, PlayerName = PlayerName, PlayerRealm = PlayerRealm, GearScore = GearScore, AvgItemLevel = AvgItemLevel, LFGItemLevel = AvgItemLevelWithBags, LFGItemLevelPVP = AvgItemLevelPvP, FLOPScore = FLOPScore, HeraldFails = HeraldFails, InsanityFails = DedInsanityFails, RawTime = RawTime, Color = color, FLOPColor = flopColor, HeraldColor = heraldColor, InsanityColor = dedInsanityColor, Description = description} lib.PlayerScoreData[guid] = scoreData lib.callbacks:Fire("LibGearScore_Update", guid, scoreData) end @@ -712,6 +771,18 @@ function lib:HeraldCheck(unitorguid) end end +function lib:InsanityCheck(unitorguid) + local guid = ResolveGUID(unitorguid) + if (guid) then + local scoreData = lib.PlayerScoreData[guid] + if scoreData and scoreData.InsanityFails then + local fail = tCount(scoreData.InsanityFails)>0 + local pass = not fail + return pass, scoreData.InsanityFails, scoreData.InsanityColor + end + end +end + --------------- --- Testing --- --------------- @@ -738,6 +809,14 @@ local function TargetScore() else print("Herald: "..scoreData.HeraldColor:WrapTextInColorCode(_G.YES)) end + if tCount(scoreData.InsanityFails) > 0 then + print("Ded.Insanity: "..scoreData.InsanityColor:WrapTextInColorCode(_G.NO)) + for k,v in pairs(scoreData.InsanityFails) do + print(format(" %s: %s",k,scoreData.InsanityColor:WrapTextInColorCode(v))) + end + else + print("Ded.Insanity: "..scoreData.InsanityColor:WrapTextInColorCode(_G.YES)) + end end else print(format("No Gearcheck data available for '%s'. Try inspecting first.",(UnitName("target")))) diff --git a/Libs/LibGearScore-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/Libs/LibGearScore-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua index a791159..6b32193 100644 --- a/Libs/LibGearScore-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/Libs/LibGearScore-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -1,5 +1,5 @@ ---[[ $Id: CallbackHandler-1.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]] -local MAJOR, MINOR = "CallbackHandler-1.0", 7 +--[[ $Id: CallbackHandler-1.0.lua 1298 2022-12-12 15:10:10Z nevcairiel $ ]] +local MAJOR, MINOR = "CallbackHandler-1.0", 8 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed @@ -7,21 +7,16 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs -local error = error +local securecallfunction, error = securecallfunction, error local setmetatable, rawget = setmetatable, rawget local next, select, pairs, type, tostring = next, select, pairs, type, tostring -local xpcall = xpcall - -local function errorhandler(err) - return geterrorhandler()(err) -end local function Dispatch(handlers, ...) local index, method = next(handlers) if not method then return end repeat - xpcall(method, errorhandler, ...) + securecallfunction(method, ...) index, method = next(handlers, index) until not method end diff --git a/Libs/TaintLess/TaintLess.toc b/Libs/TaintLess/TaintLess.toc index 8435952..364c14f 100644 --- a/Libs/TaintLess/TaintLess.toc +++ b/Libs/TaintLess/TaintLess.toc @@ -1,5 +1,6 @@ -## Interface: 100100 +## Interface: 100205 ## Title: TaintLess ## Notes: Eliminates certain classes of taint errors. -## Version: 23-05-18 +## Version: 24-02-20 +## IconTexture: 134125 TaintLess.xml \ No newline at end of file diff --git a/Libs/TaintLess/TaintLess.xml b/Libs/TaintLess/TaintLess.xml index c30d0a1..04964ec 100644 --- a/Libs/TaintLess/TaintLess.xml +++ b/Libs/TaintLess/TaintLess.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/Libs/TaintLess/TaintLess_Classic.toc b/Libs/TaintLess/TaintLess_Classic.toc index 91af6b5..5b8cb0c 100644 --- a/Libs/TaintLess/TaintLess_Classic.toc +++ b/Libs/TaintLess/TaintLess_Classic.toc @@ -1,5 +1,6 @@ -## Interface: 11403 +## Interface: 11501 ## Title: TaintLess ## Notes: Eliminates certain classes of taint errors. -## Version: 23-05-18 +## Version: 24-02-20 +## IconTexture: 134125 TaintLess.xml \ No newline at end of file diff --git a/Libs/TaintLess/TaintLess_Wrath.toc b/Libs/TaintLess/TaintLess_Wrath.toc index 9eed96e..b58b527 100644 --- a/Libs/TaintLess/TaintLess_Wrath.toc +++ b/Libs/TaintLess/TaintLess_Wrath.toc @@ -1,5 +1,6 @@ -## Interface: 30401 +## Interface: 30403 ## Title: TaintLess ## Notes: Eliminates certain classes of taint errors. -## Version: 23-05-18 +## Version: 24-02-20 +## IconTexture: 134125 TaintLess.xml \ No newline at end of file diff --git a/Localization/enUS.lua b/Localization/enUS.lua index ea10af4..c5830b1 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -305,3 +305,17 @@ L["CommunityLabel"] = "Groupie Community" L["GlobalFriendsLabel"] = "Global Friends List" L["GeneralOptionslabel"] = "General Options" L["KeywordFilters"] = "Keyword FIlters" +L["VersionMessage"] = +[[1.75 +Initial Classic Era / Season of Discovery Support + +1.74 +Remove GroupBrowser module for Wrath Classic (obsolete since RDF induction) + +1.64 +Groupie is switching to a new "Charm Validation" technique and getting rid of the ugly hashes -- like "[#Ag4f]" at the end of messages. +Instead we're using 3 target markers. The idea came from user Haste on our Discord. + +You may see some "Fake News" responses from people who haven't updated yet. Hopefully it won't take too long to get everyone updated. + +Cheers!]]