Skip to content

Commit

Permalink
Fixed reassign bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Sep 17, 2024
1 parent 86538bf commit a6e9047
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GuildWarsPartySearch.NodeJSServer/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ function reassign_bot_clients(request) {
// For remaining bots, assign them where you can
const to_reassign_cpy = Array.from(bots_to_reassign);
to_reassign_cpy.forEach((bot_client) => {
check_district_regions.forEach((district_region) => {
for(let i=0;i < check_district_regions.length;i++) {
const district_region = check_district_regions[i];
for(let map_id = 0; map_id < map_ids.Count;map_id++) {
if(!isValidOutpost(map_id))
continue;
Expand All @@ -391,7 +392,7 @@ function reassign_bot_clients(request) {
assign_bot(bot_client, map_id, district_region);
return;
}
});
}
})

if (bots_to_reassign.length) {
Expand Down

0 comments on commit a6e9047

Please sign in to comment.