#29 - OpenPetPackageMessageComposer added

This commit is contained in:
oobjectt 2022-12-26 17:23:40 +01:00
parent e70d9cc804
commit 9cf2c7c8f8
5 changed files with 31 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -136,6 +136,7 @@ export class OutgoingHeader
public static PET_RESPECT = 3202; public static PET_RESPECT = 3202;
public static PET_RIDE = 1036; public static PET_RIDE = 1036;
public static PET_MOVE = 3449; public static PET_MOVE = 3449;
public static PET_OPEN_PACKAGE = 3698;
public static GET_PET_TRAINING_PANEL = 2161; public static GET_PET_TRAINING_PANEL = 2161;
public static RECYCLER_PRIZES = 398; public static RECYCLER_PRIZES = 398;
public static RELEASE_VERSION = 4000; public static RELEASE_VERSION = 4000;

View File

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

View File

@ -9,6 +9,7 @@ export * from './FurniturePlacePaintComposer';
export * from './FurniturePostItPlaceComposer'; export * from './FurniturePostItPlaceComposer';
export * from './logic'; export * from './logic';
export * from './mannequin'; export * from './mannequin';
export * from './OpenPetPackageMessageComposer';
export * from './presents'; export * from './presents';
export * from './toner'; export * from './toner';
export * from './wall'; export * from './wall';

View File

@ -1,7 +1,7 @@
import { IConnection, IRoomSession, RoomControllerLevel, RoomTradingLevelEnum } from '../../api'; import { IConnection, IRoomSession, RoomControllerLevel, RoomTradingLevelEnum } from '../../api';
import { Disposable } from '../../core'; import { Disposable } from '../../core';
import { RoomSessionEvent } from '../../events'; import { RoomSessionEvent } from '../../events';
import { BotRemoveComposer, CompostPlantMessageComposer, FurnitureMultiStateComposer, GetPetCommandsComposer, HarvestPetMessageComposer, MoodlightSettingsComposer, MoodlightSettingsSaveComposer, MoodlightTogggleStateComposer, OpenPresentComposer, PetMountComposer, PetRemoveComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, RoomAmbassadorAlertComposer, RoomBanUserComposer, RoomDoorbellAccessComposer, RoomEnterComposer, RoomGiveRightsComposer, RoomKickUserComposer, RoomModerationSettings, RoomMuteUserComposer, RoomTakeRightsComposer, RoomUnitActionComposer, RoomUnitChatComposer, RoomUnitChatShoutComposer, RoomUnitChatWhisperComposer, RoomUnitDanceComposer, RoomUnitPostureComposer, RoomUnitSignComposer, RoomUnitTypingStartComposer, RoomUnitTypingStopComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer, UserMottoComposer } from '../communication'; import { BotRemoveComposer, CompostPlantMessageComposer, FurnitureMultiStateComposer, GetPetCommandsComposer, HarvestPetMessageComposer, MoodlightSettingsComposer, MoodlightSettingsSaveComposer, MoodlightTogggleStateComposer, OpenPetPackageMessageComposer, OpenPresentComposer, PetMountComposer, PetRemoveComposer, PollAnswerComposer, PollRejectComposer, PollStartComposer, RemovePetSaddleComposer, RoomAmbassadorAlertComposer, RoomBanUserComposer, RoomDoorbellAccessComposer, RoomEnterComposer, RoomGiveRightsComposer, RoomKickUserComposer, RoomModerationSettings, RoomMuteUserComposer, RoomTakeRightsComposer, RoomUnitActionComposer, RoomUnitChatComposer, RoomUnitChatShoutComposer, RoomUnitChatWhisperComposer, RoomUnitDanceComposer, RoomUnitPostureComposer, RoomUnitSignComposer, RoomUnitTypingStartComposer, RoomUnitTypingStopComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer, UserMottoComposer } from '../communication';
import { UserDataManager } from './UserDataManager'; import { UserDataManager } from './UserDataManager';
export class RoomSession extends Disposable implements IRoomSession export class RoomSession extends Disposable implements IRoomSession
@ -212,6 +212,11 @@ export class RoomSession extends Disposable implements IRoomSession
this._connection.send(new PollAnswerComposer(pollId, questionId, answers)); this._connection.send(new PollAnswerComposer(pollId, questionId, answers));
} }
public sendOpenPetPackageMessage(objectId: number, petName: string): void
{
this._connection.send(new OpenPetPackageMessageComposer(objectId, petName));
}
public updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void public updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void
{ {
let colorString = '000000' + color.toString(16).toUpperCase(); let colorString = '000000' + color.toString(16).toUpperCase();