mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 14:36:26 +01:00
Add more pet packets
This commit is contained in:
parent
b2ef1d7530
commit
240d3d0e43
@ -383,7 +383,9 @@ import { SaveRoomSettingsComposer } from './messages/outgoing/room/data/SaveRoom
|
||||
import { BotPlaceComposer } from './messages/outgoing/room/engine/BotPlaceComposer';
|
||||
import { BotRemoveComposer } from './messages/outgoing/room/engine/BotRemoveComposer';
|
||||
import { BotSkillSaveComposer } from './messages/outgoing/room/engine/BotSkillSaveComposer';
|
||||
import { CompostPlantMessageComposer } from './messages/outgoing/room/engine/CompostPlantMessageComposer';
|
||||
import { GetItemDataComposer } from './messages/outgoing/room/engine/GetItemDataComposer';
|
||||
import { HarvestPetMessageComposer } from './messages/outgoing/room/engine/HarvestPetMessageComposer';
|
||||
import { PetMoveComposer } from './messages/outgoing/room/engine/PetMoveComposer';
|
||||
import { PetPlaceComposer } from './messages/outgoing/room/engine/PetPlaceComposer';
|
||||
import { PetRemoveComposer } from './messages/outgoing/room/engine/PetRemoveComposer';
|
||||
@ -1176,6 +1178,8 @@ export class NitroMessages implements IMessageConfiguration
|
||||
this._composers.set(OutgoingHeader.PET_PICKUP, PetRemoveComposer);
|
||||
this._composers.set(OutgoingHeader.SET_ITEM_DATA, SetItemDataMessageComposer);
|
||||
this._composers.set(OutgoingHeader.SET_OBJECT_DATA, SetObjectDataMessageComposer);
|
||||
this._composers.set(OutgoingHeader.COMPOST_PLANT, CompostPlantMessageComposer);
|
||||
this._composers.set(OutgoingHeader.HARVEST_PET, HarvestPetMessageComposer);
|
||||
|
||||
// FURNITURE
|
||||
this._composers.set(OutgoingHeader.FURNITURE_ALIASES, FurnitureAliasesComposer);
|
||||
|
@ -379,4 +379,6 @@ export class OutgoingHeader
|
||||
public static POLL_START = 109;
|
||||
public static DISCONNECT = 2445;
|
||||
public static SCR_GET_KICKBACK_INFO = 869;
|
||||
public static COMPOST_PLANT = 3835;
|
||||
public static HARVEST_PET = 1521;
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
import { PetMessageComposer } from './PetMessageComposer';
|
||||
|
||||
export class CompostPlantMessageComposer extends PetMessageComposer
|
||||
{
|
||||
constructor(id: number)
|
||||
{
|
||||
super(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
import { PetMessageComposer } from './PetMessageComposer';
|
||||
|
||||
export class HarvestPetMessageComposer extends PetMessageComposer
|
||||
{
|
||||
constructor(id: number)
|
||||
{
|
||||
super(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class PetMessageComposer implements IMessageComposer<ConstructorParameters<typeof PetMessageComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof PetMessageComposer>;
|
||||
|
||||
constructor(id: number)
|
||||
{
|
||||
this._data = [ id ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
export * from './BotPlaceComposer';
|
||||
export * from './BotRemoveComposer';
|
||||
export * from './BotSkillSaveComposer';
|
||||
export * from './CompostPlantMessageComposer';
|
||||
export * from './GetItemDataComposer';
|
||||
export * from './HarvestPetMessageComposer';
|
||||
export * from './PetMessageComposer';
|
||||
export * from './PetMoveComposer';
|
||||
export * from './PetPlaceComposer';
|
||||
export * from './PetRemoveComposer';
|
||||
|
@ -43,6 +43,8 @@ export interface IRoomSession extends IDisposable
|
||||
togglePetBreeding(id: number): void;
|
||||
togglePetRiding(id: number): void;
|
||||
useMultistateItem(id: number): void;
|
||||
harvestPet(id: number): void;
|
||||
compostPlant(id: number): void;
|
||||
connection: IConnection;
|
||||
userDataManager: UserDataManager;
|
||||
roomId: number;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Disposable } from '../../core/common/disposable/Disposable';
|
||||
import { IConnection } from '../../core/communication/connections/IConnection';
|
||||
import { FurnitureMultiStateComposer, PetMountComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from '../communication';
|
||||
import { CompostPlantMessageComposer, FurnitureMultiStateComposer, HarvestPetMessageComposer, PetMountComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from '../communication';
|
||||
import { RoomDoorbellAccessComposer } from '../communication/messages/outgoing/room/access/RoomDoorbellAccessComposer';
|
||||
import { RoomEnterComposer } from '../communication/messages/outgoing/room/access/RoomEnterComposer';
|
||||
import { RoomAmbassadorAlertComposer } from '../communication/messages/outgoing/room/action/RoomAmbassadorAlertComposer';
|
||||
@ -314,6 +314,16 @@ export class RoomSession extends Disposable implements IRoomSession
|
||||
this._connection.send(new FurnitureMultiStateComposer(id));
|
||||
}
|
||||
|
||||
public harvestPet(id: number): void
|
||||
{
|
||||
this._connection.send(new HarvestPetMessageComposer(id));
|
||||
}
|
||||
|
||||
public compostPlant(id: number): void
|
||||
{
|
||||
this._connection.send(new CompostPlantMessageComposer(id));
|
||||
}
|
||||
|
||||
public get connection(): IConnection
|
||||
{
|
||||
return this._connection;
|
||||
|
Loading…
Reference in New Issue
Block a user