diff --git a/game-server/app/servers/guild/handler/gvgBattleHandler.ts b/game-server/app/servers/guild/handler/gvgBattleHandler.ts index 79f1f57b5..b78d1ccae 100644 --- a/game-server/app/servers/guild/handler/gvgBattleHandler.ts +++ b/game-server/app/servers/guild/handler/gvgBattleHandler.ts @@ -1,6 +1,6 @@ import { GVGCityType } from './../../../db/GVGCity'; import { GVGRecModel } from '../../../db/GVGRec'; -import { LeagueGood } from '../../../domain/gvgField/returnData'; +import { GVGAreaInMap, GVGTeamInList, GVGTeamInListOnPoint, GVGTeamSpineInMap, LeagueGood } from '../../../domain/gvgField/returnData'; import { GVGTeamModel, GVGTeamType } from '../../../db/GVGTeam'; import { GVGUserDataModel } from '../../../db/GVGUserData'; import { GVGCityModel } from '../../../db/GVGCity'; @@ -10,10 +10,15 @@ import { LineupHero } from "../../../domain/roleField/hero"; import { resResult, genCode } from "../../../pubUtils/util"; import { GVGLeagueModel } from '../../../db/GVGLeague'; import { checkGVGPeriod, getGroupIdOfServer, getGVGConfig, getGVGPeriodData, getGVGServerType } from '../../../services/gvg/gvgService'; -import { checkMoveStatus, getBirthAreaOfCity, initRobots } from '../../../services/gvg/gvgBattleService'; +import { checkAreaIsInCity, checkMoveStatus, getBirthAreaOfCity, initRobots } from '../../../services/gvg/gvgBattleService'; import { getGVGBattleData } from '../../../services/gvg/gvgBattleMemory'; import { nowSeconds } from '../../../pubUtils/timeUtil'; import { GVGBattleRecModel } from '../../../db/GVGBattleRec'; +import { getFightTimeByPeriod } from '../../../services/gvg/gvgFightService'; +import { gameData } from '../../../pubUtils/data'; +import { getAllServerName } from '../../../services/redisService'; +import { checkBattleHeroesByHid } from '../../../services/normalBattleService'; +import { pick } from 'underscore'; export default function (app: Application) { new HandlerService(app, {}); @@ -39,43 +44,53 @@ export class GVGBattleHandler { // spine: 形象 // lineup: 阵容 async saveTeam(msg: { index: number, head: number, frame: number, spine: number, lineup: [ LineupHero ] }, session: BackendSession) { - if(checkGVGPeriod(GVG_PERIOD.BATTLE)) return resResult(STATUS.GVG_NOT_BATTLE_PERIOD); + // if(checkGVGPeriod(GVG_PERIOD.BATTLE)) return resResult(STATUS.GVG_NOT_BATTLE_PERIOD); const roleId = session.get('roleId'); + const serverId = session.get('serverId'); + const roleName = session.get('roleName'); const guildCode = session.get('guildCode'); let myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode); if(!myLeague) return resResult(STATUS.GVG_LEAGUE_NOT_EXIST); const { index, head, frame, spine, lineup } = msg; - const team = await GVGTeamModel.saveTeam(roleId, myLeague.leagueCode, index, head, frame, spine, lineup); + let durability = gameData.gvgTeamDurability.get(index)||0; + let { isOK, heroes } = await checkBattleHeroesByHid(roleId, lineup.map(cur => cur.actorId)); + if(!isOK) return resResult(STATUS.BATTLE_HERO_NOT_FOUND); + + let lineupCe = heroes.reduce((pre, cur) => pre + cur.ce, 0); + const team = await GVGTeamModel.saveTeam(roleId, roleName, serverId, myLeague.leagueCode, myLeague.name, index, head, frame, spine, durability, lineup, lineupCe); if (!team) { return resResult(STATUS.GVG_SAVE_TEAM_FAILED); } - return resResult(STATUS.SUCCESS, { teams: [ team.teamCode ] }); + return resResult(STATUS.SUCCESS, { curTeam: pick(team, ['teamCode', 'index', 'head', 'frame', 'spine', 'lineup']) }); } // 获取城池信息 async getCity(msg: { cityId: number }, session: BackendSession) { const guildCode = session.get('guildCode'); const { cityId } = msg; - let { configId } = getGVGPeriodData(); + let { configId, period } = getGVGPeriodData(); + let { startFightTime, endFightTime } = getFightTimeByPeriod(period); let myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode); if(!myLeague) return resResult(STATUS.GVG_LEAGUE_NOT_EXIST); const city = await GVGCityModel.findOne({ configId, cityId }).lean(); - const { guardLeague: leagueCode, guardLeagueName: name, guardLeagueIcon: icon } = city; - const { battleTime: startTime, scheduleTime } = getGVGConfig(); - const cityTeamCnt = await GVGTeamModel.getTeamCntByCity(cityId); - const leagueTeamCnt = await GVGTeamModel.getTeamCntByCity(cityId, myLeague.leagueCode); + const { guardLeague: leagueCode = '', guardLeagueName: name = '', guardLeagueIcon: icon = 0, players } = city; + + let ourTeamCnt = 0, oppTeamCnt = 0; + for(let { leagueCode, teamCnt } of players) { + myLeague.leagueCode == leagueCode? (ourTeamCnt+= teamCnt): (oppTeamCnt += teamCnt); + } return resResult(STATUS.SUCCESS, { cityId, guardLeague: { leagueCode, name, icon }, - startTime, - endTime: scheduleTime, // ! endTime 修正 - ourTeamCnt: leagueTeamCnt, - oppTeamCnt: cityTeamCnt - leagueTeamCnt, // ! 总数是否直接存储在城池中,或有其它更好的方案 + startTime: startFightTime, + endTime: endFightTime, + ourTeamCnt, + oppTeamCnt, }); } @@ -120,13 +135,15 @@ export class GVGBattleHandler { return resResult(STATUS.GVG_USER_NOT_FOUND); } + let teamObj = getGVGBattleData(groupId, serverType); let teams: GVGTeamType[] = []; // 检测是否已经在城池中,玩家不在这个城池中时进行处理 - if (gvgUserData.cityId !== cityId) { + if (!await GVGTeamModel.checkCity(roleId, cityId, groupId, serverType)) { if(gvgUserData.cityId > 0) { // 如果leaveCity没有退出成功,玩家还遗留在上一座城中,做一下处理 await GVGCityModel.decreasePlayer(configId, groupId, serverType, gvgUserData.cityId, roleId); } - city = await GVGCityModel.increasePlayer(configId, groupId, serverType, cityId, roleId, myLeague.leagueCode); + const roleTeamCnt = await GVGTeamModel.getTeamCntByRole(roleId); + city = await GVGCityModel.increasePlayer(configId, groupId, serverType, cityId, roleId, myLeague.leagueCode, roleTeamCnt); if(!city) return resResult(STATUS.GVG_BATTLE_CITY_FULL); gvgUserData = await GVGUserDataModel.changeCity(configId, myLeague.leagueCode, roleId, cityId); @@ -134,7 +151,6 @@ export class GVGBattleHandler { let areaId = getBirthAreaOfCity(city, myLeague.leagueCode); await GVGTeamModel.enterCity(roleId, cityId, areaId, groupId, serverType); teams = await GVGTeamModel.findByRole(roleId); - let teamObj = getGVGBattleData(groupId, serverType); teamObj.enterCity(teams); } @@ -155,13 +171,12 @@ export class GVGBattleHandler { // 离开城池 async leaveCity(msg: { cityId: number }, session: BackendSession) { - if(!checkGVGPeriod(GVG_PERIOD.BATTLE)) return resResult(STATUS.GVG_NOT_BATTLE_PERIOD); - const roleId = session.get('roleId'); const guildCode = session.get('guildCode'); const serverId = session.get('serverId'); const { cityId } = msg; - let { configId } = getGVGPeriodData(); + let { configId, period } = getGVGPeriodData(); + if (period != GVG_PERIOD.BATTLE) return resResult(STATUS.GVG_NOT_BATTLE_PERIOD); let groupId = await getGroupIdOfServer(serverId); let serverType = await getGVGServerType(serverId); @@ -191,6 +206,61 @@ export class GVGBattleHandler { return resResult(STATUS.SUCCESS); } + // 获取区域上的队伍 + async getAreaTeams(msg: { cityId: number, areaIds: number[] }, session: BackendSession) { + const serverId = session.get('serverId'); + const { cityId, areaIds } = msg; + + if(!checkAreaIsInCity(cityId, areaIds)) return resResult(STATUS.GVG_AREA_NOT_IN_CITY); + + let groupId = await getGroupIdOfServer(serverId); + let serverType = await getGVGServerType(serverId); + + let serverNames = await getAllServerName(); + + let teamObj = getGVGBattleData(groupId, serverType); + let result: GVGAreaInMap[] = []; + for(let areaId of areaIds) { + let teams = teamObj.findTeamsByArea(areaId); + let spines = teams.map(team => new GVGTeamSpineInMap(team, serverNames)); + result.push({ areaId, spines }) + } + + return resResult(STATUS.SUCCESS, { cityId, areas: result }); + } + + // 点击自己的编队获取区域列表 + async getAreaOfMyTeam(msg: { cityId: number, teamCode: string }, session: BackendSession) { + const roleId = session.get('roleId'); + const serverId = session.get('serverId'); + const { cityId, teamCode } = msg; + + let groupId = await getGroupIdOfServer(serverId); + let serverType = await getGVGServerType(serverId); + + let myTeam = await GVGTeamModel.findByTeamCode(roleId, teamCode); + if(!myTeam) return resResult(STATUS.GVG_TEAM_NOT_FOUND); + if(myTeam.cityId != cityId) return resResult(STATUS.GVG_BATTLE_IS_NOT_IN_CITY); + + let teams = await GVGTeamModel.findByAreaId(groupId, serverType, cityId, myTeam.areaId); + let points: GVGTeamInListOnPoint[] = [], players: GVGTeamInList[] = []; + let pointIds = gameData.gvgPointByAreaId.get(myTeam.areaId)||[]; + for(let pointId of pointIds) { + let team = teams.find(cur => cur.pointId == pointId); + let obj = new GVGTeamInListOnPoint(pointId, !!team, team); + points.push(obj); + } + for(let team of teams) { + if(team.pointId == 0) { + let obj = new GVGTeamInList(team); + players.push(obj); + } + } + return resResult(STATUS.SUCCESS, { + cityId, areaId: myTeam.areaId, points, players + }); + } + // 开始移动 // areaId: 要移动的目标据点 id async startMove(msg: { cityId: number, areaId: number, teamCode: string }, session: BackendSession) { @@ -205,11 +275,11 @@ export class GVGBattleHandler { let checkResult = checkMoveStatus(team, cityId, areaId); if(checkResult.code != 0) return resResult(checkResult); - team = await GVGTeamModel.startMove(teamCode, areaId); + team = await GVGTeamModel.startMove(teamCode, areaId, team.areaId); // 更新内存数据 let teamObj = getGVGBattleData(groupId, serverType); - teamObj.move(teamCode, areaId, team.startMoveTime, team.stopMoveTime); + teamObj.move(teamCode, areaId, team.fromAreaId, team.startMoveTime, team.stopMoveTime); return resResult(STATUS.SUCCESS, { areaId, cityId, stopMoveTime: team.stopMoveTime }); } @@ -231,7 +301,7 @@ export class GVGBattleHandler { team = await GVGTeamModel.stopMove(teamCode, areaId); // 更新内存数据 let teamObj = getGVGBattleData(groupId, serverType); - teamObj.move(teamCode, areaId, team.startMoveTime, team.stopMoveTime); + teamObj.move(teamCode, areaId, 0, team.startMoveTime, team.stopMoveTime); return resResult(STATUS.SUCCESS, { areaId, cityId, curTeam: team }); } @@ -286,10 +356,10 @@ export class GVGBattleHandler { const { battleCode, isSuccess } = msg; const record = await GVGBattleRecModel.findByBattleCode(battleCode); if(!record) return resResult(STATUS.GVG_BATTLEREC_NOT_FOUND); - const teamCode = ''; + const myTeam = await GVGTeamModel.findByTeamCode(record.attackTeam.roleId, record.attackTeam.teamCode); const leagueGoods: LeagueGood[] = null; // ! 计算并更新两支队伍耐久 - const curTeam = await GVGTeamModel.findOneAndUpdate({ teamCode }, {}).lean(); + const curTeam = await GVGTeamModel.findOneAndUpdate({ teamCode: myTeam.teamCode }, {}).lean(); // ! 推送战斗结果给对手队伍 // const channel = this.channelService.getChannel(teamCode, false); // if (!!channel) { @@ -337,17 +407,4 @@ export class GVGBattleHandler { // ! 重新组织每个城市的数据,添加据点和积分点的信息 return resResult(STATUS.SUCCESS, { cities }); } - - // 获取区域上的队伍 - async getAreaTeams(msg: { cityId: number, areaIds: [number] }, session: BackendSession) { - const { cityId, areaIds } = msg; - const queryParam = {}; - areaIds.forEach(areaId => { - queryParam[areaId] = [{ $match: { areaId, cityId } }, { $limit: 20 }]; - }); - const teams = await GVGTeamModel.aggregate([ - { $facet: queryParam }, - ]); - return resResult(STATUS.SUCCESS, { teams }); - } } diff --git a/game-server/app/servers/guild/handler/gvgHandler.ts b/game-server/app/servers/guild/handler/gvgHandler.ts index 8d6b9bf1a..bae24924a 100644 --- a/game-server/app/servers/guild/handler/gvgHandler.ts +++ b/game-server/app/servers/guild/handler/gvgHandler.ts @@ -4,7 +4,7 @@ import { GVGLeagueModel } from "../../../db/GVGLeague"; import { GVGLeaguePrepareModel } from "../../../db/GVGLeaguePrepare"; import { GVGMainData, LeagueContributeInfo, LeagueMemberContributeInfo, LeagueMemberListInfo } from "../../../domain/gvgField/returnData"; import { resResult } from "../../../pubUtils/util"; -import { calLeagueCe, getGVGConfig, getGVGPeriodData, getGVGServerType, getServerTypeByTime } from "../../../services/gvg/gvgService"; +import { calLeagueCe, getGroupIdOfServer, getGVGConfig, getGVGPeriodData, getGVGServerType, getServerTypeByTime } from "../../../services/gvg/gvgService"; import { autoCreateLeague, checkCanChooseJob, checkCanPrepare, checkLeagueAuth, getMyAuth } from "../../../services/gvg/gvgTeamService"; import { getAllServerName } from "../../../services/redisService"; import { Contribute, GVGUserDataModel } from "../../../db/GVGUserData"; @@ -89,7 +89,11 @@ export class GVGHandler { let { configId, period, countdownTime } = getGVGPeriodData(); let { startFightTime, endFightTime } = getFightTimeByPeriod(period); - let cities = await getGVGCitiesInfo(myLeague); + + let groupId = await getGroupIdOfServer(serverId); + let serverType = await getGVGServerType(serverId); + + let cities = await getGVGCitiesInfo(configId, groupId, serverType, myLeague); let vestiges = await getMyVestiges(serverId, roleId); return resResult(STATUS.SUCCESS, { diff --git a/game-server/app/servers/guild/handler/gvgManageHandler.ts b/game-server/app/servers/guild/handler/gvgManageHandler.ts index 9dd3bc066..25baac021 100644 --- a/game-server/app/servers/guild/handler/gvgManageHandler.ts +++ b/game-server/app/servers/guild/handler/gvgManageHandler.ts @@ -7,7 +7,7 @@ import { GVGLeagueApplyModel } from "../../../db/GVGLeagueApply"; import { calLeagueCe, getGroupIdOfServer, getGVGConfig, getGVGPeriodData, getGVGServerType, getServersOfSameGroup } from "../../../services/gvg/gvgService"; import { checkCanManage, checkGuildLeader, checkLeagueAuth, createLeague, getLeagueApplyData, getLeagueInviteData, getMyAuth, joinGuildToLeague } from "../../../services/gvg/gvgTeamService"; import { LeagueGuildInfo, LeagueListInfo, LeagueMemberListInfo, LeagueSimpleInfo } from "../../../domain/gvgField/returnData"; -import { getAllServerName, getServerName, updateUserInfo } from "../../../services/redisService"; +import { getAllServerName, getServerName, isRoleOnline, updateUserInfo } from "../../../services/redisService"; import { GVG } from "../../../pubUtils/dicParam"; import { RoleModel } from "../../../db/Role"; import { GVGUserDataModel } from "../../../db/GVGUserData"; @@ -373,14 +373,17 @@ export class GVGManageHandler { const roles = await RoleModel.findByRoleIds(roleIds); const serverNames = await getAllServerName(); const userdatas = await GVGUserDataModel.findByRoles(configId, targetLeagueCode, roleIds); - const result = roles.map(role => { + const result: LeagueMemberListInfo[] = []; + for(let role of roles) { let obj = new LeagueMemberListInfo(role, serverNames); let userdata = userdatas.find(userdata => userdata.roleId == role.roleId); if(userdata) obj.setByUserData(userdata); let member = members.find(cur => cur.roleId == role.roleId); if(member) obj.setAuth(member.auth); - return obj; - }); + let isOnline = await isRoleOnline(role.roleId); + obj.setOnline(!!isOnline); + result.push(obj); + } // 返回 return resResult(STATUS.SUCCESS, { diff --git a/game-server/app/services/gvg/gvgBattleMemory.ts b/game-server/app/services/gvg/gvgBattleMemory.ts index ebaeb712f..583650ddb 100644 --- a/game-server/app/services/gvg/gvgBattleMemory.ts +++ b/game-server/app/services/gvg/gvgBattleMemory.ts @@ -14,29 +14,41 @@ class GVGBattleData { private rolePoints: Map = new Map(); // roleId => pointId[],用于更新玩家的积分 private roleToTeam: Map = new Map(); // roleId => teamCode private areaToTeams: Map> = new Map(); // areaId => teamCode set,用于定时下发地图玩家数据 + private hasRobot: Map = new Map(); // cityId => boolean constructor(groupId: number, serverType: number) { this.groupId = groupId; this.serverType = serverType; } + public findTeamsByArea(areaId: number) { + let teamCodes = this.areaToTeams.get(areaId)||new Set(); + let teams: GVGTeamMem[] = []; + for(let teamCode of teamCodes) { + let team = this.teams.get(teamCode); + if(team) teams.push(team); + } + return teams.slice(0, 20); + } + public leaveCity(roleId: string) { let teamCodes = this.roleToTeam.get(roleId)||[]; for(let teamCode of teamCodes) { let team = this.teams.get(teamCode); - if(team) team.setCity(0, 0); + if(team) team.setCity(0); } this.rolePoints.delete(roleId); } public enterCity(teams: GVGTeamType[]) { for(let team of teams) { + let fromAreaId = this.teams.get(team.teamCode)?.areaId||0; + + console.log('#### team', team.teamCode) if(!this.teams.has(team.teamCode)) { this.teams.set(team.teamCode, new GVGTeamMem(team)) } - let originTeam = this.teams.get(team.teamCode); - let fromAreaId = originTeam.areaId; - originTeam.setCity(team.cityId, team.areaId); + this.teams.get(team.teamCode).setCity(team.cityId, team.areaId, team.pointId); if(team.pointId > 0) { if(!this.rolePoints.has(team.roleId)) this.rolePoints.set(team.roleId, []); this.rolePoints.get(team.roleId).push(team.pointId); @@ -45,6 +57,8 @@ class GVGBattleData { if(teamCodesOfRole.indexOf(team.teamCode) == -1) teamCodesOfRole.push(team.teamCode); this.roleToTeam.set(team.roleId, teamCodesOfRole); this.setAreaMap(team.teamCode, fromAreaId, team.areaId); + + if(team.isRobot) this.hasRobot.set(team.cityId, team.isRobot); } } @@ -61,11 +75,10 @@ class GVGBattleData { } } - public move(teamCode: string, areaId: number, startMoveTime: number, stopMoveTime: number) { + public move(teamCode: string, areaId: number, fromAreaId: number, startMoveTime: number, stopMoveTime: number) { let team = this.teams.get(teamCode); if(!team) return; - let fromAreaId = team.areaId; - team.moveToArea(areaId, startMoveTime, stopMoveTime); + team.moveToArea(areaId, fromAreaId, startMoveTime, stopMoveTime); this.setAreaMap(teamCode, fromAreaId, areaId); } @@ -82,6 +95,10 @@ class GVGBattleData { if(!team) return; team.pointId = pointId; } + + public checkHasRobot(cityId: number) { + return this.hasRobot.get(cityId)||false; + } } export function getGVGBattleData(groupId: number, serverType: number) { diff --git a/game-server/app/services/gvg/gvgBattleService.ts b/game-server/app/services/gvg/gvgBattleService.ts index d1404b55c..19df2b70a 100644 --- a/game-server/app/services/gvg/gvgBattleService.ts +++ b/game-server/app/services/gvg/gvgBattleService.ts @@ -1,11 +1,13 @@ import { GVGTeamMem } from "../../domain/battleField/gvgBattle"; import { GVGLeagueType } from "../../db/GVGLeague"; import { GVGTeamModel, GVGTeamType } from "../../db/GVGTeam"; -import { GVGCityType } from "../../db/GVGCity"; +import { GVGCityModel, GVGCityType } from "../../db/GVGCity"; import { gameData } from "../../pubUtils/data"; import { STATUS } from "../../consts"; import { nowSeconds } from "../../pubUtils/timeUtil"; import { DicGVGAreaPoint } from "../../pubUtils/dictionary/DicGVGAreaPoint"; +import { getGVGBattleData } from "./gvgBattleMemory"; +import { GVGCityMapInfo } from "../../domain/gvgField/returnData"; /** @@ -27,11 +29,18 @@ export async function getGVGCities(league: GVGLeagueType) { } /** - * TODO 获取当前城池状态 + * 获取当前城池状态 * @returns [{cityId: number, guardLeagueCode: string, guardLeagueName: string, teamCnt: number }] */ -export async function getGVGCitiesInfo(league: GVGLeagueType): Promise<{cityId: number, guardLeagueName: string, teamCnt: number }[]> { - return []; +export async function getGVGCitiesInfo(configId: number, groupId: number, serverType: number, league: GVGLeagueType): Promise<{cityId: number, guardLeagueName: string, teamCnt: number }[]> { + let cities = await GVGCityModel.findGuardCityByLeague(configId, groupId, serverType); + let result: GVGCityMapInfo[] = []; + for(let city of cities) { + let players = (city.players||[]).filter(cur => cur.leagueCode == league.leagueCode); + let obj = new GVGCityMapInfo(city, players.length); + result.push(obj); + } + return result; } /** @@ -63,13 +72,23 @@ export function checkMoveStatus(team: GVGTeamType, cityId: number, areaId: numbe } export async function initRobots(groupId: number, serverType: number, cityId: number) { - let hasRobot = await GVGTeamModel.checkRobot(groupId, serverType, cityId); - if(!hasRobot) { + let teamObj = getGVGBattleData(groupId, serverType); + if(!teamObj.checkHasRobot(cityId)) { let dicPoints: DicGVGAreaPoint[] = []; let { areaIds = []} = gameData.gvgCity.get(cityId); for(let [_, point] of gameData.gvgAreaPoint) { if(areaIds.indexOf(point.areaId) != -1) dicPoints.push(point); } - await GVGTeamModel.initRobots(groupId, serverType, cityId, dicPoints); + let teams = await GVGTeamModel.initRobots(groupId, serverType, cityId, dicPoints); + teamObj.enterCity(teams); } +} + +export function checkAreaIsInCity(cityId: number, areaIds: number[]) { + let dicCity = gameData.gvgCity.get(cityId); + if(!dicCity) return false; + for(let areaId of areaIds) { + if(dicCity.areaIds.indexOf(areaId) == -1) return false; + } + return true; } \ No newline at end of file diff --git a/game-server/app/services/redisService.ts b/game-server/app/services/redisService.ts index 60f554d81..f07a433e2 100644 --- a/game-server/app/services/redisService.ts +++ b/game-server/app/services/redisService.ts @@ -545,7 +545,7 @@ export async function getAllServers() { return serverlist; } -export async function getAllServerName() { +export async function getAllServerName(): Promise<{[serverId: string]: string}> { let servers = await redisClient().hgetallAsync(REDIS_KEY.SERVER); return servers; } diff --git a/shared/consts/statusCode.ts b/shared/consts/statusCode.ts index 02f1d1b40..470cfaae8 100644 --- a/shared/consts/statusCode.ts +++ b/shared/consts/statusCode.ts @@ -367,6 +367,8 @@ export const STATUS = { GVG_TEAM_ATTACKING: { code: 21405, simStr: '您的编队正在攻击冷却中' }, GVG_TEAM_DEFENSEING: { code: 21406, simStr: '选择的编队正在防守冷却中' }, GVG_BATTLEREC_NOT_FOUND: { code: 21407, simStr: '未找到该记录' }, + GVG_AREA_NOT_IN_CITY: { code: 21408, simStr: '选择区域不在这座城池中' }, + GVG_TEAM_NOT_FOUND: { code: 21409, simStr: '未找到这个队伍' }, // 通用 30000 - 30099 DIC_DATA_NOT_FOUND: { code: 30000, simStr: '数据表未找到' }, diff --git a/shared/db/GVGCity.ts b/shared/db/GVGCity.ts index 783c36e57..371b2530d 100644 --- a/shared/db/GVGCity.ts +++ b/shared/db/GVGCity.ts @@ -6,6 +6,8 @@ class Player { leagueCode: string; @prop({ required: true }) roleId: string; + @prop({ required: true }) + teamCnt: number; } @@ -27,6 +29,9 @@ export default class GVGCity extends BaseModel { @prop({ required: true, default: [], type: Player, _id: false }) players: Player[]; // 联军 + @prop({ required: false }) + hasGuard: boolean; // 是否有联军占领 + @prop({ required: false }) guardLeague: string; // 占领的联军 @@ -42,7 +47,7 @@ export default class GVGCity extends BaseModel { // 创建城市 public static async createCity(configId: number, groupId: number, serverType: number, cityId: number) { let doc = new GVGCityModel(); - let update = Object.assign(doc.toJSON(), { configId, cityId}); + let update = Object.assign(doc.toJSON(), { configId, cityId, groupId, serverType}); const city: GVGCityType = await GVGCityModel.findOneAndUpdate({ configId, cityId, groupId, serverType }, { $setOnInsert: update }, { upsert: true, new: true }).lean(); return city; } @@ -54,8 +59,8 @@ export default class GVGCity extends BaseModel { } // 添加人数 - public static async increasePlayer(configId: number, groupId: number, serverType: number, cityId: number, roleId: string, leagueCode: string) { - const city: GVGCityType = await GVGCityModel.findOneAndUpdate({ configId, groupId, serverType, cityId, userCnt: { $lt: 200 } }, { $inc: { userCnt: 1 }, $push: { players: { roleId, leagueCode } }}, { new: true, upsert: true }).lean(); + public static async increasePlayer(configId: number, groupId: number, serverType: number, cityId: number, roleId: string, leagueCode: string, teamCnt: number) { + const city: GVGCityType = await GVGCityModel.findOneAndUpdate({ configId, groupId, serverType, cityId, userCnt: { $lt: 200 } }, { $inc: { userCnt: 1 }, $push: { players: { roleId, leagueCode, teamCnt } }}, { new: true, upsert: true }).lean(); return city; } @@ -64,6 +69,12 @@ export default class GVGCity extends BaseModel { const city: GVGCityType = await GVGCityModel.findOneAndUpdate({ configId, groupId, serverType, cityId, 'players.roleId': roleId }, { $inc: { userCnt: -1 }, $pull: { players: { roleId } }}, { new: true, upsert: true }).lean(); return city; } + + // 查询联军驻守情况 + public static async findGuardCityByLeague(configId: number, groupId: number, serverType: number, ) { + const cities: GVGCityType[] = await GVGCityModel.find({ configId, groupId, serverType, hasGuard: true }).lean(); + return cities + } } diff --git a/shared/db/GVGTeam.ts b/shared/db/GVGTeam.ts index c26138d21..23884d595 100644 --- a/shared/db/GVGTeam.ts +++ b/shared/db/GVGTeam.ts @@ -15,6 +15,12 @@ export default class GVGTeam extends BaseModel { @prop({ required: true }) roleId: string; // 玩家id + @prop({ required: true }) + roleName: string; // 玩家名 + + @prop({ required: true }) + serverId: number; // 小区id + @prop({ required: true }) teamCode: string; // 玩家队伍唯一标识 @@ -24,6 +30,9 @@ export default class GVGTeam extends BaseModel { @prop({ required: true }) leagueCode: string; // 联军 + @prop({ required: true }) + leagueName: string; // 联军 + @prop({ required: true }) guildCode: string; // 军团 @@ -48,12 +57,18 @@ export default class GVGTeam extends BaseModel { @prop({ required: true, default: 0 }) durability: number; // 耐久 + @prop({ required: true, default: 0 }) + maxDurability: number; // 耐久 + @prop({ required: true, default: 0 }) restartTime: number; // 修整期倒计时 @prop({ required: true, default: 0 }) attackTime: number; // 进攻冷却时间 + @prop({ required: true, default: 0 }) + fromAreaId: number; // 从那个区域移动 + @prop({ required: true, default: 0 }) startMoveTime: number; @@ -82,19 +97,19 @@ export default class GVGTeam extends BaseModel { isRobot: boolean; // 是否是机器人 // 创建队伍 - public static async createTeam(roleId: string, leagueCode: string, teamId: number, head: number, spine: number, frame: number, lineup: [LineupHero]) { + public static async createTeam(roleId: string, roleName: string, serverId: number, leagueCode: string, leagueName: string, teamId: number, head: number, spine: number, frame: number, durability: number, lineup: [LineupHero], lineupCe: number) { const doc = new GVGTeamModel(); const teamCode = genCode(8); - const update = Object.assign(doc.toJSON(), { roleId, leagueCode, teamId, teamCode, head, spine, frame, lineup }); + const update = Object.assign(doc.toJSON(), { roleId, roleName, serverId, leagueCode, leagueName, teamId, teamCode, head, spine, frame, lineup, durability, maxDurability: durability, lineupCe }); const team: GVGTeamType | null = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $setOnInsert: update }, { upsert: true, new: true }).lean(); return team; } // 保存队伍 - public static async saveTeam(roleId: string, leagueCode: string, teamId: number, head: number, spine: number, frame: number, lineup: [LineupHero]) { + public static async saveTeam(roleId: string, roleName: string, serverId: number, leagueCode: string, leagueName: string, teamId: number, head: number, spine: number, frame: number, durability: number, lineup: [LineupHero], lineupCe: number) { let team: GVGTeamType = await GVGTeamModel.findOne({ roleId, teamId }).lean(); if (!team) { - team = await this.createTeam(roleId, leagueCode, teamId, head, spine, frame, lineup); + team = await this.createTeam(roleId, roleName, serverId, leagueCode, leagueName, teamId, head, spine, frame, durability, lineup, lineupCe); return team; } @@ -122,6 +137,10 @@ export default class GVGTeam extends BaseModel { return teams.length; } + public static async checkCity(roleId: string, cityId: number, groupId: number, serverType: number) { + return await GVGTeamModel.exists({ roleId, cityId, groupId, serverType }); + } + // 玩家切换城池更新队伍信息 public static async enterCity(roleId: string, cityId: number, areaId: number, groupId: number, serverType: number) { const res = await GVGTeamModel.updateMany({ roleId }, { cityId, areaId, pointId: 0, groupId, serverType }).lean(); @@ -141,13 +160,13 @@ export default class GVGTeam extends BaseModel { } // 移动 - public static async startMove(teamCode: string, areaId: number) { - const res: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $set: { areaId, stopMoveTime: nowSeconds() + GVG.GVG_DEFAULT_MOVE_CD } }).lean(); + public static async startMove(teamCode: string, areaId: number, fromAreaId: number) { + const res: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $set: { areaId, fromAreaId, stopMoveTime: nowSeconds() + GVG.GVG_DEFAULT_MOVE_CD } }).lean(); return res; } public static async stopMove(teamCode: string, areaId: number) { - const res: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $set: { areaId, stopMoveTime: nowSeconds() } }).lean(); + const res: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $set: { areaId, fromAreaId: 0, stopMoveTime: nowSeconds() } }).lean(); return res; } @@ -161,7 +180,7 @@ export default class GVGTeam extends BaseModel { } return { attackTeam, defenseTeam } } - + public static async checkRobot(groupId: number, serverType: number, cityId: number) { return await GVGTeamModel.exists({ groupId, serverType, cityId, isRobot: true }); } @@ -171,10 +190,12 @@ export default class GVGTeam extends BaseModel { return { updateOne: { filter: { groupId, serverType, cityId, pointId: dic.pointId }, - update: { $setOnInsert: { teamCode: `robot${dic.pointId}`, ...dic, isRobot: true } }, upsert: true + update: { $setOnInsert: { teamCode: `robot${dic.pointId}`, ...dic, roleName: dic.name, isRobot: true } }, upsert: true } } })); + const team: GVGTeamType[] = await GVGTeamModel.find({ groupId, serverType, cityId, isRobot: true }).lean(); + return team; } // 攻击方攻击cd @@ -188,6 +209,11 @@ export default class GVGTeam extends BaseModel { const team: GVGTeamType = await GVGTeamModel.findOneAndUpdate({ teamCode }, { $set: { attackTime: nowSeconds() + GVG.GVG_DEFAULT_DEFENSE_CD, groupId, serverType } }, { new: true }).lean(); return team; } + + public static async findByAreaId(groupId: number, serverType: number, cityId: number, areaId: number) { + const team: GVGTeamType[] = await GVGTeamModel.find({ groupId, serverType, cityId, areaId, stopMoveTime: { $lte: nowSeconds() } }).lean(); + return team; + } } diff --git a/shared/domain/battleField/gvgBattle.ts b/shared/domain/battleField/gvgBattle.ts index 5078e472b..5bda21910 100644 --- a/shared/domain/battleField/gvgBattle.ts +++ b/shared/domain/battleField/gvgBattle.ts @@ -1,4 +1,4 @@ -import { GVGTeamType, GVGTeamUpdate } from "../../db/GVGTeam"; +import GVGTeam, { GVGTeamType } from "../../db/GVGTeam"; // 积分点分类统计,1-3级积分点代表从小到大 export class LeagueCityPoint { @@ -20,42 +20,43 @@ export class LeagueCityPoint { } // 队伍状态 -export class GVGTeamMem implements GVGTeamUpdate { - roleId: string; // 玩家id - id: number; - teamCode: string; - teamId: number; - leagueCode: string; - guildCode: string; - areaId: number; - cityId: number; - pointId: number; - head: number; - spine: number; - frame: number; - durability: number; - restartTime: number; - attackTime: number; - defenseTime: number; - startMoveTime: number; - stopMoveTime: number; +export class GVGTeamMem extends GVGTeam { isMoving: boolean; - point: number; constructor(team: GVGTeamType) { - for(let key in team) { - this[key] = team[key]; - } + super(); + this.roleId = team.roleId; + this.roleName = team.roleName; + this.serverId = team.serverId; + this.teamCode = team.teamCode; + this.teamId = team.teamId; + this.leagueCode = team.leagueCode; + this.guildCode = team.guildCode; + this.areaId = team.areaId; + this.fromAreaId = team.fromAreaId; + this.cityId = team.cityId; + this.pointId = team.pointId; + this.head = team.head; + this.spine = team.spine; + this.frame = team.frame; + this.durability = team.durability; + this.restartTime = team.restartTime; + this.attackTime = team.attackTime; + this.defenseTime = team.defenseTime; + this.startMoveTime = team.startMoveTime; + this.stopMoveTime = team.stopMoveTime; + this.point = team.point; } - public setCity(cityId: number, areaId = 0) { + public setCity(cityId: number, areaId = 0, pointId = 0) { this.cityId = cityId; this.areaId = areaId; - this.pointId = 0; + this.pointId = pointId; } - public moveToArea(areaId: number, startMoveTime: number, stopMoveTime: number) { + public moveToArea(areaId: number, fromAreaId: number, startMoveTime: number, stopMoveTime: number) { this.areaId = areaId; + this.fromAreaId = fromAreaId; this.startMoveTime = startMoveTime; this.stopMoveTime = stopMoveTime; } diff --git a/shared/domain/gvgField/returnData.ts b/shared/domain/gvgField/returnData.ts index 3931430b3..687f142fa 100644 --- a/shared/domain/gvgField/returnData.ts +++ b/shared/domain/gvgField/returnData.ts @@ -11,6 +11,9 @@ import { DicWarJson } from "../../pubUtils/dictionary/DicWarJson"; import { gameData } from "../../pubUtils/data"; import { HeroType } from "../../db/Hero"; import { RoleRankInfo } from "../rank"; +import { GVGCityType } from "../../db/GVGCity"; +import { GVGTeamMem } from "../battleField/gvgBattle"; +import { GVGTeamType } from "../../db/GVGTeam"; class LeagueLeaderInfo { name: string; // 盟主名 @@ -257,7 +260,6 @@ export class LeagueMemberListInfo { this.serverName = serverNames[role.serverId]; this.ce = role.ce; this.quitTime = role.quitTime; - this.isOnline = role.quitTime == role.loginTime; } setByUserData(data: GVGUserDataType) { @@ -269,6 +271,10 @@ export class LeagueMemberListInfo { setAuth(auth: number) { this.auth = auth; } + + setOnline(isOnline: boolean) { + this.isOnline = isOnline; + } } export class LeagueMemberContributeInfo extends LeagueMemberListInfo{ @@ -588,4 +594,88 @@ export class VestigeRank { this.lineupCe = 0; this.score = 0; } +} + +// 大地图上城池占林 +export class GVGCityMapInfo { + cityId: number; // 城池id + guardLeagueCode: string; // 驻守城池的联军id + guardLeagueName: string; // 驻守这个城池的联军 + guardLeagueIcon: number; // 驻守这个城池的联军的icon + teamCnt: number; // 我方队伍数量 + + constructor(city: GVGCityType, teamCnt: number) { + if(!city) return; + this.cityId = city.cityId; + this.guardLeagueCode = city.guardLeague; + this.guardLeagueName = city.guardLeagueName; + this.guardLeagueIcon = city.guardLeagueIcon; + this.teamCnt = teamCnt; + } +} + +export class GVGTeamSpineInMap { + spine: number = 0; + roleName: string = ''; + serverName: string = ''; + startMoveTime: number = 0; + stopMoveTime: number = 0; + isMoving: boolean = false; + pointId: number = 0; + fromAreaId: number = 0; + + constructor(obj: GVGTeamMem, serverNames: {[serverId: string]: string}) { + this.spine = obj.spine; + this.roleName = obj.roleName; + if(obj.serverId) this.serverName = serverNames[obj.serverId]; + this.startMoveTime = obj.startMoveTime; + this.stopMoveTime = obj.stopMoveTime; + this.isMoving = nowSeconds() < this.stopMoveTime; + this.pointId = obj.pointId; + this.fromAreaId = obj.fromAreaId; + } +} + +export class GVGAreaInMap { + areaId: number; + spines: GVGTeamSpineInMap[] = []; +} + +// 地图右边列表上的队伍信息 +export class GVGTeamInList { + teamCode: string; + roleName: string; + head: number; + frame: number; + lineupCe: number; + leagueCode: string; + leagueName: string; + durability: number; // 耐久 + maxDurability: number; // 最大耐久 + + constructor(team: GVGTeamType) { + if(!team) return; + this.teamCode = team.teamCode; + this.roleName = team.roleName; + this.head = team.head; + this.frame = team.frame; + this.lineupCe = team.lineupCe; + this.leagueCode = team.leagueCode; + this.leagueName = team.leagueName; + this.durability = team.durability; + this.maxDurability = team.maxDurability; + } +} + +export class GVGTeamInListOnPoint extends GVGTeamInList { + pointId: number; // 积分点 + hasTeam: boolean; // 是否有队伍占领 + isRobot: boolean; // 这个队伍是不是擂台守卫者 + + constructor(pointId: number, hasTeam: boolean, team?: GVGTeamType) { + super(team); + this.pointId = pointId; + this.hasTeam = hasTeam; + if(team) this.isRobot = team.isRobot; + } } \ No newline at end of file diff --git a/shared/pubUtils/data.ts b/shared/pubUtils/data.ts index 17c2a49fa..6b1c1dab2 100644 --- a/shared/pubUtils/data.ts +++ b/shared/pubUtils/data.ts @@ -131,7 +131,7 @@ import { dicGVGVestigeByType, dicGVGVestigeName, loadGVGVestigeType } from './di import { dicGVGVestige, loadGVGVestige } from './dictionary/DicGVGVestige'; import { DicGVGVestigeRange, dicGVGVestigeRange, loadGVGVestigeRange } from './dictionary/DicGVGVestigeRange'; import { DicGVGVestigeLeagueRank, dicGVGVestigeLeagueRank, loadGVGVestigeLeagueRank } from "./dictionary/DicGVGVestigeLeagueRank"; -import { dicGVGAreaPoint, loadGVGAreaPoint } from "./dictionary/DicGVGAreaPoint"; +import { dicGVGAreaPoint, loadGVGAreaPoint, dicGVGPointsByAreaId } from "./dictionary/DicGVGAreaPoint"; import { DicGVGBattleRankReward, dicGVGBattleRankReward, loadGVGBattleRankReward } from './dictionary/DicGVGBattleRankReward'; export const gameData = { @@ -335,6 +335,8 @@ export const gameData = { gvgAreaPoint: dicGVGAreaPoint, gvgBattleRankReward: dicGVGBattleRankReward, gvgBattleDurabilityMinus: { win: 0, fail: 0 }, + gvgTeamDurability: new Map(), + gvgPointByAreaId: dicGVGPointsByAreaId, }; // 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据 @@ -1220,6 +1222,14 @@ function parseGVGDurabilityMinus() { gameData.gvgBattleDurabilityMinus.fail = range[0]; } +function parseGVGTeamDurability() { + let arr = decodeArrayListStr(param.GVG.GVG_TEAM_NUMBER); + for(let [index, _lv, durability] of arr) { + gameData.gvgTeamDurability.set(parseInt(index), parseInt(durability)); + } + +} + // 初始加载 function initDatas() { parseDicParam(); @@ -1244,6 +1254,7 @@ function parseDicParam() { parseGVGFieldAdd(); parseGVGVestigeCnt(); parseGVGDurabilityMinus(); + parseGVGTeamDurability(); } /** diff --git a/shared/pubUtils/dictionary/DicGVGAreaPoint.ts b/shared/pubUtils/dictionary/DicGVGAreaPoint.ts index b86bf6af6..20af05614 100644 --- a/shared/pubUtils/dictionary/DicGVGAreaPoint.ts +++ b/shared/pubUtils/dictionary/DicGVGAreaPoint.ts @@ -24,12 +24,18 @@ export interface DicGVGAreaPoint { } export const dicGVGAreaPoint = new Map(); +export const dicGVGPointsByAreaId = new Map(); export function loadGVGAreaPoint() { dicGVGAreaPoint.clear(); + dicGVGPointsByAreaId.clear(); let arr = readFileAndParse(FILENAME.DIC_GVG_AREA_POINT); arr.forEach(o => { dicGVGAreaPoint.set(o.pointId, o); + if(!dicGVGPointsByAreaId.has(o.areaId)) { + dicGVGPointsByAreaId.set(o.areaId, []); + } + dicGVGPointsByAreaId.get(o.areaId).push(o.pointId); }); arr = undefined; } \ No newline at end of file diff --git a/shared/resource/jsons/dic_zyz_GVGAreaPoint.json b/shared/resource/jsons/dic_zyz_GVGAreaPoint.json index ad19c81ea..8e8d897b5 100644 --- a/shared/resource/jsons/dic_zyz_GVGAreaPoint.json +++ b/shared/resource/jsons/dic_zyz_GVGAreaPoint.json @@ -4,797 +4,1253 @@ "score": 100, "areaId": 102, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11401, + "head": 11201, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 1022, "score": 100, "areaId": 102, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11402, + "head": 11202, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 1023, "score": 100, "areaId": 102, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11403, + "head": 11203, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 1031, "score": 200, "areaId": 103, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11404, + "head": 11204, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 2021, "score": 100, "areaId": 202, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11405, + "head": 11205, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 2022, "score": 100, "areaId": 202, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11407, + "head": 11207, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 2023, "score": 100, "areaId": 202, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11408, + "head": 11208, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 2031, "score": 200, "areaId": 203, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11410, + "head": 11210, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3021, "score": 200, "areaId": 302, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11411, + "head": 11211, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3022, "score": 200, "areaId": 302, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11412, + "head": 11212, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3023, "score": 200, "areaId": 302, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11413, + "head": 11213, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3024, "score": 200, "areaId": 302, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11414, + "head": 11214, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3031, "score": 200, "areaId": 303, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11416, + "head": 11216, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3032, "score": 200, "areaId": 303, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11417, + "head": 11217, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3033, "score": 200, "areaId": 303, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11418, + "head": 11218, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3034, "score": 200, "areaId": 303, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11419, + "head": 11219, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3041, "score": 200, "areaId": 304, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11420, + "head": 11220, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3042, "score": 200, "areaId": 304, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11421, + "head": 11221, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3043, "score": 200, "areaId": 304, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11422, + "head": 11222, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3044, "score": 200, "areaId": 304, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11424, + "head": 11224, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3051, "score": 600, "areaId": 305, "pointPosition": "0&25", - "durability": 300 + "durability": 300, + "spine": 11425, + "head": 11225, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3052, "score": 600, "areaId": 305, "pointPosition": "-25&-25", - "durability": 300 + "durability": 300, + "spine": 11426, + "head": 11226, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 3053, "score": 600, "areaId": 305, "pointPosition": "25&-25", - "durability": 300 + "durability": 300, + "spine": 11425, + "head": 11227, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 4021, "score": 100, "areaId": 402, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11228, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 4022, "score": 100, "areaId": 402, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11230, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 4023, "score": 100, "areaId": 402, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11401, + "head": 11201, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 4031, "score": 200, "areaId": 403, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11402, + "head": 11202, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 5021, "score": 100, "areaId": 502, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11403, + "head": 11203, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 5022, "score": 100, "areaId": 502, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11404, + "head": 11204, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 5023, "score": 100, "areaId": 502, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11405, + "head": 11205, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 5031, "score": 200, "areaId": 503, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11407, + "head": 11207, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 6021, "score": 100, "areaId": 602, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11408, + "head": 11208, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 6022, "score": 100, "areaId": 602, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11410, + "head": 11210, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 6023, "score": 100, "areaId": 602, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11411, + "head": 11211, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 6031, "score": 200, "areaId": 603, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11412, + "head": 11212, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 7021, "score": 100, "areaId": 702, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11413, + "head": 11213, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 7022, "score": 100, "areaId": 702, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11414, + "head": 11214, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 7023, "score": 100, "areaId": 702, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11416, + "head": 11216, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 7031, "score": 200, "areaId": 703, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11417, + "head": 11217, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 8021, "score": 100, "areaId": 802, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11418, + "head": 11218, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 8022, "score": 100, "areaId": 802, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11419, + "head": 11219, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 8023, "score": 100, "areaId": 802, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11420, + "head": 11220, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 8031, "score": 200, "areaId": 803, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11421, + "head": 11221, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 9021, "score": 100, "areaId": 902, "pointPosition": "0&25", - "durability": 100 + "durability": 100, + "spine": 11422, + "head": 11222, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 9022, "score": 100, "areaId": 902, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11424, + "head": 11224, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 9023, "score": 100, "areaId": 902, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11225, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 9031, "score": 200, "areaId": 903, "pointPosition": "0&0", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11226, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10021, "score": 200, "areaId": 1002, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11227, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10022, "score": 200, "areaId": 1002, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11228, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10023, "score": 200, "areaId": 1002, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11230, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10024, "score": 200, "areaId": 1002, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11401, + "head": 11201, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10031, "score": 200, "areaId": 1003, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11402, + "head": 11202, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10032, "score": 200, "areaId": 1003, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11403, + "head": 11203, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10033, "score": 200, "areaId": 1003, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11404, + "head": 11204, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10034, "score": 200, "areaId": 1003, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11405, + "head": 11205, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10041, "score": 200, "areaId": 1004, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11407, + "head": 11207, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10042, "score": 200, "areaId": 1004, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11408, + "head": 11208, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10043, "score": 200, "areaId": 1004, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11410, + "head": 11210, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10044, "score": 200, "areaId": 1004, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11411, + "head": 11211, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10051, "score": 600, "areaId": 1005, "pointPosition": "0&25", - "durability": 300 + "durability": 300, + "spine": 11412, + "head": 11212, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10052, "score": 600, "areaId": 1005, "pointPosition": "-25&-25", - "durability": 300 + "durability": 300, + "spine": 11413, + "head": 11213, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 10053, "score": 600, "areaId": 1005, "pointPosition": "25&-25", - "durability": 300 + "durability": 300, + "spine": 11414, + "head": 11214, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11021, "score": 200, "areaId": 1102, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11416, + "head": 11216, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11022, "score": 200, "areaId": 1102, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11417, + "head": 11217, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11023, "score": 200, "areaId": 1102, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11418, + "head": 11218, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11024, "score": 200, "areaId": 1102, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11419, + "head": 11219, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11031, "score": 200, "areaId": 1103, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11420, + "head": 11220, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11032, "score": 200, "areaId": 1103, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11421, + "head": 11221, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11033, "score": 200, "areaId": 1103, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11422, + "head": 11222, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11034, "score": 200, "areaId": 1103, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11424, + "head": 11224, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11041, "score": 200, "areaId": 1104, "pointPosition": "-25&25", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11225, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11042, "score": 200, "areaId": 1104, "pointPosition": "25&25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11226, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11043, "score": 200, "areaId": 1104, "pointPosition": "-25&-25", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11227, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11044, "score": 200, "areaId": 1104, "pointPosition": "25&-25", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11228, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11051, "score": 600, "areaId": 1105, "pointPosition": "0&25", - "durability": 300 + "durability": 300, + "spine": 11426, + "head": 11230, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11052, "score": 600, "areaId": 1105, "pointPosition": "-25&-25", - "durability": 300 + "durability": 300, + "spine": 11401, + "head": 11201, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 11053, "score": 600, "areaId": 1105, "pointPosition": "25&-25", - "durability": 300 + "durability": 300, + "spine": 11402, + "head": 11202, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13021, "score": 400, "areaId": 1302, "pointPosition": "-25&44", - "durability": 100 + "durability": 100, + "spine": 11403, + "head": 11203, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13022, "score": 400, "areaId": 1302, "pointPosition": "25&44", - "durability": 100 + "durability": 100, + "spine": 11404, + "head": 11204, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13023, "score": 400, "areaId": 1302, "pointPosition": "50&0", - "durability": 100 + "durability": 100, + "spine": 11405, + "head": 11205, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13024, "score": 400, "areaId": 1302, "pointPosition": "25&-44", - "durability": 100 + "durability": 100, + "spine": 11407, + "head": 11207, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13025, "score": 400, "areaId": 1302, "pointPosition": "-25&-44", - "durability": 100 + "durability": 100, + "spine": 11408, + "head": 11208, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13026, "score": 400, "areaId": 1302, "pointPosition": "-50&0", - "durability": 100 + "durability": 100, + "spine": 11410, + "head": 11210, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13031, "score": 400, "areaId": 1303, "pointPosition": "-25&44", - "durability": 100 + "durability": 100, + "spine": 11411, + "head": 11211, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13032, "score": 400, "areaId": 1303, "pointPosition": "25&44", - "durability": 100 + "durability": 100, + "spine": 11412, + "head": 11212, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13033, "score": 400, "areaId": 1303, "pointPosition": "50&0", - "durability": 100 + "durability": 100, + "spine": 11413, + "head": 11213, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13034, "score": 400, "areaId": 1303, "pointPosition": "25&-44", - "durability": 100 + "durability": 100, + "spine": 11414, + "head": 11214, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13035, "score": 400, "areaId": 1303, "pointPosition": "-25&-44", - "durability": 100 + "durability": 100, + "spine": 11416, + "head": 11216, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13036, "score": 400, "areaId": 1303, "pointPosition": "-50&0", - "durability": 100 + "durability": 100, + "spine": 11417, + "head": 11217, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13041, "score": 400, "areaId": 1304, "pointPosition": "-25&44", - "durability": 100 + "durability": 100, + "spine": 11418, + "head": 11218, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13042, "score": 400, "areaId": 1304, "pointPosition": "25&44", - "durability": 100 + "durability": 100, + "spine": 11419, + "head": 11219, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13043, "score": 400, "areaId": 1304, "pointPosition": "50&0", - "durability": 100 + "durability": 100, + "spine": 11420, + "head": 11220, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13044, "score": 400, "areaId": 1304, "pointPosition": "25&-44", - "durability": 100 + "durability": 100, + "spine": 11421, + "head": 11221, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13045, "score": 400, "areaId": 1304, "pointPosition": "-25&-44", - "durability": 100 + "durability": 100, + "spine": 11422, + "head": 11222, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13046, "score": 400, "areaId": 1304, "pointPosition": "-50&0", - "durability": 100 + "durability": 100, + "spine": 11424, + "head": 11224, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13051, "score": 400, "areaId": 1305, "pointPosition": "-25&44", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11225, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13052, "score": 400, "areaId": 1305, "pointPosition": "25&44", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11226, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13053, "score": 400, "areaId": 1305, "pointPosition": "50&0", - "durability": 100 + "durability": 100, + "spine": 11425, + "head": 11227, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13054, "score": 400, "areaId": 1305, "pointPosition": "25&-44", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11228, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13055, "score": 400, "areaId": 1305, "pointPosition": "-25&-44", - "durability": 100 + "durability": 100, + "spine": 11426, + "head": 11230, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13056, "score": 400, "areaId": 1305, "pointPosition": "-50&0", - "durability": 100 + "durability": 100, + "spine": 11401, + "head": 11201, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13061, "score": 1000, "areaId": 1306, "pointPosition": "-25&44", - "durability": 600 + "durability": 600, + "spine": 11402, + "head": 11202, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13062, "score": 1000, "areaId": 1306, "pointPosition": "25&44", - "durability": 600 + "durability": 600, + "spine": 11403, + "head": 11203, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13063, "score": 1000, "areaId": 1306, "pointPosition": "50&0", - "durability": 600 + "durability": 600, + "spine": 11404, + "head": 11204, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13064, "score": 1000, "areaId": 1306, "pointPosition": "25&-44", - "durability": 600 + "durability": 600, + "spine": 11405, + "head": 11205, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13065, "score": 1000, "areaId": 1306, "pointPosition": "-25&-44", - "durability": 600 + "durability": 600, + "spine": 11407, + "head": 11207, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13066, "score": 1000, "areaId": 1306, "pointPosition": "-50&0", - "durability": 600 + "durability": 600, + "spine": 11408, + "head": 11208, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13071, "score": 1000, "areaId": 1307, "pointPosition": "-25&44", - "durability": 600 + "durability": 600, + "spine": 11410, + "head": 11210, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13072, "score": 1000, "areaId": 1307, "pointPosition": "25&44", - "durability": 600 + "durability": 600, + "spine": 11411, + "head": 11211, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13073, "score": 1000, "areaId": 1307, "pointPosition": "50&0", - "durability": 600 + "durability": 600, + "spine": 11412, + "head": 11212, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13074, "score": 1000, "areaId": 1307, "pointPosition": "25&-44", - "durability": 600 + "durability": 600, + "spine": 11413, + "head": 11213, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13075, "score": 1000, "areaId": 1307, "pointPosition": "-25&-44", - "durability": 600 + "durability": 600, + "spine": 11414, + "head": 11214, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13076, "score": 1000, "areaId": 1307, "pointPosition": "-50&0", - "durability": 600 + "durability": 600, + "spine": 11416, + "head": 11216, + "name": "守卫者", + "ce": 2000000 }, { "pointId": 13081, "score": 8000, "areaId": 1308, "pointPosition": "0&0", - "durability": 1500 + "durability": 1500, + "spine": 11417, + "head": 11217, + "name": "守卫者", + "ce": 2000000 } ] \ No newline at end of file