mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Merge branch 'recycler-finished-status' of https://github.com/oobjectt/nitro-renderer into oobjectt-recycler-finished-status
This commit is contained in:
commit
945e6ab6d1
File diff suppressed because one or more lines are too long
@ -136,6 +136,8 @@ export class IncomingHeader
|
|||||||
public static PET_NEST_BREEDING_SUCCESS = 2527;
|
public static PET_NEST_BREEDING_SUCCESS = 2527;
|
||||||
public static PET_CONFIRM_BREEDING_REQUEST = 634;
|
public static PET_CONFIRM_BREEDING_REQUEST = 634;
|
||||||
public static RECYCLER_PRIZES = 3164;
|
public static RECYCLER_PRIZES = 3164;
|
||||||
|
public static RECYCLER_STATUS = 3433;
|
||||||
|
public static RECYCLER_FINISHED = 468;
|
||||||
public static ROOM_BAN_LIST = 1869;
|
public static ROOM_BAN_LIST = 1869;
|
||||||
public static ROOM_BAN_REMOVE = 3429;
|
public static ROOM_BAN_REMOVE = 3429;
|
||||||
public static ROOM_CREATED = 1304;
|
public static ROOM_CREATED = 1304;
|
||||||
|
@ -42,6 +42,7 @@ export * from './perk';
|
|||||||
export * from './pet';
|
export * from './pet';
|
||||||
export * from './poll';
|
export * from './poll';
|
||||||
export * from './quest';
|
export * from './quest';
|
||||||
|
export * from './recycler';
|
||||||
export * from './room';
|
export * from './room';
|
||||||
export * from './room/access';
|
export * from './room/access';
|
||||||
export * from './room/access/doorbell';
|
export * from './room/access/doorbell';
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { RecyclerFinishedMessageParser } from '../../parser';
|
||||||
|
|
||||||
|
export class RecyclerFinishedMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
public static readonly FINISHED_OK: number = 1;
|
||||||
|
public static readonly FINISHED_FAIL: number = 2;
|
||||||
|
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, RecyclerFinishedMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): RecyclerFinishedMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as RecyclerFinishedMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { RecyclerStatusMessageParser } from '../../parser';
|
||||||
|
|
||||||
|
export class RecyclerStatusMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
public static readonly SYSTEM_STATUS_ENABLED: number = 1;
|
||||||
|
public static readonly SYSTEM_STATUS_DISABLED: number = 2;
|
||||||
|
public static readonly SYSTEM_STATUS_TIMEOUT: number = 3;
|
||||||
|
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, RecyclerStatusMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): RecyclerStatusMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as RecyclerStatusMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './RecyclerFinishedMessageEvent';
|
||||||
|
export * from './RecyclerStatusMessageEvent';
|
@ -44,6 +44,7 @@ export * from './perk/common';
|
|||||||
export * from './pet';
|
export * from './pet';
|
||||||
export * from './poll';
|
export * from './poll';
|
||||||
export * from './quest';
|
export * from './quest';
|
||||||
|
export * from './recycler';
|
||||||
export * from './room';
|
export * from './room';
|
||||||
export * from './room/access';
|
export * from './room/access';
|
||||||
export * from './room/access/doorbell';
|
export * from './room/access/doorbell';
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class RecyclerFinishedMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _recyclerFinishedStatus: number;
|
||||||
|
private _prizeId: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._recyclerFinishedStatus = -1;
|
||||||
|
this._prizeId = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._recyclerFinishedStatus = wrapper.readInt();
|
||||||
|
this._prizeId = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get recyclerFinishedStatus(): number
|
||||||
|
{
|
||||||
|
return this._recyclerFinishedStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get prizeId(): number
|
||||||
|
{
|
||||||
|
return this._prizeId;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class RecyclerStatusMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _recyclerStatus: number;
|
||||||
|
private _recyclerTimeoutSeconds: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._recyclerStatus = -1;
|
||||||
|
this._recyclerTimeoutSeconds = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._recyclerStatus = wrapper.readInt();
|
||||||
|
this._recyclerTimeoutSeconds = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get recyclerStatus(): number
|
||||||
|
{
|
||||||
|
return this._recyclerStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get recyclerTimeoutSeconds(): number
|
||||||
|
{
|
||||||
|
return this._recyclerTimeoutSeconds;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './RecyclerFinishedMessageParser';
|
||||||
|
export * from './RecyclerStatusMessageParser';
|
Loading…
Reference in New Issue
Block a user