Files
Erupe/server/migrations/sql/0008_achievement_displayed_levels.sql
Houmgaor 61d85e749f feat(achievement): add rank-up notifications (#165)
RE'd putDisplayed_achievement from ZZ client DLL via Ghidra: the packet
sends opcode + 1 zero byte with no achievement ID, acting as a blanket
"I saw everything" signal.

Server changes:
- Track per-character last-displayed levels in new displayed_levels
  column (migration 0008)
- GetAchievement compares current vs displayed levels per entry
- DisplayedAchievement snapshots current levels to clear notifications
- Repo, service, mock, and 3 new service tests

Protbot changes:
- New --action achievement: fetches achievements, shows rank-up markers,
  sends DISPLAYED_ACHIEVEMENT, re-fetches to verify notifications clear
- Packet builders for GET/ADD/DISPLAYED_ACHIEVEMENT
2026-03-18 11:35:31 +01:00

5 lines
326 B
SQL

-- 0008: Add displayed_levels to achievements table for rank-up notifications (#165).
-- Stores 33 bytes (one level per achievement) representing the last level
-- the client acknowledged seeing. NULL means never displayed (shows all rank-ups).
ALTER TABLE public.achievements ADD COLUMN IF NOT EXISTS displayed_levels bytea;