Files
bdot1andClaude Opus 5.5 f679318d70 v1.15.0: drag and drop only - everything ships with WhoDidIt, no CMD for players
Holybunny tested it: players had to run CMD files to get half the addon,
the "not downloaded yet" prompt sent them to the sync helper (which then
read 2,929 raid logs for ~50 minutes), and the built-in Chronicle logger
started logging for someone who had switched ChronicleCompanion off.

- Chronicle\, RollFor\ and DopingControl\ now ship in the repository at
  their pinned commits, each with a WDI_NOTICE.txt crediting its authors
  (DopingControl keeps its MIT LICENSE; ChronicleCompanion and RollFor
  state no licence: not under WhoDidIt's MIT licence, removed on request).
  The maintainer's decision.
- the built-in Chronicle logger logs nothing until the player says yes
  (asked the first time they enter a raid, or Start logging); until then
  its auto-logging is off. If the separate ChronicleCompanion is installed
  but switched off, the built-in copy stays off too.
- no player is told to run a CMD any more: missing parts say "download
  WhoDidIt again"; raid times aren't counted as missing (they come from the
  master feed); the Rankings bar shows the feed for players, and Sync now /
  helper states only for the master's characters
- the sync helper and AutoSync are maintainer-only: they check the WTF
  folder for a B.MASTERS character and otherwise explain and stop (-Force
  overrides; AutoSync-Off works for anyone). The helper no longer installs
  addons; EmbedUpdate.ps1 is the maintainer tool for moving pins.
- README (install = drag and drop), CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 00:00:04 +01:00

85 lines
2.7 KiB
Lua

if WDI_CHRON_SKIP then return end -- =============================================================================
-- Chronicle Addon for Vanilla WoW
-- =============================================================================
-- =============================================================================
-- Chronicle Namespace
-- =============================================================================
---@class Chronicle
Chronicle = {}
local initialized = false
function Chronicle:Init()
if initialized then
return
end
initialized = true
ChronicleLog:Init()
end
-- =============================================================================
-- Event Frame
-- =============================================================================
function Chronicle:CreateEventFrame()
self.eventFrame = CreateFrame("Frame", "ChronicleEventFrame")
self.eventFrame:SetScript("OnEvent", function()
Chronicle:OnEvent(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
end)
-- Register events
self.eventFrame:RegisterEvent("ADDON_LOADED")
end
function Chronicle:OnEvent(event, ...)
if event == "ADDON_LOADED" then
local addonName = arg1
if addonName == "WhoDidIt" then
self.chronicleCompanionLoaded = true
self:Init()
ChronicleMinimapButton:SetShown(ChronicleLog:GetSetting("showMinimapIcon") ~= false)
self:Print("Chronicle v" .. WDI_ChronVersion() .. " loaded. Type /chronicle help for commands.")
end
-- local existing = LoggingCombat()
-- LoggingCombat(1)
-- local zone = GetRealZoneText()
-- local pgid, ok = UnitExists("player")
-- local loginMessage = "PLAYER_LOGIN: " .. UnitName("player") .. "&" .. tostring(ok and pgid or "nil") .. "&" .. zone
-- CombatLogAdd(loginMessage, 1)
-- CombatLogAdd(loginMessage)
-- LoggingCombat(existing)
end
end
-- =============================================================================
-- Utility Functions
-- =============================================================================
function Chronicle:Print(msg)
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00[Chronicle]|r " .. tostring(msg))
end
local global = _G or getfenv(0)
function Chronicle:DebugPrint(msg)
if ChronicleLog:GetSetting("debugMode") then
local frameNum = ChronicleLog:GetSetting("debugChatFrame") or 1
local chatFrame = global["ChatFrame" .. frameNum] or DEFAULT_CHAT_FRAME
chatFrame:AddMessage("|cff888888[Chronicle Debug]|r " .. tostring(msg))
end
end
function Chronicle:FormatTime(seconds)
if seconds < 60 then
return seconds .. "s"
elseif seconds < 3600 then
return math.floor(seconds / 60) .. "m"
elseif seconds < 86400 then
return string.format("%.1fh", seconds / 3600)
else
return string.format("%.1fd", seconds / 86400)
end
end