fix alliance name

This commit is contained in:
2026-04-22 22:54:14 +03:00
parent 794d4bbb79
commit 97854f0f1e
2 changed files with 16 additions and 1 deletions

View File

@@ -85,6 +85,12 @@
const player = uw.Game?.player_name || '';
const player_id = uw.Game?.player_id ?? null;
const alliance_id = uw.Game?.alliance_id ?? null;
let alliance_name = null;
try {
const pm = uw.MM.getModels().Player[player_id];
if (pm && pm.attributes) alliance_name = pm.attributes.alliance_name;
} catch(e) {}
const total_points = uw.Game?.player_points ?? 0;
const world = uw.Game?.world_id || '';
@@ -262,6 +268,7 @@
has_premium,
bonuses,
wonder_points,
alliance_name,
};
});