Merge branch 'dev' into avatar-grayscale

This commit is contained in:
dank074 2021-12-08 00:14:11 -06:00
commit 41da5e68fa
491 changed files with 8622 additions and 4192 deletions

715
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,26 +5,26 @@
"type": "git",
"url": "https://git.krews.org/nitro/nitro-renderer"
},
"main": "./index.ts",
"scripts": {
"compile": "tsc --project ./tsconfig.json",
"eslint": "eslint ./src --fix"
},
"private": true,
"dependencies": {
"@pixi/canvas-renderer": "^6.1.0",
"@pixi/extract": "^6.1.0",
"@pixi/canvas-renderer": "^6.1.3",
"@pixi/extract": "^6.1.3",
"@pixi/filter-adjustment": "^4.1.3",
"@pixi/tilemap": "^3.2.2",
"pako": "^2.0.4",
"pixi.js": "^6.1.0",
"tslib": "^2.3.0"
"pixi.js": "^6.1.3",
"tslib": "^2.3.1"
},
"devDependencies": {
"@types/node": "^14.17.7",
"@types/pako": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"create-ts-index": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"typescript": "^4.3.5"
"typescript": "^4.4.4"
}
}

View File

@ -9,15 +9,6 @@ export class BinaryReader
this._dataView = new DataView(buffer);
}
public readByte(): number
{
const byte = this._dataView.getInt8(this._position);
this._position++;
return byte;
}
public readBytes(length: number): BinaryReader
{
const buffer = new BinaryReader(this._dataView.buffer.slice(this._position, this._position + length));
@ -27,6 +18,15 @@ export class BinaryReader
return buffer;
}
public readByte(): number
{
const byte = this._dataView.getInt8(this._position);
this._position++;
return byte;
}
public readShort(): number
{
const short = this._dataView.getInt16(this._position);
@ -45,6 +45,24 @@ export class BinaryReader
return int;
}
public readFloat(): number
{
const float = this._dataView.getFloat32(this._position);
this._position += 4;
return float;
}
public readDouble(): number
{
const double = this._dataView.getFloat64(this._position);
this._position += 8;
return double;
}
public remaining(): number
{
return this._dataView.byteLength - this._position;
@ -59,4 +77,4 @@ export class BinaryReader
{
return this._dataView.buffer;
}
}
}

View File

@ -12,13 +12,6 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
this._buffer = buffer;
}
public readByte(): number
{
if(!this._buffer) return -1;
return this._buffer.readByte();
}
public readBytes(length: number): BinaryReader
{
if(!this._buffer) return null;
@ -26,6 +19,13 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
return this._buffer.readBytes(length);
}
public readByte(): number
{
if(!this._buffer) return -1;
return this._buffer.readByte();
}
public readBoolean(): boolean
{
return (this.readByte() === 1);
@ -45,6 +45,20 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
return this._buffer.readInt();
}
public readFloat(): number
{
if(!this._buffer) return -1;
return this._buffer.readFloat();
}
public readDouble(): number
{
if(!this._buffer) return -1;
return this._buffer.readDouble();
}
public readString(): string
{
const length = this.readShort();
@ -62,4 +76,4 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
{
return (this._buffer && (this._buffer.remaining() > 0));
}
}
}

View File

@ -7,7 +7,9 @@ export interface IMessageDataWrapper
readBoolean(): boolean;
readShort(): number;
readInt(): number;
readFloat(): number;
readDouble(): number;
readString(): string;
header: number;
bytesAvailable: boolean;
}
}

View File

@ -0,0 +1,4 @@
import { Spritesheet } from '@pixi/spritesheet';
export class NitroSpritesheet extends Spritesheet
{}

View File

@ -8,7 +8,9 @@ export * from './NitroPoint';
export * from './NitroRectangle';
export * from './NitroRenderTexture';
export * from './NitroSprite';
export * from './NitroSpritesheet';
export * from './NitroTexture';
export * from './PixiApplicationProxy';
export * from './PixiInteractionEventProxy';
export * from './PixiLoaderProxy';
export * from './tilemap';

View File

@ -0,0 +1,6 @@
import { Tilemap } from '@pixi/tilemap';
export class NitroTilemap extends Tilemap
{
}

View File

@ -0,0 +1,2 @@
export { POINT_STRUCT_SIZE } from '@pixi/tilemap';
export * from './NitroTilemap';

View File

@ -12,6 +12,7 @@ import { TilingSpriteRenderer } from '@pixi/sprite-tiling';
import { SpritesheetLoader } from '@pixi/spritesheet';
import { BitmapFontLoader } from '@pixi/text-bitmap';
import { TickerPlugin } from '@pixi/ticker';
import { TileRenderer } from '@pixi/tilemap';
Renderer.registerPlugin('accessibility', AccessibilityManager);
Renderer.registerPlugin('extract', Extract);
@ -20,6 +21,7 @@ Renderer.registerPlugin('particle', ParticleRenderer);
Renderer.registerPlugin('prepare', Prepare);
Renderer.registerPlugin('batch', BatchRenderer);
Renderer.registerPlugin('tilingSprite', TilingSpriteRenderer);
Renderer.registerPlugin('tilemap', TileRenderer);
Loader.registerPlugin(BitmapFontLoader);
Loader.registerPlugin(CompressedTextureLoader);

View File

@ -562,12 +562,6 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
const container = new NitroContainer();
const sprite = new NitroSprite(Texture.EMPTY);
sprite.width = avatarCanvas.width;
sprite.height = avatarCanvas.height;
container.addChild(sprite);
let partCount = (setTypes.length - 1);
@ -615,7 +609,9 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
partCount--;
}
const image = TextureUtils.generateImage(container);
const texture = TextureUtils.generateTexture(container, new Rectangle(0, 0, avatarCanvas.width, avatarCanvas.height));
const image = TextureUtils.generateImage(texture);
if(!image) return null;

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,10 @@ import { Nitro } from '../../Nitro';
import { INitroCommunicationManager } from '../INitroCommunicationManager';
import { ClientPingEvent } from '../messages/incoming/client/ClientPingEvent';
import { AuthenticatedEvent } from '../messages/incoming/security/AuthenticatedEvent';
import { ClientPongComposer } from '../messages/outgoing/client/ClientPongComposer';
import { ClientReleaseVersionComposer } from '../messages/outgoing/client/ClientReleaseVersionComposer';
import { InfoRetrieveBaseMessageComposer } from '../messages/outgoing/handshake/InfoRetrieveBaseMessageComposer';
import { SecurityTicketComposer } from '../messages/outgoing/handshake/SecurityTicketComposer';
import { ClientHelloMessageComposer } from '../messages/outgoing/handshake/ClientHelloMessageComposer';
import { InfoRetrieveMessageComposer } from '../messages/outgoing/handshake/InfoRetrieveMessageComposer';
import { PongMessageComposer } from '../messages/outgoing/handshake/PongMessageComposer';
import { SSOTicketMessageComposer } from '../messages/outgoing/handshake/SSOTicketMessageComposer';
import { NitroCommunicationDemoEvent } from './NitroCommunicationDemoEvent';
export class NitroCommunicationDemo extends NitroManager
@ -88,7 +88,7 @@ export class NitroCommunicationDemo extends NitroManager
this.startHandshake(connection);
connection.send(new ClientReleaseVersionComposer(null, null, null, null));
connection.send(new ClientHelloMessageComposer(null, null, null, null));
this.tryAuthentication(connection);
}
@ -129,7 +129,7 @@ export class NitroCommunicationDemo extends NitroManager
return;
}
connection.send(new SecurityTicketComposer(this._sso, Nitro.instance.time));
connection.send(new SSOTicketMessageComposer(this._sso, Nitro.instance.time));
}
private onClientPingEvent(event: ClientPingEvent): void
@ -149,7 +149,7 @@ export class NitroCommunicationDemo extends NitroManager
//event.connection.send(new UserHomeRoomComposer(555));
event.connection.send(new InfoRetrieveBaseMessageComposer());
event.connection.send(new InfoRetrieveMessageComposer());
}
public setSSO(sso: string): void
@ -195,7 +195,7 @@ export class NitroCommunicationDemo extends NitroManager
if(!connection) return;
connection.send(new ClientPongComposer());
connection.send(new PongMessageComposer());
}
private dispatchCommunicationDemoEvent(type: string, connection: IConnection): void

View File

@ -14,7 +14,7 @@ export class IncomingHeader
public static PRODUCT_OFFER = 3388;
public static LIMITED_SOLD_OUT = 377;
public static CATALOG_PUBLISHED = 1866;
public static CFH_RESULT_MESSAGE = 934;
public static CFH_RESULT_MESSAGE = 3635;
public static CLIENT_LATENCY = 10;
public static CLIENT_PING = 3928;
public static DESKTOP_CAMPAIGN = 1745;
@ -30,14 +30,15 @@ export class IncomingHeader
public static FURNITURE_FLOOR_UPDATE = 3776;
public static FURNITURE_ITEMDATA = 2202;
public static FURNITURE_STATE = 2376;
public static FURNITURE_GROUP_CONTEXT_MENU_INFO= 3293;
public static FURNITURE_GROUP_CONTEXT_MENU_INFO = 3293;
public static FURNITURE_POSTIT_STICKY_POLE_OPEN = 2366;
public static GAME_CENTER_ACHIEVEMENTS = 2265;
public static GAME_CENTER_GAME_LIST = 222;
public static GAME_CENTER_STATUS = 2893;
public static GENERIC_ALERT = 3801;
public static MODERATOR_MESSAGE = 2030;
public static GENERIC_ERROR = 1600;
public static GIFT_WRAPPER_CONFIG = 2234;
public static GIFT_WRAPPER_CONFIG = 2234;
public static GROUP_BADGES = 2402;
public static GROUP_CREATE_OPTIONS = 2159;
public static GROUP_FORUM_INFO = 3011;
@ -49,6 +50,7 @@ export class IncomingHeader
public static GROUP_MEMBERS = 1200;
public static GROUP_MEMBERS_REFRESH = 2445;
public static GROUP_MEMBER_REMOVE_CONFIRM = 1876;
public static GROUP_PURCHASED = 2808;
public static GROUP_SETTINGS = 3965;
public static GROUP_BADGE_PARTS = 2238;
public static ITEM_DIMMER_SETTINGS = 2710;
@ -81,7 +83,6 @@ export class IncomingHeader
public static MESSENGER_UPDATE = 2800;
public static MODERATION_REPORT_DISABLED = 1651;
public static MODERATION_TOOL = 2696;
public static MODERATION_TOPICS = 325;
public static MODERATION_USER_INFO = 2866;
public static MOTD_MESSAGES = 2035;
public static NAVIGATOR_CATEGORIES = 1562;
@ -167,7 +168,6 @@ export class IncomingHeader
public static USER_BADGES = 717;
public static USER_BADGES_ADD = 2493;
public static USER_BADGES_CURRENT = 1087;
public static USER_BOT_ADD = 1352;
public static USER_BOT_REMOVE = 233;
public static USER_BOTS = 3086;
public static USER_CHANGE_NAME = 118;
@ -215,12 +215,18 @@ export class IncomingHeader
public static MODTOOL_ROOM_INFO = 1333;
public static MODTOOL_USER_CHATLOG = 3377;
public static MODTOOL_ROOM_CHATLOG = 3434;
public static MODTOOL_VISITED_ROOMS_USER = 1752;
public static MODERATOR_ACTION_RESULT = 2335;
public static ISSUE_DELETED = 3192;
public static ISSUE_INFO = 3609;
public static ISSUE_PICK_FAILED = 3150;
public static CFH_CHATLOG = 607;
public static MODERATOR_TOOL_PREFERENCES = 1576;
public static LOVELOCK_FURNI_START = 3753;
public static LOVELOCK_FURNI_FRIEND_COMFIRMED = 382;
public static LOVELOCK_FURNI_FINISHED = 770;
public static GIFT_RECEIVER_NOT_FOUND = 1517;
public static GIFT_OPENED = 56;
public static HOTEL_WILL_SHUTDOWN = 1050;
public static FLOOD_CONTROL = 566;
public static REMAINING_MUTE = 826;
public static USER_EFFECT_LIST = 340;
@ -230,7 +236,6 @@ export class IncomingHeader
public static CLUB_GIFT_INFO = 619;
public static REDEEM_VOUCHER_ERROR = 714;
public static REDEEM_VOUCHER_OK = 3336;
public static MODTOOL_VISITED_ROOMS_USER = 1752;
public static IN_CLIENT_LINK = 2023;
public static BOT_COMMAND_CONFIGURATION = 1618;
public static HAND_ITEM_RECEIVED = 354;
@ -314,4 +319,48 @@ export class IncomingHeader
public static COMPETITION_USER_PART_OF = 3841;
public static COMPETITION_NO_OWNED_ROOMS = 2064;
public static COMPETITION_SECONDS_UNTIL = 3926;
public static BADGE_POINT_LIMITS = 2501;
public static BADGE_REQUEST_FULFILLED = 2998;
public static HELPER_TALENT_TRACK = 3406;
public static USER_BANNED = 1683;
public static BOT_RECEIVED = 3684;
public static PET_LEVEL_NOTIFICATION = 859;
public static PET_RECEIVED = 1111;
public static MODERATION_CAUTION = 1890;
public static YOUTUBE_CONTROL_VIDEO = 1554;
public static YOUTUBE_DISPLAY_PLAYLISTS = 1112;
public static YOUTUBE_DISPLAY_VIDEO = 1411;
public static CFH_DISABLED_NOTIFY = 1651;
public static QUESTION = 2665;
public static POLL_CONTENTS = 2997;
public static POLL_ERROR = 662;
public static POLL_OFFER = 3785;
public static QUESTION_ANSWERED = 2589;
public static QUESTION_FINISHED = 1066;
public static CFH_PENDING_CALLS = 1121;
public static GUIDE_ON_DUTY_STATUS = 1548;
public static GUIDE_SESSION_ATTACHED = 1591;
public static GUIDE_SESSION_DETACHED = 138;
public static GUIDE_SESSION_ENDED = 1456;
public static GUIDE_SESSION_ERROR = 673;
public static GUIDE_SESSION_INVITED_TO_GUIDE_ROOM = 219;
public static GUIDE_SESSION_MESSAGE = 841;
public static GUIDE_SESSION_PARTNER_IS_TYPING = 1016;
public static GUIDE_SESSION_REQUESTER_ROOM = 1847;
public static GUIDE_SESSION_STARTED = 3209;
public static GUIDE_TICKET_CREATION_RESULT = 3285;
public static GUIDE_TICKET_RESOLUTION = 2674;
public static GUIDE_REPORTING_STATUS = 3463;
public static HOTEL_MERGE_NAME_CHANGE = 1663;
public static ISSUE_CLOSE_NOTIFICATION = 934;
public static QUIZ_DATA = 2927;
public static QUIZ_RESULTS = 2772;
public static CFH_PENDING_CALLS_DELETED = 77;
public static CFH_REPLY = 3796;
public static CHAT_REVIEW_SESSION_DETACHED = 30;
public static CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE = 735;
public static CHAT_REVIEW_SESSION_RESULTS = 3276;
public static CHAT_REVIEW_SESSION_STARTED = 143;
public static CHAT_REVIEW_SESSION_VOTING_STATUS = 1829;
public static SCR_SEND_KICKBACK_INFO = 3277;
}

View File

@ -1,6 +1,6 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { BotAddedToInventoryParser } from '../../../parser/inventory/bots/BotAddedToInventoryParser';
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { BotAddedToInventoryParser } from '../../parser/bots/BotAddedToInventoryParser';
export class BotAddedToInventoryEvent extends MessageEvent implements IMessageEvent
{

View File

@ -1,6 +1,6 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { BotInventoryMessageParser } from '../../../parser/inventory/bots/BotInventoryMessageParser';
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { BotInventoryMessageParser } from '../../parser/bots/BotInventoryMessageParser';
export class BotInventoryMessageEvent extends MessageEvent implements IMessageEvent
{

View File

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

View File

@ -1,6 +1,6 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { BotRemovedFromInventoryParser } from '../../../parser/inventory/bots/BotRemovedFromInventoryParser';
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { BotRemovedFromInventoryParser } from '../../parser/bots/BotRemovedFromInventoryParser';
export class BotRemovedFromInventoryEvent extends MessageEvent implements IMessageEvent
{

View File

@ -1,4 +1,4 @@
export * from './BotAddedToInventoryEvent';
export * from './BotInventoryEvent';
export * from './BotInventoryMessageEvent';
export * from './BotReceivedMessageEvent';
export * from './BotRemovedFromInventoryEvent';

View File

@ -19,7 +19,7 @@ export class CallForHelpCategoryData implements INamed, IDisposable
{
this._topics.push(new CallForHelpTopicData(wrapper));
count++;
count--;
}
}
@ -41,7 +41,7 @@ export class CallForHelpCategoryData implements INamed, IDisposable
return this._name;
}
public get _Str_14841(): CallForHelpTopicData[]
public get topics(): CallForHelpTopicData[]
{
return this._topics;
}

View File

@ -24,7 +24,7 @@ export class CallForHelpTopicData implements INamed
return this._id;
}
public get _Str_26337(): string
public get consequence(): string
{
return this._consequence;
}

View File

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

View File

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

View File

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

View File

@ -1,6 +1,8 @@
export * from './GroupBadgePartsEvent';
export * from './GroupBadgesEvent';
export * from './GroupBuyDataEvent';
export * from './GroupConfirmMemberRemoveEvent';
export * from './GroupInformationEvent';
export * from './GroupMembersEvent';
export * from './GroupPurchasedEvent';
export * from './GroupSettingsEvent';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1 +1,26 @@
export * from './CallForHelpDisabledNotifyMessageEvent';
export * from './CallForHelpPendingCallsDeletedMessageEvent';
export * from './CallForHelpPendingCallsMessageEvent';
export * from './CallForHelpReplyMessageEvent';
export * from './CallForHelpResultMessageEvent';
export * from './ChatReviewSessionDetachedMessageEvent';
export * from './ChatReviewSessionOfferedToGuideMessageEvent';
export * from './ChatReviewSessionResultsMessageEvent';
export * from './ChatReviewSessionStartedMessageEvent';
export * from './ChatReviewSessionVotingStatusMessageEvent';
export * from './GuideOnDutyStatusMessageEvent';
export * from './GuideSessionAttachedMessageEvent';
export * from './GuideSessionDetachedMessageEvent';
export * from './GuideSessionEndedMessageEvent';
export * from './GuideSessionErrorMessageEvent';
export * from './GuideSessionInvitedToGuideRoomMessageEvent';
export * from './GuideSessionMessageMessageEvent';
export * from './GuideSessionPartnerIsTypingMessageEvent';
export * from './GuideSessionRequesterRoomMessageEvent';
export * from './GuideSessionStartedMessageEvent';
export * from './GuideTicketCreationResultMessageEvent';
export * from './GuideTicketResolutionMessageEvent';
export * from './HotelMergeNameChangeEvent';
export * from './IssueCloseNotificationMessageEvent';
export * from './QuizDataMessageEvent';
export * from './QuizResultsMessageEvent';

View File

@ -1,7 +1,10 @@
export * from './advertisement';
export * from './availability';
export * from './avatar';
export * from './bots';
export * from './callforhelp';
export * from './camera';
export * from './campaign';
export * from './catalog';
export * from './client';
export * from './desktop';
@ -15,7 +18,6 @@ export * from './inventory';
export * from './inventory/achievements';
export * from './inventory/avatareffect';
export * from './inventory/badges';
export * from './inventory/bots';
export * from './inventory/clothes';
export * from './inventory/furni';
export * from './inventory/furni/gifts';
@ -23,10 +25,12 @@ export * from './inventory/pets';
export * from './inventory/trading';
export * from './landingview';
export * from './marketplace';
export * from './modtool';
export * from './moderation';
export * from './mysterybox';
export * from './navigator';
export * from './notifications';
export * from './perk';
export * from './poll';
export * from './quest';
export * from './room';
export * from './room/access';
@ -46,6 +50,7 @@ export * from './room/unit/chat';
export * from './roomevents';
export * from './security';
export * from './sound';
export * from './talent';
export * from './user';
export * from './user/access';
export * from './user/data';

View File

@ -1,6 +1,7 @@
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
import { IsBadgeRequestFulfilledParser } from '../../../parser/inventory/badges/IsBadgeRequestFulfilledParser';
export class IsBadgeRequestFulfilledEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)

View File

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

View File

@ -1,7 +1,6 @@
export * from './achievements';
export * from './avatareffect';
export * from './badges';
export * from './bots';
export * from './clothes';
export * from './furni';
export * from './pets';

View File

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

View File

@ -1,3 +1,4 @@
export * from './PetAddedToInventoryEvent';
export * from './PetInventoryEvent';
export * from './PetReceivedMessageEvent';
export * from './PetRemovedFromInventoryEvent';

View File

@ -0,0 +1,45 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { ChatRecordData } from './ChatRecordData';
export class CfhChatlogData
{
private _issueId: number;
private _callerUserId: number;
private _reportedUserId: number;
private _chatRecordId: number;
private _chatRecord: ChatRecordData
constructor(k:IMessageDataWrapper)
{
this._issueId = k.readInt();
this._callerUserId = k.readInt();
this._reportedUserId = k.readInt();
this._chatRecordId = k.readInt();
this._chatRecord = new ChatRecordData(k);
}
public get issueId(): number
{
return this._issueId;
}
public get callerUserId(): number
{
return this._callerUserId;
}
public get reportedUserId(): number
{
return this._reportedUserId;
}
public get chatRecordId(): number
{
return this._chatRecordId;
}
public get chatRecord(): ChatRecordData
{
return this._chatRecord;
}
}

View File

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

View File

@ -0,0 +1,110 @@
import { IMessageDataWrapper } from '../../../../..';
import { ChatlineData } from './ChatlineData';
export class ChatRecordData
{
public static readonly TYPE_SIMPLE = 0;
public static readonly TYPE_ROOM_CHAT = 1;
public static readonly TYPE_IM_SESSION = 2;
public static readonly TYPE_DISCUSSION_THREAD = 3;
public static readonly TYPE_DISCUSSION_MESSAGE = 4;
public static readonly TYPE_SELFIE = 5;
public static readonly TYPE_PHOTO = 6;
private _recordType:number;
private _context:Map<string, any>;
private _chatlog:ChatlineData[];
constructor(wrapper: IMessageDataWrapper)
{
this._context = new Map();
this._chatlog = [];
this._recordType = wrapper.readByte();
const contextCount = wrapper.readShort();
for(let i = 0; i < contextCount; i++)
{
const key = wrapper.readString();
const type = wrapper.readByte();
switch(type)
{
case 0:
this._context.set(key, wrapper.readBoolean());
break;
case 1:
this._context.set(key, wrapper.readInt());
break;
case 2:
this._context.set(key, wrapper.readString());
break;
default:
throw new Error('Unknown data type ' + type);
}
}
const chatCount = wrapper.readShort();
for(let i = 0; i < chatCount; i++)
{
const timestamp = wrapper.readString();
const habboId = wrapper.readInt();
const username = wrapper.readString();
const message = wrapper.readString();
const hasHighlighting = wrapper.readBoolean();
this._chatlog.push(new ChatlineData(timestamp, habboId, username, message, hasHighlighting));
}
}
public get recordType():number
{
return this._recordType;
}
public get context():Map<string, any>
{
return this._context;
}
public get chatlog():ChatlineData[]
{
return this._chatlog;
}
public get roomId():number
{
return this.getInt('roomId');
}
public get roomName():string
{
return this._context.get('roomName') as string;
}
public get groupId():number
{
return this.getInt('groupId');
}
public get threadId():number
{
return this.getInt('threadId');
}
public get messageId(): number
{
return this.getInt('messageId');
}
private getInt(k:string): number
{
const value = this._context.get(k);
if(!value)
{
return 0;
}
return value as number;
}
}

View File

@ -1,20 +1,18 @@
import { IChatlog } from './IChatlog';
export class ModtoolRoomChatlogLine implements IChatlog
export class ChatlineData
{
private readonly _timestamp: string;
private readonly _habboId: number;
private readonly _username: string;
private readonly _message: string;
private _boolean: boolean;
private readonly _hasHighlighting: boolean;
constructor(timestamp: string, habboId: number, username: string, message: string, boolean: boolean)
constructor(timestamp: string, habboId: number, username: string, message: string, hasHighlighting: boolean)
{
this._timestamp = timestamp;
this._habboId = habboId;
this._username = username;
this._message = message;
this._boolean = boolean;
this._hasHighlighting = hasHighlighting;
}
public get timestamp(): string
@ -36,4 +34,9 @@ export class ModtoolRoomChatlogLine implements IChatlog
{
return this._message;
}
public get hasHighlighting(): boolean
{
return this._hasHighlighting;
}
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,65 @@
import { IDisposable } from '../../../../../core/common/disposable/IDisposable';
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
export class ModRoomData implements IDisposable
{
private _exists:boolean;
private _name:string;
private _desc:string;
private _tags:string[];
private _disposed:boolean;
constructor(k:IMessageDataWrapper)
{
this._tags = [];
this._exists = k.readBoolean();
if(!this.exists)
{
return;
}
this._name = k.readString();
this._desc = k.readString();
const tagCount = k.readInt();
for(let i = 0; i < tagCount; i++)
{
this._tags.push(k.readString());
}
}
public get name():string
{
return this._name;
}
public get desc():string
{
return this._desc;
}
public get tags():string[]
{
return this._tags;
}
public get exists():boolean
{
return this._exists;
}
public get disposed():boolean
{
return this._disposed;
}
public dispose():void
{
if(this._disposed)
{
return;
}
this._disposed = true;
this._tags = null;
}
}

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { ModeratorMessageParser } from '../../parser/notifications/ModeratorMessageParser';
import { ModeratorMessageParser } from '../../parser/moderation/ModeratorMessageParser';
export class ModeratorMessageEvent extends MessageEvent implements IMessageEvent
{

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { IMessageDataWrapper } from '../../../../../../core';
import { IMessageDataWrapper } from '../../../../../core';
export class ModeratorUserInfoData
{

View File

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

View File

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

View File

@ -0,0 +1,73 @@
import { IDisposable } from '../../../../../core/common/disposable/IDisposable';
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { ModRoomData } from './ModRoomData';
export class RoomModerationData implements IDisposable
{
private _flatId:number;
private _userCount:number;
private _ownerInRoom:boolean;
private _ownerId:number;
private _ownerName:string;
private _room:ModRoomData;
private _disposed:boolean;
constructor(k:IMessageDataWrapper)
{
this._flatId = k.readInt();
this._userCount = k.readInt();
this._ownerInRoom = k.readBoolean();
this._ownerId = k.readInt();
this._ownerName = k.readString();
this._room = new ModRoomData(k);
}
public get flatId():number
{
return this._flatId;
}
public get userCount():number
{
return this._userCount;
}
public get ownerInRoom():boolean
{
return this._ownerInRoom;
}
public get ownerId():number
{
return this._ownerId;
}
public get ownerName():string
{
return this._ownerName;
}
public get room():ModRoomData
{
return this._room;
}
public get disposed():boolean
{
return this._disposed;
}
public dispose():void
{
if(this._disposed)
{
return;
}
this._disposed = true;
if(this._room != null)
{
this._room.dispose();
this._room = null;
}
}
}

View File

@ -1,4 +1,4 @@
import { IMessageDataWrapper } from '../../../../../../core';
import { IMessageDataWrapper } from '../../../../../core';
export class RoomVisitData
{

View File

@ -1,8 +1,7 @@
import { IMessageDataWrapper } from '../../../../../../core';
import { IMessageDataWrapper } from '../../../../../core';
import { RoomVisitData } from './RoomVisitData';
export class ModtoolRoomVisitedData
export class RoomVisitsData
{
private _userId: number;
private _userName: string;

View File

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

View File

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

View File

@ -0,0 +1,35 @@
import { IMessageDataWrapper } from '../../../../..';
import { ChatRecordData } from './ChatRecordData';
export class UserChatlogData
{
private _userId: number;
private _username: string;
private _roomChatlogs: ChatRecordData[] = [];
constructor(wrapper: IMessageDataWrapper)
{
this._userId = wrapper.readInt();
this._username = wrapper.readString();
const size = wrapper.readInt();
for(let i = 0; i < size; i++)
{
this._roomChatlogs.push(new ChatRecordData(wrapper));
}
}
public get userId(): number
{
return this._userId;
}
public get username(): string
{
return this._username;
}
public get roomChatlogs(): ChatRecordData[]
{
return this._roomChatlogs;
}
}

View File

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

View File

@ -1 +1,25 @@
export * from './CfhChatlogData';
export * from './CfhChatlogEvent';
export * from './ChatlineData';
export * from './ChatRecordData';
export * from './INamed';
export * from './IssueDeletedMessageEvent';
export * from './IssueInfoMessageEvent';
export * from './IssuePickFailedMessageEvent';
export * from './ModeratorActionResultMessageEvent';
export * from './ModeratorCautionEvent';
export * from './ModeratorInitMessageEvent';
export * from './ModeratorMessageEvent';
export * from './ModeratorRoomInfoEvent';
export * from './ModeratorToolPreferencesEvent';
export * from './ModeratorUserInfoData';
export * from './ModeratorUserInfoEvent';
export * from './ModRoomData';
export * from './RoomChatlogEvent';
export * from './RoomModerationData';
export * from './RoomVisitData';
export * from './RoomVisitsData';
export * from './RoomVisitsEvent';
export * from './UserBannedMessageEvent';
export * from './UserChatlogData';
export * from './UserChatlogEvent';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +0,0 @@
export * from './ModtoolCallForHelpTopicsEvent';
export * from './ModtoolMainEvent';
export * from './ModtoolReceivedRoomsUserEvent';
export * from './ModtoolRoomChatlogEvent';
export * from './ModtoolRoomInfoEvent';
export * from './ModtoolUserChatlogEvent';
export * from './ModtoolUserInfoEvent';

View File

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

View File

@ -6,8 +6,8 @@ export * from './ClubGiftNotificationEvent';
export * from './HabboBroadcastMessageEvent';
export * from './HotelWillShutdownEvent';
export * from './InfoFeedEnableMessageEvent';
export * from './ModeratorMessageEvent';
export * from './MOTDNotificationEvent';
export * from './NotificationDialogMessageEvent';
export * from './PetLevelNotificationEvent';
export * from './PetPlacingErrorEvent';
export * from './UnseenItemsEvent';

View File

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

View File

@ -0,0 +1 @@
export * from './PerkAllowancesMessageEvent';

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More