[Bug] Fix arena traps on flyout (#2483)

* fix arena traps on flyout

* specify for arena trap tags
This commit is contained in:
Adrian T 2024-06-21 22:32:49 +08:00 committed by GitHub
parent 0ebf9342f5
commit 9baa72903f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -273,16 +273,16 @@ export default class ArenaFlyout extends Phaser.GameObjects.Container {
const existingTrapTagIndex = isArenaTrapTag ? this.fieldEffectInfo.findIndex(e => tagAddedEvent.arenaTagType === e.tagType && arenaEffectType === e.effecType) : -1;
let name: string = ArenaTagType[tagAddedEvent.arenaTagType];
if (isArenaTrapTag && tagAddedEvent.arenaTagMaxLayers > 1) {
if (isArenaTrapTag) {
if (existingTrapTagIndex !== -1) {
this.fieldEffectInfo[existingTrapTagIndex].name = `${name} (${tagAddedEvent.arenaTagLayers})`;
const layers = tagAddedEvent.arenaTagMaxLayers > 1 ? ` (${tagAddedEvent.arenaTagLayers})` : "";
this.fieldEffectInfo[existingTrapTagIndex].name = `${name}${layers}`;
break;
} else {
} else if (tagAddedEvent.arenaTagMaxLayers > 1) {
name = `${name} (${tagAddedEvent.arenaTagLayers})`;
}
}
this.fieldEffectInfo.push({
name,
effecType: arenaEffectType,