Skip to content

Commit

Permalink
Merge pull request #3285 from wowsims/apl
Browse files Browse the repository at this point in the history
Change rotation json spacing
  • Loading branch information
jimmyt857 committed Jul 11, 2023
2 parents 913f694 + 00cc974 commit c89850e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 248 deletions.
2 changes: 1 addition & 1 deletion ui/core/components/exporters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class IndividualJsonExporter<SpecType extends Spec> extends Exporter {
}

if (path[0] == 'player' && path[1] == 'rotation' && ['prepullActions', 'priorityList'].includes(path[2])) {
return path[path.length - 2] == 'action';
return path.length > 3;
}

return false;
Expand Down
291 changes: 44 additions & 247 deletions ui/hunter/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,73 +113,21 @@ export const ROTATION_PRESET_BM = {
timeToTrapWeaveMs: 2000,
})),
rotation: APLRotation.fromJsonString(`{
"enabled": true,
"enabled": true,
"prepullActions": [
{
"action": {
"castSpell": {"spellId":{"otherId":"OtherActionPotion"}}
},
"doAt": "-1s"
}
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAt":"-1s"}
],
"priorityList": [
{
"action": {
"condition": {"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},
"autocastOtherCooldowns": {}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},
"castSpell": {"spellId":{"spellId":34074}}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},
"castSpell": {"spellId":{"spellId":61847}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":61006}}
}
},
{
"hide": true,
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},
"castSpell": {"spellId":{"tag":1,"spellId":49067}}
}
},
{
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},
"castSpell": {"spellId":{"spellId":49001}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49050}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49048}}
}
},
{
"hide": true,
"action": {
"castSpell": {"spellId":{"spellId":49045}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49052}}
}
}
{"action":{"condition":{"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},"castSpell":{"spellId":{"spellId":34074}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},"castSpell":{"spellId":{"spellId":61847}}}},
{"action":{"castSpell":{"spellId":{"spellId":61006}}}},
{"hide":true,"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},"castSpell":{"spellId":{"tag":1,"spellId":49067}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"6s"}}}}]}},"castSpell":{"spellId":{"spellId":49001}}}},
{"action":{"castSpell":{"spellId":{"spellId":49050}}}},
{"action":{"castSpell":{"spellId":{"spellId":49048}}}},
{"hide":true,"action":{"castSpell":{"spellId":{"spellId":49045}}}},
{"action":{"castSpell":{"spellId":{"spellId":49052}}}}
]
}`),
}),
Expand All @@ -194,76 +142,20 @@ export const ROTATION_PRESET_MM = {
rotation: APLRotation.fromJsonString(`{
"enabled": true,
"prepullActions": [
{
"action": {
"castSpell": {"spellId":{"otherId":"OtherActionPotion"}}
},
"doAt": "-1s"
}
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAt":"-1s"}
],
"priorityList": [
{
"action": {
"condition": {"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},
"autocastOtherCooldowns": {}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},
"castSpell": {"spellId":{"spellId":34074}}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},
"castSpell": {"spellId":{"spellId":61847}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":61006}}
}
},
{
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},
"castSpell": {"spellId":{"spellId":49001}}
}
},
{
"hide": true,
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},
"castSpell": {"spellId":{"tag":1,"spellId":49067}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":53209}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49050}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49048}}
}
},
{
"hide": true,
"action": {
"castSpell": {"spellId":{"spellId":49045}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49052}}
}
}
{"action":{"condition":{"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},"castSpell":{"spellId":{"spellId":34074}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},"castSpell":{"spellId":{"spellId":61847}}}},
{"action":{"castSpell":{"spellId":{"spellId":61006}}}},
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},"castSpell":{"spellId":{"spellId":49001}}}},
{"hide":true,"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},"castSpell":{"spellId":{"tag":1,"spellId":49067}}}},
{"action":{"castSpell":{"spellId":{"spellId":53209}}}},
{"action":{"castSpell":{"spellId":{"spellId":49050}}}},
{"action":{"castSpell":{"spellId":{"spellId":49048}}}},
{"hide":true,"action":{"castSpell":{"spellId":{"spellId":49045}}}},
{"action":{"castSpell":{"spellId":{"spellId":49052}}}}
]
}`),
}),
Expand All @@ -278,82 +170,21 @@ export const ROTATION_PRESET_SV = {
rotation: APLRotation.fromJsonString(`{
"enabled": true,
"prepullActions": [
{
"action": {
"castSpell": {"spellId":{"otherId":"OtherActionPotion"}}
},
"doAt": "-1s"
}
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAt":"-1s"}
],
"priorityList": [
{
"action": {
"condition": {"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},
"autocastOtherCooldowns": {}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},
"castSpell": {"spellId":{"spellId":34074}}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},
"castSpell": {"spellId":{"spellId":61847}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":61006}}
}
},
{
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":60053}}}}},
"castSpell": {"spellId":{"spellId":60053}}
}
},
{
"action": {
"condition": {"dotIsActive":{"spellId":{"spellId":60053}}},
"castSpell": {"spellId":{"spellId":60052}}
}
},
{
"hide": true,
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},
"castSpell": {"spellId":{"tag":1,"spellId":49067}}
}
},
{
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},
"castSpell": {"spellId":{"spellId":49001}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":63672}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49050}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49048}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":49052}}
}
}
{"action":{"condition":{"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},"castSpell":{"spellId":{"spellId":34074}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},"castSpell":{"spellId":{"spellId":61847}}}},
{"action":{"castSpell":{"spellId":{"spellId":61006}}}},
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":60053}}}}},"castSpell":{"spellId":{"spellId":60053}}}},
{"action":{"condition":{"dotIsActive":{"spellId":{"spellId":60053}}},"castSpell":{"spellId":{"spellId":60052}}}},
{"hide":true,"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},"castSpell":{"spellId":{"tag":1,"spellId":49067}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49001}}}}},{"cmp":{"op":"OpGt","lhs":{"remainingTime":{}},"rhs":{"const":{"val":"6s"}}}}]}},"castSpell":{"spellId":{"spellId":49001}}}},
{"action":{"castSpell":{"spellId":{"spellId":63672}}}},
{"action":{"castSpell":{"spellId":{"spellId":49050}}}},
{"action":{"castSpell":{"spellId":{"spellId":49048}}}},
{"action":{"castSpell":{"spellId":{"spellId":49052}}}}
]
}`),
}),
Expand All @@ -368,49 +199,15 @@ export const ROTATION_PRESET_AOE = {
rotation: APLRotation.fromJsonString(`{
"enabled": true,
"prepullActions": [
{
"action": {
"castSpell": {"spellId":{"otherId":"OtherActionPotion"}}
},
"doAt": "-1s"
}
{"action":{"castSpell":{"spellId":{"otherId":"OtherActionPotion"}}},"doAt":"-1s"}
],
"priorityList": [
{
"action": {
"condition": {"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},
"autocastOtherCooldowns": {}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},
"castSpell": {"spellId":{"spellId":34074}}
}
},
{
"action": {
"condition": {"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},
"castSpell": {"spellId":{"spellId":61847}}
}
},
{
"hide": true,
"action": {
"multidot": {"spellId":{"spellId":49001},"maxDots":3,"maxOverlap":{"const":{"val":"0ms"}}}
}
},
{
"action": {
"condition": {"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},
"castSpell": {"spellId":{"tag":1,"spellId":49067}}
}
},
{
"action": {
"castSpell": {"spellId":{"spellId":58434}}
}
}
{"action":{"condition":{"cmp":{"op":"OpGt","lhs":{"currentTime":{}},"rhs":{"const":{"val":"10s"}}}},"autocastOtherCooldowns":{}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":34074}}}}},{"cmp":{"op":"OpLt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"10%"}}}}]}},"castSpell":{"spellId":{"spellId":34074}}}},
{"action":{"condition":{"and":{"vals":[{"not":{"val":{"auraIsActive":{"auraId":{"spellId":61847}}}}},{"cmp":{"op":"OpGt","lhs":{"currentManaPercent":{}},"rhs":{"const":{"val":"30%"}}}}]}},"castSpell":{"spellId":{"spellId":61847}}}},
{"hide":true,"action":{"multidot":{"spellId":{"spellId":49001},"maxDots":3,"maxOverlap":{"const":{"val":"0ms"}}}}},
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":49067}}}}},"castSpell":{"spellId":{"tag":1,"spellId":49067}}}},
{"action":{"castSpell":{"spellId":{"spellId":58434}}}}
]
}`),
}),
Expand Down

0 comments on commit c89850e

Please sign in to comment.