Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverting for now #4091

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sim/core/apl.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (rot *APLRotation) doAndRecordWarnings(warningsList *[]string, isPrepull bo
}

func (unit *Unit) newAPLRotation(config *proto.APLRotation) *APLRotation {
if config == nil || !unit.IsUsingAPL {
if config == nil || config.Type != proto.APLRotation_TypeAPL {
return nil
}

Expand Down
5 changes: 1 addition & 4 deletions sim/core/character.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@ func NewCharacter(party *Party, partyIndex int, player *proto.Player) Character
ChannelClipDelay: max(0, time.Duration(player.ChannelClipDelayMs)*time.Millisecond),
DistanceFromTarget: player.DistanceFromTarget,
NibelungAverageCasts: player.NibelungAverageCasts,
IsUsingAPL: player.Rotation != nil &&
(player.Rotation.Type == proto.APLRotation_TypeAPL ||
player.Rotation.Type == proto.APLRotation_TypeAuto ||
player.Rotation.Type == proto.APLRotation_TypeSimple),
IsUsingAPL: player.Rotation != nil && player.Rotation.Type == proto.APLRotation_TypeAPL,
},

Name: player.Name,
Expand Down
10 changes: 3 additions & 7 deletions ui/core/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,15 +827,11 @@ export class Player<SpecType extends Spec> {
const type = this.getRotationType();
if (type == APLRotationType.TypeAuto && this.autoRotationGenerator) {
// Clone to avoid modifying preset rotations, which are often returned directly.
const rot = APLRotation.clone(this.autoRotationGenerator(this));
rot.type = APLRotationType.TypeAuto;
return rot;
return APLRotation.clone(this.autoRotationGenerator(this));
} else if (type == APLRotationType.TypeSimple && this.simpleRotationGenerator) {
// Clone to avoid modifying preset rotations, which are often returned directly.
const simpleRot = this.getRotation();
const rot = APLRotation.clone(this.simpleRotationGenerator(this, simpleRot, this.getCooldowns()));
rot.simple = this.aplRotation.simple;
rot.type = APLRotationType.TypeSimple; // Set this here for convenience, so the generator functions don't need to.
const rot = APLRotation.clone(this.simpleRotationGenerator(this, this.getRotation(), this.getCooldowns()));
rot.type = APLRotationType.TypeAPL; // Set this here for convenience, so the generator functions don't need to.
return rot;
} else {
return this.aplRotation;
Expand Down
Loading