优化:gm-server创建武将
This commit is contained in:
@@ -728,7 +728,7 @@ export const RoleModel = getModelForClass(Role);
|
||||
|
||||
export interface RoleType extends Pick<DocumentType<Role>, keyof Role> { };
|
||||
export type RoleUpdate = Partial<RoleType>; // 将所有字段变成可选项
|
||||
export type RoleInc = Partial<Pick<DocumentType<Role>, 'heroNum' | 'blockCnt' | 'friendCnt' | 'gold' | 'coin'>>;
|
||||
export type RoleInc = Partial<Pick<DocumentType<Role>, 'heroNum' | 'blockCnt' | 'friendCnt' | 'gold' | 'coin' | 'ce'>>;
|
||||
|
||||
// 初始化
|
||||
function getInitialTeraph() {
|
||||
|
||||
@@ -34,7 +34,7 @@ export default class Skin extends BaseModel {
|
||||
const items: SkinType[] = await SkinModel.insertMany(insertInfos);
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
public static async increaseSkin(roleId: string, id: number, info: { roleId: string, roleName: string, id: number, skinName: string, hid: number }, lean = true) {
|
||||
const doc = new SkinModel();
|
||||
const setOnInsert = Object.assign(doc.toJSON(), info);
|
||||
|
||||
Reference in New Issue
Block a user