Skip to content

Commit

Permalink
fixed a filtering bug in simple rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
EliphasNUIT committed Dec 23, 2023
1 parent ade54dc commit 017b1df
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions GW2EIBuilders/Resources/htmlTemplates/tmplSimpleRotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,33 @@
template: `${template}`,
data: function () {
var selectedSkills = {};
var skillList = [];
var rotation = this.target ? logData.targets[this.actorindex].details.rotation[this.phaseindex] : logData.players[this.actorindex].details.rotation[this.phaseindex];
for (var i = 0; i < rotation.length; i++) {
var rota = rotation[i];
var skillID = rota[1];
var skill = this.getSkill(skillID);
if (skill.isSwap || selectedSkills['s' + skillID]) {
continue;
var skillListList = [];
for (var phaseIndex = 0; phaseIndex < logData.phases.length; phaseIndex++) {
var skillList = [];
var encounteredSkills = {};
var rotation = this.target ? logData.targets[this.actorindex].details.rotation[phaseIndex] : logData.players[this.actorindex].details.rotation[phaseIndex];
for (var i = 0; i < rotation.length; i++) {
var rota = rotation[i];
var skillID = rota[1];
var skill = this.getSkill(skillID);
if (skill.isSwap || encounteredSkills['s' + skillID]) {
continue;
}
skillList.push({name: skill.name, id: skillID});
encounteredSkills['s'+skillID] = true;
selectedSkills['s'+skillID] = true;
}
skillList.push({name: skill.name, id: skillID});
selectedSkills['s'+skillID] = true;
skillList.sort((x,y) => {
if (x.name < y.name) {
return -1;
}
if (x.name > y.name) {
return 1;
}
return 0;
});
skillListList.push(skillList);
}
skillList.sort((x,y) => {
if (x.name < y.name) {
return -1;
}
if (x.name > y.name) {
return 1;
}
return 0;
});
return {
autoattack: true,
small: false,
Expand All @@ -136,7 +142,7 @@
hideGearProc: false,
hideSmallTime: true,
selectedSkills: selectedSkills,
skillList: skillList,
skillListList: skillListList,
};
},
computed: {
Expand All @@ -151,6 +157,9 @@
},
RotationStatus: function() {
return RotationStatus;
},
skillList: function() {
return this.skillListList[this.phaseindex];
}
},
methods: {
Expand Down

0 comments on commit 017b1df

Please sign in to comment.