Update some packets

This commit is contained in:
Bill 2022-03-19 18:27:09 -04:00
parent a2bb884b04
commit e476526226
26 changed files with 334 additions and 55 deletions

View File

@ -96,6 +96,7 @@ import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/Marketpl
import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent'; import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent';
import { CfhChatlogEvent, IssueDeletedMessageEvent, IssueInfoMessageEvent, IssuePickFailedMessageEvent, ModeratorActionResultMessageEvent, ModeratorInitMessageEvent, ModeratorMessageEvent, ModeratorRoomInfoEvent, ModeratorToolPreferencesEvent, ModeratorUserInfoEvent, RoomChatlogEvent, RoomVisitsEvent, UserBannedMessageEvent, UserChatlogEvent } from './messages/incoming/moderation'; import { CfhChatlogEvent, IssueDeletedMessageEvent, IssueInfoMessageEvent, IssuePickFailedMessageEvent, ModeratorActionResultMessageEvent, ModeratorInitMessageEvent, ModeratorMessageEvent, ModeratorRoomInfoEvent, ModeratorToolPreferencesEvent, ModeratorUserInfoEvent, RoomChatlogEvent, RoomVisitsEvent, UserBannedMessageEvent, UserChatlogEvent } from './messages/incoming/moderation';
import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent'; import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent';
import { CanCreateRoomEventEvent } from './messages/incoming/navigator/CanCreateRoomEventEvent';
import { NavigatorCategoriesEvent } from './messages/incoming/navigator/NavigatorCategoriesEvent'; import { NavigatorCategoriesEvent } from './messages/incoming/navigator/NavigatorCategoriesEvent';
import { NavigatorCollapsedEvent } from './messages/incoming/navigator/NavigatorCollapsedEvent'; import { NavigatorCollapsedEvent } from './messages/incoming/navigator/NavigatorCollapsedEvent';
import { NavigatorEventCategoriesEvent } from './messages/incoming/navigator/NavigatorEventCategoriesEvent'; import { NavigatorEventCategoriesEvent } from './messages/incoming/navigator/NavigatorEventCategoriesEvent';
@ -136,7 +137,6 @@ import { RoomEnterEvent } from './messages/incoming/room/access/RoomEnterEvent';
import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent'; import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent';
import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent'; import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent';
import { GetGuestRoomResultEvent } from './messages/incoming/room/data/GetGuestRoomResultEvent'; import { GetGuestRoomResultEvent } from './messages/incoming/room/data/GetGuestRoomResultEvent';
import { RoomBannedUsersEvent } from './messages/incoming/room/data/RoomBannedUsersEvent';
import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent'; import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent';
import { RoomEntryInfoMessageEvent } from './messages/incoming/room/data/RoomEntryInfoMessageEvent'; import { RoomEntryInfoMessageEvent } from './messages/incoming/room/data/RoomEntryInfoMessageEvent';
import { RoomScoreEvent } from './messages/incoming/room/data/RoomScoreEvent'; import { RoomScoreEvent } from './messages/incoming/room/data/RoomScoreEvent';
@ -144,7 +144,6 @@ import { RoomSettingsErrorEvent } from './messages/incoming/room/data/RoomSettin
import { RoomSettingsEvent } from './messages/incoming/room/data/RoomSettingsEvent'; import { RoomSettingsEvent } from './messages/incoming/room/data/RoomSettingsEvent';
import { RoomSettingsSavedEvent } from './messages/incoming/room/data/RoomSettingsSavedEvent'; import { RoomSettingsSavedEvent } from './messages/incoming/room/data/RoomSettingsSavedEvent';
import { RoomSettingsUpdatedEvent } from './messages/incoming/room/data/RoomSettingsUpdatedEvent'; import { RoomSettingsUpdatedEvent } from './messages/incoming/room/data/RoomSettingsUpdatedEvent';
import { RoomUsersWithRightsEvent } from './messages/incoming/room/data/RoomUsersWithRightsEvent';
import { ObjectsDataUpdateEvent } from './messages/incoming/room/engine/ObjectsDataUpdateEvent'; import { ObjectsDataUpdateEvent } from './messages/incoming/room/engine/ObjectsDataUpdateEvent';
import { ObjectsRollingEvent } from './messages/incoming/room/engine/ObjectsRollingEvent'; import { ObjectsRollingEvent } from './messages/incoming/room/engine/ObjectsRollingEvent';
import { RoomCreatedEvent } from './messages/incoming/room/engine/RoomCreatedEvent'; import { RoomCreatedEvent } from './messages/incoming/room/engine/RoomCreatedEvent';
@ -208,6 +207,10 @@ import { WiredOpenEvent } from './messages/incoming/roomevents/WiredOpenEvent';
import { WiredRewardResultMessageEvent } from './messages/incoming/roomevents/WiredRewardResultMessageEvent'; import { WiredRewardResultMessageEvent } from './messages/incoming/roomevents/WiredRewardResultMessageEvent';
import { WiredSaveSuccessEvent } from './messages/incoming/roomevents/WiredSaveSuccessEvent'; import { WiredSaveSuccessEvent } from './messages/incoming/roomevents/WiredSaveSuccessEvent';
import { WiredValidationErrorEvent } from './messages/incoming/roomevents/WiredValidationErrorEvent'; import { WiredValidationErrorEvent } from './messages/incoming/roomevents/WiredValidationErrorEvent';
import { BannedUsersFromRoomEvent } from './messages/incoming/roomsettings/BannedUsersFromRoomEvent';
import { FlatControllerAddedEvent } from './messages/incoming/roomsettings/FlatControllerAddedEvent';
import { FlatControllerRemovedEvent } from './messages/incoming/roomsettings/FlatControllerRemovedEvent';
import { FlatControllersEvent } from './messages/incoming/roomsettings/FlatControllersEvent';
import { AuthenticatedEvent } from './messages/incoming/security/AuthenticatedEvent'; import { AuthenticatedEvent } from './messages/incoming/security/AuthenticatedEvent';
import { UserPermissionsEvent } from './messages/incoming/user/access/UserPermissionsEvent'; import { UserPermissionsEvent } from './messages/incoming/user/access/UserPermissionsEvent';
import { RelationshipStatusInfoEvent } from './messages/incoming/user/data/RelationshipStatusInfoEvent'; import { RelationshipStatusInfoEvent } from './messages/incoming/user/data/RelationshipStatusInfoEvent';
@ -724,6 +727,7 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.NAVIGATOR_SEARCHES, NavigatorSearchesEvent); this._events.set(IncomingHeader.NAVIGATOR_SEARCHES, NavigatorSearchesEvent);
this._events.set(IncomingHeader.NAVIGATOR_SEARCH, NavigatorSearchEvent); this._events.set(IncomingHeader.NAVIGATOR_SEARCH, NavigatorSearchEvent);
this._events.set(IncomingHeader.NAVIGATOR_SETTINGS, NavigatorSettingsEvent); this._events.set(IncomingHeader.NAVIGATOR_SETTINGS, NavigatorSettingsEvent);
this._events.set(IncomingHeader.CAN_CREATE_ROOM_EVENT, CanCreateRoomEventEvent);
// NOTIFICATIONS // NOTIFICATIONS
this._events.set(IncomingHeader.GENERIC_ALERT, HabboBroadcastMessageEvent); this._events.set(IncomingHeader.GENERIC_ALERT, HabboBroadcastMessageEvent);
@ -780,8 +784,6 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.ROOM_SETTINGS, RoomSettingsEvent); this._events.set(IncomingHeader.ROOM_SETTINGS, RoomSettingsEvent);
this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE, RoomSettingsSavedEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_SAVE, RoomSettingsSavedEvent);
this._events.set(IncomingHeader.ROOM_SETTINGS_UPDATED, RoomSettingsUpdatedEvent); this._events.set(IncomingHeader.ROOM_SETTINGS_UPDATED, RoomSettingsUpdatedEvent);
this._events.set(IncomingHeader.ROOM_RIGHTS_LIST, RoomUsersWithRightsEvent);
this._events.set(IncomingHeader.ROOM_BAN_LIST, RoomBannedUsersEvent);
this._events.set(IncomingHeader.ROOM_ROLLING, ObjectsRollingEvent); this._events.set(IncomingHeader.ROOM_ROLLING, ObjectsRollingEvent);
this._events.set(IncomingHeader.ROOM_CREATED, RoomCreatedEvent); this._events.set(IncomingHeader.ROOM_CREATED, RoomCreatedEvent);
this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent); this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent);
@ -806,6 +808,12 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent); this._events.set(IncomingHeader.FURNITURE_GROUP_CONTEXT_MENU_INFO, GroupFurniContextMenuInfoMessageEvent);
this._events.set(IncomingHeader.FURNITURE_POSTIT_STICKY_POLE_OPEN, FurniturePostItStickyPoleOpenEvent); this._events.set(IncomingHeader.FURNITURE_POSTIT_STICKY_POLE_OPEN, FurniturePostItStickyPoleOpenEvent);
// ROOM SETTINGS
this._events.set(IncomingHeader.ROOM_RIGHTS_LIST, FlatControllersEvent);
this._events.set(IncomingHeader.ROOM_RIGHTS_LIST_ADD, FlatControllerAddedEvent);
this._events.set(IncomingHeader.ROOM_RIGHTS_LIST_REMOVE, FlatControllerRemovedEvent);
this._events.set(IncomingHeader.ROOM_BAN_LIST, BannedUsersFromRoomEvent);
// MAPPING // MAPPING
this._events.set(IncomingHeader.ROOM_MODEL_DOOR, RoomEntryTileMessageEvent); this._events.set(IncomingHeader.ROOM_MODEL_DOOR, RoomEntryTileMessageEvent);
this._events.set(IncomingHeader.ROOM_HEIGHT_MAP, RoomHeightMapEvent); this._events.set(IncomingHeader.ROOM_HEIGHT_MAP, RoomHeightMapEvent);

View File

@ -368,4 +368,5 @@ export class IncomingHeader
public static PET_RESPECTED = 2788; public static PET_RESPECTED = 2788;
public static PET_SUPPLEMENT = 3441; public static PET_SUPPLEMENT = 3441;
public static NOOBNESS_LEVEL = 3738; public static NOOBNESS_LEVEL = 3738;
public static CAN_CREATE_ROOM_EVENT = 2599;
} }

View File

@ -50,6 +50,7 @@ export * from './room/session';
export * from './room/unit'; export * from './room/unit';
export * from './room/unit/chat'; export * from './room/unit/chat';
export * from './roomevents'; export * from './roomevents';
export * from './roomsettings';
export * from './security'; export * from './security';
export * from './sound'; export * from './sound';
export * from './talent'; export * from './talent';

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { CanCreateRoomEventParser } from '../../parser/navigator/CanCreateRoomEventParser';
export class CanCreateRoomEventEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, CanCreateRoomEventParser);
}
public getParser(): CanCreateRoomEventParser
{
return this.parser as CanCreateRoomEventParser;
}
}

View File

@ -1,3 +1,4 @@
export * from './CanCreateRoomEventEvent';
export * from './NavigatorCategoriesEvent'; export * from './NavigatorCategoriesEvent';
export * from './NavigatorCollapsedEvent'; export * from './NavigatorCollapsedEvent';
export * from './NavigatorEventCategoriesEvent'; export * from './NavigatorEventCategoriesEvent';

View File

@ -1,16 +0,0 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { RoomSettingsUsersListParser } from '../../../parser/room/data/RoomSettingsUsersListParser';
export class RoomBannedUsersEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, RoomSettingsUsersListParser);
}
public getParser(): RoomSettingsUsersListParser
{
return this.parser as RoomSettingsUsersListParser;
}
}

View File

@ -1,16 +0,0 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { RoomSettingsUsersListParser } from '../../../parser/room/data/RoomSettingsUsersListParser';
export class RoomUsersWithRightsEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, RoomSettingsUsersListParser);
}
public getParser(): RoomSettingsUsersListParser
{
return this.parser as RoomSettingsUsersListParser;
}
}

View File

@ -1,5 +1,4 @@
export * from './GetGuestRoomResultEvent'; export * from './GetGuestRoomResultEvent';
export * from './RoomBannedUsersEvent';
export * from './RoomChatSettingsEvent'; export * from './RoomChatSettingsEvent';
export * from './RoomEntryInfoMessageEvent'; export * from './RoomEntryInfoMessageEvent';
export * from './RoomScoreEvent'; export * from './RoomScoreEvent';
@ -7,4 +6,3 @@ export * from './RoomSettingsErrorEvent';
export * from './RoomSettingsEvent'; export * from './RoomSettingsEvent';
export * from './RoomSettingsSavedEvent'; export * from './RoomSettingsSavedEvent';
export * from './RoomSettingsUpdatedEvent'; export * from './RoomSettingsUpdatedEvent';
export * from './RoomUsersWithRightsEvent';

View File

@ -0,0 +1,24 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IFlatUser } from './IFlatUser';
export class BannedUserData implements IFlatUser
{
private _userId: number;
private _userName: string;
constructor(wrapper: IMessageDataWrapper)
{
this._userId = wrapper.readInt();
this._userName = wrapper.readString();
}
public get userId(): number
{
return this._userId;
}
public get userName(): string
{
return this._userName;
}
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { BannedUsersFromRoomParser } from '../../parser/roomsettings/BannedUsersFromRoomParser';
export class BannedUsersFromRoomEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, BannedUsersFromRoomParser);
}
public getParser(): BannedUsersFromRoomParser
{
return this.parser as BannedUsersFromRoomParser;
}
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { FlatControllerAddedParser } from '../../parser/roomsettings/FlatControllerAddedParser';
export class FlatControllerAddedEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, FlatControllerAddedParser);
}
public getParser(): FlatControllerAddedParser
{
return this.parser as FlatControllerAddedParser;
}
}

View File

@ -0,0 +1,35 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IFlatUser } from './IFlatUser';
export class FlatControllerData implements IFlatUser
{
private _userId: number;
private _userName: string;
private _selected: boolean;
constructor(wrapper: IMessageDataWrapper)
{
this._userId = wrapper.readInt();
this._userName = wrapper.readString();
}
public get userId(): number
{
return this._userId;
}
public get userName(): string
{
return this._userName;
}
public get selected(): boolean
{
return this._selected;
}
public set selected(selected: boolean)
{
this._selected = selected;
}
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { FlatControllerRemovedParser } from '../../parser/roomsettings/FlatControllerRemovedParser';
export class FlatControllerRemovedEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, FlatControllerRemovedParser);
}
public getParser(): FlatControllerRemovedParser
{
return this.parser as FlatControllerRemovedParser;
}
}

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { FlatControllersParser } from '../../parser/roomsettings/FlatControllersParser';
export class FlatControllersEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, FlatControllersParser);
}
public getParser(): FlatControllersParser
{
return this.parser as FlatControllersParser;
}
}

View File

@ -0,0 +1,5 @@
export interface IFlatUser
{
userId: number;
userName: string;
}

View File

@ -0,0 +1,7 @@
export * from './BannedUserData';
export * from './BannedUsersFromRoomEvent';
export * from './FlatControllerAddedEvent';
export * from './FlatControllerData';
export * from './FlatControllerRemovedEvent';
export * from './FlatControllersEvent';
export * from './IFlatUser';

View File

@ -28,6 +28,7 @@ export * from './poll';
export * from './quest'; export * from './quest';
export * from './room'; export * from './room';
export * from './roomevents'; export * from './roomevents';
export * from './roomsettings';
export * from './security'; export * from './security';
export * from './sound'; export * from './sound';
export * from './talent'; export * from './talent';

View File

@ -0,0 +1,36 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
export class CanCreateRoomEventParser implements IMessageParser
{
private _canCreate: boolean;
private _errorCode: number;
public flush(): boolean
{
this._canCreate = false;
this._errorCode = 0;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._canCreate = wrapper.readBoolean();
this._errorCode = wrapper.readInt();
return true;
}
public get canCreate(): boolean
{
return this._canCreate;
}
public get errorCode(): number
{
return this._errorCode;
}
}

View File

@ -1,3 +1,4 @@
export * from './CanCreateRoomEventParser';
export * from './NavigatorCategoriesParser'; export * from './NavigatorCategoriesParser';
export * from './NavigatorCategoryDataParser'; export * from './NavigatorCategoryDataParser';
export * from './NavigatorCollapsedParser'; export * from './NavigatorCollapsedParser';

View File

@ -1,4 +1,4 @@
import { IMessageDataWrapper } from '../../../../../../core'; import { IMessageDataWrapper } from '../../../../../../core/communication/messages';
export class RoomDataParser export class RoomDataParser
{ {
@ -12,7 +12,8 @@ export class RoomDataParser
public static OPEN_STATE = 0; public static OPEN_STATE = 0;
public static DOORBELL_STATE = 1; public static DOORBELL_STATE = 1;
public static PASSWORD_STATE = 2; public static PASSWORD_STATE = 2;
public static INVISIBLE_STATE = 4; public static INVISIBLE_STATE = 3;
public static NOOB_STATE = 4;
private _roomId: number; private _roomId: number;
private _roomName: string; private _roomName: string;
@ -41,7 +42,7 @@ export class RoomDataParser
private _adExpiresIn: number; private _adExpiresIn: number;
private _allInRoomMuted: boolean; private _allInRoomMuted: boolean;
private _canMute: boolean; private _canMute: boolean;
private _roomPicker: boolean;
private _officialRoomPicRef: string; private _officialRoomPicRef: string;
constructor(wrapper: IMessageDataWrapper) constructor(wrapper: IMessageDataWrapper)
@ -81,7 +82,6 @@ export class RoomDataParser
this._adExpiresIn = 0; this._adExpiresIn = 0;
this._allInRoomMuted = false; this._allInRoomMuted = false;
this._canMute = false; this._canMute = false;
this._roomPicker = false;
this._officialRoomPicRef = null; this._officialRoomPicRef = null;
return true; return true;
@ -279,16 +279,6 @@ export class RoomDataParser
return this._displayAd; return this._displayAd;
} }
public get roomPicker(): boolean
{
return this._roomPicker;
}
public set roomPicker(k: boolean)
{
this._roomPicker = k;
}
public get canMute(): boolean public get canMute(): boolean
{ {
return this._canMute; return this._canMute;

View File

@ -9,4 +9,3 @@ export * from './RoomSettingsErrorParser';
export * from './RoomSettingsParser'; export * from './RoomSettingsParser';
export * from './RoomSettingsSavedParser'; export * from './RoomSettingsSavedParser';
export * from './RoomSettingsUpdatedParser'; export * from './RoomSettingsUpdatedParser';
export * from './RoomSettingsUsersListParser';

View File

@ -0,0 +1,45 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
import { BannedUserData } from '../../incoming/roomsettings/BannedUserData';
export class BannedUsersFromRoomParser implements IMessageParser
{
private _roomId: number;
private _bannedUsers: BannedUserData[];
public flush(): boolean
{
this._roomId = 0;
this._bannedUsers = [];
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._roomId = wrapper.readInt();
let totalBans = wrapper.readInt();
while(totalBans > 0)
{
this._bannedUsers.push(new BannedUserData(wrapper));
totalBans--;
}
return true;
}
public get roomId(): number
{
return this._roomId;
}
public get bannedUsers(): BannedUserData[]
{
return this._bannedUsers;
}
}

View File

@ -0,0 +1,37 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
import { FlatControllerData } from '../../incoming/roomsettings/FlatControllerData';
export class FlatControllerAddedParser implements IMessageParser
{
private _roomId: number;
private _data: FlatControllerData;
public flush(): boolean
{
this._roomId = 0;
this._data = null;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._roomId = wrapper.readInt();
this._data = new FlatControllerData(wrapper);
return true;
}
public get roomId(): number
{
return this._roomId;
}
public get data(): FlatControllerData
{
return this._data;
}
}

View File

@ -0,0 +1,36 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
export class FlatControllerRemovedParser implements IMessageParser
{
private _roomId: number;
private _userId: number;
public flush(): boolean
{
this._roomId = 0;
this._userId = 0;
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._roomId = wrapper.readInt();
this._userId = wrapper.readInt();
return true;
}
public get roomId(): number
{
return this._roomId;
}
public get userId(): number
{
return this._userId;
}
}

View File

@ -1,6 +1,7 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
export class RoomSettingsUsersListParser implements IMessageParser export class FlatControllersParser implements IMessageParser
{ {
private _roomId: number; private _roomId: number;
private _users: Map<number, string>; private _users: Map<number, string>;
@ -27,6 +28,7 @@ export class RoomSettingsUsersListParser implements IMessageParser
const name = wrapper.readString(); const name = wrapper.readString();
this._users.set(id, name); this._users.set(id, name);
usersCount--; usersCount--;
} }

View File

@ -0,0 +1,4 @@
export * from './BannedUsersFromRoomParser';
export * from './FlatControllerAddedParser';
export * from './FlatControllerRemovedParser';
export * from './FlatControllersParser';