瀏覽代碼

bug #1915: Fixed noit being able to log yourself out if you are in an instanced zone

tags/v0.11.0
Shaun 2 年之前
父節點
當前提交
4646f86635
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. +2
    -2
      src/server/security/connections.js
  2. +2
    -2
      src/server/world/atlas.js

+ 2
- 2
src/server/security/connections.js 查看文件

@@ -129,8 +129,8 @@ module.exports = {
continue;

if (p.auth.username === exclude.auth.username) {
if (p.name && p.zoneName)
await atlas.forceSavePlayer(p.name, p.zoneName);
if (p.name && p.zoneId)
await atlas.forceSavePlayer(p.name, p.zoneId);

p.socket.emit('dc', {});
}


+ 2
- 2
src/server/world/atlas.js 查看文件

@@ -314,8 +314,8 @@ module.exports = {
});
},

forceSavePlayer: async function (playerName, zoneName) {
const thread = this.getThreadFromName(zoneName);
forceSavePlayer: async function (playerName, zoneId) {
const thread = this.threads.find(t => t.id === zoneId);

if (!thread)
return;


Loading…
取消
儲存