cleaned RoomSessionChatEvent

This commit is contained in:
Dank074 2021-06-19 21:11:45 -05:00
parent a1827d8cc4
commit 09e90a8c93
2 changed files with 18 additions and 18 deletions

View File

@ -6,17 +6,17 @@ export class RoomSessionChatEvent extends RoomSessionEvent
public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT'; public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT';
public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT'; public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT';
public static CHAT_NORMAL: number = 0; public static CHAT_TYPE_SPEAK: number = 0;
public static CHAT_WHISPER: number = 1; public static CHAT_TYPE_WHISPER: number = 1;
public static CHAT_SHOUT: number = 2; public static CHAT_TYPE_SHOUT: number = 2;
public static _Str_5821: number = 3; public static CHAT_TYPE_RESPECT: number = 3;
public static _Str_6081: number = 4; public static CHAT_TYPE_PETRESPECT: number = 4;
public static _Str_8971: number = 5; public static CHAT_TYPE_HAND_ITEM_RECEIVED: number = 5;
public static _Str_5958: number = 6; public static CHAT_TYPE_PETTREAT: number = 6;
public static _Str_6065: number = 7; public static CHAT_TYPE_PETREVIVE: number = 7;
public static _Str_5998: number = 8; public static CHAT_TYPE_PET_REBREED_FERTILIZE: number = 8;
public static _Str_5904: number = 9; public static CHAT_TYPE_PET_SPEED_FERTILIZE: number = 9;
public static _Str_8909: number = 10; public static CHAT_TYPE_MUTE_REMAINING: number = 10;
private _objectId: number; private _objectId: number;
private _message: string; private _message: string;

View File

@ -38,10 +38,10 @@ export class RoomChatHandler extends BaseHandler
if(!parser) return; if(!parser) return;
let chatType: number = RoomSessionChatEvent.CHAT_NORMAL; let chatType: number = RoomSessionChatEvent.CHAT_TYPE_SPEAK;
if(event instanceof RoomUnitChatShoutEvent) chatType = RoomSessionChatEvent.CHAT_SHOUT; if(event instanceof RoomUnitChatShoutEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_SHOUT;
else if(event instanceof RoomUnitChatWhisperEvent) chatType = RoomSessionChatEvent.CHAT_WHISPER; else if(event instanceof RoomUnitChatWhisperEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_WHISPER;
const chatEvent = new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.roomIndex, parser.message, chatType, parser.bubble); const chatEvent = new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.roomIndex, parser.message, chatType, parser.bubble);
@ -60,7 +60,7 @@ export class RoomChatHandler extends BaseHandler
if(!parser) return; if(!parser) return;
this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.giverUserId, '', RoomSessionChatEvent._Str_8971, SystemChatStyleEnum.GENERIC, null, parser.handItemType)); this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, parser.giverUserId, '', RoomSessionChatEvent.CHAT_TYPE_HAND_ITEM_RECEIVED, SystemChatStyleEnum.GENERIC, null, parser.handItemType));
} }
private onRespectReceivedEvent(event: RespectReceivedEvent): void private onRespectReceivedEvent(event: RespectReceivedEvent): void
@ -79,7 +79,7 @@ export class RoomChatHandler extends BaseHandler
if(!userData) return; if(!userData) return;
this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, userData.roomIndex, '', RoomSessionChatEvent._Str_5821, SystemChatStyleEnum.GENERIC)); this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, userData.roomIndex, '', RoomSessionChatEvent.CHAT_TYPE_RESPECT, SystemChatStyleEnum.GENERIC));
} }
private onFloodControlEvent(event: FloodControlEvent): void private onFloodControlEvent(event: FloodControlEvent): void
@ -111,6 +111,6 @@ export class RoomChatHandler extends BaseHandler
if(!parser) return; if(!parser) return;
this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, session.ownRoomIndex, '', RoomSessionChatEvent._Str_8909, SystemChatStyleEnum.GENERIC, null, parser.seconds)); this.listener.events.dispatchEvent(new RoomSessionChatEvent(RoomSessionChatEvent.CHAT_EVENT, session, session.ownRoomIndex, '', RoomSessionChatEvent.CHAT_TYPE_MUTE_REMAINING, SystemChatStyleEnum.GENERIC, null, parser.seconds));
} }
} }