Browse Source

chore: Removed unused function in order to resolve circular dependency

1993-leagues
Shaun 8 months ago
parent
commit
7e7ccbcc60
1 changed files with 0 additions and 21 deletions
  1. +0
    -21
      src/server/world/threadManager.js

+ 0
- 21
src/server/world/threadManager.js View File

@@ -23,7 +23,6 @@ const childProcess = require('child_process');


//Imports //Imports
const objects = require('../objects/objects'); const objects = require('../objects/objects');
const connections = require('../security/connections');
const { mapList } = require('./mapManager'); const { mapList } = require('./mapManager');
const { registerCallback } = require('./atlas/registerCallback'); const { registerCallback } = require('./atlas/registerCallback');
const events = require('../misc/events'); const events = require('../misc/events');
@@ -33,10 +32,6 @@ const threads = [];
const listenersOnZoneIdle = []; const listenersOnZoneIdle = [];


//Helpers //Helpers
const getThreadFromName = name => {
return threads.find(t => t.name === name);
};

const getThreadFromId = threadId => { const getThreadFromId = threadId => {
return threads.find(t => t.id === threadId); return threads.find(t => t.id === threadId);
}; };
@@ -100,22 +95,6 @@ const messageHandlers = {
player.auth.gaTracker.track(message.obj); player.auth.gaTracker.track(message.obj);
}, },


callDifferentThread: function (thread, message) {
let obj = connections.players.find(p => (p.name === message.playerName));
if (!obj)
return;

let newThread = getThreadFromName(obj.zoneName);
if (!newThread)
return;

newThread.worker.send({
module: message.data.module,
method: message.data.method,
args: message.data.args
});
},

rezone: async function (thread, message) { rezone: async function (thread, message) {
const { args: { obj, newZone, keepPos = true } } = message; const { args: { obj, newZone, keepPos = true } } = message;




Loading…
Cancel
Save