军团活动:修复debug接口
This commit is contained in:
@@ -287,11 +287,11 @@ export class GateActivityHandler {
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
async debugIncChallengeCnt(msg: { }, session: BackendSession) {
|
||||
async debugIncChallengeCnt(msg: { }, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let res = await UserGuildActivityRecModel.updateInfoByRoleId(roleId, { challengeCnt: 0 });
|
||||
let res = await UserGuildActivityRecModel.updateInfoByRoleId(roleId, { challengeCnt: -100 });
|
||||
|
||||
return resResult(STATUS.SUCCESS, { challengeCnt: res.challengeCnt });
|
||||
return resResult(STATUS.SUCCESS, { challengeCnt: GUILDACTIVITY.GATEACTIVITY_CHALLENGE_TIMES - (res?.challengeCnt||0) });
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
|
||||
16
game-server/app/servers/guild/handler/raceActivityHandler.ts
Normal file
16
game-server/app/servers/guild/handler/raceActivityHandler.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Application, ChannelService } from "pinus";
|
||||
|
||||
export default function (app: Application) {
|
||||
return new RaceActivityHandler(app);
|
||||
}
|
||||
|
||||
export class RaceActivityHandler {
|
||||
|
||||
channelService: ChannelService;
|
||||
constructor(private app: Application) {
|
||||
this.channelService = app.get('channelService');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -130,9 +130,11 @@ export function getRecordScore(aid: number, record: { round: number, dataId: num
|
||||
let score = gameData.gateActivityPoint.get(enemyType);
|
||||
newRecords.push({ round, dataId, score, enemyType});
|
||||
sum += score;
|
||||
console.log('*******', sum, score, enemyType);
|
||||
if(round > curRound) { // 每回合开始得10分
|
||||
sum += gameData.gateActivityPoint.get(GET_POINT_WAYS.ROUND_START);
|
||||
curRound = round;
|
||||
console.log('********', sum);
|
||||
}
|
||||
|
||||
historyEnemies.push(dataId);
|
||||
@@ -256,6 +258,8 @@ export async function sendGuildActEndMsg(aid: number) {
|
||||
}
|
||||
// 发完之后再做下周自动宣战
|
||||
for(let serverId of serverlists) {
|
||||
let chatSid = await getWorldChannelSid(serverId);
|
||||
pinus.app.rpc.chat.chatRemote.sendGuildActivityEnd.toServer(chatSid, serverId);
|
||||
await autoDeclare(serverId);
|
||||
}
|
||||
cityActivityObj = new CityActivityObject();
|
||||
|
||||
@@ -202,6 +202,19 @@ export class CityActivityObject {
|
||||
}
|
||||
}
|
||||
|
||||
// 木牛流马
|
||||
export class WoodenHorse {
|
||||
guildCode: string; // 军团code 木马的唯一标识
|
||||
guildName: string; // 军团名
|
||||
guildCe: number; // 军团速度
|
||||
speed: number; // 速度
|
||||
durability: number; // 耐久度
|
||||
distance: number; // 距离
|
||||
time: number; // 到达时间
|
||||
memberCnt: number; //
|
||||
}
|
||||
|
||||
|
||||
export interface GuildGateRankParam {
|
||||
guildRank: SimpleGuildRankParam[],
|
||||
myGuildRank: SimpleGuildRankParam,
|
||||
|
||||
Reference in New Issue
Block a user