tempBanSkill修改支持传入数组形式
This commit is contained in:
parent
f93800fa43
commit
92b93e5b25
|
@ -7171,6 +7171,12 @@ export class Player extends HTMLDivElement {
|
||||||
return skill;
|
return skill;
|
||||||
}
|
}
|
||||||
tempBanSkill(skill, expire, log) {
|
tempBanSkill(skill, expire, log) {
|
||||||
|
if (Array.isArray(skill)) {
|
||||||
|
for (var i = 0; i < skill.length; i++) {
|
||||||
|
this.tempBanSkill(skill[i], expire, log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
if (this.isTempBanned(skill)) return;
|
if (this.isTempBanned(skill)) return;
|
||||||
this.setStorage(`temp_ban_${skill}`, true);
|
this.setStorage(`temp_ban_${skill}`, true);
|
||||||
|
|
||||||
|
@ -7185,6 +7191,7 @@ export class Player extends HTMLDivElement {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delete player.storage[`temp_ban_${bannedSkill}`];
|
delete player.storage[`temp_ban_${bannedSkill}`];
|
||||||
});
|
});
|
||||||
|
}
|
||||||
return skill;
|
return skill;
|
||||||
}
|
}
|
||||||
isTempBanned(skill) {
|
isTempBanned(skill) {
|
||||||
|
|
Loading…
Reference in New Issue