Add packet

This commit is contained in:
Bill 2021-06-14 00:56:57 -04:00
parent 16807ff08f
commit fe7bb7e947
4 changed files with 25 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, SellablePetPalettesEvent } from './messages';
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, RoomUnitGiveHandItemPetComposer, SellablePetPalettesEvent } from './messages';
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
@ -918,6 +918,7 @@ export class NitroMessages implements IMessageConfiguration
this._composers.set(OutgoingHeader.UNIT_DANCE, RoomUnitDanceComposer);
this._composers.set(OutgoingHeader.UNIT_DROP_HAND_ITEM, RoomUnitDropHandItemComposer);
this._composers.set(OutgoingHeader.UNIT_GIVE_HANDITEM, RoomUnitGiveHandItemComposer);
this._composers.set(OutgoingHeader.UNIT_GIVE_HANDITEM_PET, RoomUnitGiveHandItemPetComposer);
this._composers.set(OutgoingHeader.UNIT_LOOK, RoomUnitLookComposer);
this._composers.set(OutgoingHeader.UNIT_SIGN, RoomUnitSignComposer);
this._composers.set(OutgoingHeader.UNIT_POSTURE, RoomUnitPostureComposer);

View File

@ -232,4 +232,5 @@ export class OutgoingHeader
public static MARKETPLACE_BUY_OFFER = 1603;
public static CATALOG_REQUESET_PET_BREEDS = 1756;
public static APPROVE_NAME = 2109;
public static UNIT_GIVE_HANDITEM_PET = 2768;
}

View File

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

View File

@ -3,6 +3,7 @@ export * from './RoomUnitActionComposer';
export * from './RoomUnitDanceComposer';
export * from './RoomUnitDropHandItemComposer';
export * from './RoomUnitGiveHandItemComposer';
export * from './RoomUnitGiveHandItemPetComposer';
export * from './RoomUnitLookComposer';
export * from './RoomUnitPostureComposer';
export * from './RoomUnitSignComposer';