Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Fixed for wrong recursive profiles adding for custom profiles #122

Merged
merged 5 commits into from
May 29, 2015
Merged
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
13 changes: 8 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ function _select_Gateway() { // Check for Gateway used to
var profileBase = {
profileName: 'Add profile name',
isProfileActive: true,
recursiveList: true,
level: {}
};

Expand Down Expand Up @@ -403,14 +402,17 @@ function _select_Gateway() { // Check for Gateway used to
//override
if(profile.level && profile.level[i]) {
newProfile.level[i] = profile.level[i];
if (profile.recursiveList && i > 0 && !profile.level[i+1]) {
profile.level[i+1] = profile.level[i];
}
continue;
}
}
//iterate and set
if(newProfile.recursiveList && i > 0) {
if(profile.recursiveList && i > 0 && !newProfile.level[i]) {
newProfile.level[i] = newProfile.level[i - 1];
}
}

console.info("profile added ",newProfile.profileName, newProfile);
professionSet.profiles.push(newProfile);
}

Expand Down Expand Up @@ -1199,7 +1201,7 @@ function _select_Gateway() { // Check for Gateway used to
});

addProfile("Leatherworking", {
profileName: "craft Elemental Trousers(?)",
profileName: "craft Elemental Trousers",
level: {
//purples first. shirts > tunics > pants.
25: ['Leatherworking_Tier4_Leather_Pants_Special_2_Set2', //Exquisite Elemental Trousers
Expand Down Expand Up @@ -1666,6 +1668,7 @@ function _select_Gateway() { // Check for Gateway used to
customProfiles = [];
};
customProfiles.forEach(function (cProfile, idx) {
if (!cProfile.profile.hasOwnProperty('recursiveList')){ cProfile.profile.recursiveList = false;}
addProfile(cProfile.taskName, cProfile.profile, cProfile.baseProfile);
});

Expand Down