mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 post-L5 audit cleanup: drop redundant dual-writes + refresh stale comments
Audit confirmed saveAdvCharacter's fan-out (upsertAllPlayerMetaFromAdvChar) covers all 13 migrated subsystems, so the per-call-site upsertPlayerMetaXxx calls retained "as defense" through the L4-L5 migration are redundant post-L5h. Removed 16 such call sites across arena (2), scheduler (4), hospital (1), consumables (2), rival (1), housing (11), and reordered masterwork to drop a now-pointless explicit upsert before the load+save. Refreshed nine stale doc comments referencing the legacy adventure_characters table or "soak window / fallback" language that no longer applies after the L5 close-out (commit 596b2b7). No behavior change; go vet + go test ./... pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -89,16 +89,12 @@ func (p *AdventurePlugin) checkRivalPoolUnlock(char *AdventureCharacter) {
|
||||
return
|
||||
}
|
||||
// Promote to pool + send unlock DM if not yet announced.
|
||||
// Persistence rides the caller's saveAdvCharacter → fan-out.
|
||||
char.RivalPool = 1
|
||||
pool = 1
|
||||
if !notified {
|
||||
char.RivalUnlockedNotified = true
|
||||
notified = true
|
||||
p.SendDM(char.UserID, rivalUnlockDM)
|
||||
}
|
||||
if err := upsertPlayerMetaRivalState(char.UserID, pool, notified); err != nil {
|
||||
slog.Error("player_meta: rival unlock dual-write failed", "user", char.UserID, "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
// ── DB CRUD ──────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user