军团活动:蛮夷入侵定时任务及推送
This commit is contained in:
@@ -5,6 +5,7 @@ import { ON_ADD_CHANNEL_ROUTE, ON_GROUP_MSG_ROUTE, ON_LEAVE_CHANNEL_ROUTE, STATU
|
||||
import { PrivateMessageType } from '../../../db/PrivateMessage';
|
||||
import { addUserToChannel, getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { ChannelUser } from '../../../domain/ChannelUser';
|
||||
import { getWorldChannelSid } from '../../../services/chatService';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new ChatRemote(app);
|
||||
@@ -29,6 +30,7 @@ export class ChatRemote {
|
||||
}
|
||||
|
||||
private channelService: ChannelService;
|
||||
private GUILD_ACTIVITY_END = 'onGuildActivityEnd';
|
||||
|
||||
/**
|
||||
* 加入世界频道(分服).
|
||||
@@ -163,4 +165,16 @@ export class ChatRemote {
|
||||
public async sendPrivateMsg(msg: Partial<PrivateMessageType>) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 全服推送活动结束通知
|
||||
* @param serverId
|
||||
*/
|
||||
public async sendGuildActivityEnd(serverId: number) {
|
||||
let roomId = await getWorldChannelSid(serverId);
|
||||
let channel = this.channelService.getChannel(roomId, false);
|
||||
if (!channel) return;
|
||||
channel.pushMessage(this.GUILD_ACTIVITY_END, resResult(STATUS.SUCCESS, { }));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { GuildType } from '../../../db/Guild';
|
||||
import { RoleType } from '../../../db/Role';
|
||||
import { GuildRecType } from '../../../db/GuildRec';
|
||||
import { leaveGuildChannel, groupRoomId } from '../../../services/chatService';
|
||||
import { GuildGateRankParam } from '../../../domain/battleField/guildActivity';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new GuildRemote(app);
|
||||
@@ -161,7 +162,7 @@ export class GuildRemote {
|
||||
* 向军团推送排行榜名次
|
||||
* @param guildCode
|
||||
*/
|
||||
public pushRank(guildCode: string) {
|
||||
|
||||
public pushRank(guildCode: string, msg: GuildGateRankParam) {
|
||||
this.pushMessage(guildCode, this.GUILD_ACT_RANK, msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user