tempBanSkill修改支持传入数组形式

This commit is contained in:
mengxinzxz 2024-01-22 14:27:44 +08:00
parent f93800fa43
commit 92b93e5b25
1 changed files with 21 additions and 14 deletions

View File

@ -7171,6 +7171,12 @@ export class Player extends HTMLDivElement {
return skill;
}
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;
this.setStorage(`temp_ban_${skill}`, true);
@ -7185,6 +7191,7 @@ export class Player extends HTMLDivElement {
}).then(() => {
delete player.storage[`temp_ban_${bannedSkill}`];
});
}
return skill;
}
isTempBanned(skill) {