Added Color to the Renderer and Avatar update

This commit is contained in:
duckietm
2024-04-04 09:26:05 +02:00
parent 187622429f
commit 95bc0045ec
11 changed files with 92 additions and 51 deletions
+9 -4
View File
@@ -69,14 +69,14 @@ export class RoomSession implements IRoomSession
this._roomId = roomId;
}
public sendChatMessage(text: string, styleId: number): void
public sendChatMessage(text: string, styleId: number, chatColour: string): void
{
GetCommunication().connection.send(new RoomUnitChatComposer(text, styleId));
GetCommunication().connection.send(new RoomUnitChatComposer(text, styleId, chatColour));
}
public sendShoutMessage(text: string, styleId: number): void
public sendShoutMessage(text: string, styleId: number, chatColour: string): void
{
GetCommunication().connection.send(new RoomUnitChatShoutComposer(text, styleId));
GetCommunication().connection.send(new RoomUnitChatShoutComposer(text, styleId, chatColour));
}
public sendWhisperMessage(recipientName: string, text: string, styleId: number): void
@@ -126,6 +126,11 @@ export class RoomSession implements IRoomSession
{
GetCommunication().connection.send(new RoomAmbassadorAlertComposer(userId));
}
public sendWhisperGroupMessage(userId: number): void
{
GetCommunication().connection.send(new ChatWhisperGroupComposer(userId));
}
public sendKickMessage(userId: number): void
{
@@ -37,7 +37,7 @@ export class RoomChatHandler extends BaseHandler
if(event instanceof RoomUnitChatShoutEvent) chatType = RoomSessionChatEvent.CHAT_TYPE_SHOUT;
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, parser.chatColours);
GetEventDispatcher().dispatchEvent(chatEvent);
}