You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
@@ -7,6 +7,7 @@ import { ConfInvisStateMessageEvent } from './messages';
|
|||||||
import { HanditemBlockStateMessageEvent } from './messages';
|
import { HanditemBlockStateMessageEvent } from './messages';
|
||||||
import { TranslationLanguagesEvent, TranslationLanguagesRequestComposer, TranslationResultEvent, TranslationTextRequestComposer } from './messages';
|
import { TranslationLanguagesEvent, TranslationLanguagesRequestComposer, TranslationResultEvent, TranslationTextRequestComposer } from './messages';
|
||||||
import { YouTubeRoomBroadcastEvent, YouTubeRoomPlayComposer, YouTubeRoomSettingsComposer, YouTubeRoomSettingsEvent, YouTubeRoomWatchersEvent, YouTubeRoomWatchingComposer } from './messages';
|
import { YouTubeRoomBroadcastEvent, YouTubeRoomPlayComposer, YouTubeRoomSettingsComposer, YouTubeRoomSettingsEvent, YouTubeRoomWatchersEvent, YouTubeRoomWatchingComposer } from './messages';
|
||||||
|
import { HousekeepingActionLogEvent, HousekeepingActionResultEvent, HousekeepingBanUserComposer, HousekeepingDashboardEvent, HousekeepingDeleteRoomComposer, HousekeepingFindRoomByIdComposer, HousekeepingFindUserByIdComposer, HousekeepingFindUserByNameComposer, HousekeepingForceDisconnectUserComposer, HousekeepingGetDashboardComposer, HousekeepingGiveCreditsComposer, HousekeepingGiveCurrencyComposer, HousekeepingGrantItemComposer, HousekeepingKickAllFromRoomComposer, HousekeepingKickUserComposer, HousekeepingListActionLogComposer, HousekeepingMuteRoomComposer, HousekeepingMuteUserComposer, HousekeepingResetUserPasswordComposer, HousekeepingRoomDetailEvent, HousekeepingRoomListEvent, HousekeepingRoomStateComposer, HousekeepingSearchRoomsComposer, HousekeepingSendHotelAlertComposer, HousekeepingSetHcSubscriptionComposer, HousekeepingSetUserRankComposer, HousekeepingTradeLockUserComposer, HousekeepingTransferRoomOwnershipComposer, HousekeepingUnbanUserComposer, HousekeepingUserDetailEvent } from './messages';
|
||||||
export class NitroMessages implements IMessageConfiguration
|
export class NitroMessages implements IMessageConfiguration
|
||||||
{
|
{
|
||||||
private _events: Map<number, Function>;
|
private _events: Map<number, Function>;
|
||||||
@@ -505,6 +506,14 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.YOUTUBE_ROOM_BROADCAST, YouTubeRoomBroadcastEvent);
|
this._events.set(IncomingHeader.YOUTUBE_ROOM_BROADCAST, YouTubeRoomBroadcastEvent);
|
||||||
this._events.set(IncomingHeader.YOUTUBE_ROOM_SETTINGS, YouTubeRoomSettingsEvent);
|
this._events.set(IncomingHeader.YOUTUBE_ROOM_SETTINGS, YouTubeRoomSettingsEvent);
|
||||||
this._events.set(IncomingHeader.YOUTUBE_ROOM_WATCHERS, YouTubeRoomWatchersEvent);
|
this._events.set(IncomingHeader.YOUTUBE_ROOM_WATCHERS, YouTubeRoomWatchersEvent);
|
||||||
|
|
||||||
|
// Housekeeping (in-client admin panel)
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_USER_DETAIL, HousekeepingUserDetailEvent);
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_ACTION_RESULT, HousekeepingActionResultEvent);
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_ROOM_DETAIL, HousekeepingRoomDetailEvent);
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_ROOM_LIST, HousekeepingRoomListEvent);
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_DASHBOARD, HousekeepingDashboardEvent);
|
||||||
|
this._events.set(IncomingHeader.HOUSEKEEPING_ACTION_LOG, HousekeepingActionLogEvent);
|
||||||
this._events.set(IncomingHeader.WIRED_REWARD, WiredRewardResultMessageEvent);
|
this._events.set(IncomingHeader.WIRED_REWARD, WiredRewardResultMessageEvent);
|
||||||
this._events.set(IncomingHeader.WIRED_SAVE, WiredSaveSuccessEvent);
|
this._events.set(IncomingHeader.WIRED_SAVE, WiredSaveSuccessEvent);
|
||||||
this._events.set(IncomingHeader.WIRED_ERROR, WiredValidationErrorEvent);
|
this._events.set(IncomingHeader.WIRED_ERROR, WiredValidationErrorEvent);
|
||||||
@@ -1255,6 +1264,32 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_PLAY, YouTubeRoomPlayComposer);
|
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_PLAY, YouTubeRoomPlayComposer);
|
||||||
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_SETTINGS, YouTubeRoomSettingsComposer);
|
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_SETTINGS, YouTubeRoomSettingsComposer);
|
||||||
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_WATCHING, YouTubeRoomWatchingComposer);
|
this._composers.set(OutgoingHeader.YOUTUBE_ROOM_WATCHING, YouTubeRoomWatchingComposer);
|
||||||
|
|
||||||
|
// Housekeeping (in-client admin panel)
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_FIND_USER_BY_NAME, HousekeepingFindUserByNameComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_FIND_USER_BY_ID, HousekeepingFindUserByIdComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_BAN_USER, HousekeepingBanUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_UNBAN_USER, HousekeepingUnbanUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_MUTE_USER, HousekeepingMuteUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_KICK_USER, HousekeepingKickUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_FORCE_DISCONNECT_USER, HousekeepingForceDisconnectUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_SET_USER_RANK, HousekeepingSetUserRankComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_TRADE_LOCK_USER, HousekeepingTradeLockUserComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_RESET_USER_PASSWORD, HousekeepingResetUserPasswordComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_FIND_ROOM_BY_ID, HousekeepingFindRoomByIdComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_SEARCH_ROOMS, HousekeepingSearchRoomsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_ROOM_STATE, HousekeepingRoomStateComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_MUTE_ROOM, HousekeepingMuteRoomComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_KICK_ALL_FROM_ROOM, HousekeepingKickAllFromRoomComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_TRANSFER_ROOM_OWNERSHIP, HousekeepingTransferRoomOwnershipComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_DELETE_ROOM, HousekeepingDeleteRoomComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_GIVE_CREDITS, HousekeepingGiveCreditsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_GIVE_CURRENCY, HousekeepingGiveCurrencyComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_GRANT_ITEM, HousekeepingGrantItemComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_SET_HC_SUBSCRIPTION, HousekeepingSetHcSubscriptionComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_SEND_HOTEL_ALERT, HousekeepingSendHotelAlertComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_GET_DASHBOARD, HousekeepingGetDashboardComposer);
|
||||||
|
this._composers.set(OutgoingHeader.HOUSEKEEPING_LIST_ACTION_LOG, HousekeepingListActionLogComposer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get events(): Map<number, Function>
|
public get events(): Map<number, Function>
|
||||||
|
|||||||
@@ -503,4 +503,12 @@ export class IncomingHeader
|
|||||||
public static YOUTUBE_ROOM_BROADCAST = 8001;
|
public static YOUTUBE_ROOM_BROADCAST = 8001;
|
||||||
public static YOUTUBE_ROOM_WATCHERS = 8002;
|
public static YOUTUBE_ROOM_WATCHERS = 8002;
|
||||||
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
||||||
|
|
||||||
|
// Housekeeping (in-client admin panel) — IDs 9200..9299 reserved
|
||||||
|
public static HOUSEKEEPING_USER_DETAIL = 9200;
|
||||||
|
public static HOUSEKEEPING_ACTION_RESULT = 9201;
|
||||||
|
public static HOUSEKEEPING_ROOM_DETAIL = 9202;
|
||||||
|
public static HOUSEKEEPING_ROOM_LIST = 9203;
|
||||||
|
public static HOUSEKEEPING_DASHBOARD = 9204;
|
||||||
|
public static HOUSEKEEPING_ACTION_LOG = 9205;
|
||||||
}
|
}
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingActionLogParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingActionLogEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingActionLogParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingActionLogParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingActionLogParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingActionResultParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingActionResultEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingActionResultParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingActionResultParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingActionResultParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingDashboardParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingDashboardEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingDashboardParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingDashboardParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingDashboardParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingRoomDetailParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingRoomDetailEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingRoomDetailParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingRoomDetailParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingRoomDetailParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingRoomListParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingRoomListEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingRoomListParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingRoomListParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingRoomListParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '@nitrots/api';
|
||||||
|
import { MessageEvent } from '@nitrots/events';
|
||||||
|
import { HousekeepingUserDetailParser } from '../../parser';
|
||||||
|
|
||||||
|
export class HousekeepingUserDetailEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, HousekeepingUserDetailParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): HousekeepingUserDetailParser
|
||||||
|
{
|
||||||
|
return this.parser as HousekeepingUserDetailParser;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from './HousekeepingActionLogEvent';
|
||||||
|
export * from './HousekeepingActionResultEvent';
|
||||||
|
export * from './HousekeepingDashboardEvent';
|
||||||
|
export * from './HousekeepingRoomDetailEvent';
|
||||||
|
export * from './HousekeepingRoomListEvent';
|
||||||
|
export * from './HousekeepingUserDetailEvent';
|
||||||
@@ -24,6 +24,7 @@ export * from './group';
|
|||||||
export * from './groupforums';
|
export * from './groupforums';
|
||||||
export * from './handshake';
|
export * from './handshake';
|
||||||
export * from './help';
|
export * from './help';
|
||||||
|
export * from './housekeeping';
|
||||||
export * from './inventory';
|
export * from './inventory';
|
||||||
export * from './inventory/achievements';
|
export * from './inventory/achievements';
|
||||||
export * from './inventory/avatareffect';
|
export * from './inventory/avatareffect';
|
||||||
|
|||||||
@@ -522,4 +522,30 @@ export class OutgoingHeader
|
|||||||
public static YOUTUBE_ROOM_PLAY = 8001;
|
public static YOUTUBE_ROOM_PLAY = 8001;
|
||||||
public static YOUTUBE_ROOM_WATCHING = 8002;
|
public static YOUTUBE_ROOM_WATCHING = 8002;
|
||||||
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
||||||
|
|
||||||
|
// Housekeeping (in-client admin panel) — IDs 9100..9199 reserved
|
||||||
|
public static HOUSEKEEPING_FIND_USER_BY_NAME = 9100;
|
||||||
|
public static HOUSEKEEPING_FIND_USER_BY_ID = 9101;
|
||||||
|
public static HOUSEKEEPING_BAN_USER = 9102;
|
||||||
|
public static HOUSEKEEPING_UNBAN_USER = 9103;
|
||||||
|
public static HOUSEKEEPING_MUTE_USER = 9104;
|
||||||
|
public static HOUSEKEEPING_KICK_USER = 9105;
|
||||||
|
public static HOUSEKEEPING_FORCE_DISCONNECT_USER = 9106;
|
||||||
|
public static HOUSEKEEPING_SET_USER_RANK = 9107;
|
||||||
|
public static HOUSEKEEPING_TRADE_LOCK_USER = 9108;
|
||||||
|
public static HOUSEKEEPING_RESET_USER_PASSWORD = 9109;
|
||||||
|
public static HOUSEKEEPING_FIND_ROOM_BY_ID = 9110;
|
||||||
|
public static HOUSEKEEPING_SEARCH_ROOMS = 9111;
|
||||||
|
public static HOUSEKEEPING_ROOM_STATE = 9112;
|
||||||
|
public static HOUSEKEEPING_MUTE_ROOM = 9113;
|
||||||
|
public static HOUSEKEEPING_KICK_ALL_FROM_ROOM = 9114;
|
||||||
|
public static HOUSEKEEPING_TRANSFER_ROOM_OWNERSHIP = 9115;
|
||||||
|
public static HOUSEKEEPING_DELETE_ROOM = 9116;
|
||||||
|
public static HOUSEKEEPING_GIVE_CREDITS = 9117;
|
||||||
|
public static HOUSEKEEPING_GIVE_CURRENCY = 9118;
|
||||||
|
public static HOUSEKEEPING_GRANT_ITEM = 9119;
|
||||||
|
public static HOUSEKEEPING_SET_HC_SUBSCRIPTION = 9120;
|
||||||
|
public static HOUSEKEEPING_SEND_HOTEL_ALERT = 9121;
|
||||||
|
public static HOUSEKEEPING_GET_DASHBOARD = 9122;
|
||||||
|
public static HOUSEKEEPING_LIST_ACTION_LOG = 9123;
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingBanUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingBanUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingBanUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, reason: string, hours: number)
|
||||||
|
{
|
||||||
|
this._data = [userId, reason, hours];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingDeleteRoomComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingDeleteRoomComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingDeleteRoomComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number) { this._data = [roomId]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingFindRoomByIdComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingFindRoomByIdComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingFindRoomByIdComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number) { this._data = [roomId]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingFindUserByIdComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingFindUserByIdComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingFindUserByIdComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number)
|
||||||
|
{
|
||||||
|
this._data = [userId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingFindUserByNameComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingFindUserByNameComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingFindUserByNameComposer>;
|
||||||
|
|
||||||
|
constructor(username: string)
|
||||||
|
{
|
||||||
|
this._data = [username];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingForceDisconnectUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingForceDisconnectUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingForceDisconnectUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, reason: string)
|
||||||
|
{
|
||||||
|
this._data = [userId, reason];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingGetDashboardComposer implements IMessageComposer<[]>
|
||||||
|
{
|
||||||
|
public getMessageArray(): [] { return []; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingGiveCreditsComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingGiveCreditsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingGiveCreditsComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, amount: number) { this._data = [userId, amount]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingGiveCurrencyComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingGiveCurrencyComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingGiveCurrencyComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, currencyType: number, amount: number) { this._data = [userId, currencyType, amount]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingGrantItemComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingGrantItemComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingGrantItemComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, itemId: number, quantity: number) { this._data = [userId, itemId, quantity]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingKickAllFromRoomComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingKickAllFromRoomComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingKickAllFromRoomComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number) { this._data = [roomId]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingKickUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingKickUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingKickUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, reason: string)
|
||||||
|
{
|
||||||
|
this._data = [userId, reason];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingListActionLogComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingListActionLogComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingListActionLogComposer>;
|
||||||
|
|
||||||
|
constructor(limit: number) { this._data = [limit]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingMuteRoomComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingMuteRoomComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingMuteRoomComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number, minutes: number) { this._data = [roomId, minutes]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingMuteUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingMuteUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingMuteUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, reason: string, minutes: number)
|
||||||
|
{
|
||||||
|
this._data = [userId, reason, minutes];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingResetUserPasswordComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingResetUserPasswordComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingResetUserPasswordComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number)
|
||||||
|
{
|
||||||
|
this._data = [userId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingRoomStateComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingRoomStateComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingRoomStateComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number, open: boolean) { this._data = [roomId, open]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingSearchRoomsComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingSearchRoomsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingSearchRoomsComposer>;
|
||||||
|
|
||||||
|
constructor(query: string, exactMatch: boolean, limit: number) { this._data = [query, exactMatch, limit]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingSendHotelAlertComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingSendHotelAlertComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingSendHotelAlertComposer>;
|
||||||
|
|
||||||
|
constructor(message: string) { this._data = [message]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingSetHcSubscriptionComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingSetHcSubscriptionComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingSetHcSubscriptionComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, days: number) { this._data = [userId, days]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingSetUserRankComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingSetUserRankComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingSetUserRankComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, rankId: number)
|
||||||
|
{
|
||||||
|
this._data = [userId, rankId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingTradeLockUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingTradeLockUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingTradeLockUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number, hours: number, reason: string)
|
||||||
|
{
|
||||||
|
this._data = [userId, hours, reason];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingTransferRoomOwnershipComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingTransferRoomOwnershipComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingTransferRoomOwnershipComposer>;
|
||||||
|
|
||||||
|
constructor(roomId: number, newOwnerId: number) { this._data = [roomId, newOwnerId]; }
|
||||||
|
|
||||||
|
public getMessageArray() { return this._data; }
|
||||||
|
public dispose(): void { return; }
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingUnbanUserComposer implements IMessageComposer<ConstructorParameters<typeof HousekeepingUnbanUserComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof HousekeepingUnbanUserComposer>;
|
||||||
|
|
||||||
|
constructor(userId: number)
|
||||||
|
{
|
||||||
|
this._data = [userId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
export * from './HousekeepingBanUserComposer';
|
||||||
|
export * from './HousekeepingDeleteRoomComposer';
|
||||||
|
export * from './HousekeepingFindRoomByIdComposer';
|
||||||
|
export * from './HousekeepingFindUserByIdComposer';
|
||||||
|
export * from './HousekeepingFindUserByNameComposer';
|
||||||
|
export * from './HousekeepingForceDisconnectUserComposer';
|
||||||
|
export * from './HousekeepingGetDashboardComposer';
|
||||||
|
export * from './HousekeepingGiveCreditsComposer';
|
||||||
|
export * from './HousekeepingGiveCurrencyComposer';
|
||||||
|
export * from './HousekeepingGrantItemComposer';
|
||||||
|
export * from './HousekeepingKickAllFromRoomComposer';
|
||||||
|
export * from './HousekeepingKickUserComposer';
|
||||||
|
export * from './HousekeepingListActionLogComposer';
|
||||||
|
export * from './HousekeepingMuteRoomComposer';
|
||||||
|
export * from './HousekeepingMuteUserComposer';
|
||||||
|
export * from './HousekeepingResetUserPasswordComposer';
|
||||||
|
export * from './HousekeepingRoomStateComposer';
|
||||||
|
export * from './HousekeepingSearchRoomsComposer';
|
||||||
|
export * from './HousekeepingSendHotelAlertComposer';
|
||||||
|
export * from './HousekeepingSetHcSubscriptionComposer';
|
||||||
|
export * from './HousekeepingSetUserRankComposer';
|
||||||
|
export * from './HousekeepingTradeLockUserComposer';
|
||||||
|
export * from './HousekeepingTransferRoomOwnershipComposer';
|
||||||
|
export * from './HousekeepingUnbanUserComposer';
|
||||||
@@ -21,6 +21,7 @@ export * from './group';
|
|||||||
export * from './groupforums';
|
export * from './groupforums';
|
||||||
export * from './handshake';
|
export * from './handshake';
|
||||||
export * from './help';
|
export * from './help';
|
||||||
|
export * from './housekeeping';
|
||||||
export * from './inventory';
|
export * from './inventory';
|
||||||
export * from './inventory/avatareffect';
|
export * from './inventory/avatareffect';
|
||||||
export * from './inventory/badges';
|
export * from './inventory/badges';
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
import { IMessageDataWrapper } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingActionLogEntryData
|
||||||
|
{
|
||||||
|
private _id: number = 0;
|
||||||
|
private _timestamp: number = 0;
|
||||||
|
private _actorId: number = 0;
|
||||||
|
private _actorName: string = '';
|
||||||
|
private _targetType: string = 'user';
|
||||||
|
private _targetId: number = 0;
|
||||||
|
private _targetLabel: string = '';
|
||||||
|
private _action: string = '';
|
||||||
|
private _detail: string = '';
|
||||||
|
private _success: boolean = true;
|
||||||
|
|
||||||
|
constructor(wrapper: IMessageDataWrapper)
|
||||||
|
{
|
||||||
|
if(!wrapper) throw new Error('invalid_wrapper');
|
||||||
|
|
||||||
|
this._id = wrapper.readInt();
|
||||||
|
this._timestamp = wrapper.readInt();
|
||||||
|
this._actorId = wrapper.readInt();
|
||||||
|
this._actorName = wrapper.readString();
|
||||||
|
this._targetType = wrapper.readString();
|
||||||
|
this._targetId = wrapper.readInt();
|
||||||
|
this._targetLabel = wrapper.readString();
|
||||||
|
this._action = wrapper.readString();
|
||||||
|
this._detail = wrapper.readString();
|
||||||
|
this._success = wrapper.readBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
public get id(): number { return this._id; }
|
||||||
|
public get timestamp(): number { return this._timestamp; }
|
||||||
|
public get actorId(): number { return this._actorId; }
|
||||||
|
public get actorName(): string { return this._actorName; }
|
||||||
|
public get targetType(): string { return this._targetType; }
|
||||||
|
public get targetId(): number { return this._targetId; }
|
||||||
|
public get targetLabel(): string { return this._targetLabel; }
|
||||||
|
public get action(): string { return this._action; }
|
||||||
|
public get detail(): string { return this._detail; }
|
||||||
|
public get success(): boolean { return this._success; }
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
import { HousekeepingActionLogEntryData } from './HousekeepingActionLogEntryData';
|
||||||
|
|
||||||
|
export class HousekeepingActionLogParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _entries: HousekeepingActionLogEntryData[] = [];
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._entries = [];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
const count = wrapper.readInt();
|
||||||
|
|
||||||
|
for(let i = 0; i < count; i++) this._entries.push(new HousekeepingActionLogEntryData(wrapper));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get entries(): HousekeepingActionLogEntryData[] { return this._entries; }
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic ack for any housekeeping action (ban, mute, kick, give-credits,
|
||||||
|
* room-close, …). Carries an `actionKey` string so a single event handler
|
||||||
|
* can multiplex over many in-flight actions and resolve the right Promise
|
||||||
|
* via an `accept` predicate.
|
||||||
|
*/
|
||||||
|
export class HousekeepingActionResultParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _actionKey: string = '';
|
||||||
|
private _ok: boolean = false;
|
||||||
|
private _actionId: number = 0;
|
||||||
|
private _message: string = '';
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._actionKey = '';
|
||||||
|
this._ok = false;
|
||||||
|
this._actionId = 0;
|
||||||
|
this._message = '';
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._actionKey = wrapper.readString();
|
||||||
|
this._ok = wrapper.readBoolean();
|
||||||
|
this._actionId = wrapper.readInt();
|
||||||
|
this._message = wrapper.readString();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get actionKey(): string { return this._actionKey; }
|
||||||
|
public get ok(): boolean { return this._ok; }
|
||||||
|
public get actionId(): number { return this._actionId; }
|
||||||
|
public get message(): string { return this._message; }
|
||||||
|
}
|
||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingDashboardParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _onlineUsers: number = 0;
|
||||||
|
private _totalUsers: number = 0;
|
||||||
|
private _activeRooms: number = 0;
|
||||||
|
private _totalRooms: number = 0;
|
||||||
|
private _peakOnlineToday: number = 0;
|
||||||
|
private _peakOnlineAllTime: number = 0;
|
||||||
|
private _pendingTickets: number = 0;
|
||||||
|
private _sanctionsLast24h: number = 0;
|
||||||
|
private _serverUptimeSeconds: number = 0;
|
||||||
|
private _serverVersion: string = '';
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._onlineUsers = 0;
|
||||||
|
this._totalUsers = 0;
|
||||||
|
this._activeRooms = 0;
|
||||||
|
this._totalRooms = 0;
|
||||||
|
this._peakOnlineToday = 0;
|
||||||
|
this._peakOnlineAllTime = 0;
|
||||||
|
this._pendingTickets = 0;
|
||||||
|
this._sanctionsLast24h = 0;
|
||||||
|
this._serverUptimeSeconds = 0;
|
||||||
|
this._serverVersion = '';
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._onlineUsers = wrapper.readInt();
|
||||||
|
this._totalUsers = wrapper.readInt();
|
||||||
|
this._activeRooms = wrapper.readInt();
|
||||||
|
this._totalRooms = wrapper.readInt();
|
||||||
|
this._peakOnlineToday = wrapper.readInt();
|
||||||
|
this._peakOnlineAllTime = wrapper.readInt();
|
||||||
|
this._pendingTickets = wrapper.readInt();
|
||||||
|
this._sanctionsLast24h = wrapper.readInt();
|
||||||
|
this._serverUptimeSeconds = wrapper.readInt();
|
||||||
|
this._serverVersion = wrapper.readString();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get onlineUsers(): number { return this._onlineUsers; }
|
||||||
|
public get totalUsers(): number { return this._totalUsers; }
|
||||||
|
public get activeRooms(): number { return this._activeRooms; }
|
||||||
|
public get totalRooms(): number { return this._totalRooms; }
|
||||||
|
public get peakOnlineToday(): number { return this._peakOnlineToday; }
|
||||||
|
public get peakOnlineAllTime(): number { return this._peakOnlineAllTime; }
|
||||||
|
public get pendingTickets(): number { return this._pendingTickets; }
|
||||||
|
public get sanctionsLast24h(): number { return this._sanctionsLast24h; }
|
||||||
|
public get serverUptimeSeconds(): number { return this._serverUptimeSeconds; }
|
||||||
|
public get serverVersion(): string { return this._serverVersion; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { IMessageDataWrapper } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingRoomData
|
||||||
|
{
|
||||||
|
private _id: number = 0;
|
||||||
|
private _name: string = '';
|
||||||
|
private _description: string = '';
|
||||||
|
private _ownerId: number = 0;
|
||||||
|
private _ownerName: string = '';
|
||||||
|
private _userCount: number = 0;
|
||||||
|
private _maxUsers: number = 0;
|
||||||
|
private _isLocked: boolean = false;
|
||||||
|
private _isMuted: boolean = false;
|
||||||
|
private _isPublic: boolean = false;
|
||||||
|
private _createdAt: number = 0;
|
||||||
|
|
||||||
|
constructor(wrapper: IMessageDataWrapper)
|
||||||
|
{
|
||||||
|
if(!wrapper) throw new Error('invalid_wrapper');
|
||||||
|
|
||||||
|
this._id = wrapper.readInt();
|
||||||
|
this._name = wrapper.readString();
|
||||||
|
this._description = wrapper.readString();
|
||||||
|
this._ownerId = wrapper.readInt();
|
||||||
|
this._ownerName = wrapper.readString();
|
||||||
|
this._userCount = wrapper.readInt();
|
||||||
|
this._maxUsers = wrapper.readInt();
|
||||||
|
this._isLocked = wrapper.readBoolean();
|
||||||
|
this._isMuted = wrapper.readBoolean();
|
||||||
|
this._isPublic = wrapper.readBoolean();
|
||||||
|
this._createdAt = wrapper.readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public get id(): number { return this._id; }
|
||||||
|
public get name(): string { return this._name; }
|
||||||
|
public get description(): string { return this._description; }
|
||||||
|
public get ownerId(): number { return this._ownerId; }
|
||||||
|
public get ownerName(): string { return this._ownerName; }
|
||||||
|
public get userCount(): number { return this._userCount; }
|
||||||
|
public get maxUsers(): number { return this._maxUsers; }
|
||||||
|
public get isLocked(): boolean { return this._isLocked; }
|
||||||
|
public get isMuted(): boolean { return this._isMuted; }
|
||||||
|
public get isPublic(): boolean { return this._isPublic; }
|
||||||
|
public get createdAt(): number { return this._createdAt; }
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
import { HousekeepingRoomData } from './HousekeepingRoomData';
|
||||||
|
|
||||||
|
export class HousekeepingRoomDetailParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _found: boolean = false;
|
||||||
|
private _room: HousekeepingRoomData | null = null;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._found = false;
|
||||||
|
this._room = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._found = wrapper.readBoolean();
|
||||||
|
|
||||||
|
if(this._found) this._room = new HousekeepingRoomData(wrapper);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get found(): boolean { return this._found; }
|
||||||
|
public get room(): HousekeepingRoomData | null { return this._room; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
import { HousekeepingRoomData } from './HousekeepingRoomData';
|
||||||
|
|
||||||
|
export class HousekeepingRoomListParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _rooms: HousekeepingRoomData[] = [];
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._rooms = [];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
const count = wrapper.readInt();
|
||||||
|
|
||||||
|
for(let i = 0; i < count; i++) this._rooms.push(new HousekeepingRoomData(wrapper));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get rooms(): HousekeepingRoomData[] { return this._rooms; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { IMessageDataWrapper } from '@nitrots/api';
|
||||||
|
|
||||||
|
export class HousekeepingUserDetailData
|
||||||
|
{
|
||||||
|
private _id: number = 0;
|
||||||
|
private _username: string = '';
|
||||||
|
private _motto: string = '';
|
||||||
|
private _figure: string = '';
|
||||||
|
private _rank: number = 0;
|
||||||
|
private _rankName: string = '';
|
||||||
|
private _online: boolean = false;
|
||||||
|
private _lastOnlineAt: number = 0;
|
||||||
|
private _creditsBalance: number = 0;
|
||||||
|
private _ducketsBalance: number = 0;
|
||||||
|
private _diamondsBalance: number = 0;
|
||||||
|
private _email: string = '';
|
||||||
|
private _ipLast: string = '';
|
||||||
|
private _isBanned: boolean = false;
|
||||||
|
private _isMuted: boolean = false;
|
||||||
|
private _isTradeLocked: boolean = false;
|
||||||
|
|
||||||
|
constructor(wrapper: IMessageDataWrapper)
|
||||||
|
{
|
||||||
|
if(!wrapper) throw new Error('invalid_wrapper');
|
||||||
|
|
||||||
|
this._id = wrapper.readInt();
|
||||||
|
this._username = wrapper.readString();
|
||||||
|
this._motto = wrapper.readString();
|
||||||
|
this._figure = wrapper.readString();
|
||||||
|
this._rank = wrapper.readInt();
|
||||||
|
this._rankName = wrapper.readString();
|
||||||
|
this._online = wrapper.readBoolean();
|
||||||
|
this._lastOnlineAt = wrapper.readInt();
|
||||||
|
this._creditsBalance = wrapper.readInt();
|
||||||
|
this._ducketsBalance = wrapper.readInt();
|
||||||
|
this._diamondsBalance = wrapper.readInt();
|
||||||
|
this._email = wrapper.readString();
|
||||||
|
this._ipLast = wrapper.readString();
|
||||||
|
this._isBanned = wrapper.readBoolean();
|
||||||
|
|
||||||
|
if(wrapper.bytesAvailable) this._isMuted = wrapper.readBoolean();
|
||||||
|
if(wrapper.bytesAvailable) this._isTradeLocked = wrapper.readBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
public get id(): number { return this._id; }
|
||||||
|
public get username(): string { return this._username; }
|
||||||
|
public get motto(): string { return this._motto; }
|
||||||
|
public get figure(): string { return this._figure; }
|
||||||
|
public get rank(): number { return this._rank; }
|
||||||
|
public get rankName(): string { return this._rankName; }
|
||||||
|
public get online(): boolean { return this._online; }
|
||||||
|
public get lastOnlineAt(): number { return this._lastOnlineAt; }
|
||||||
|
public get creditsBalance(): number { return this._creditsBalance; }
|
||||||
|
public get ducketsBalance(): number { return this._ducketsBalance; }
|
||||||
|
public get diamondsBalance(): number { return this._diamondsBalance; }
|
||||||
|
public get email(): string { return this._email; }
|
||||||
|
public get ipLast(): string { return this._ipLast; }
|
||||||
|
public get isBanned(): boolean { return this._isBanned; }
|
||||||
|
public get isMuted(): boolean { return this._isMuted; }
|
||||||
|
public get isTradeLocked(): boolean { return this._isTradeLocked; }
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||||
|
import { HousekeepingUserDetailData } from './HousekeepingUserDetailData';
|
||||||
|
|
||||||
|
export class HousekeepingUserDetailParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _found: boolean = false;
|
||||||
|
private _user: HousekeepingUserDetailData | null = null;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._found = false;
|
||||||
|
this._user = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._found = wrapper.readBoolean();
|
||||||
|
|
||||||
|
if(this._found) this._user = new HousekeepingUserDetailData(wrapper);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get found(): boolean { return this._found; }
|
||||||
|
public get user(): HousekeepingUserDetailData | null { return this._user; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
export * from './HousekeepingActionLogEntryData';
|
||||||
|
export * from './HousekeepingActionLogParser';
|
||||||
|
export * from './HousekeepingActionResultParser';
|
||||||
|
export * from './HousekeepingDashboardParser';
|
||||||
|
export * from './HousekeepingRoomData';
|
||||||
|
export * from './HousekeepingRoomDetailParser';
|
||||||
|
export * from './HousekeepingRoomListParser';
|
||||||
|
export * from './HousekeepingUserDetailData';
|
||||||
|
export * from './HousekeepingUserDetailParser';
|
||||||
@@ -24,6 +24,7 @@ export * from './group/utils';
|
|||||||
export * from './groupforums';
|
export * from './groupforums';
|
||||||
export * from './handshake';
|
export * from './handshake';
|
||||||
export * from './help';
|
export * from './help';
|
||||||
|
export * from './housekeeping';
|
||||||
export * from './inventory';
|
export * from './inventory';
|
||||||
export * from './inventory/achievements';
|
export * from './inventory/achievements';
|
||||||
export * from './inventory/avatareffect';
|
export * from './inventory/avatareffect';
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export class UserProfileParser implements IMessageParser
|
|||||||
private _standId: number;
|
private _standId: number;
|
||||||
private _overlayId: number;
|
private _overlayId: number;
|
||||||
private _cardBackgroundId: number;
|
private _cardBackgroundId: number;
|
||||||
|
private _totalBadges: number;
|
||||||
private _nickIcon: string;
|
private _nickIcon: string;
|
||||||
private _prefixText: string;
|
private _prefixText: string;
|
||||||
private _prefixColor: string;
|
private _prefixColor: string;
|
||||||
@@ -47,6 +48,7 @@ export class UserProfileParser implements IMessageParser
|
|||||||
this._standId = 0;
|
this._standId = 0;
|
||||||
this._overlayId = 0;
|
this._overlayId = 0;
|
||||||
this._cardBackgroundId = 0;
|
this._cardBackgroundId = 0;
|
||||||
|
this._totalBadges = 0;
|
||||||
this._nickIcon = '';
|
this._nickIcon = '';
|
||||||
this._prefixText = '';
|
this._prefixText = '';
|
||||||
this._prefixColor = '';
|
this._prefixColor = '';
|
||||||
@@ -200,6 +202,11 @@ export class UserProfileParser implements IMessageParser
|
|||||||
return this._cardBackgroundId;
|
return this._cardBackgroundId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get totalBadges(): number
|
||||||
|
{
|
||||||
|
return this._totalBadges;
|
||||||
|
}
|
||||||
|
|
||||||
public get nickIcon(): string
|
public get nickIcon(): string
|
||||||
{
|
{
|
||||||
return this._nickIcon;
|
return this._nickIcon;
|
||||||
|
|||||||
Reference in New Issue
Block a user