Browse Source

bug #2004: Fixed the thread finder check and announcement duration

tags/v0.14.0^2
Shaun 6 months ago
parent
commit
721ecfe54b
2 changed files with 15 additions and 2 deletions
  1. +1
    -1
      src/server/world/atlas.js
  2. +14
    -1
      src/server/world/threadManager.js

+ 1
- 1
src/server/world/atlas.js View File

@@ -51,7 +51,7 @@ module.exports = {
event: 'onGetAnnouncement',
data: {
msg: 'Generating a new map, please wait as this may take a few moments..',
ttl: 5000
ttl: 500
}
});
}


+ 14
- 1
src/server/world/threadManager.js View File

@@ -174,9 +174,22 @@ const spawnThread = async ({ name, path, instanced }) => {
};

const doesThreadExist = ({ zoneName, zoneId }) => {
let map = mapList.find(m => m.name === zoneName);

if (!map)
map = mapList.find(m => m.name === clientConfig.config.defaultZone);

const exists = threads.some(t => t.id === zoneId && t.name === zoneName);

return exists;
if (exists)
return true;

if (map.instanced)
return false;

const thread = getThreadFromName(map.name);

return !!thread;
};

const getThread = async ({ zoneName, zoneId }) => {


Loading…
Cancel
Save