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

135 lines
3.8 KiB
Lua

if WDI_CHRON_SKIP then return end -- Helpful to check out some events
-- local f = CreateFrame("Frame")
-- local function RegisterEvent(name)
-- f:UnregisterAllEvents()
-- f:RegisterEvent(name)
-- print("Now listening to:", name)
-- end
-- SLASH_LOGEVENT1 = "/logevent"
-- SlashCmdList["LOGEVENT"] = function(msg)
-- if msg and msg ~= "" then
-- RegisterEvent(msg)
-- else
-- print("Usage: /logevent EVENT_NAME")
-- end
-- end
-- f:SetScript("OnEvent", function()
-- print("Event fired:", event)
-- local i = 1
-- while _G["arg"..i] ~= nil do
-- print("Arg", i, "=", tostring(_G["arg"..i]))
-- i = i + 1
-- end
-- print("----")
-- end)
-- -- Default
-- RegisterEvent("RAW_COMBATLOG")
-- local ADDON = "ChronicleFileRoundTrip"
-- -- 1MB payload in memory (created once, reused on every click)
-- local ONE_MB = string.rep("x", 1024 * 1024*20)
-- local INPUT_NAME = "chronicle"
-- local OUTPUT_NAME = "chronicle"
-- local function ReadFile(name)
-- if type(ImportFile) == "function" then
-- return ImportFile(name)
-- end
-- return nil, "ImportFile() not available in this client/mod"
-- end
-- local function WriteFile(name, data)
-- if type(ExportFile) == "function" then
-- ExportFile(name, data)
-- return true
-- end
-- return false, "ExportFile() not available in this client/mod"
-- end
-- local function Now()
-- return date("%Y-%m-%d %H:%M:%S")
-- end
-- -- formats seconds nicely (ms)
-- local function fmt_ms(sec)
-- return string.format("%.2fms", sec * 1000)
-- end
-- local btn
-- local function CreateButton()
-- if btn then return end
-- btn = CreateFrame("Button", "ChronicleFileRoundTripButton", UIParent, "UIPanelButtonTemplate")
-- btn:SetWidth(220)
-- btn:SetHeight(28)
-- btn:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
-- btn:SetText("Chronicle: Import → +1MB → Export")
-- btn:Show()
-- btn:SetScript("OnClick", function()
-- local t0 = GetTime()
-- local before, readErr = ReadFile(INPUT_NAME)
-- local t1 = GetTime()
-- if not before then
-- before = ""
-- DEFAULT_CHAT_FRAME:AddMessage(
-- string.format("|cffffcc00[%s]|r No input read (%s). Using empty string.", ADDON, readErr or "unknown")
-- )
-- else
-- DEFAULT_CHAT_FRAME:AddMessage(
-- string.format("|cff00ff00[%s]|r Read %d bytes from %s", ADDON, string.len(before), INPUT_NAME)
-- )
-- end
-- local toAdd = "\n[" .. ADDON .. " " .. Now() .. "] +1MB payload\n" .. ONE_MB
-- local out = before .. toAdd
-- local t2 = GetTime()
-- local ok, writeErr = WriteFile(OUTPUT_NAME, out)
-- local t3 = GetTime()
-- if ok then
-- DEFAULT_CHAT_FRAME:AddMessage(
-- string.format("|cff00ff00[%s]|r Queued export %d bytes to %s", ADDON, string.len(out), OUTPUT_NAME)
-- )
-- DEFAULT_CHAT_FRAME:AddMessage(
-- string.format("|cffffcc00[%s]|r Note: many clients only actually write on /reload or logout.", ADDON)
-- )
-- else
-- DEFAULT_CHAT_FRAME:AddMessage(
-- string.format("|cffff0000[%s]|r Export failed: %s", ADDON, writeErr or "unknown")
-- )
-- end
-- -- Timing output
-- DEFAULT_CHAT_FRAME:AddMessage(string.format(
-- "|cff00ffff[%s]|r Timings: read=%s, build=%s, export_call=%s, total=%s",
-- ADDON,
-- fmt_ms(t1 - t0),
-- fmt_ms(t2 - t1),
-- fmt_ms(t3 - t2),
-- fmt_ms(t3 - t0)
-- ))
-- end)
-- DEFAULT_CHAT_FRAME:AddMessage(string.format("|cff00ff00[%s]|r Loaded. Click the button to test file round-trip.", ADDON))
-- end
-- local f = CreateFrame("Frame")
-- f:RegisterEvent("PLAYER_LOGIN")
-- f:SetScript("OnEvent", function()
-- CreateButton()
-- DEFAULT_CHAT_FRAME:AddMessage("|cff00ff00["..ADDON.."]|r Loaded. Use /chronicle to toggle.")
-- end)