feat(gvg): 激战期内存以及玩家移动、挑战操作

This commit is contained in:
luying
2023-02-10 21:23:52 +08:00
parent 5d5137f203
commit 19b70baf8c
16 changed files with 536 additions and 125 deletions

View File

@@ -22,7 +22,7 @@ export interface DicGVGArea {
}
export const dicGVGArea = new Map<number, DicGVGArea>();
export const dicGVGCity = new Map<number, { cityType: number, areaIds: number[] }>();
export const dicGVGCity = new Map<number, { cityType: number, areaIds: number[], defenseBirth: number, attackBirth: number }>();
export function loadGVGArea() {
dicGVGArea.clear();
dicGVGCity.clear();
@@ -31,9 +31,11 @@ export function loadGVGArea() {
arr.forEach(o => {
o.relateArea = parseNumberList(o.relateArea);
if(!dicGVGCity.has(o.cityId)) {
dicGVGCity.set(o.cityId, { cityType: o.cityType, areaIds: [] });
dicGVGCity.set(o.cityId, { cityType: o.cityType, areaIds: [], defenseBirth: 0, attackBirth: 0 });
}
dicGVGCity.get(o.cityId)?.areaIds.push(o.areaId);
if(o.areaType == 1) dicGVGCity.get(o.cityId).defenseBirth = o.areaId;
if(o.areaType == 2) dicGVGCity.get(o.cityId).attackBirth = o.areaId;
dicGVGArea.set(o.areaId, o);
});
arr = undefined;

View File

@@ -11,6 +11,16 @@ export interface DicGVGAreaPoint {
readonly score: number;
// 位置
readonly pointPosition: string;
// 守卫名
readonly name: number;
// 守卫头像
readonly head: number;
// 守卫形象
readonly spine: number;
// 守卫战力
readonly ce: number;
// 守卫耐久
readonly durability: number;
}
export const dicGVGAreaPoint = new Map<number, DicGVGAreaPoint>();