Merge branch 'feature/skin' into dev
This commit is contained in:
commit
c4a60ac6ab
@ -20,7 +20,8 @@ export default async function (call: ApiCall<ReqChangeInfo, ResChangeInfo>) {
|
||||
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);
|
||||
|
@ -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<number>, model: k_v<any>, active: k_v<number>; }>) {
|
||||
static chechIsActive(fmtId: string, collection: Partial<{ lv: number, vip: number, lsyx: k_v<number>, model: k_v<any>, active: k_v<number>, heroskin: k_v<any>; }>) {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user