Move to Renderer V2

This commit is contained in:
duckietm
2024-04-03 09:27:56 +02:00
parent 110c3ad393
commit b3134ce50b
4080 changed files with 115593 additions and 66375 deletions
@@ -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;
}
}