Render for room settings filter

This commit is contained in:
oobjectt 2022-12-14 22:10:06 +01:00
parent 2d4f780fcc
commit 526d7ea16b
10 changed files with 103 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -157,6 +157,7 @@ export class IncomingHeader
public static ROOM_INFO_UPDATED = 3297; public static ROOM_INFO_UPDATED = 3297;
public static ROOM_SPECTATOR = 1033; public static ROOM_SPECTATOR = 1033;
public static ROOM_THICKNESS = 3547; public static ROOM_THICKNESS = 3547;
public static ROOM_GET_FILTER_WORDS = 2937;
public static INFO_FEED_ENABLE = 3284; public static INFO_FEED_ENABLE = 3284;
public static SECURITY_MACHINE = 1488; public static SECURITY_MACHINE = 1488;
public static MYSTERY_BOX_KEYS = 2833; public static MYSTERY_BOX_KEYS = 2833;

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../api';
import { MessageEvent } from '../../../../../events';
import { RoomGetFilterWordsMessageParser } from '../../parser';
export class RoomGetFilterWordsMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, RoomGetFilterWordsMessageParser);
}
public getParser(): RoomGetFilterWordsMessageParser
{
return this.parser as RoomGetFilterWordsMessageParser;
}
}

View File

@ -20,6 +20,7 @@ export * from './NavigatorSearchEvent';
export * from './NavigatorSettingsEvent'; export * from './NavigatorSettingsEvent';
export * from './RoomEventCancelEvent'; export * from './RoomEventCancelEvent';
export * from './RoomEventEvent'; export * from './RoomEventEvent';
export * from './RoomGetFilterWordsMessageEvent';
export * from './RoomSettingsUpdatedEvent'; export * from './RoomSettingsUpdatedEvent';
export * from './RoomThumbnailUpdateResultEvent'; export * from './RoomThumbnailUpdateResultEvent';
export * from './UserEventCatsEvent'; export * from './UserEventCatsEvent';

View File

@ -193,6 +193,8 @@ export class OutgoingHeader
public static ROOM_SETTINGS = 3129; public static ROOM_SETTINGS = 3129;
public static ROOM_SETTINGS_SAVE = 1969; public static ROOM_SETTINGS_SAVE = 1969;
public static ROOM_STAFF_PICK = 1918; public static ROOM_STAFF_PICK = 1918;
public static ROOM_FILTER_WORDS = 1911;
public static ROOM_FILTER_WORDS_MODIFY = 3001;
public static MYSTERYBOXWAITINGCANCELEDMESSAGE = 2012; public static MYSTERYBOXWAITINGCANCELEDMESSAGE = 2012;
public static SECURITY_MACHINE = 2490; public static SECURITY_MACHINE = 2490;
public static SECURITY_TICKET = 2419; public static SECURITY_TICKET = 2419;

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../api';
export class RoomFilterWordsMessageComposer implements IMessageComposer<ConstructorParameters<typeof RoomFilterWordsMessageComposer>>
{
private _data: ConstructorParameters<typeof RoomFilterWordsMessageComposer>;
constructor(roomId: number)
{
this._data = [roomId];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../api';
export class RoomFilterWordsModifyMessageComposer implements IMessageComposer<ConstructorParameters<typeof RoomFilterWordsModifyMessageComposer>>
{
private _data: ConstructorParameters<typeof RoomFilterWordsModifyMessageComposer>;
constructor(roomId: number, isAddingWord: boolean, word: string)
{
this._data = [roomId, isAddingWord, word];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -36,6 +36,8 @@ export * from './RemoveOwnRoomRightsRoomMessageComposer';
export * from './RoomAdEventTabAdClickedComposer'; export * from './RoomAdEventTabAdClickedComposer';
export * from './RoomAdEventTabViewedComposer'; export * from './RoomAdEventTabViewedComposer';
export * from './RoomAdSearchMessageComposer'; export * from './RoomAdSearchMessageComposer';
export * from './RoomFilterWordsMessageComposer';
export * from './RoomFilterWordsModifyMessageComposer';
export * from './RoomsWhereMyFriendsAreSearchMessageComposer'; export * from './RoomsWhereMyFriendsAreSearchMessageComposer';
export * from './RoomsWithHighestScoreSearchMessageComposer'; export * from './RoomsWithHighestScoreSearchMessageComposer';
export * from './RoomTextSearchMessageComposer'; export * from './RoomTextSearchMessageComposer';

View File

@ -0,0 +1,34 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
export class RoomGetFilterWordsMessageParser implements IMessageParser
{
private _words: string[];
public flush(): boolean
{
this._words = [];
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
let totalWords = wrapper.readInt();
while(totalWords > 0)
{
this._words.push(wrapper.readString());
totalWords--;
}
return true;
}
public get words(): string[]
{
return this._words;
}
}

View File

@ -23,6 +23,7 @@ export * from './NavigatorSearchParser';
export * from './NavigatorSettingsParser'; export * from './NavigatorSettingsParser';
export * from './RoomEventCancelMessageParser'; export * from './RoomEventCancelMessageParser';
export * from './RoomEventMessageParser'; export * from './RoomEventMessageParser';
export * from './RoomGetFilterWordsMessageParser';
export * from './RoomSettingsUpdatedParser'; export * from './RoomSettingsUpdatedParser';
export * from './RoomThumbnailUpdateResultMessageParser'; export * from './RoomThumbnailUpdateResultMessageParser';
export * from './UserEventCatsMessageParser'; export * from './UserEventCatsMessageParser';