mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
add poll methods to RoomSession
This commit is contained in:
parent
1cedce0a76
commit
52954806f8
@ -28,6 +28,9 @@ export interface IRoomSession extends IDisposable
|
||||
sendBanMessage(userId: number, type: string): void;
|
||||
sendGiveRightsMessage(userId: number): void;
|
||||
sendTakeRightsMessage(userId: number): void;
|
||||
sendPollStartMessage(pollId:number):void;
|
||||
sendPollRejectMessage(pollId:number):void;
|
||||
sendPollAnswerMessage(pollId:number, questionId:number, answers:string[]):void;
|
||||
updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void;
|
||||
toggleMoodlightState(): void;
|
||||
pickupPet(id: number): void;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Disposable } from '../../core/common/disposable/Disposable';
|
||||
import { IConnection } from '../../core/communication/connections/IConnection';
|
||||
import { FurnitureMultiStateComposer, PetMountComposer, RemovePetSaddleComposer, TogglePetBreedingComposer, TogglePetRidingComposer, UsePetProductComposer } from '../communication';
|
||||
import { FurnitureMultiStateComposer, 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';
|
||||
@ -225,6 +225,21 @@ export class RoomSession extends Disposable implements IRoomSession
|
||||
this._connection.send(new RoomTakeRightsComposer(userId));
|
||||
}
|
||||
|
||||
public sendPollStartMessage(pollId:number):void
|
||||
{
|
||||
this._connection.send(new PollStartComposer(pollId));
|
||||
}
|
||||
|
||||
public sendPollRejectMessage(pollId:number):void
|
||||
{
|
||||
this._connection.send(new PollRejectComposer(pollId));
|
||||
}
|
||||
|
||||
public sendPollAnswerMessage(pollId:number, questionId:number, answers:string[]):void
|
||||
{
|
||||
this._connection.send(new PollAnswerComposer(pollId, questionId, answers));
|
||||
}
|
||||
|
||||
public updateMoodlightData(id: number, effectId: number, color: number, brightness: number, apply: boolean): void
|
||||
{
|
||||
let colorString = '000000' + color.toString(16).toUpperCase();
|
||||
|
Loading…
Reference in New Issue
Block a user