diff --git a/.pkgmeta b/.pkgmeta index 07d5873..e1e22d4 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -13,4 +13,4 @@ ignore: - release-please-config.json - .release-please-manifest.json - .luacheckrc - - RaidLogAuto.lua + diff --git a/README.md b/README.md index 6ba6232..83d4e09 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ - ๐Ÿ”„ **Automatic Combat Logging** โ€” Starts recording when you enter a raid, stops when you leave - โš”๏ธ **Mythic+ Support** โ€” Optionally log Mythic+ dungeons (Retail & MoP Classic) -- ๐ŸŒ **Multi-Version** โ€” Works across Retail, MoP Classic, Cataclysm Classic, TBC Anniversary, Classic Era, and Wrath Classic +- ๐ŸŒ **Multi-Version** โ€” Works across Retail, MoP Classic, Cataclysm Classic, TBC Anniversary, and Classic Era +- ๐Ÿ“Š **Advanced Combat Logging** โ€” Automatically enables Advanced Combat Logging for detailed parse data +- ๐Ÿ”” **Combat Log Reminder** โ€” One-time popup reminder about deleting old CombatLog.txt files - ๐Ÿชถ **Lightweight** โ€” Minimal memory footprint, zero performance impact - ๐Ÿ”‡ **Silent Mode** โ€” Toggle chat notifications on or off - โšก **Zero Config** โ€” Install and forget โ€” it just works @@ -50,12 +52,11 @@ RaidLogAuto listens for instance changes. When you zone into a raid (or a Mythic | Version | Lua File | Features | |:--------|:---------|:---------| -| **Retail** | `RaidLogAuto_Main.lua` | Raid logging + Mythic+ | -| **MoP Classic** | `RaidLogAuto_Main.lua` | Raid logging + Mythic+ | -| **Cataclysm Classic** | `RaidLogAuto_Legacy.lua` | Raid logging | -| **TBC Anniversary** | `RaidLogAuto_Legacy.lua` | Raid logging | -| **Classic Era** | `RaidLogAuto_Classic.lua` | Raid logging (limited) | -| **Wrath Classic** | `RaidLogAuto_Classic.lua` | Raid logging (limited) | +| **Retail** | `RaidLogAuto_Retail.lua` | Raid logging + Mythic+ + Advanced Combat Logging | +| **MoP Classic** | `RaidLogAuto_Mists.lua` | Raid logging + Mythic+ + Advanced Combat Logging | +| **Cataclysm Classic** | `RaidLogAuto_Cata.lua` | Raid logging + Advanced Combat Logging | +| **TBC Anniversary** | `RaidLogAuto_TBC.lua` | Raid logging + Advanced Combat Logging | +| **Classic Era** | `RaidLogAuto_Classic.lua` | Raid logging + Advanced Combat Logging | --- @@ -96,6 +97,7 @@ All commands use the `/rla` prefix (or the full `/raidlogauto`): | `/rla toggle` | Toggle on/off | | `/rla mythic` | Toggle Mythic+ logging *(Retail & MoP Classic only)* | | `/rla silent` | Toggle chat notifications | +| `/rla acl` | Check and enable Advanced Combat Logging | | `/rla help` | Show help | --- @@ -108,8 +110,10 @@ Settings are stored in the `RaidLogAutoDB` SavedVariable and persist per-charact | Variable | Default | Description | |:---------|:--------|:------------| | `enabled` | `true` | Master toggle โ€” enable or disable the addon | +| `raidOnly` | `true` | Only log in raid instances | | `mythicPlus` | `false` | Log Mythic+ dungeons *(Retail & MoP Classic only)* | | `printMessages` | `true` | Show status messages in chat | +| `combatLogReminderDismissed` | `false` | Whether the one-time combat log reminder has been dismissed | All settings can be changed via the [slash commands](#%EF%B8%8F-commands) above. diff --git a/RaidLogAuto.lua b/RaidLogAuto.lua deleted file mode 100644 index 882ffd7..0000000 --- a/RaidLogAuto.lua +++ /dev/null @@ -1,219 +0,0 @@ -------------------------------------------------------------------------------- --- RaidLogAuto --- Automatically enables combat logging when entering a raid instance --- and disables it when leaving. -------------------------------------------------------------------------------- - --- DEPRECATION NOTICE --- This file is deprecated and is no longer loaded by the addon. --- Please use the version-specific file instead: --- - RaidLogAuto_Classic.lua for Classic, Hardcore, and Era servers --- - RaidLogAuto_Retail.lua for Retail (Dragonflight, The War Within, etc.) --- The TOC file now loads the appropriate version-specific file based on the game version. - -local ADDON_NAME, ns = ... - --- Saved variables (initialized on ADDON_LOADED) -RaidLogAutoDB = RaidLogAutoDB or {} - --- Default settings -local defaults = { - enabled = true, -- Master toggle - raidOnly = true, -- Only log in raid instances - mythicPlus = false, -- Also log in Mythic+ dungeons (Retail only) - printMessages = true, -- Print status messages to chat -} - --- Local references for performance -local IsInInstance = IsInInstance -local IsInRaid = IsInRaid -local GetInstanceInfo = GetInstanceInfo -local LoggingCombat = LoggingCombat -local print = print - --- Localized strings (use Blizzard's globals when available) -local L = { - ENABLED = COMBATLOGENABLED or "Combat logging enabled.", - DISABLED = COMBATLOGDISABLED or "Combat logging disabled.", - ADDON_LOADED = "RaidLogAuto loaded. Type /rla for options.", -} - --- Color codes -local COLOR_YELLOW = "|cffffff00" -local COLOR_GREEN = "|cff00ff00" -local COLOR_RED = "|cffff0000" -local COLOR_RESET = "|r" - -------------------------------------------------------------------------------- --- Helper Functions -------------------------------------------------------------------------------- - -local function Print(msg) - if RaidLogAutoDB.printMessages then - print(COLOR_YELLOW .. "[RaidLogAuto]|r " .. msg) - end -end - -local function ShouldEnableLogging() - if not RaidLogAutoDB.enabled then - return false - end - - local inInstance, instanceType = IsInInstance() - - -- Not in any instance - if not inInstance then - return false - end - - -- Raid instance check - if instanceType == "raid" then - return true - end - - -- Mythic+ dungeon check (Retail only) - -- C_ChallengeMode exists only in Retail - if RaidLogAutoDB.mythicPlus and instanceType == "party" then - if C_ChallengeMode and C_ChallengeMode.GetActiveChallengeMapID then - local mapID = C_ChallengeMode.GetActiveChallengeMapID() - if mapID then - return true - end - end - end - - return false -end - -local function UpdateLogging() - local shouldLog = ShouldEnableLogging() - local currentlyLogging = LoggingCombat() - - if shouldLog and not currentlyLogging then - LoggingCombat(true) - Print(COLOR_GREEN .. L.ENABLED .. COLOR_RESET) - elseif not shouldLog and currentlyLogging then - LoggingCombat(false) - Print(COLOR_RED .. L.DISABLED .. COLOR_RESET) - end -end - -------------------------------------------------------------------------------- --- Event Handler -------------------------------------------------------------------------------- - -local frame = CreateFrame("Frame") - -local function OnEvent(self, event, arg1) - if event == "ADDON_LOADED" and arg1 == ADDON_NAME then - -- Initialize saved variables with defaults - for key, value in pairs(defaults) do - if RaidLogAutoDB[key] == nil then - RaidLogAutoDB[key] = value - end - end - Print(L.ADDON_LOADED) - - self:UnregisterEvent("ADDON_LOADED") - self:RegisterEvent("PLAYER_ENTERING_WORLD") - self:RegisterEvent("ZONE_CHANGED_NEW_AREA") - - -- Retail-specific: Challenge mode events - if C_ChallengeMode then - self:RegisterEvent("CHALLENGE_MODE_START") - self:RegisterEvent("CHALLENGE_MODE_COMPLETED") - end - - elseif event == "PLAYER_ENTERING_WORLD" then - -- Slight delay to ensure instance info is available - C_Timer.After(1, UpdateLogging) - - elseif event == "ZONE_CHANGED_NEW_AREA" then - UpdateLogging() - - elseif event == "CHALLENGE_MODE_START" then - if RaidLogAutoDB.mythicPlus then - UpdateLogging() - end - - elseif event == "CHALLENGE_MODE_COMPLETED" then - -- Logging will be disabled on zone change, but check immediately - UpdateLogging() - end -end - -frame:SetScript("OnEvent", OnEvent) -frame:RegisterEvent("ADDON_LOADED") - -------------------------------------------------------------------------------- --- Slash Commands -------------------------------------------------------------------------------- - -SLASH_RAIDLOGAUTO1 = "/raidlogauto" -SLASH_RAIDLOGAUTO2 = "/rla" - -local function PrintStatus() - print(COLOR_YELLOW .. "--- RaidLogAuto Status ---" .. COLOR_RESET) - print(" Enabled: " .. (RaidLogAutoDB.enabled and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) - print(" Raid Only: " .. (RaidLogAutoDB.raidOnly and "Yes" or "No")) - if C_ChallengeMode then - print(" Mythic+: " .. (RaidLogAutoDB.mythicPlus and "Yes" or "No")) - end - print(" Print Messages: " .. (RaidLogAutoDB.printMessages and "Yes" or "No")) - print(" Currently Logging: " .. (LoggingCombat() and COLOR_GREEN .. "Yes" or COLOR_RED .. "No") .. COLOR_RESET) -end - -local function PrintHelp() - print(COLOR_YELLOW .. "--- RaidLogAuto Commands ---" .. COLOR_RESET) - print(" /rla - Show current status") - print(" /rla on - Enable addon") - print(" /rla off - Disable addon") - print(" /rla toggle - Toggle addon on/off") - print(" /rla mythic - Toggle Mythic+ logging (Retail only)") - print(" /rla silent - Toggle chat messages") - print(" /rla help - Show this help") -end - -SlashCmdList["RAIDLOGAUTO"] = function(msg) - local cmd = msg:lower():trim() - - if cmd == "" or cmd == "status" then - PrintStatus() - - elseif cmd == "on" or cmd == "enable" then - RaidLogAutoDB.enabled = true - Print("Addon " .. COLOR_GREEN .. "enabled" .. COLOR_RESET) - UpdateLogging() - - elseif cmd == "off" or cmd == "disable" then - RaidLogAutoDB.enabled = false - Print("Addon " .. COLOR_RED .. "disabled" .. COLOR_RESET) - UpdateLogging() - - elseif cmd == "toggle" then - RaidLogAutoDB.enabled = not RaidLogAutoDB.enabled - Print("Addon " .. (RaidLogAutoDB.enabled and COLOR_GREEN .. "enabled" or COLOR_RED .. "disabled") .. COLOR_RESET) - UpdateLogging() - - elseif cmd == "mythic" or cmd == "m+" then - if C_ChallengeMode then - RaidLogAutoDB.mythicPlus = not RaidLogAutoDB.mythicPlus - Print("Mythic+ logging " .. (RaidLogAutoDB.mythicPlus and COLOR_GREEN .. "enabled" or COLOR_RED .. "disabled") .. COLOR_RESET) - UpdateLogging() - else - Print("Mythic+ is only available in Retail WoW.") - end - - elseif cmd == "silent" or cmd == "quiet" then - RaidLogAutoDB.printMessages = not RaidLogAutoDB.printMessages - -- Always print this one so user knows it worked - print(COLOR_YELLOW .. "[RaidLogAuto]|r Messages " .. (RaidLogAutoDB.printMessages and "enabled" or "disabled")) - - elseif cmd == "help" or cmd == "?" then - PrintHelp() - - else - print(COLOR_YELLOW .. "[RaidLogAuto]|r Unknown command: " .. cmd) - PrintHelp() - end -end diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index 7e5b650..0000000 --- a/cliff.toml +++ /dev/null @@ -1,98 +0,0 @@ -# DEPRECATED: This file is kept for reference during the migration to release-please. -# It will be removed after the first successful release-please release. -# See issue #19. - -# git-cliff ~ configuration file -# https://git-cliff.org/docs/configuration - - -[changelog] -# A Tera template to be rendered for each release in the changelog. -# See https://keats.github.io/tera/docs/#introduction -body = """ -{% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} -{% else %}\ - ## [unreleased] -{% endif %}\ -{% for group, commits in commits | group_by(attribute="group") %} - ### {{ group | striptags | trim | upper_first }} - {% for commit in commits %} - - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ - {% if commit.breaking %}[**breaking**] {% endif %}\ - {{ commit.message | upper_first }}\ - {% endfor %} -{% endfor %} -""" -# Remove leading and trailing whitespaces from the changelog's body. -trim = true -# Render body even when there are no releases to process. -render_always = true -# An array of regex based postprocessors to modify the changelog. -postprocessors = [ - # Replace the placeholder with a URL. - #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, -] -# render body even when there are no releases to process -# render_always = true -# output file path -# output = "test.md" - -[git] -# Parse commits according to the conventional commits specification. -# See https://www.conventionalcommits.org -conventional_commits = true -# Exclude commits that do not match the conventional commits specification. -filter_unconventional = true -# Require all commits to be conventional. -# Takes precedence over filter_unconventional. -require_conventional = false -# Split commits on newlines, treating each line as an individual commit. -split_commits = false -# An array of regex based parsers to modify commit messages prior to further processing. -commit_preprocessors = [ - # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. - #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, - # Check spelling of the commit message using https://github.com/crate-ci/typos. - # If the spelling is incorrect, it will be fixed automatically. - #{ pattern = '.*', replace_command = 'typos --write-changes -' }, -] -# Prevent commits that are breaking from being excluded by commit parsers. -protect_breaking_commits = false -# An array of regex based parsers for extracting data from the commit message. -# Assigns commits to groups. -# Optionally sets the commit's scope and can decide to exclude commits from further processing. -commit_parsers = [ - { message = "^feat", group = "๐Ÿš€ Features" }, - { message = "^fix", group = "๐Ÿ› Bug Fixes" }, - { message = "^doc", group = "๐Ÿ“š Documentation" }, - { message = "^perf", group = "โšก Performance" }, - { message = "^refactor", group = "๐Ÿšœ Refactor" }, - { message = "^style", group = "๐ŸŽจ Styling" }, - { message = "^test", group = "๐Ÿงช Testing" }, - { message = "^chore\\(release\\): prepare for", skip = true }, - { message = "^chore\\(deps.*\\)", skip = true }, - { message = "^chore\\(pr\\)", skip = true }, - { message = "^chore\\(pull\\)", skip = true }, - { message = "^chore|^ci", group = "โš™๏ธ Miscellaneous Tasks" }, - { body = ".*security", group = "๐Ÿ›ก๏ธ Security" }, - { message = "^revert", group = "โ—€๏ธ Revert" }, - { message = ".*", group = "๐Ÿ’ผ Other" }, -] -# Exclude commits that are not matched by any commit parser. -filter_commits = false -# Fail on a commit that is not matched by any commit parser. -fail_on_unmatched_commit = false -# An array of link parsers for extracting external references, and turning them into URLs, using regex. -link_parsers = [] -# Include only the tags that belong to the current branch. -use_branch_tags = false -# Order releases topologically instead of chronologically. -topo_order = false -# Order commits topologically instead of chronologically. -topo_order_commits = true -# Order of commits in each group/release within the changelog. -# Allowed values: newest, oldest -sort_commits = "oldest" -# Process submodules commits -recurse_submodules = false