[Bug] Fix nicknames not showing up in battle (#6378)

This commit is contained in:
Sirz Benjie 2025-08-23 18:47:39 -05:00 committed by GitHub
parent 842f0e88b0
commit 70b47945e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -454,7 +454,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
getNameToRender(useIllusion = true) { getNameToRender(useIllusion = true) {
const illusion = this.summonData.illusion; const illusion = this.summonData.illusion;
const name = useIllusion ? (illusion?.name ?? this.name) : this.name; const name = useIllusion ? (illusion?.name ?? this.name) : this.name;
const nickname: string | undefined = useIllusion ? illusion?.nickname : this.nickname; const nickname: string | undefined = useIllusion ? (illusion?.nickname ?? this.nickname) : this.nickname;
try { try {
if (nickname) { if (nickname) {
return decodeURIComponent(escape(atob(nickname))); // TODO: Remove `atob` and `escape`... eventually... return decodeURIComponent(escape(atob(nickname))); // TODO: Remove `atob` and `escape`... eventually...