From fb82868c4cb9d6338a8dd3faa9d7e9740bc9f0b0 Mon Sep 17 00:00:00 2001 From: Ivo Julca Date: Thu, 5 Dec 2024 19:24:06 -0500 Subject: [PATCH] Update mmrCache from ladder update response --- server/room-battle.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/room-battle.ts b/server/room-battle.ts index d1fcbcc51ecd1..67ce2aae1a0ea 100644 --- a/server/room-battle.ts +++ b/server/room-battle.ts @@ -872,6 +872,12 @@ export class RoomBattle extends RoomGame { this.p1.name, this.p2.name, p1score, this.room ); void this.logBattle(score, p1rating, p2rating); + if (Config.remoteladder) { + const p1 = Users.getExact(this.p1.name); + const p2 = Users.getExact(this.p2.name); + if (p1) p1.updateRatingCache(this.format, p1rating); + if (p2) p2.updateRatingCache(this.format, p2rating); + } Chat.runHandlers('onBattleRanked', this, winnerid, [p1rating, p2rating], [this.p1.id, this.p2.id]); } async logBattle(