diff --git a/src/api_s2c/user/ApiChangeInfo.ts b/src/api_s2c/user/ApiChangeInfo.ts index 5bfac14..2bc00b3 100644 --- a/src/api_s2c/user/ApiChangeInfo.ts +++ b/src/api_s2c/user/ApiChangeInfo.ts @@ -20,7 +20,8 @@ export default async function (call: ApiCall) { vip: call.conn.gud.vip, lsyx: call.conn.lshd.hero, model: call.conn.gud.model, - active: active + active: active, + heroskin: call.conn.gud.heroskin }); if (!isMeet && call.req.type != 'headFrame' && call.req.type != 'chatFrame') return call.error(globalThis.lng.user_1); diff --git a/src/shared/public/user.ts b/src/shared/public/user.ts index fe19f59..5310bab 100644 --- a/src/shared/public/user.ts +++ b/src/shared/public/user.ts @@ -24,7 +24,7 @@ export class UserShared { * 判断头像之类是否激活 * @param id 请使用 UserShared.getInfo 转化后的id */ - static chechIsActive(fmtId: string, collection: Partial<{ lv: number, vip: number, lsyx: k_v, model: k_v, active: k_v; }>) { + static chechIsActive(fmtId: string, collection: Partial<{ lv: number, vip: number, lsyx: k_v, model: k_v, active: k_v, heroskin: k_v; }>) { const [type, id] = fmtId.split('_'); const jsonName = 'player' + type.slice(0, 1).toLocaleUpperCase() + type.slice(1); @@ -37,6 +37,7 @@ export class UserShared { // else if (conf.cond[0] == 'time') return collection.active[fmtId] == -1 || collection.active[fmtId] > G.time; else if (conf.cond[0] == 'time') return conf.cond[1] == -1 || collection.active?.[fmtId] > G.time; else if (conf.cond[0] == 'model') return Object.values(collection.model).find(i => i.id == conf.cond[1]); + else if (conf.cond[0] == 'heroskin') return conf.cond[1] in collection.heroskin; else return false; } } \ No newline at end of file