Merge branch 'feature/skin' into dev

This commit is contained in:
yushunrui 2024-01-11 21:10:05 +08:00
commit c4a60ac6ab
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}
}