军团活动:修复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) });
|
||||
}
|
||||
|
||||
// ! 测试接口
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user