mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
add poll outgoing packets
This commit is contained in:
parent
7ad0b94ed7
commit
d208aaa283
File diff suppressed because one or more lines are too long
@ -372,4 +372,7 @@ export class OutgoingHeader
|
||||
public static GUIDE_SESSION_RESOLVED = 887;
|
||||
public static POST_QUIZ_ANSWERS = 3720;
|
||||
public static SEARCH_FAQS = 2031;
|
||||
public static POLL_ANSWER = 3505;
|
||||
public static POLL_REJECT = 1773;
|
||||
public static POLL_START = 109;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ export * from './moderation';
|
||||
export * from './navigator';
|
||||
export * from './OutgoingHeader';
|
||||
export * from './pet';
|
||||
export * from './poll';
|
||||
export * from './quest';
|
||||
export * from './room';
|
||||
export * from './roomevents';
|
||||
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class PollAnswerComposer implements IMessageComposer<any>
|
||||
{
|
||||
private _data: any;
|
||||
|
||||
constructor(pollId:number, questionId:number, answers:string[])
|
||||
{
|
||||
this._data = [ pollId, questionId, answers.length, ...answers ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer';
|
||||
|
||||
export class PollStartComposer implements IMessageComposer<ConstructorParameters<typeof PollStartComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof PollStartComposer>;
|
||||
|
||||
constructor(k: number)
|
||||
{
|
||||
this._data = [ k ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
3
src/nitro/communication/messages/outgoing/poll/index.ts
Normal file
3
src/nitro/communication/messages/outgoing/poll/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './PollAnswerComposer';
|
||||
export * from './PollRejectComposer';
|
||||
export * from './PollStartComposer';
|
Loading…
Reference in New Issue
Block a user