#29 - SetClothingChangeDataMessageComposer added

This commit is contained in:
oobjectt 2022-12-26 19:44:59 +01:00
parent e70d9cc804
commit f592a9412f
5 changed files with 36 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -432,6 +432,7 @@ export class OutgoingHeader
public static SCR_GET_KICKBACK_INFO = 869;
public static COMPOST_PLANT = 3835;
public static HARVEST_PET = 1521;
public static SET_CLOTHING_CHANGE_DATA = 924;
public static GROUP_UNFAVORITE = 1820;
public static NEW_USER_EXPERIENCE_GET_GIFTS = 1822;
}

View File

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

View File

@ -9,5 +9,6 @@ export * from './PetMoveComposer';
export * from './PetPlaceComposer';
export * from './PetRemoveComposer';
export * from './RemoveWallItemComposer';
export * from './SetClothingChangeDataMessageComposer';
export * from './SetItemDataMessageComposer';
export * from './SetObjectDataMessageComposer';

View File

@ -1,7 +1,7 @@
import { IConnection, IRoomSession, RoomControllerLevel, RoomTradingLevelEnum } from '../../api';
import { Disposable } from '../../core';
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, 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, SetClothingChangeDataMessageComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer, UserMottoComposer } from '../communication';
import { UserDataManager } from './UserDataManager';
export class RoomSession extends Disposable implements IRoomSession
@ -301,6 +301,16 @@ export class RoomSession extends Disposable implements IRoomSession
this._connection.send(new GetPetCommandsComposer(id));
}
public sendUpdateClothingChangeFurniture(objectId: number, gender: string, look: string):void
{
if(!this._connection) return;
let connectData: SetClothingChangeDataMessageComposer = new SetClothingChangeDataMessageComposer(objectId, gender, look);
this._connection.send(connectData);
connectData.dispose();
connectData = null;
}
public get connection(): IConnection
{
return this._connection;