Skip to content

Commit

Permalink
Additional Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kjaegers committed Aug 22, 2023
1 parent 8bbafc6 commit 0a2e603
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions EncounterHelper/1.1.0/EncounterHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,12 @@ Commands : Note: Encounter Names are case sensitive.
}

function addToEncounter(pageid, encounterName, selected) {
var ids = getEncounterMobs(pageid, encounterName);
var ids = []
var existingInfo = getEncounterMobsFullInfo(pageid, encounterName);
existingInfo.forEach(function (entity) {
ids.push(entity);
});

selected.forEach(function (entity) {
var extInfo = entity._id;
var token = undefined;
Expand Down Expand Up @@ -1162,7 +1167,7 @@ Commands : Note: Encounter Names are case sensitive.
}
}

function addEncounter(pageid, encounterName, moblist) {
function addEncounter(pageid, encounterName, moblist, existingInfo) {
deleteEncounter(pageid, encounterName);
var currentList = getEncounterList(pageid);
currentList.push(`${encounterName}:${moblist.join("|")}`);
Expand Down

0 comments on commit 0a2e603

Please sign in to comment.