军团活动:粮草先行的结算时机
This commit is contained in:
@@ -273,7 +273,7 @@ export class RaceActivityObject {
|
||||
await r.setExpire(tomorrow);
|
||||
|
||||
if (needSendEnd) { // 抵达后发送奖励,发送消息,结算
|
||||
await sendSingleRaceActEndMsg(guildCode, this.woodenHorses);
|
||||
await sendSingleRaceActEndMsg(guildCode, woodenHorse);
|
||||
}
|
||||
}
|
||||
this.handleItemsByWoodenHorse(woodenHorse);
|
||||
|
||||
@@ -367,10 +367,10 @@ export async function sendSingleCityActEndMsg(cityId: number, serverId: number)
|
||||
* 单个军团抵达赛道之后给他发奖励
|
||||
* @param guildCode 军团code
|
||||
*/
|
||||
export async function sendSingleRaceActEndMsg(guildCode: string, woodenHorses: Map<string, WoodenHorse>) {
|
||||
export async function sendSingleRaceActEndMsg(guildCode: string, woodenHorse: WoodenHorse) {
|
||||
let chatSid = await getGuildChannelSid(guildCode);
|
||||
pinus.app.rpc.chat.guildRemote.sendGuildActivityEnd.toServer(chatSid, guildCode);
|
||||
// await raceActivitySettleReward(guildCode, woodenHorse);
|
||||
await raceActivitySettleReward(guildCode, woodenHorse);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -119,16 +119,10 @@ export class WoodenHorse {
|
||||
if(this.durability <= 0) {
|
||||
this.status = RACE_ACTIVITY_STATUS.END;
|
||||
this.speed = 0;
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public isOver() {
|
||||
if(this.status == RACE_ACTIVITY_STATUS.END) return true;
|
||||
return false
|
||||
}
|
||||
|
||||
private calEvent(id: number, count: number = 1, endTime?: number) {
|
||||
let { effect } = gameData.raceActivityEvents.get(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user