为removeGlobalSkill添加了参数player,对接了player.js的调用
This commit is contained in:
parent
504c61f4be
commit
dc35acf0d2
|
@ -4653,8 +4653,14 @@ export class Game extends Uninstantable {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param { string } skill
|
* @param { string } skill
|
||||||
|
* @param { lib.element.Player } player
|
||||||
*/
|
*/
|
||||||
static removeGlobalSkill(skill) {
|
static removeGlobalSkill(skill, player) {
|
||||||
|
const players = lib.skill.globalmap[skill];
|
||||||
|
if(player && Array.isArray(players)) {
|
||||||
|
lib.skill.globalmap[skill].remove(player);
|
||||||
|
if(players.length) return;
|
||||||
|
}
|
||||||
lib.skill.global.remove(skill);
|
lib.skill.global.remove(skill);
|
||||||
delete lib.skill.globalmap[skill];
|
delete lib.skill.globalmap[skill];
|
||||||
for (let i in lib.hook.globalskill) {
|
for (let i in lib.hook.globalskill) {
|
||||||
|
|
Loading…
Reference in New Issue