军团:诸侯混战城门血量
This commit is contained in:
@@ -8,7 +8,7 @@ import { GuildModel } from "../../db/Guild";
|
||||
import { sendSingleRaceActEndMsg } from "./guildActivityService";
|
||||
import { REDIS_KEY, RACE_EVENT_TYPE, RACE_EVENT_EFFECT_TYPE, RACE_EVENT, STATUS, RACE_ACTIVITY_STATUS, PUSH_ROUTE, GUILD_ACTIVITY_STATUS } from "../../consts";
|
||||
import { getRandEelm, sortArrRandom, resResult, getRandResultByMember } from "../../pubUtils/util";
|
||||
import { sendMessageToGuildWithSuc, sendMessageToUserWithSuc } from "../pushService";
|
||||
import { sendMessageToGuildWithSuc, sendMessageToServerWithSuc, sendMessageToUserWithSuc } from "../pushService";
|
||||
|
||||
// 粮草先行
|
||||
export class RaceActivityObject {
|
||||
@@ -114,7 +114,7 @@ export class RaceActivityObject {
|
||||
return woodenHorse;
|
||||
}
|
||||
|
||||
public async useItem(fromRoleId: string, sid: string, fromGuild: string, toGuild: string, id: number, count: number) {
|
||||
public async useItem(serverId: number, fromRoleId: string, sid: string, fromGuild: string, toGuild: string, id: number, count: number) {
|
||||
let rec = this.handleItems(fromRoleId, sid, [{id, count: -1 * count}]);
|
||||
if(!rec) return false;
|
||||
let event = new Event(id, fromGuild, toGuild, count);
|
||||
@@ -125,7 +125,7 @@ export class RaceActivityObject {
|
||||
events.push(event);
|
||||
this.events.set(toGuild, events);
|
||||
}
|
||||
await sendMessageToGuildWithSuc(toGuild, PUSH_ROUTE.GUILD_RACE_EVENT, { timestamp: Date.now(), events: [event] });
|
||||
await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.GUILD_RACE_EVENT, { timestamp: Date.now(), events: [event] });
|
||||
return event;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user