✨ feat(宝物): 添加宝物系统
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
import { ArtifactModelType } from '../../db/Artifact';
|
||||
import { Connect, EPlace, HeroSkin, HeroType, HeroUpdate, Talent } from '../../db/Hero';
|
||||
import { JewelSe, JewelType, RandSe } from '../../db/Jewel';
|
||||
import { gameData } from '../../pubUtils/data';
|
||||
@@ -60,6 +61,7 @@ export class HeroParam {
|
||||
skins: HeroSKinParam[] = []; // 皮肤
|
||||
ePlace: EPlace[]; // 武将装备引用数组
|
||||
|
||||
artifact: number = 0;
|
||||
talent: Talent[] = [];
|
||||
usedTalentPoint: number = 0;
|
||||
totalTalentPoint: number = 0;
|
||||
@@ -93,6 +95,7 @@ export class HeroParam {
|
||||
}
|
||||
}
|
||||
this.ePlace = hero.ePlace;
|
||||
this.artifact = hero.artifact;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,3 +127,27 @@ export class JewelParam {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class ArtifactParam {
|
||||
seqId: number; // 唯一id
|
||||
artifactId: number; // 宝物id
|
||||
id: number; // 物品id
|
||||
lv: number; // 强化等级
|
||||
hid: number; // 装备的武将
|
||||
count: number;
|
||||
inc: number; // 增减数量,固定1
|
||||
reason: number; // 来源id
|
||||
|
||||
constructor(artifact: ArtifactModelType, isPush?: boolean, reason?: number) {
|
||||
this.seqId = artifact.seqId;
|
||||
this.artifactId = artifact.artifactId;
|
||||
this.id = artifact.id;
|
||||
this.lv = artifact.lv;
|
||||
this.hid = artifact.hid;
|
||||
if(isPush) {
|
||||
this.count = 1;
|
||||
this.inc = 1;
|
||||
this.reason = reason;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user