From ee16f2c62943592ddc5580231c9559317d96ba05 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 10 Oct 2023 20:47:25 -0700 Subject: [PATCH] Default to auto when loading legacy for sims with launched APL rotation --- ui/core/player.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ui/core/player.ts b/ui/core/player.ts index 4fbc9c46ae..37a1ea8651 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -1312,15 +1312,20 @@ export class Player { this.setInFrontOfTarget(eventID, proto.inFrontOfTarget); this.setDistanceFromTarget(eventID, proto.distanceFromTarget); this.setHealingModel(eventID, proto.healingModel || HealingModel.create()); - if (aplLaunchStatuses[this.spec] != LaunchStatus.Launched) { + this.setSpecOptions(eventID, this.specTypeFunctions.optionsFromPlayer(proto)); + + if (aplLaunchStatuses[this.spec] == LaunchStatus.Launched) { + if (proto.rotation?.type == APLRotationType.TypeUnknown || proto.rotation?.type == APLRotationType.TypeLegacy) { + if (!proto.rotation) { + proto.rotation = APLRotation.create(); + } + proto.rotation.type = APLRotationType.TypeAuto; + } + } else { this.setCooldowns(eventID, proto.cooldowns || Cooldowns.create()); this.setRotation(eventID, this.specTypeFunctions.rotationFromPlayer(proto)); } this.setAplRotation(eventID, proto.rotation || APLRotation.create()) - this.setSpecOptions(eventID, this.specTypeFunctions.optionsFromPlayer(proto)); - - this.aplRotation = proto.rotation || APLRotation.create(); - this.rotationChangeEmitter.emit(eventID); const options = this.getSpecOptions(); for (let key in options) {