Files
ZYZ/shared/consts/constModules/chatConst.ts
2022-02-22 16:12:37 +08:00

91 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export const MSG_CODE_LEN = 8;
export const MAX_PRIVATE_MSGS = 99;
export const JEWEL_PUSH_LV = 7;
export const MSG_STATUS = {
NORMAL: 0,
BLOCKED: 1
}
export const MSG_TYPE = {
TEXT: 0,
RICH_TEXT: 1,
IMG: 2
}
export const CHANNEL_PREFIX = {
SYS: 'sys',
WORLD: 'world',
GUILD: 'guild',
TEAM: 'com_btl_team',
CITY: 'city', // 军团活动诸侯混战按城池分channel
GUILD_AUCTION: 'g_auction', // 军团拍卖
WORLD_AUCTION: 'w_auction', // 军团拍卖
}
export const getChannelType = function(prefix: string) {
switch(prefix) {
case CHANNEL_PREFIX.SYS:
return 1;
case CHANNEL_PREFIX.WORLD:
return 2;
case CHANNEL_PREFIX.GUILD:
return 3;
case CHANNEL_PREFIX.TEAM:
return 4;
case 'private':
return 5;
}
}
export const getSdkChannelId = function(prefix: string) {
switch(prefix) {
case CHANNEL_PREFIX.WORLD:
return 1;
case CHANNEL_PREFIX.GUILD:
return 4;
case CHANNEL_PREFIX.TEAM:
return 3;
case 'private':
return 2;
}
}
// 消息来源
export const MSG_SOURCE = {
ROLE_SEND_TEXT: 0,
PRIVATE_SEND_GIFT: 1,
TEAM_ROLE: 2,
HERO_QUALITY_UP: 3,
COMPOSE_ORANGE_HERO: 4,
HERO_STAR_MAX: 5,
GUILD_NOTICE: 6,
GUILD_STRUCTURE_LV_UP: 7,
GUILD_TRAIN_SUC: 8,
GUILD_BOSS_SUC: 9,
EQUIP_REFINE_SUC: 10,
EQUIP_COMPOSE_SUIT: 11,
EQUIP_COMPOSE_ORANGE: 12,
JEWEL_COMPOSE: 13,
ORANGE_BLUEPRT_COMPOSE: 14,
TOWER_SUC: 15,
MYSTERY_FIRST_SUC: 16,
VESTIGE_FIRST_SUC: 17,
TEAM_INVITE: 18,
HERO_WAKE_UP: 19,
EQUIP_REFRESH_BEST: 20,
ACQUIRE_RARE_GOODS: 21,
GROUP_SEND_GIFT: 22,
SEND_MARQUEE: 23,
GUILD_RECURIT: 24,
EQUIP_STAR_UP: 25,
EQUIP_QUALITY_UP: 26,
}
export const ON_PRIVATE_MSG_ROUTE = 'onPrivateMessage';
export const ON_GROUP_MSG_ROUTE = 'onGroupMessage';
export const ON_ADD_CHANNEL_ROUTE = 'onAddChannel';
export const ON_LEAVE_CHANNEL_ROUTE = 'onLeaveChannel';
export const DEFAULT_MSG_PER_PAGE = 10;