Skip to content

Commit

Permalink
Merge pull request #3693 from wowsims/apl
Browse files Browse the repository at this point in the history
Fix bug with loading simple CD settings
  • Loading branch information
jimmyt857 authored Sep 17, 2023
2 parents 9ada6eb + 5b39775 commit 0b70f8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ui/core/components/individual_sim_ui/rotation_tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export class RotationTab extends SimTab {
}

private buildSimpleOrLegacyContent(isSimple: boolean) {
if (!isSimple && aplLaunchStatuses[this.simUI.player.spec] == LaunchStatus.Launched) {
return;
}
const cssClass = isSimple ? 'rotation-tab-simple' : 'rotation-tab-legacy';

const contentBlock = new ContentBlock(this.leftPanel, 'rotation-settings', {
Expand Down
2 changes: 1 addition & 1 deletion ui/core/components/settings_menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class SettingsMenu extends BaseModal {
<button
class="restore-defaults-button btn btn-primary"
data-bs-toggle="tooltip"
data-bs-title="Restores all default settings (gear, consumes, buffs, talents, EP weights, etc)."
data-bs-title="Restores all default settings (gear, consumes, buffs, talents, EP weights, etc). Saved settings are preserved."
>Restore Defaults</button>
`

Expand Down
2 changes: 1 addition & 1 deletion ui/core/proto_utils/apl_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function autocastCooldownsAction(startAt?: string): APLAction {
}

export function scheduledCooldownAction(schedule: string, actionId: ActionIdProto): APLAction {
return APLAction.fromJsonString(`{"schedule":{"schedule":"${schedule}","innerAction":{"castSpell":{"spellId":${ActionIdProto.toJson(actionId)}}}}}`);
return APLAction.fromJsonString(`{"schedule":{"schedule":"${schedule}","innerAction":{"castSpell":{"spellId":${ActionIdProto.toJsonString(actionId)}}}}}`);
}

export function simpleCooldownActions(cooldowns: Cooldowns): Array<APLAction> {
Expand Down
10 changes: 5 additions & 5 deletions ui/hunter/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export class HunterSimUI extends IndividualSimUI<Spec.SpecHunter> {
simpleRotation: (player: Player<Spec.SpecHunter>, simple: HunterRotation, cooldowns: Cooldowns): APLRotation => {
let [prepullActions, actions] = AplUtils.standardCooldownDefaults(cooldowns);

const multiDotSerpentSting = (numTargets: number) => APLAction.fromJsonString(`{"condition":{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"6s"}}}},"multidot":{"spellId":{"spellId":49001},"maxDots":${numTargets},"maxOverlap":{"const":{"val":"0ms"}}}}`);
const serpentSting = APLAction.fromJsonString(`{"condition":{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"6s"}}}},"multidot":{"spellId":{"spellId":49001},"maxDots":${simple.multiDotSerpentSting ? 3 : 1},"maxOverlap":{"const":{"val":"0ms"}}}}`);
const scorpidSting = APLAction.fromJsonString(`{"condition":{"auraShouldRefresh":{"auraId":{"spellId":3043},"maxOverlap":{"const":{"val":"0ms"}}}},"castSpell":{"spellId":{"spellId":3043}}}`);
const trapWeave = APLAction.fromJsonString(`{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},"castSpell":{"spellId":{"tag":1,"spellId":49067}}}`);
const volley = APLAction.fromJsonString(`{"castSpell":{"spellId":{"spellId":58434}}}`);
Expand All @@ -314,7 +314,7 @@ export class HunterSimUI extends IndividualSimUI<Spec.SpecHunter> {
if (simple.type == Hunter_Rotation_RotationType.Aoe) {
actions.push(...[
simple.sting == StingType.ScorpidSting ? scorpidSting : null,
simple.sting == StingType.SerpentSting ? (simple.multiDotSerpentSting ? multiDotSerpentSting(3) : multiDotSerpentSting(1)) : null,
simple.sting == StingType.SerpentSting ? serpentSting : null,
simple.trapWeave ? trapWeave : null,
volley,
].filter(a => a) as Array<APLAction>)
Expand All @@ -323,7 +323,7 @@ export class HunterSimUI extends IndividualSimUI<Spec.SpecHunter> {
killShot,
simple.trapWeave ? trapWeave : null,
simple.sting == StingType.ScorpidSting ? scorpidSting : null,
simple.sting == StingType.SerpentSting ? (simple.multiDotSerpentSting ? multiDotSerpentSting(3) : multiDotSerpentSting(1)) : null,
simple.sting == StingType.SerpentSting ? serpentSting : null,
aimedShot,
multiShot,
steadyShot,
Expand All @@ -333,7 +333,7 @@ export class HunterSimUI extends IndividualSimUI<Spec.SpecHunter> {
silencingShot,
killShot,
simple.sting == StingType.ScorpidSting ? scorpidSting : null,
simple.sting == StingType.SerpentSting ? (simple.multiDotSerpentSting ? multiDotSerpentSting(3) : multiDotSerpentSting(1)) : null,
simple.sting == StingType.SerpentSting ? serpentSting : null,
simple.trapWeave ? trapWeave : null,
chimeraShot,
aimedShot,
Expand All @@ -347,7 +347,7 @@ export class HunterSimUI extends IndividualSimUI<Spec.SpecHunter> {
simple.allowExplosiveShotDownrank ? explosiveShot3 : null,
simple.trapWeave ? trapWeave : null,
simple.sting == StingType.ScorpidSting ? scorpidSting : null,
simple.sting == StingType.SerpentSting ? (simple.multiDotSerpentSting ? multiDotSerpentSting(3) : multiDotSerpentSting(1)) : null,
simple.sting == StingType.SerpentSting ? serpentSting : null,
blackArrow,
aimedShot,
multiShot,
Expand Down

0 comments on commit 0b70f8c

Please sign in to comment.