This commit is contained in:
Bill 2021-10-21 23:20:23 -04:00
commit ec818935f5
12 changed files with 23 additions and 97 deletions

View File

@ -91,7 +91,7 @@ import { MarketplaceItemStatsEvent } from './messages/incoming/marketplace/Marke
import { MarketplaceMakeOfferResult } from './messages/incoming/marketplace/MarketplaceMakeOfferResult';
import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/MarketplaceOffersEvent';
import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent';
import { CfhChatlogEvent, IssueDeletedMessageEvent, IssueInfoMessageEvent, IssuePickFailedMessageEvent, ModeratorActionResultMessageEvent, ModeratorInitMessageEvent, ModeratorMessageEvent, ModeratorRoomInfoEvent, ModeratorUserInfoEvent, RoomChatlogEvent, RoomVisitsEvent, UserBannedMessageEvent, UserChatlogEvent } from './messages/incoming/moderation';
import { CfhChatlogEvent, IssueDeletedMessageEvent, IssueInfoMessageEvent, IssuePickFailedMessageEvent, ModeratorActionResultMessageEvent, ModeratorInitMessageEvent, ModeratorMessageEvent, ModeratorRoomInfoEvent, ModeratorToolPreferencesEvent, ModeratorUserInfoEvent, RoomChatlogEvent, RoomVisitsEvent, UserBannedMessageEvent, UserChatlogEvent } from './messages/incoming/moderation';
import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent';
import { NavigatorCategoriesEvent } from './messages/incoming/navigator/NavigatorCategoriesEvent';
import { NavigatorCollapsedEvent } from './messages/incoming/navigator/NavigatorCollapsedEvent';
@ -672,6 +672,7 @@ export class NitroMessages implements IMessageConfiguration
this._events.set(IncomingHeader.ISSUE_PICK_FAILED, IssuePickFailedMessageEvent);
this._events.set(IncomingHeader.MODERATOR_ACTION_RESULT, ModeratorActionResultMessageEvent);
this._events.set(IncomingHeader.MODERATOR_MESSAGE, ModeratorMessageEvent);
this._events.set(IncomingHeader.MODERATOR_TOOL_PREFERENCES, ModeratorToolPreferencesEvent);
// MYSTERY BOX
this._events.set(IncomingHeader.MYSTERY_BOX_KEYS, MysteryBoxKeysEvent);

View File

@ -221,6 +221,7 @@ export class IncomingHeader
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;

View File

@ -19,7 +19,7 @@ export class CallForHelpCategoryData implements INamed, IDisposable
{
this._topics.push(new CallForHelpTopicData(wrapper));
count++;
count--;
}
}

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,44 +0,0 @@
import { IMessageDataWrapper } from '../../../../../core';
export class CallForHelpCategoryData
{
private _name: string;
private _topics: CallForHelpTopicData[];
constructor(wrapper: IMessageDataWrapper)
{
this._topics = [];
this._name = wrapper.readString();
const count = wrapper.readInt();
let i = 0;
while(i < count)
{
const name = wrapper.readString();
const id = wrapper.readInt();
const unknown = wrapper.readString();
this._topics.push({
name,
id,
consequence: unknown
});
i++;
}
}
public get topics(): CallForHelpTopicData[]
{
return this._topics;
}
public get name(): string
{
return this._name;
}
}
interface CallForHelpTopicData {
name: string;
id: number;
consequence: string;
}

View File

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

View File

@ -1,5 +1,3 @@
export * from './CallForHelpCategoryData';
export * from './CallForHelpDisabledNotifyMessageEvent';
export * from './CallForHelpResultMessageEvent';
export * from './CfhTopicsInitEvent';
export * from './TalentTrackEvent';

View File

@ -2,6 +2,7 @@ export * from './advertisement';
export * from './availability';
export * from './avatar';
export * from './bots';
export * from './callforhelp';
export * from './camera';
export * from './catalog';
export * from './client';

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

@ -11,6 +11,7 @@ export * from './ModeratorCautionEvent';
export * from './ModeratorInitMessageEvent';
export * from './ModeratorMessageEvent';
export * from './ModeratorRoomInfoEvent';
export * from './ModeratorToolPreferencesEvent';
export * from './ModeratorUserInfoData';
export * from './ModeratorUserInfoEvent';
export * from './ModRoomData';

View File

@ -1,31 +0,0 @@
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
import { CallForHelpCategoryData } from '../../incoming/help/CallForHelpCategoryData';
export class CfhTopicsInitMessageParser implements IMessageParser
{
private _callForHelpCategories: CallForHelpCategoryData[];
public flush(): boolean
{
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
this._callForHelpCategories = [];
const count = wrapper.readInt();
let i = 0;
while(i < count)
{
this._callForHelpCategories.push(new CallForHelpCategoryData(wrapper));
i++;
}
return true;
}
public get callForHelpCategories(): CallForHelpCategoryData[]
{
return this._callForHelpCategories;
}
}

View File

@ -1,5 +1,4 @@
export * from './CallForHelpDisabledNotifyMessageParser';
export * from './CallForHelpResultMessageParser';
export * from './CfhTopicsInitMessageParser';
export * from './common';
export * from './TalentTrackParser';