[Bug] Fix arena traps on flyout (#2483)
* fix arena traps on flyout * specify for arena trap tags
This commit is contained in:
parent
0ebf9342f5
commit
9baa72903f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue