Add GetResolutionAchievementsMessageComposer

This commit is contained in:
Bill 2022-03-18 00:59:43 -04:00
parent c6a7482bcc
commit 4d3a13e2bd
5 changed files with 28 additions and 2 deletions

View File

@ -275,6 +275,7 @@ import { SendMessageComposer } from './messages/outgoing/friendlist/SendMessageC
import { SendRoomInviteComposer } from './messages/outgoing/friendlist/SendRoomInviteComposer';
import { SetRelationshipStatusComposer } from './messages/outgoing/friendlist/SetRelationshipStatusComposer';
import { VisitUserComposer } from './messages/outgoing/friendlist/VisitUserComposer';
import { GetResolutionAchievementsMessageComposer } from './messages/outgoing/game/GetResolutionAchievementsMessageComposer';
import { GroupAdminGiveComposer } from './messages/outgoing/group/GroupAdminGiveComposer';
import { GroupAdminTakeComposer } from './messages/outgoing/group/GroupAdminTakeComposer';
import { GroupBadgePartsComposer } from './messages/outgoing/group/GroupBadgePartsComposer';
@ -1374,6 +1375,8 @@ export class NitroMessages implements IMessageConfiguration
// TALENT
this._composers.set(OutgoingHeader.HELPER_TALENT_TRACK, TalentTrackComposer);
this._composers.set(OutgoingHeader.ACHIEVEMENT_RESOLUTION_OPEN, GetResolutionAchievementsMessageComposer);
}
public get events(): Map<number, Function>

View File

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

View File

@ -0,0 +1 @@
export * from './GetResolutionAchievementsMessageComposer';

View File

@ -8,6 +8,7 @@ export * from './crafting';
export * from './desktop';
export * from './friendfurni';
export * from './friendlist';
export * from './game';
export * from './gifts';
export * from './group';
export * from './groupforums';

View File

@ -12,6 +12,7 @@ import { IVector3D } from '../../room/utils/IVector3D';
import { RoomEnterEffect } from '../../room/utils/RoomEnterEffect';
import { Vector3d } from '../../room/utils/Vector3d';
import { FurnitureGroupInfoComposer, SetObjectDataMessageComposer } from '../communication';
import { GetResolutionAchievementsMessageComposer } from '../communication/messages/outgoing/game/GetResolutionAchievementsMessageComposer';
import { BotPlaceComposer } from '../communication/messages/outgoing/room/engine/BotPlaceComposer';
import { GetItemDataComposer } from '../communication/messages/outgoing/room/engine/GetItemDataComposer';
import { PetMoveComposer } from '../communication/messages/outgoing/room/engine/PetMoveComposer';
@ -835,8 +836,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_MYSTERYTROPHY_OPEN_DIALOG, roomId, objectId, objectCategory));
return;
case RoomObjectWidgetRequestEvent.ACHIEVEMENT_RESOLUTION_OPEN:
//this._roomEngine.connection.send();
// new _Str_4406(k._Str_1577, 0)
this._roomEngine.connection.send(new GetResolutionAchievementsMessageComposer(event.objectId, 0));
return;
case RoomObjectWidgetRequestEvent.ACHIEVEMENT_RESOLUTION_ENGRAVING:
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING, roomId, objectId, objectCategory));