Enforce hardcore retirement with level-one faction-balanced replacements

This commit is contained in:
Codex
2026-09-22 15:55:41 -04:00
parent bc50395221
commit 77f6b56c2f
10 changed files with 526 additions and 5 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ async function deliverEvents(){
FROM acore_auth.azerothai_event_outbox
WHERE delivered_at IS NULL
${fresh.length?`AND id NOT IN (${fresh.map(row=>Number(row[0])).join(',')})`:''}
ORDER BY CASE WHEN kind IN ('player.whisper','player.chat') AND created_at >= NOW() - INTERVAL 90 SECOND THEN 0 ELSE 1 END, id
ORDER BY CASE WHEN kind IN ('player.permanent-death','bridge.ready') THEN 0 WHEN kind IN ('player.whisper','player.chat') AND created_at >= NOW() - INTERVAL 90 SECOND THEN 1 ELSE 2 END, id
LIMIT ${Math.max(1,EVENT_BATCH-fresh.length)}`);
for(const [id,kindHex,payloadHex] of [...fresh,...batch]){
const kind=Buffer.from(kindHex||'','hex').toString('utf8');