You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Move to Renderer V2
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { NewUserExperienceGiftOptions } from '../../incoming/nux';
|
||||
|
||||
export class NewUserExperienceGiftOfferMessageParser implements IMessageParser
|
||||
{
|
||||
private _giftOptions: NewUserExperienceGiftOptions[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
const count = wrapper.readInt();
|
||||
this._giftOptions = [];
|
||||
let index = 0;
|
||||
|
||||
while(index < count)
|
||||
{
|
||||
this._giftOptions.push(new NewUserExperienceGiftOptions(wrapper));
|
||||
index++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get giftOptions(): NewUserExperienceGiftOptions[]
|
||||
{
|
||||
return this._giftOptions;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user