From 7b994e53cbe245551793d9010e7cae25714edc58 Mon Sep 17 00:00:00 2001 From: kuangshen04 <2832899707@qq.com> Date: Mon, 22 Jan 2024 14:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Duninit=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=92=8C=E5=9B=BE=E6=A0=87=E4=B8=8D=E5=90=8C=E6=AD=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/player.js | 34 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/noname/library/element/player.js b/noname/library/element/player.js index f4e6a20ef..97efcc906 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -2096,9 +2096,6 @@ export class Player extends HTMLDivElement { } } uninit() { - this.expandedSlots = {}; - this.disabledSlots = {}; - delete this.name; delete this.name1; delete this.tempname; @@ -2107,21 +2104,14 @@ export class Player extends HTMLDivElement { delete this.hp; delete this.maxHp; delete this.hujia; - this.clearSkills(true); if (this.name2) { delete this.singleHp; delete this.name2; } - for (var mark in this.marks) { - this.marks[mark].remove(); - } - ui.updatem(this); this.skipList = []; - this.skills = this.skills.filter(skill => { - return lib.skill[skill] && lib.skill[skill].superCharlotte; - }); + this.clearSkills(true); this.initedSkills = []; this.additionalSkills = {}; this.disabledSkills = {}; @@ -2133,6 +2123,8 @@ export class Player extends HTMLDivElement { this.tempSkills = {}; this.storage = {}; this.marks = {}; + this.expandedSlots = {}; + this.disabledSlots = {}; this.ai = { friend: [], enemy: [], neutral: [] }; this.$uninit(); @@ -2140,18 +2132,18 @@ export class Player extends HTMLDivElement { return this; } $uninit() { + this.$syncExpand(); this.$syncDisable(); - if (this.isDisabledJudge()) { - game.broadcastAll(function (player) { - player.storage._disableJudge = false; - for (var i = 0; i < player.node.judges.childNodes.length; i++) { - if (player.node.judges.childNodes[i].name == 'disable_judge') { - player.node.judges.removeChild(player.node.judges.childNodes[i]); - break; - } + game.broadcastAll(function (player) { + delete player.storage._disableJudge; + for (var i = 0; i < player.node.judges.childNodes.length; i++) { + if (player.node.judges.childNodes[i].name == 'disable_judge') { + player.node.judges.removeChild(player.node.judges.childNodes[i]); + break; } - }, this); - } + } + }, this); + this.node.avatar.hide(); this.node.count.hide(); if (this.node.wuxing) {