✨ feat(宝物): 添加宝物系统
This commit is contained in:
@@ -4,6 +4,7 @@ import * as friendUtil from '../../pubUtils/friendUtil'
|
||||
import { FRIEND_RELATION_TYPE } from "../../consts";
|
||||
import { Connect, EPlace, HeroType, Stone, Talent } from "../../db/Hero";
|
||||
import { JewelType, RandSe } from "../../db/Jewel";
|
||||
import { ArtifactModelType } from "../../db/Artifact";
|
||||
|
||||
export class FriendParams {
|
||||
roleId: string;
|
||||
@@ -201,6 +202,7 @@ export class HeroDetailParam {
|
||||
school: number;
|
||||
};
|
||||
subHid: number = 0;
|
||||
artifacts: {artifactId: number, lv: number }[] = []
|
||||
|
||||
constructor(hero: HeroType) {
|
||||
this.roleId = hero.roleId;
|
||||
@@ -239,4 +241,8 @@ export class HeroDetailParam {
|
||||
setRole(title: number, scroll: number, teraph: number, school: number) {
|
||||
this.role = { title, scroll, teraph, school };
|
||||
}
|
||||
|
||||
setArtifact(artifact: ArtifactModelType) {
|
||||
this.artifacts.push({ artifactId: artifact.artifactId, lv: artifact.lv });
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ArtifactModelType } from "../../db/Artifact";
|
||||
import { Connect, EPlace, HeroType } from "../../db/Hero";
|
||||
import { JewelType } from "../../db/Jewel";
|
||||
import { HeroScore } from "../battleField/pvp";
|
||||
@@ -56,6 +57,8 @@ export class TaskParamInter {
|
||||
jewels?: JewelType[]; // 天晶石
|
||||
skinId?: number; // 皮肤id
|
||||
|
||||
artifacts?: ArtifactModelType[]; // 宝物
|
||||
|
||||
skipTower?: boolean;
|
||||
debugInfo?: {condition: number};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user