diff --git a/sim/core/apl.go b/sim/core/apl.go index a518bb24bf..d0f2dedb40 100644 --- a/sim/core/apl.go +++ b/sim/core/apl.go @@ -50,8 +50,9 @@ func (unit *Unit) newAPLRotation(config *proto.APLRotation) *APLRotation { rotation.curWarnings = nil } - for i, action := range rotation.allAPLActions() { + for i, action := range rotation.priorityList { action.impl.Finalize(rotation) + rotation.priorityListWarnings[configIdxs[i]] = append(rotation.priorityListWarnings[configIdxs[i]], rotation.curWarnings...) rotation.curWarnings = nil diff --git a/sim/core/apl_actions_sequences.go b/sim/core/apl_actions_sequences.go index 1cb169d568..df66c2c93a 100644 --- a/sim/core/apl_actions_sequences.go +++ b/sim/core/apl_actions_sequences.go @@ -26,7 +26,11 @@ func (rot *APLRotation) newActionSequence(config *proto.APLActionSequence) APLAc func (action *APLActionSequence) GetInnerActions() []*APLAction { return Flatten(MapSlice(action.actions, func(action *APLAction) []*APLAction { return action.GetAllActions() })) } -func (action *APLActionSequence) Finalize(*APLRotation) {} +func (action *APLActionSequence) Finalize(rot *APLRotation) { + for _, subaction := range action.actions { + subaction.impl.Finalize(rot) + } +} func (action *APLActionSequence) Reset(*Simulation) { action.curIdx = 0 } @@ -92,7 +96,11 @@ func (rot *APLRotation) newActionStrictSequence(config *proto.APLActionStrictSeq func (action *APLActionStrictSequence) GetInnerActions() []*APLAction { return Flatten(MapSlice(action.actions, func(action *APLAction) []*APLAction { return action.GetAllActions() })) } -func (action *APLActionStrictSequence) Finalize(*APLRotation) {} +func (action *APLActionStrictSequence) Finalize(rot *APLRotation) { + for _, subaction := range action.actions { + subaction.impl.Finalize(rot) + } +} func (action *APLActionStrictSequence) Reset(*Simulation) { action.curIdx = 0 } diff --git a/sim/hunter/explosive_trap.go b/sim/hunter/explosive_trap.go index 8c7e7a7835..0ec11f4762 100644 --- a/sim/hunter/explosive_trap.go +++ b/sim/hunter/explosive_trap.go @@ -15,6 +15,7 @@ func (hunter *Hunter) registerExplosiveTrapSpell(timer *core.Timer) { ActionID: core.ActionID{SpellID: 49067}, SpellSchool: core.SpellSchoolFire, ProcMask: core.ProcMaskSpellDamage, + Flags: core.SpellFlagAPL, ManaCost: core.ManaCostOptions{ BaseCost: 0.19, diff --git a/ui/core/proto_utils/action_id.ts b/ui/core/proto_utils/action_id.ts index 8d1b2bade1..6133e9da83 100644 --- a/ui/core/proto_utils/action_id.ts +++ b/ui/core/proto_utils/action_id.ts @@ -213,6 +213,18 @@ export class ActionId { const baseName = tooltipData['name']; let name = baseName; switch (baseName) { + case 'Explosive Shot': + if (this.spellId == 60053) { + name += ' (R4)'; + } else if (this.spellId == 60052) { + name += ' (R3)'; + } + break; + case 'Explosive Trap': + if (this.tag == 1) { + name += ' (Weaving)'; + } + break; case 'Arcane Blast': if (this.tag == 1) { name += ' (No Stacks)'; @@ -408,7 +420,7 @@ export class ActionId { } else if (this.otherId) { return 'other-' + this.otherId; } else { - return 'empty-action'; + throw new Error('Empty action id!'); } } @@ -481,7 +493,8 @@ export class ActionId { } } - private static readonly logRegex = /{((SpellID)|(ItemID)|(OtherID)): (\d+)(, Tag: (-?\d+))?}/g; + private static readonly logRegex = /{((SpellID)|(ItemID)|(OtherID)): (\d+)(, Tag: (-?\d+))?}/; + private static readonly logRegexGlobal = new RegExp(ActionId.logRegex, 'g'); private static fromMatch(match: RegExpMatchArray): ActionId { const idType = match[1]; const id = parseInt(match[5]); @@ -503,7 +516,7 @@ export class ActionId { } static async replaceAllInString(str: string): Promise { - const matches = [...str.matchAll(ActionId.logRegex)]; + const matches = [...str.matchAll(ActionId.logRegexGlobal)]; const replaceData = await Promise.all(matches.map(async match => { const actionId = ActionId.fromMatch(match); diff --git a/ui/scss/core/components/individual_sim_ui/_apl_rotation_picker.scss b/ui/scss/core/components/individual_sim_ui/_apl_rotation_picker.scss index 33f94db96f..8f72cc1ea7 100644 --- a/ui/scss/core/components/individual_sim_ui/_apl_rotation_picker.scss +++ b/ui/scss/core/components/individual_sim_ui/_apl_rotation_picker.scss @@ -92,4 +92,7 @@ .apl-picker-builder-root.apl-action-sequence .apl-action-condition { display: none; +} +.apl-picker-builder-root.apl-action-strictSequence .apl-action-condition { + display: none; } \ No newline at end of file