mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Co-authored-by: Bill <billsonnn@users.noreply.github.com>
This commit is contained in:
parent
7ac70f4ef0
commit
276c3e1b68
File diff suppressed because one or more lines are too long
@ -128,6 +128,7 @@ export class IncomingHeader
|
|||||||
public static CONVERTED_ROOM_ID = 1331;
|
public static CONVERTED_ROOM_ID = 1331;
|
||||||
public static GUEST_ROOM_SEARCH_RESULT = 52;
|
public static GUEST_ROOM_SEARCH_RESULT = 52;
|
||||||
public static NOTIFICATION_LIST = 1992;
|
public static NOTIFICATION_LIST = 1992;
|
||||||
|
public static NOTIFICATION_OFFER_REWARD_DELIVERED = 2125;
|
||||||
public static NOTIFICATION_SIMPLE_ALERT = 5100;
|
public static NOTIFICATION_SIMPLE_ALERT = 5100;
|
||||||
public static NOTIFICATION_ELEMENT_POINTER = 1787;
|
public static NOTIFICATION_ELEMENT_POINTER = 1787;
|
||||||
public static PET_FIGURE_UPDATE = 1924;
|
public static PET_FIGURE_UPDATE = 1924;
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { OfferRewardDeliveredMessageParser } from '../../parser';
|
||||||
|
|
||||||
|
export class OfferRewardDeliveredMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, OfferRewardDeliveredMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): OfferRewardDeliveredMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as OfferRewardDeliveredMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@ export * from './HotelWillShutdownEvent';
|
|||||||
export * from './InfoFeedEnableMessageEvent';
|
export * from './InfoFeedEnableMessageEvent';
|
||||||
export * from './MOTDNotificationEvent';
|
export * from './MOTDNotificationEvent';
|
||||||
export * from './NotificationDialogMessageEvent';
|
export * from './NotificationDialogMessageEvent';
|
||||||
|
export * from './OfferRewardDeliveredMessageEvent';
|
||||||
export * from './PetLevelNotificationEvent';
|
export * from './PetLevelNotificationEvent';
|
||||||
export * from './PetPlacingErrorEvent';
|
export * from './PetPlacingErrorEvent';
|
||||||
export * from './SimpleAlertMessageEvent';
|
export * from './SimpleAlertMessageEvent';
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class OfferRewardDeliveredMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _contentType: string;
|
||||||
|
private _classId: number;
|
||||||
|
private _name: string;
|
||||||
|
private _description: string;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._contentType = null;
|
||||||
|
this._classId = 0;
|
||||||
|
this._name = null;
|
||||||
|
this._description = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._contentType = wrapper.readString();
|
||||||
|
this._classId = wrapper.readInt();
|
||||||
|
this._name = wrapper.readString();
|
||||||
|
this._description = wrapper.readString();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get contentType(): string
|
||||||
|
{
|
||||||
|
return this._contentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get classId(): number
|
||||||
|
{
|
||||||
|
return this._classId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get name(): string
|
||||||
|
{
|
||||||
|
return this._name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get description(): string
|
||||||
|
{
|
||||||
|
return this._description;
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,7 @@ export * from './HotelWillShutdownParser';
|
|||||||
export * from './InfoFeedEnableMessageParser';
|
export * from './InfoFeedEnableMessageParser';
|
||||||
export * from './MOTDNotificationParser';
|
export * from './MOTDNotificationParser';
|
||||||
export * from './NotificationDialogMessageParser';
|
export * from './NotificationDialogMessageParser';
|
||||||
|
export * from './OfferRewardDeliveredMessageParser';
|
||||||
export * from './PetLevelNotificationParser';
|
export * from './PetLevelNotificationParser';
|
||||||
export * from './PetPlacingErrorEventParser';
|
export * from './PetPlacingErrorEventParser';
|
||||||
export * from './SimpleAlertMessageParser';
|
export * from './SimpleAlertMessageParser';
|
||||||
|
Loading…
Reference in New Issue
Block a user