#29 - GetRecyclerStatusMessageComposer and RecycleItemsMessageComposer added

This commit is contained in:
oobjectt 2022-12-26 18:57:09 +01:00
parent e70d9cc804
commit 2d24c20426
6 changed files with 62 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -138,6 +138,8 @@ export class OutgoingHeader
public static PET_MOVE = 3449;
public static GET_PET_TRAINING_PANEL = 2161;
public static RECYCLER_PRIZES = 398;
public static RECYCLER_STATUS = 1342;
public static RECYCLER_ITEMS = 2771;
public static RELEASE_VERSION = 4000;
public static CALL_FOR_HELP = 1691;
public static ROOM_AMBASSADOR_ALERT = 2996;

View File

@ -37,6 +37,7 @@ export * from './OutgoingHeader';
export * from './pet';
export * from './poll';
export * from './quest';
export * from './recycler';
export * from './room';
export * from './room/access';
export * from './room/action';

View File

@ -0,0 +1,21 @@
import { IMessageComposer } from '../../../../../api';
export class GetRecyclerStatusMessageComposer implements IMessageComposer<ConstructorParameters<typeof GetRecyclerStatusMessageComposer>>
{
private _data: ConstructorParameters<typeof GetRecyclerStatusMessageComposer>;
constructor()
{
this._data = [];
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}

View File

@ -0,0 +1,31 @@
import { IMessageComposer } from '../../../../../api';
export class RecycleItemsMessageComposer implements IMessageComposer<any>
{
private _data: any;
constructor(...data: RecycleItemsEntry[])
{
this._data = [data.length];
data.forEach(entry =>
{
this._data.push(entry.itemId);
});
}
public getMessageArray()
{
return this._data;
}
public dispose(): void
{
return;
}
}
export class RecycleItemsEntry
{
constructor(public itemId: number)
{ }
}

View File

@ -0,0 +1,2 @@
export * from './GetRecyclerStatusMessageComposer';
export * from './RecycleItemsMessageComposer';