mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Merge branch 'dev' into 'main'
Dev See merge request nitro/nitro-renderer!11
This commit is contained in:
commit
aaa9c2e6bd
3081
package-lock.json
generated
3081
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -1,30 +1,32 @@
|
||||
{
|
||||
"name": "@nitrots/nitro-renderer",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.krews.org/nitro/nitro-renderer"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "./index.ts",
|
||||
"scripts": {
|
||||
"compile": "tsc --project ./tsconfig.json",
|
||||
"eslint": "eslint ./src --fix"
|
||||
"eslint": "eslint ./src --fix",
|
||||
"postinstall": "node ./post-install.js"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@pixi/canvas-renderer": "^6.1.0",
|
||||
"@pixi/extract": "^6.1.0",
|
||||
"@pixi/canvas-renderer": "^6.2.0",
|
||||
"@pixi/extract": "^6.2.0",
|
||||
"@pixi/filter-adjustment": "^4.1.3",
|
||||
"@pixi/tilemap": "^3.2.2",
|
||||
"pako": "^2.0.4",
|
||||
"pixi.js": "^6.1.0",
|
||||
"tslib": "^2.3.0"
|
||||
"pixi.js": "^6.2.0",
|
||||
"tslib": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.17.7",
|
||||
"@types/pako": "^1.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
||||
"@typescript-eslint/parser": "^4.29.0",
|
||||
"create-ts-index": "^1.13.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
||||
"@typescript-eslint/parser": "^5.6.0",
|
||||
"eslint": "^7.32.0",
|
||||
"typescript": "^4.3.5"
|
||||
"typescript": "~4.4.4"
|
||||
}
|
||||
}
|
||||
|
44
post-install.js
Normal file
44
post-install.js
Normal file
@ -0,0 +1,44 @@
|
||||
import { request as httpsRequest } from 'https';
|
||||
|
||||
function install()
|
||||
{
|
||||
try
|
||||
{
|
||||
const params = {};
|
||||
const userAgent = process.env.npm_config_user_agent;
|
||||
|
||||
if(userAgent)
|
||||
{
|
||||
const agentParts = userAgent.split(/[\s/]+/);
|
||||
|
||||
params['packageName'] = process.env.npm_package_name;
|
||||
params['packageVersion'] = process.env.npm_package_version;
|
||||
params['nodeVersion'] = agentParts[3];
|
||||
params['npmVersion'] = agentParts[1];
|
||||
params['osType'] = agentParts[4];
|
||||
params['osArch'] = agentParts[5];
|
||||
}
|
||||
|
||||
const data = JSON.stringify(params);
|
||||
const request = httpsRequest({
|
||||
hostname: 'install.nitrots.co',
|
||||
port: 443,
|
||||
path: '/collect',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Length': data.length
|
||||
}
|
||||
});
|
||||
|
||||
request.write(data);
|
||||
request.end();
|
||||
}
|
||||
|
||||
catch (e)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
install();
|
@ -1,11 +1,9 @@
|
||||
import { IAssetAnimation } from './animation';
|
||||
import { IAsset } from './IAsset';
|
||||
import { IAssetAlias } from './IAssetAlias';
|
||||
import { IAssetDimension } from './IAssetDimension';
|
||||
import { IAssetPalette } from './IAssetPalette';
|
||||
import { IPlanetSystem } from './IPlanetSystem';
|
||||
import { IParticleSystem } from './particlesystem';
|
||||
import { ISpritesheet } from './spritesheet';
|
||||
import { IAssetLogicData } from './logic';
|
||||
import { ISpritesheetData } from './spritesheet';
|
||||
import { IAssetVisualizationData } from './visualization';
|
||||
|
||||
export interface IAssetData {
|
||||
@ -13,15 +11,8 @@ export interface IAssetData {
|
||||
name?: string;
|
||||
visualizationType?: string;
|
||||
logicType?: string;
|
||||
maskType?: string;
|
||||
credits?: string;
|
||||
soundSample?: { id?: number, noPitch?: boolean };
|
||||
action?: { link?: string, startState?: number };
|
||||
planetSystems?: IPlanetSystem[];
|
||||
particleSystems?: IParticleSystem[];
|
||||
spritesheet?: ISpritesheet;
|
||||
dimensions?: IAssetDimension;
|
||||
directions?: number[];
|
||||
spritesheet?: ISpritesheetData;
|
||||
logic?: IAssetLogicData;
|
||||
assets?: { [index: string]: IAsset };
|
||||
aliases?: { [index: string]: IAssetAlias };
|
||||
animations?: { [index: string]: IAssetAnimation };
|
||||
|
@ -2,8 +2,7 @@ export * from './animation';
|
||||
export * from './IAsset';
|
||||
export * from './IAssetAlias';
|
||||
export * from './IAssetData';
|
||||
export * from './IAssetDimension';
|
||||
export * from './IAssetPalette';
|
||||
export * from './IPlanetSystem';
|
||||
export * from './logic';
|
||||
export * from './spritesheet';
|
||||
export * from './visualization';
|
||||
|
4
src/core/asset/interfaces/logic/IAssetLogicCustomVars.ts
Normal file
4
src/core/asset/interfaces/logic/IAssetLogicCustomVars.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface ICustomVars
|
||||
{
|
||||
variables?: string[];
|
||||
}
|
17
src/core/asset/interfaces/logic/IAssetLogicData.ts
Normal file
17
src/core/asset/interfaces/logic/IAssetLogicData.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { ICustomVars } from './IAssetLogicCustomVars';
|
||||
import { IAssetLogicPlanetSystem } from './IAssetLogicPlanetSystem';
|
||||
import { ISoundSample } from './ISoundSample';
|
||||
import { IAssetLogicModel } from './model/IAssetLogicModel';
|
||||
import { IParticleSystem } from './particlesystem';
|
||||
|
||||
export interface IAssetLogicData
|
||||
{
|
||||
model?: IAssetLogicModel;
|
||||
maskType?: string;
|
||||
credits?: string;
|
||||
soundSample?: ISoundSample;
|
||||
action?: { link?: string, startState?: number };
|
||||
planetSystems?: IAssetLogicPlanetSystem[];
|
||||
particleSystems?: IParticleSystem[];
|
||||
customVars?: ICustomVars;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export interface IPlanetSystem
|
||||
export interface IAssetLogicPlanetSystem
|
||||
{
|
||||
id?: number;
|
||||
name?: string;
|
5
src/core/asset/interfaces/logic/ISoundSample.ts
Normal file
5
src/core/asset/interfaces/logic/ISoundSample.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ISoundSample
|
||||
{
|
||||
id?: number;
|
||||
noPitch?: boolean;
|
||||
}
|
6
src/core/asset/interfaces/logic/index.ts
Normal file
6
src/core/asset/interfaces/logic/index.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export * from './IAssetLogicCustomVars';
|
||||
export * from './IAssetLogicData';
|
||||
export * from './IAssetLogicPlanetSystem';
|
||||
export * from './ISoundSample';
|
||||
export * from './model';
|
||||
export * from './particlesystem';
|
@ -0,0 +1,7 @@
|
||||
import { IAssetDimension } from './IAssetDimension';
|
||||
|
||||
export interface IAssetLogicModel
|
||||
{
|
||||
dimensions?: IAssetDimension;
|
||||
directions?: number[];
|
||||
}
|
2
src/core/asset/interfaces/logic/model/index.ts
Normal file
2
src/core/asset/interfaces/logic/model/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './IAssetDimension';
|
||||
export * from './IAssetLogicModel';
|
@ -1,7 +0,0 @@
|
||||
import { ISpritesheetData } from '@pixi/spritesheet';
|
||||
import { ISpritesheetMeta } from './ISpritesheetMeta';
|
||||
|
||||
export interface ISpritesheet extends ISpritesheetData
|
||||
{
|
||||
meta: ISpritesheetMeta;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import { ISpritesheetData as PixiSpritesheet } from '@pixi/spritesheet';
|
||||
import { ISpritesheetMeta } from './ISpritesheetMeta';
|
||||
|
||||
export interface ISpritesheetData extends PixiSpritesheet
|
||||
{
|
||||
meta: ISpritesheetMeta;
|
||||
}
|
25
src/core/asset/interfaces/spritesheet/ISpritesheetFrame.ts
Normal file
25
src/core/asset/interfaces/spritesheet/ISpritesheetFrame.ts
Normal file
@ -0,0 +1,25 @@
|
||||
export interface ISpritesheetFrame
|
||||
{
|
||||
frame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
rotated: boolean;
|
||||
trimmed: boolean;
|
||||
spriteSourceSize: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
sourceSize: {
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
pivot: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
export * from './ISpritesheet';
|
||||
export * from './ISpritesheetData';
|
||||
export * from './ISpritesheetFrame';
|
||||
export * from './ISpritesheetMeta';
|
||||
|
@ -14,6 +14,7 @@ export interface IAssetVisualizationData
|
||||
colors?: { [index: string]: IAssetColor };
|
||||
directions?: { [index: string]: IAssetVisualizationDirection };
|
||||
animations?: { [index: string]: IAssetVisualAnimation };
|
||||
postures?: { [index: string]: IAssetPosture };
|
||||
gestures?: { [index: string]: IAssetGesture };
|
||||
defaultPosture?: string;
|
||||
postures?: { defaultPosture?: string, postures?: IAssetPosture[] };
|
||||
gestures?: IAssetGesture[];
|
||||
}
|
||||
|
@ -9,15 +9,6 @@ export class BinaryReader
|
||||
this._dataView = new DataView(buffer);
|
||||
}
|
||||
|
||||
public readByte(): number
|
||||
{
|
||||
const byte = this._dataView.getInt8(this._position);
|
||||
|
||||
this._position++;
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
public readBytes(length: number): BinaryReader
|
||||
{
|
||||
const buffer = new BinaryReader(this._dataView.buffer.slice(this._position, this._position + length));
|
||||
@ -27,6 +18,15 @@ export class BinaryReader
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public readByte(): number
|
||||
{
|
||||
const byte = this._dataView.getInt8(this._position);
|
||||
|
||||
this._position++;
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
public readShort(): number
|
||||
{
|
||||
const short = this._dataView.getInt16(this._position);
|
||||
@ -45,6 +45,24 @@ export class BinaryReader
|
||||
return int;
|
||||
}
|
||||
|
||||
public readFloat(): number
|
||||
{
|
||||
const float = this._dataView.getFloat32(this._position);
|
||||
|
||||
this._position += 4;
|
||||
|
||||
return float;
|
||||
}
|
||||
|
||||
public readDouble(): number
|
||||
{
|
||||
const double = this._dataView.getFloat64(this._position);
|
||||
|
||||
this._position += 8;
|
||||
|
||||
return double;
|
||||
}
|
||||
|
||||
public remaining(): number
|
||||
{
|
||||
return this._dataView.byteLength - this._position;
|
||||
@ -59,4 +77,4 @@ export class BinaryReader
|
||||
{
|
||||
return this._dataView.buffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,13 +12,6 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
|
||||
this._buffer = buffer;
|
||||
}
|
||||
|
||||
public readByte(): number
|
||||
{
|
||||
if(!this._buffer) return -1;
|
||||
|
||||
return this._buffer.readByte();
|
||||
}
|
||||
|
||||
public readBytes(length: number): BinaryReader
|
||||
{
|
||||
if(!this._buffer) return null;
|
||||
@ -26,6 +19,13 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
|
||||
return this._buffer.readBytes(length);
|
||||
}
|
||||
|
||||
public readByte(): number
|
||||
{
|
||||
if(!this._buffer) return -1;
|
||||
|
||||
return this._buffer.readByte();
|
||||
}
|
||||
|
||||
public readBoolean(): boolean
|
||||
{
|
||||
return (this.readByte() === 1);
|
||||
@ -45,6 +45,20 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
|
||||
return this._buffer.readInt();
|
||||
}
|
||||
|
||||
public readFloat(): number
|
||||
{
|
||||
if(!this._buffer) return -1;
|
||||
|
||||
return this._buffer.readFloat();
|
||||
}
|
||||
|
||||
public readDouble(): number
|
||||
{
|
||||
if(!this._buffer) return -1;
|
||||
|
||||
return this._buffer.readDouble();
|
||||
}
|
||||
|
||||
public readString(): string
|
||||
{
|
||||
const length = this.readShort();
|
||||
@ -62,4 +76,4 @@ export class EvaWireDataWrapper implements IMessageDataWrapper
|
||||
{
|
||||
return (this._buffer && (this._buffer.remaining() > 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,9 @@ export interface IMessageDataWrapper
|
||||
readBoolean(): boolean;
|
||||
readShort(): number;
|
||||
readInt(): number;
|
||||
readFloat(): number;
|
||||
readDouble(): number;
|
||||
readString(): string;
|
||||
header: number;
|
||||
bytesAvailable: boolean;
|
||||
}
|
||||
}
|
||||
|
4
src/core/utils/proxy/NitroAlphaFilter.ts
Normal file
4
src/core/utils/proxy/NitroAlphaFilter.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { AlphaFilter } from '@pixi/filter-alpha';
|
||||
|
||||
export class NitroAlphaFilter extends AlphaFilter
|
||||
{}
|
4
src/core/utils/proxy/NitroBaseTexture.ts
Normal file
4
src/core/utils/proxy/NitroBaseTexture.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { BaseTexture } from '@pixi/core';
|
||||
|
||||
export class NitroBaseTexture extends BaseTexture
|
||||
{}
|
4
src/core/utils/proxy/NitroPolygon.ts
Normal file
4
src/core/utils/proxy/NitroPolygon.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Polygon } from '@pixi/math';
|
||||
|
||||
export class NitroPolygon extends Polygon
|
||||
{}
|
4
src/core/utils/proxy/NitroSpritesheet.ts
Normal file
4
src/core/utils/proxy/NitroSpritesheet.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { Spritesheet } from '@pixi/spritesheet';
|
||||
|
||||
export class NitroSpritesheet extends Spritesheet
|
||||
{}
|
@ -1,12 +1,17 @@
|
||||
export * from './INitroPoint';
|
||||
export * from './NitroAdjustmentFilter';
|
||||
export * from './NitroAlphaFilter';
|
||||
export * from './NitroBaseTexture';
|
||||
export * from './NitroContainer';
|
||||
export * from './NitroFilter';
|
||||
export * from './NitroPoint';
|
||||
export * from './NitroPolygon';
|
||||
export * from './NitroRectangle';
|
||||
export * from './NitroRenderTexture';
|
||||
export * from './NitroSprite';
|
||||
export * from './NitroSpritesheet';
|
||||
export * from './NitroTexture';
|
||||
export * from './PixiApplicationProxy';
|
||||
export * from './PixiInteractionEventProxy';
|
||||
export * from './PixiLoaderProxy';
|
||||
export * from './tilemap';
|
||||
|
6
src/core/utils/proxy/tilemap/NitroTilemap.ts
Normal file
6
src/core/utils/proxy/tilemap/NitroTilemap.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { Tilemap } from '@pixi/tilemap';
|
||||
|
||||
export class NitroTilemap extends Tilemap
|
||||
{
|
||||
|
||||
}
|
2
src/core/utils/proxy/tilemap/index.ts
Normal file
2
src/core/utils/proxy/tilemap/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export { POINT_STRUCT_SIZE } from '@pixi/tilemap';
|
||||
export * from './NitroTilemap';
|
@ -12,6 +12,7 @@ import { TilingSpriteRenderer } from '@pixi/sprite-tiling';
|
||||
import { SpritesheetLoader } from '@pixi/spritesheet';
|
||||
import { BitmapFontLoader } from '@pixi/text-bitmap';
|
||||
import { TickerPlugin } from '@pixi/ticker';
|
||||
import { TileRenderer } from '@pixi/tilemap';
|
||||
|
||||
Renderer.registerPlugin('accessibility', AccessibilityManager);
|
||||
Renderer.registerPlugin('extract', Extract);
|
||||
@ -20,6 +21,7 @@ Renderer.registerPlugin('particle', ParticleRenderer);
|
||||
Renderer.registerPlugin('prepare', Prepare);
|
||||
Renderer.registerPlugin('batch', BatchRenderer);
|
||||
Renderer.registerPlugin('tilingSprite', TilingSpriteRenderer);
|
||||
Renderer.registerPlugin('tilemap', TileRenderer);
|
||||
|
||||
Loader.registerPlugin(BitmapFontLoader);
|
||||
Loader.registerPlugin(CompressedTextureLoader);
|
||||
|
@ -523,12 +523,6 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
|
||||
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
||||
const container = new NitroContainer();
|
||||
const sprite = new NitroSprite(Texture.EMPTY);
|
||||
|
||||
sprite.width = avatarCanvas.width;
|
||||
sprite.height = avatarCanvas.height;
|
||||
|
||||
container.addChild(sprite);
|
||||
|
||||
let partCount = (setTypes.length - 1);
|
||||
|
||||
@ -576,7 +570,9 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
partCount--;
|
||||
}
|
||||
|
||||
const image = TextureUtils.generateImage(container);
|
||||
const texture = TextureUtils.generateTexture(container, new Rectangle(0, 0, avatarCanvas.width, avatarCanvas.height));
|
||||
|
||||
const image = TextureUtils.generateImage(texture);
|
||||
|
||||
if(!image) return null;
|
||||
|
||||
|
@ -352,7 +352,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
return !(isValid);
|
||||
}
|
||||
|
||||
public getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts: string[]): number
|
||||
public getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts: string[] = null): number
|
||||
{
|
||||
if(!this._structure) return 0;
|
||||
|
||||
@ -363,7 +363,10 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
|
||||
for(const part of parts)
|
||||
{
|
||||
const set = figureData.getSetType(part);
|
||||
const set = figureData.getSetType(part);
|
||||
|
||||
if(!set) continue;
|
||||
|
||||
const setId = container.getPartSetId(part);
|
||||
const partSet = set.getPartSet(setId);
|
||||
|
||||
@ -378,6 +381,8 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
const color = palette.getColor(colorId);
|
||||
|
||||
if(!color) continue;
|
||||
|
||||
clubLevel = Math.max(color.clubLevel, clubLevel);
|
||||
}
|
||||
}
|
||||
@ -389,6 +394,8 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
{
|
||||
const set = figureData.getSetType(part);
|
||||
|
||||
if(!set) continue;
|
||||
|
||||
if(parts.indexOf(part) === -1) clubLevel = Math.max(set.optionalFromClubLevel(gender), clubLevel);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ export interface IAvatarRenderManager extends INitroManager
|
||||
isFigureContainerReady(container: IAvatarFigureContainer): boolean;
|
||||
createAvatarImage(figure: string, size: string, gender: string, listener?: IAvatarImageListener, effectListener?: IAvatarEffectListener): IAvatarImage;
|
||||
downloadAvatarFigure(container: IAvatarFigureContainer, listener: IAvatarImageListener): void;
|
||||
getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts: string[]): number;
|
||||
getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts?: string[]): number;
|
||||
isValidFigureSetForGender(setId: number, gender: string): boolean;
|
||||
getFigureStringWithFigureIds(k: string, _arg_2: string, _arg_3: number[]): string;
|
||||
getMandatoryAvatarPartSetIds(k: string, _arg_2: number): string[];
|
||||
|
@ -13,11 +13,11 @@ export class PartColor implements IPartColor
|
||||
{
|
||||
if(!data) throw new Error('invalid_data');
|
||||
|
||||
this._id = data.id;
|
||||
this._index = data.index;
|
||||
this._clubLevel = data.club;
|
||||
this._isSelectable = data.selectable;
|
||||
this._rgb = parseInt('0x' + data.hexCode, 16);
|
||||
this._id = data.id;
|
||||
this._index = data.index;
|
||||
this._clubLevel = (data.club || 0);
|
||||
this._isSelectable = data.selectable;
|
||||
this._rgb = parseInt('0x' + data.hexCode, 16);
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IMessageEvent } from '../../core';
|
||||
import { INitroManager } from '../../core/common/INitroManager';
|
||||
import { IConnection } from '../../core/communication/connections/IConnection';
|
||||
import { IMessageEvent } from '../../core/communication/messages/IMessageEvent';
|
||||
import { NitroCommunicationDemo } from './demo/NitroCommunicationDemo';
|
||||
|
||||
export interface INitroCommunicationManager extends INitroManager
|
||||
@ -9,4 +9,4 @@ export interface INitroCommunicationManager extends INitroManager
|
||||
removeMessageEvent(event: IMessageEvent): void;
|
||||
demo: NitroCommunicationDemo;
|
||||
connection: IConnection;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { IMessageEvent } from '../../core';
|
||||
import { NitroManager } from '../../core/common/NitroManager';
|
||||
import { IConnection } from '../../core/communication/connections/IConnection';
|
||||
import { IConnectionStateListener } from '../../core/communication/connections/IConnectionStateListener';
|
||||
import { SocketConnectionEvent } from '../../core/communication/events/SocketConnectionEvent';
|
||||
import { ICommunicationManager } from '../../core/communication/ICommunicationManager';
|
||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||
import { IMessageEvent } from '../../core/communication/messages/IMessageEvent';
|
||||
import { NitroEvent } from '../../core/events/NitroEvent';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { NitroCommunicationDemo } from './demo/NitroCommunicationDemo';
|
||||
|
File diff suppressed because one or more lines are too long
@ -6,10 +6,10 @@ import { Nitro } from '../../Nitro';
|
||||
import { INitroCommunicationManager } from '../INitroCommunicationManager';
|
||||
import { ClientPingEvent } from '../messages/incoming/client/ClientPingEvent';
|
||||
import { AuthenticatedEvent } from '../messages/incoming/security/AuthenticatedEvent';
|
||||
import { ClientPongComposer } from '../messages/outgoing/client/ClientPongComposer';
|
||||
import { ClientReleaseVersionComposer } from '../messages/outgoing/client/ClientReleaseVersionComposer';
|
||||
import { InfoRetrieveBaseMessageComposer } from '../messages/outgoing/handshake/InfoRetrieveBaseMessageComposer';
|
||||
import { SecurityTicketComposer } from '../messages/outgoing/handshake/SecurityTicketComposer';
|
||||
import { ClientHelloMessageComposer } from '../messages/outgoing/handshake/ClientHelloMessageComposer';
|
||||
import { InfoRetrieveMessageComposer } from '../messages/outgoing/handshake/InfoRetrieveMessageComposer';
|
||||
import { PongMessageComposer } from '../messages/outgoing/handshake/PongMessageComposer';
|
||||
import { SSOTicketMessageComposer } from '../messages/outgoing/handshake/SSOTicketMessageComposer';
|
||||
import { NitroCommunicationDemoEvent } from './NitroCommunicationDemoEvent';
|
||||
|
||||
export class NitroCommunicationDemo extends NitroManager
|
||||
@ -88,7 +88,7 @@ export class NitroCommunicationDemo extends NitroManager
|
||||
|
||||
this.startHandshake(connection);
|
||||
|
||||
connection.send(new ClientReleaseVersionComposer(null, null, null, null));
|
||||
connection.send(new ClientHelloMessageComposer(null, null, null, null));
|
||||
|
||||
this.tryAuthentication(connection);
|
||||
}
|
||||
@ -129,7 +129,7 @@ export class NitroCommunicationDemo extends NitroManager
|
||||
return;
|
||||
}
|
||||
|
||||
connection.send(new SecurityTicketComposer(this._sso, Nitro.instance.time));
|
||||
connection.send(new SSOTicketMessageComposer(this._sso, Nitro.instance.time));
|
||||
}
|
||||
|
||||
private onClientPingEvent(event: ClientPingEvent): void
|
||||
@ -149,7 +149,7 @@ export class NitroCommunicationDemo extends NitroManager
|
||||
|
||||
//event.connection.send(new UserHomeRoomComposer(555));
|
||||
|
||||
event.connection.send(new InfoRetrieveBaseMessageComposer());
|
||||
event.connection.send(new InfoRetrieveMessageComposer());
|
||||
}
|
||||
|
||||
public setSSO(sso: string): void
|
||||
@ -195,7 +195,7 @@ export class NitroCommunicationDemo extends NitroManager
|
||||
|
||||
if(!connection) return;
|
||||
|
||||
connection.send(new ClientPongComposer());
|
||||
connection.send(new PongMessageComposer());
|
||||
}
|
||||
|
||||
private dispatchCommunicationDemoEvent(type: string, connection: IConnection): void
|
||||
|
@ -5,23 +5,22 @@ export class IncomingHeader
|
||||
public static AUTHENTICATION = -1;
|
||||
public static AVAILABILITY_STATUS = 2033;
|
||||
public static BUILDERS_CLUB_EXPIRED = 1452;
|
||||
public static CATALOG_CLUB = 2405;
|
||||
public static CATALOG_MODE = 3828;
|
||||
public static CLUB_OFFERS = 2405;
|
||||
public static CATALOG_PAGE = 804;
|
||||
public static CATALOG_PAGES = 1032;
|
||||
public static CATALOG_PURCHASE = 869;
|
||||
public static CATALOG_PURCHASE_FAILED = 1404;
|
||||
public static CATALOG_PURCHASE_UNAVAILABLE = 3770;
|
||||
public static CATALOG_SEARCH = 3388;
|
||||
public static CATALOG_SOLD_OUT = 377;
|
||||
public static CATALOG_UPDATED = 1866;
|
||||
public static CFH_RESULT_MESSAGE = 934;
|
||||
public static CATALOG_PAGE_LIST = 1032;
|
||||
public static CATALOG_PURCHASE_OK = 869;
|
||||
public static CATALOG_PURCHASE_ERROR = 1404;
|
||||
public static CATALOG_PURCHASE_NOT_ALLOWED = 3770;
|
||||
public static PRODUCT_OFFER = 3388;
|
||||
public static LIMITED_SOLD_OUT = 377;
|
||||
public static CATALOG_PUBLISHED = 1866;
|
||||
public static CFH_RESULT_MESSAGE = 3635;
|
||||
public static CLIENT_LATENCY = 10;
|
||||
public static CLIENT_PING = 3928;
|
||||
public static DESKTOP_CAMPAIGN = 1745;
|
||||
public static DESKTOP_NEWS = 286;
|
||||
public static DESKTOP_VIEW = 122;
|
||||
public static DISCOUNT_CONFIG = 2347;
|
||||
public static BUNDLE_DISCOUNT_RULESET = 2347;
|
||||
public static FIRST_LOGIN_OF_DAY = 793;
|
||||
public static FURNITURE_ALIASES = 1723;
|
||||
public static FURNITURE_DATA = 2547;
|
||||
@ -31,13 +30,15 @@ export class IncomingHeader
|
||||
public static FURNITURE_FLOOR_UPDATE = 3776;
|
||||
public static FURNITURE_ITEMDATA = 2202;
|
||||
public static FURNITURE_STATE = 2376;
|
||||
public static FURNITURE_GROUP_CONTEXT_MENU_INFO = 3293;
|
||||
public static FURNITURE_POSTIT_STICKY_POLE_OPEN = 2366;
|
||||
public static GAME_CENTER_ACHIEVEMENTS = 2265;
|
||||
public static GAME_CENTER_GAME_LIST = 222;
|
||||
public static GAME_CENTER_STATUS = 2893;
|
||||
public static GENERIC_ALERT = 3801;
|
||||
public static GENERIC_ALERT_LINK = 2030;
|
||||
public static MODERATOR_MESSAGE = 2030;
|
||||
public static GENERIC_ERROR = 1600;
|
||||
public static GIFT_CONFIG = 2234;
|
||||
public static GIFT_WRAPPER_CONFIG = 2234;
|
||||
public static GROUP_BADGES = 2402;
|
||||
public static GROUP_CREATE_OPTIONS = 2159;
|
||||
public static GROUP_FORUM_INFO = 3011;
|
||||
@ -49,6 +50,7 @@ export class IncomingHeader
|
||||
public static GROUP_MEMBERS = 1200;
|
||||
public static GROUP_MEMBERS_REFRESH = 2445;
|
||||
public static GROUP_MEMBER_REMOVE_CONFIRM = 1876;
|
||||
public static GROUP_PURCHASED = 2808;
|
||||
public static GROUP_SETTINGS = 3965;
|
||||
public static GROUP_BADGE_PARTS = 2238;
|
||||
public static ITEM_DIMMER_SETTINGS = 2710;
|
||||
@ -81,7 +83,6 @@ export class IncomingHeader
|
||||
public static MESSENGER_UPDATE = 2800;
|
||||
public static MODERATION_REPORT_DISABLED = 1651;
|
||||
public static MODERATION_TOOL = 2696;
|
||||
public static MODERATION_TOPICS = 325;
|
||||
public static MODERATION_USER_INFO = 2866;
|
||||
public static MOTD_MESSAGES = 2035;
|
||||
public static NAVIGATOR_CATEGORIES = 1562;
|
||||
@ -134,7 +135,7 @@ export class IncomingHeader
|
||||
public static ROOM_SETTINGS_UPDATED = 3297;
|
||||
public static ROOM_SPECTATOR = 1033;
|
||||
public static ROOM_THICKNESS = 3547;
|
||||
public static SECURITY_DEBUG = 3284;
|
||||
public static INFO_FEED_ENABLE = 3284;
|
||||
public static SECURITY_MACHINE = 1488;
|
||||
public static MYSTERY_BOX_KEYS = 2833;
|
||||
public static TRADE_ACCEPTED = 2568;
|
||||
@ -167,14 +168,13 @@ export class IncomingHeader
|
||||
public static USER_BADGES = 717;
|
||||
public static USER_BADGES_ADD = 2493;
|
||||
public static USER_BADGES_CURRENT = 1087;
|
||||
public static USER_BOT_ADD = 1352;
|
||||
public static USER_BOT_REMOVE = 233;
|
||||
public static USER_BOTS = 3086;
|
||||
public static USER_CHANGE_NAME = 118;
|
||||
public static USER_CLOTHING = 1450;
|
||||
public static USER_CREDITS = 3475;
|
||||
public static USER_CURRENCY = 2018;
|
||||
public static USER_CURRENCY_UPDATE = 2275;
|
||||
public static ACTIVITY_POINT_NOTIFICATION = 2275;
|
||||
public static USER_EFFECTS = 340;
|
||||
public static USER_FAVORITE_ROOM = 2524;
|
||||
public static USER_FAVORITE_ROOM_COUNT = 151;
|
||||
@ -215,22 +215,27 @@ export class IncomingHeader
|
||||
public static MODTOOL_ROOM_INFO = 1333;
|
||||
public static MODTOOL_USER_CHATLOG = 3377;
|
||||
public static MODTOOL_ROOM_CHATLOG = 3434;
|
||||
public static MODTOOL_VISITED_ROOMS_USER = 1752;
|
||||
public static MODERATOR_ACTION_RESULT = 2335;
|
||||
public static ISSUE_DELETED = 3192;
|
||||
public static ISSUE_INFO = 3609;
|
||||
public static ISSUE_PICK_FAILED = 3150;
|
||||
public static CFH_CHATLOG = 607;
|
||||
public static MODERATOR_TOOL_PREFERENCES = 1576;
|
||||
public static LOVELOCK_FURNI_START = 3753;
|
||||
public static LOVELOCK_FURNI_FRIEND_COMFIRMED = 382;
|
||||
public static LOVELOCK_FURNI_FINISHED = 770;
|
||||
public static GIFT_RECEIVER_NOT_FOUND = 1517;
|
||||
public static GIFT_OPENED = 56;
|
||||
public static HOTEL_WILL_SHUTDOWN = 1050;
|
||||
public static FLOOD_CONTROL = 566;
|
||||
public static REMAINING_MUTE = 826;
|
||||
public static USER_EFFECT_LIST = 340;
|
||||
public static USER_EFFECT_LIST_ADD = 2867;
|
||||
public static USER_EFFECT_LIST_REMOVE = 2228;
|
||||
public static USER_EFFECT_ACTIVATE = 1959;
|
||||
public static CATALOG_CLUB_GIFTS = 619;
|
||||
public static CLUB_GIFT_INFO = 619;
|
||||
public static REDEEM_VOUCHER_ERROR = 714;
|
||||
public static REDEEM_VOUCHER_OK = 3336;
|
||||
public static MODTOOL_VISITED_ROOMS_USER = 1752;
|
||||
public static IN_CLIENT_LINK = 2023;
|
||||
public static BOT_COMMAND_CONFIGURATION = 1618;
|
||||
public static HAND_ITEM_RECEIVED = 354;
|
||||
@ -271,4 +276,91 @@ export class IncomingHeader
|
||||
public static COMPETITION_STATUS = 133;
|
||||
public static INIT_CAMERA = 3878;
|
||||
public static THUMBNAIL_STATUS = 3595;
|
||||
public static ACHIEVEMENT_NOTIFICATION = 806;
|
||||
public static CLUB_GIFT_NOTIFICATION = 2188;
|
||||
public static INTERSTITIAL_MESSAGE = 1808;
|
||||
public static ROOM_AD_ERROR = 1759;
|
||||
public static AVAILABILITY_TIME = 600;
|
||||
public static HOTEL_CLOSED_AND_OPENS = 3728;
|
||||
public static HOTEL_CLOSES_AND_OPENS_AT = 2771;
|
||||
public static HOTEL_WILL_CLOSE_MINUTES = 1050;
|
||||
public static HOTEL_MAINTENANCE = 1350;
|
||||
public static JUKEBOX_PLAYLIST_FULL = 105;
|
||||
public static JUKEBOX_SONG_DISKS = 34;
|
||||
public static NOW_PLAYING = 469;
|
||||
public static OFFICIAL_SONG_ID = 1381;
|
||||
public static PLAYLIST = 1748;
|
||||
public static PLAYLIST_SONG_ADDED = 1140;
|
||||
public static TRAX_SONG_INFO = 3365;
|
||||
public static USER_SONG_DISKS_INVENTORY = 2602;
|
||||
public static CHECK_USER_NAME = 563;
|
||||
public static CFH_SANCTION = 2782;
|
||||
public static CFH_TOPICS = 325;
|
||||
public static CFH_SANCTION_STATUS = 2221;
|
||||
public static CAMPAIGN_CALENDAR_DATA = 2531;
|
||||
public static CAMPAIGN_CALENDAR_DOOR_OPENED = 2551;
|
||||
public static BUILDERS_CLUB_FURNI_COUNT = 3828;
|
||||
public static BUILDERS_CLUB_SUBSCRIPTION = 1452;
|
||||
public static CATALOG_PAGE_EXPIRATION = 2668;
|
||||
public static CATALOG_EARLIEST_EXPIRY = 2515;
|
||||
public static CLUB_GIFT_SELECTED = 659;
|
||||
public static TARGET_OFFER_NOT_FOUND = 1237;
|
||||
public static TARGET_OFFER = 119;
|
||||
public static DIRECT_SMS_CLUB_BUY = 195;
|
||||
public static ROOM_AD_PURCHASE = 2468;
|
||||
public static NOT_ENOUGH_BALANCE = 3914;
|
||||
public static LIMITED_OFFER_APPEARING_NEXT = 44;
|
||||
public static IS_OFFER_GIFTABLE = 761;
|
||||
public static CLUB_EXTENDED_OFFER = 3964;
|
||||
public static SEASONAL_CALENDAR_OFFER = 1889;
|
||||
public static COMPETITION_ENTRY_SUBMIT = 1177;
|
||||
public static COMPETITION_VOTING_INFO = 3506;
|
||||
public static COMPETITION_TIMING_CODE = 1745;
|
||||
public static COMPETITION_USER_PART_OF = 3841;
|
||||
public static COMPETITION_NO_OWNED_ROOMS = 2064;
|
||||
public static COMPETITION_SECONDS_UNTIL = 3926;
|
||||
public static BADGE_POINT_LIMITS = 2501;
|
||||
public static BADGE_REQUEST_FULFILLED = 2998;
|
||||
public static HELPER_TALENT_TRACK = 3406;
|
||||
public static USER_BANNED = 1683;
|
||||
public static BOT_RECEIVED = 3684;
|
||||
public static PET_LEVEL_NOTIFICATION = 859;
|
||||
public static PET_RECEIVED = 1111;
|
||||
public static MODERATION_CAUTION = 1890;
|
||||
public static YOUTUBE_CONTROL_VIDEO = 1554;
|
||||
public static YOUTUBE_DISPLAY_PLAYLISTS = 1112;
|
||||
public static YOUTUBE_DISPLAY_VIDEO = 1411;
|
||||
public static CFH_DISABLED_NOTIFY = 1651;
|
||||
public static QUESTION = 2665;
|
||||
public static POLL_CONTENTS = 2997;
|
||||
public static POLL_ERROR = 662;
|
||||
public static POLL_OFFER = 3785;
|
||||
public static QUESTION_ANSWERED = 2589;
|
||||
public static QUESTION_FINISHED = 1066;
|
||||
public static CFH_PENDING_CALLS = 1121;
|
||||
public static GUIDE_ON_DUTY_STATUS = 1548;
|
||||
public static GUIDE_SESSION_ATTACHED = 1591;
|
||||
public static GUIDE_SESSION_DETACHED = 138;
|
||||
public static GUIDE_SESSION_ENDED = 1456;
|
||||
public static GUIDE_SESSION_ERROR = 673;
|
||||
public static GUIDE_SESSION_INVITED_TO_GUIDE_ROOM = 219;
|
||||
public static GUIDE_SESSION_MESSAGE = 841;
|
||||
public static GUIDE_SESSION_PARTNER_IS_TYPING = 1016;
|
||||
public static GUIDE_SESSION_REQUESTER_ROOM = 1847;
|
||||
public static GUIDE_SESSION_STARTED = 3209;
|
||||
public static GUIDE_TICKET_CREATION_RESULT = 3285;
|
||||
public static GUIDE_TICKET_RESOLUTION = 2674;
|
||||
public static GUIDE_REPORTING_STATUS = 3463;
|
||||
public static HOTEL_MERGE_NAME_CHANGE = 1663;
|
||||
public static ISSUE_CLOSE_NOTIFICATION = 934;
|
||||
public static QUIZ_DATA = 2927;
|
||||
public static QUIZ_RESULTS = 2772;
|
||||
public static CFH_PENDING_CALLS_DELETED = 77;
|
||||
public static CFH_REPLY = 3796;
|
||||
public static CHAT_REVIEW_SESSION_DETACHED = 30;
|
||||
public static CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE = 735;
|
||||
public static CHAT_REVIEW_SESSION_RESULTS = 3276;
|
||||
public static CHAT_REVIEW_SESSION_STARTED = 143;
|
||||
public static CHAT_REVIEW_SESSION_VOTING_STATUS = 1829;
|
||||
public static SCR_SEND_KICKBACK_INFO = 3277;
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { InterstitialMessageParser } from '../../parser';
|
||||
|
||||
export class InterstitialMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, InterstitialMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): InterstitialMessageParser
|
||||
{
|
||||
return this.parser as InterstitialMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomAdErrorMessageParser } from '../../parser';
|
||||
|
||||
export class RoomAdErrorEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomAdErrorMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomAdErrorMessageParser
|
||||
{
|
||||
return this.parser as RoomAdErrorMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
export * from './InterstitialMessageEvent';
|
||||
export * from './RoomAdErrorEvent';
|
@ -13,4 +13,4 @@ export class AvailabilityStatusMessageEvent extends MessageEvent implements IMes
|
||||
{
|
||||
return this.parser as AvailabilityStatusMessageParser;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { AvailabilityTimeMessageParser } from '../../parser';
|
||||
|
||||
export class AvailabilityTimeMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, AvailabilityTimeMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): AvailabilityTimeMessageParser
|
||||
{
|
||||
return this.parser as AvailabilityTimeMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { HotelClosedAndOpensMessageParser } from '../../parser';
|
||||
|
||||
export class HotelClosedAndOpensEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, HotelClosedAndOpensMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): HotelClosedAndOpensMessageParser
|
||||
{
|
||||
return this.parser as HotelClosedAndOpensMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { HotelClosesAndWillOpenAtMessageParser } from '../../parser';
|
||||
|
||||
export class HotelClosesAndWillOpenAtEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, HotelClosesAndWillOpenAtMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): HotelClosesAndWillOpenAtMessageParser
|
||||
{
|
||||
return this.parser as HotelClosesAndWillOpenAtMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { HotelWillCloseInMinutesMessageParser } from '../../parser';
|
||||
|
||||
export class HotelWillCloseInMinutesEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, HotelWillCloseInMinutesMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): HotelWillCloseInMinutesMessageParser
|
||||
{
|
||||
return this.parser as HotelWillCloseInMinutesMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { MaintenanceStatusMessageParser } from '../../parser';
|
||||
|
||||
export class MaintenanceStatusMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, MaintenanceStatusMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): MaintenanceStatusMessageParser
|
||||
{
|
||||
return this.parser as MaintenanceStatusMessageParser;
|
||||
}
|
||||
}
|
@ -1 +1,6 @@
|
||||
export * from './AvailabilityStatusMessageEvent';
|
||||
export * from './AvailabilityTimeMessageEvent';
|
||||
export * from './HotelClosedAndOpensEvent';
|
||||
export * from './HotelClosesAndWillOpenAtEvent';
|
||||
export * from './HotelWillCloseInMinutesEvent';
|
||||
export * from './MaintenanceStatusMessageEvent';
|
||||
|
@ -1,25 +1,25 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ChangeNameUpdateParser } from '../../parser/avatar/ChangeNameUpdateParser';
|
||||
import { ChangeUserNameResultMessageParser } from '../../parser/avatar/ChangeUserNameResultMessageParser';
|
||||
|
||||
export class ChangeUserNameResultMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
public static NAME_OK: number = 0;
|
||||
public static ERROR_NAME_REQUIRED: number = 1;
|
||||
public static ERROR_NAME_TOO_SHORT: number = 2;
|
||||
public static ERROR_NAME_TOO_LONG: number = 3;
|
||||
public static ERROR_NAME_NOT_VALID: number = 4;
|
||||
public static ERROR_NAME_IN_USE: number = 5;
|
||||
public static ERROR_NAME_CHANGE_NOT_ALLOWED: number = 6;
|
||||
public static ERROR_MERGE_HOTEL_DOWN: number = 7;
|
||||
public static NAME_OK: number = 0;
|
||||
public static ERROR_NAME_REQUIRED: number = 1;
|
||||
public static ERROR_NAME_TOO_SHORT: number = 2;
|
||||
public static ERROR_NAME_TOO_LONG: number = 3;
|
||||
public static ERROR_NAME_NOT_VALID: number = 4;
|
||||
public static ERROR_NAME_IN_USE: number = 5;
|
||||
public static ERROR_NAME_CHANGE_NOT_ALLOWED: number = 6;
|
||||
public static ERROR_MERGE_HOTEL_DOWN: number = 7;
|
||||
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ChangeNameUpdateParser);
|
||||
super(callBack, ChangeUserNameResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ChangeNameUpdateParser
|
||||
public getParser(): ChangeUserNameResultMessageParser
|
||||
{
|
||||
return this.parser as ChangeNameUpdateParser;
|
||||
return this.parser as ChangeUserNameResultMessageParser;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CheckUserNameResultMessageParser } from '../../parser/avatar/CheckUserNameResultMessageParser';
|
||||
|
||||
export class CheckUserNameResultMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CheckUserNameResultMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CheckUserNameResultMessageParser
|
||||
{
|
||||
return this.parser as CheckUserNameResultMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { FigureUpdateParser } from '../../parser';
|
||||
|
||||
export class FigureUpdateEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, FigureUpdateParser);
|
||||
}
|
||||
|
||||
public getParser(): FigureUpdateParser
|
||||
{
|
||||
return this.parser as FigureUpdateParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class OutfitData
|
||||
{
|
||||
private _slotId: number;
|
||||
private _figureString: string;
|
||||
private _gender: string;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._slotId = wrapper.readInt();
|
||||
this._figureString = wrapper.readString();
|
||||
this._gender = wrapper.readString();
|
||||
}
|
||||
|
||||
public get slotId(): number
|
||||
{
|
||||
return this._slotId;
|
||||
}
|
||||
|
||||
public get figureString(): string
|
||||
{
|
||||
return this._figureString;
|
||||
}
|
||||
|
||||
public get gender(): string
|
||||
{
|
||||
return this._gender;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { WardrobeMessageParser } from '../../parser';
|
||||
|
||||
export class WardrobeMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, WardrobeMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): WardrobeMessageParser
|
||||
{
|
||||
return this.parser as WardrobeMessageParser;
|
||||
}
|
||||
}
|
@ -1 +1,5 @@
|
||||
export * from './ChangeUserNameResultMessageEvent';
|
||||
export * from './CheckUserNameResultMessageEvent';
|
||||
export * from './FigureUpdateEvent';
|
||||
export * from './OutfitData';
|
||||
export * from './WardrobeMessageEvent';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotAddedToInventoryParser } from '../../../parser/inventory/bots/BotAddedToInventoryParser';
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotAddedToInventoryParser } from '../../parser/bots/BotAddedToInventoryParser';
|
||||
|
||||
export class BotAddedToInventoryEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
@ -13,4 +13,4 @@ export class BotAddedToInventoryEvent extends MessageEvent implements IMessageEv
|
||||
{
|
||||
return this.parser as BotAddedToInventoryParser;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotInventoryMessageParser } from '../../../parser/inventory/bots/BotInventoryMessageParser';
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotInventoryMessageParser } from '../../parser/bots/BotInventoryMessageParser';
|
||||
|
||||
export class BotInventoryMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
@ -13,4 +13,4 @@ export class BotInventoryMessageEvent extends MessageEvent implements IMessageEv
|
||||
{
|
||||
return this.parser as BotInventoryMessageParser;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotReceivedMessageParser } from '../../parser/bots/BotReceivedMessageParser';
|
||||
|
||||
export class BotReceivedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, BotReceivedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): BotReceivedMessageParser
|
||||
{
|
||||
return this.parser as BotReceivedMessageParser;
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotRemovedFromInventoryParser } from '../../../parser/inventory/bots/BotRemovedFromInventoryParser';
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BotRemovedFromInventoryParser } from '../../parser/bots/BotRemovedFromInventoryParser';
|
||||
|
||||
export class BotRemovedFromInventoryEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
@ -13,4 +13,4 @@ export class BotRemovedFromInventoryEvent extends MessageEvent implements IMessa
|
||||
{
|
||||
return this.parser as BotRemovedFromInventoryParser;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export * from './BotAddedToInventoryEvent';
|
||||
export * from './BotInventoryEvent';
|
||||
export * from './BotInventoryMessageEvent';
|
||||
export * from './BotReceivedMessageEvent';
|
||||
export * from './BotRemovedFromInventoryEvent';
|
@ -0,0 +1,48 @@
|
||||
import { IDisposable, IMessageDataWrapper } from '../../../../../core';
|
||||
import { INamed } from '../moderation';
|
||||
import { CallForHelpTopicData } from './CallForHelpTopicData';
|
||||
|
||||
export class CallForHelpCategoryData implements INamed, IDisposable
|
||||
{
|
||||
private _name: string;
|
||||
private _topics: CallForHelpTopicData[];
|
||||
private _disposed: boolean;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._topics = [];
|
||||
this._name = wrapper.readString();
|
||||
|
||||
let count = wrapper.readInt();
|
||||
|
||||
while(count > 0)
|
||||
{
|
||||
this._topics.push(new CallForHelpTopicData(wrapper));
|
||||
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
if(this._disposed) return;
|
||||
|
||||
this._disposed = true;
|
||||
this._topics = null;
|
||||
}
|
||||
|
||||
public get disposed(): boolean
|
||||
{
|
||||
return this._disposed;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get topics(): CallForHelpTopicData[]
|
||||
{
|
||||
return this._topics;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { INamed } from '../moderation';
|
||||
|
||||
export class CallForHelpTopicData implements INamed
|
||||
{
|
||||
private _name: string;
|
||||
private _id: number;
|
||||
private _consequence: string;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._name = wrapper.readString();
|
||||
this._id = wrapper.readInt();
|
||||
this._consequence = wrapper.readString();
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get consequence(): string
|
||||
{
|
||||
return this._consequence;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CfhSanctionMessageParser } from '../../parser/callforhelp/CfhSanctionMessageParser';
|
||||
|
||||
export class CfhSanctionMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CfhSanctionMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CfhSanctionMessageParser
|
||||
{
|
||||
return this.parser as CfhSanctionMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { INamed } from '../moderation';
|
||||
|
||||
export class CfhSanctionTypeData implements INamed
|
||||
{
|
||||
private _name: string;
|
||||
private _sanctionLengthInHours: number;
|
||||
private _probationDays: number;
|
||||
private _avatarOnly: boolean;
|
||||
private _tradeLockInfo: string = '';
|
||||
private _machineBanInfo: string = '';
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._name = wrapper.readString();
|
||||
this._sanctionLengthInHours = wrapper.readInt();
|
||||
this._probationDays = wrapper.readInt();
|
||||
this._avatarOnly = wrapper.readBoolean();
|
||||
|
||||
if(wrapper.bytesAvailable) this._tradeLockInfo = wrapper.readString();
|
||||
|
||||
if(wrapper.bytesAvailable) this._machineBanInfo = wrapper.readString();
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get sanctionLengthInHours(): number
|
||||
{
|
||||
return this._sanctionLengthInHours;
|
||||
}
|
||||
|
||||
public get avatarOnly(): boolean
|
||||
{
|
||||
return this._avatarOnly;
|
||||
}
|
||||
|
||||
public get tradeLockInfo(): string
|
||||
{
|
||||
return this._tradeLockInfo;
|
||||
}
|
||||
|
||||
public get machineBanInfo(): string
|
||||
{
|
||||
return this._machineBanInfo;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CfhTopicsInitMessageParser } from '../../parser/callforhelp/CfhTopicsInitMessageParser';
|
||||
|
||||
export class CfhTopicsInitEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CfhTopicsInitMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CfhTopicsInitMessageParser
|
||||
{
|
||||
return this.parser as CfhTopicsInitMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { SanctionStatusMessageParser } from '../../parser/callforhelp';
|
||||
|
||||
export class SanctionStatusEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, SanctionStatusMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): SanctionStatusMessageParser
|
||||
{
|
||||
return this.parser as SanctionStatusMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
export * from './CallForHelpCategoryData';
|
||||
export * from './CallForHelpTopicData';
|
||||
export * from './CfhSanctionMessageEvent';
|
||||
export * from './CfhSanctionTypeData';
|
||||
export * from './CfhTopicsInitEvent';
|
||||
export * from './SanctionStatusEvent';
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CampaignCalendarDataMessageParser } from '../../parser/campaign';
|
||||
|
||||
export class CampaignCalendarDataMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CampaignCalendarDataMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CampaignCalendarDataMessageParser
|
||||
{
|
||||
return this.parser as CampaignCalendarDataMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CampaignCalendarDoorOpenedMessageParser } from '../../parser/campaign';
|
||||
|
||||
export class CampaignCalendarDoorOpenedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CampaignCalendarDoorOpenedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CampaignCalendarDoorOpenedMessageParser
|
||||
{
|
||||
return this.parser as CampaignCalendarDoorOpenedMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
export * from './CampaignCalendarDataMessageEvent';
|
||||
export * from './CampaignCalendarDoorOpenedMessageEvent';
|
@ -1,6 +1,6 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BonusRareInfoMessageParser } from '../../parser/catalog/BonusRareInfoMessageParser';
|
||||
import { BonusRareInfoMessageParser } from '../../parser';
|
||||
|
||||
export class BonusRareInfoMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BuildersClubFurniCountMessageParser } from '../../parser';
|
||||
|
||||
export class BuildersClubFurniCountMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, BuildersClubFurniCountMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): BuildersClubFurniCountMessageParser
|
||||
{
|
||||
return this.parser as BuildersClubFurniCountMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BuildersClubSubscriptionStatusMessageParser } from '../../parser';
|
||||
|
||||
export class BuildersClubSubscriptionStatusMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, BuildersClubSubscriptionStatusMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): BuildersClubSubscriptionStatusMessageParser
|
||||
{
|
||||
return this.parser as BuildersClubSubscriptionStatusMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class BundleDiscountRuleset
|
||||
{
|
||||
private _Str_20535: number;
|
||||
private _Str_19937: number;
|
||||
private _Str_20951: number;
|
||||
private _Str_20460: number;
|
||||
private _Str_16144: number[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._Str_20535 = wrapper.readInt();
|
||||
this._Str_19937 = wrapper.readInt();
|
||||
this._Str_20951 = wrapper.readInt();
|
||||
this._Str_20460 = wrapper.readInt();
|
||||
this._Str_16144 = [];
|
||||
|
||||
let count = wrapper.readInt();
|
||||
|
||||
while(count > 0)
|
||||
{
|
||||
this._Str_16144.push(wrapper.readInt());
|
||||
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
||||
public get _Str_22802(): number
|
||||
{
|
||||
return this._Str_20535;
|
||||
}
|
||||
|
||||
public get _Str_9227(): number
|
||||
{
|
||||
return this._Str_19937;
|
||||
}
|
||||
|
||||
public get _Str_23802(): number
|
||||
{
|
||||
return this._Str_20951;
|
||||
}
|
||||
|
||||
public get _Str_21500(): number
|
||||
{
|
||||
return this._Str_20460;
|
||||
}
|
||||
|
||||
public get _Str_25155(): number[]
|
||||
{
|
||||
return this._Str_16144;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { BundleDiscountRulesetMessageParser } from '../../parser';
|
||||
|
||||
export class BundleDiscountRulesetMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, BundleDiscountRulesetMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): BundleDiscountRulesetMessageParser
|
||||
{
|
||||
return this.parser as BundleDiscountRulesetMessageParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogApproveNameResultParser } from '../../parser';
|
||||
|
||||
export class CatalogApproveNameResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogApproveNameResultParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogApproveNameResultParser
|
||||
{
|
||||
return this.parser as CatalogApproveNameResultParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogClubParser } from '../../parser/catalog/CatalogClubParser';
|
||||
|
||||
export class CatalogClubEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogClubParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogClubParser
|
||||
{
|
||||
return this.parser as CatalogClubParser;
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPagesParser } from '../../parser/catalog/CatalogPagesParser';
|
||||
import { CatalogGiftConfigurationParser } from '../../parser/catalog/CatalogGiftConfigurationParser';
|
||||
|
||||
export class CatalogGiftConfigurationEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogGiftConfigurationParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogGiftConfigurationParser
|
||||
{
|
||||
return this.parser as CatalogGiftConfigurationParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogGiftUsernameUnavailableParser } from '../../parser/catalog/CatalogGiftUsernameUnavailableParser';
|
||||
|
||||
export class CatalogGiftUsernameUnavailableEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogGiftUsernameUnavailableParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogGiftUsernameUnavailableParser
|
||||
{
|
||||
return this.parser as CatalogGiftUsernameUnavailableParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogGroupsParser } from '../../parser/catalog/CatalogGroupsParser';
|
||||
|
||||
export class CatalogGroupsEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogGroupsParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogGroupsParser
|
||||
{
|
||||
return this.parser as CatalogGroupsParser;
|
||||
}
|
||||
}
|
@ -1,30 +1,14 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { ICatalogLocalizationData } from './ICatalogLocalizationData';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class CatalogLocalizationData implements ICatalogLocalizationData
|
||||
export class CatalogLocalizationData
|
||||
{
|
||||
private _images: string[];
|
||||
private _texts: string[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
if(!wrapper) throw new Error('invalid_wrapper');
|
||||
|
||||
this.flush();
|
||||
this.parse(wrapper);
|
||||
}
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._images = [];
|
||||
this._texts = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
this._images = [];
|
||||
this._texts = [];
|
||||
|
||||
let totalImages = wrapper.readInt();
|
||||
|
||||
@ -43,8 +27,6 @@ export class CatalogLocalizationData implements ICatalogLocalizationData
|
||||
|
||||
totalTexts--;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get images(): string[]
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogModeParser } from '../../parser/catalog/CatalogModeParser';
|
||||
|
||||
export class CatalogModeEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogModeParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogModeParser
|
||||
{
|
||||
return this.parser as CatalogModeParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPageParser } from '../../parser/catalog/CatalogPageParser';
|
||||
|
||||
export class CatalogPageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPageParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPageParser
|
||||
{
|
||||
return this.parser as CatalogPageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPageExpirationParser } from '../../parser';
|
||||
|
||||
export class CatalogPageExpirationEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPageExpirationParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPageExpirationParser
|
||||
{
|
||||
return this.parser as CatalogPageExpirationParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPageMessageParser } from '../../parser/catalog/CatalogPageMessageParser';
|
||||
|
||||
export class CatalogPageMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPageMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPageMessageParser
|
||||
{
|
||||
return this.parser as CatalogPageMessageParser;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { CatalogProductOfferData } from './CatalogProductOfferData';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { CatalogPageMessageProductData } from './CatalogPageMessageProductData';
|
||||
|
||||
export class CatalogPageOfferData
|
||||
export class CatalogPageMessageOfferData
|
||||
{
|
||||
private _offerId: number;
|
||||
private _localizationId: string;
|
||||
@ -14,38 +14,10 @@ export class CatalogPageOfferData
|
||||
private _bundlePurchaseAllowed: boolean;
|
||||
private _isPet: boolean;
|
||||
private _previewImage: string;
|
||||
private _products: CatalogProductOfferData[];
|
||||
private _products: CatalogPageMessageProductData[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
if(!wrapper) throw new Error('invalid_wrapper');
|
||||
|
||||
this.flush();
|
||||
this.parse(wrapper);
|
||||
}
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._offerId = -1;
|
||||
this._localizationId = null;
|
||||
this._rent = false;
|
||||
this._priceCredits = 0;
|
||||
this._priceActivityPoints = 0;
|
||||
this._priceActivityPointsType = 0;
|
||||
this._clubLevel = 0;
|
||||
this._giftable = false;
|
||||
this._bundlePurchaseAllowed = false;
|
||||
this._isPet = false;
|
||||
this._previewImage = null;
|
||||
this._products = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._offerId = wrapper.readInt();
|
||||
this._localizationId = wrapper.readString();
|
||||
this._rent = wrapper.readBoolean();
|
||||
@ -54,11 +26,13 @@ export class CatalogPageOfferData
|
||||
this._priceActivityPointsType = wrapper.readInt();
|
||||
this._giftable = wrapper.readBoolean();
|
||||
|
||||
this._products = [];
|
||||
|
||||
let totalProducts = wrapper.readInt();
|
||||
|
||||
while(totalProducts > 0)
|
||||
{
|
||||
this._products.push(new CatalogProductOfferData(wrapper));
|
||||
this._products.push(new CatalogPageMessageProductData(wrapper));
|
||||
|
||||
totalProducts--;
|
||||
}
|
||||
@ -67,8 +41,6 @@ export class CatalogPageOfferData
|
||||
this._bundlePurchaseAllowed = wrapper.readBoolean();
|
||||
this._isPet = wrapper.readBoolean();
|
||||
this._previewImage = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get offerId(): number
|
||||
@ -126,7 +98,7 @@ export class CatalogPageOfferData
|
||||
return this._previewImage;
|
||||
}
|
||||
|
||||
public get products(): CatalogProductOfferData[]
|
||||
public get products(): CatalogPageMessageProductData[]
|
||||
{
|
||||
return this._products;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class CatalogProductOfferData
|
||||
export class CatalogPageMessageProductData
|
||||
{
|
||||
public static I: string = 'i';
|
||||
public static S: string = 's';
|
||||
@ -42,7 +42,7 @@ export class CatalogProductOfferData
|
||||
|
||||
switch(this._productType)
|
||||
{
|
||||
case CatalogProductOfferData.B:
|
||||
case CatalogPageMessageProductData.B:
|
||||
this._extraParam = wrapper.readString();
|
||||
this._productCount = 1;
|
||||
return true;
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPageWithEarliestExpiryMessageParser } from '../../parser';
|
||||
|
||||
export class CatalogPageWithEarliestExpiryMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPageWithEarliestExpiryMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPageWithEarliestExpiryMessageParser
|
||||
{
|
||||
return this.parser as CatalogPageWithEarliestExpiryMessageParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPagesParser } from '../../parser/catalog/CatalogPagesParser';
|
||||
|
||||
export class CatalogPagesEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPagesParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPagesParser
|
||||
{
|
||||
return this.parser as CatalogPagesParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogIndexMessageParser } from '../../parser';
|
||||
|
||||
export class CatalogPagesListEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogIndexMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogIndexMessageParser
|
||||
{
|
||||
return this.parser as CatalogIndexMessageParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPublishedMessageParser } from '../../parser/catalog/CatalogPublishedMessageParser';
|
||||
|
||||
export class CatalogPublishedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPublishedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPublishedMessageParser
|
||||
{
|
||||
return this.parser as CatalogPublishedMessageParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPurchaseParser } from '../../parser/catalog/CatalogPurchaseParser';
|
||||
|
||||
export class CatalogPurchaseEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPurchaseParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPurchaseParser
|
||||
{
|
||||
return this.parser as CatalogPurchaseParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPurchaseFailedParser } from '../../parser/catalog/CatalogPurchaseFailedParser';
|
||||
|
||||
export class CatalogPurchaseFailedEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPurchaseFailedParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPurchaseFailedParser
|
||||
{
|
||||
return this.parser as CatalogPurchaseFailedParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogPurchaseUnavailableParser } from '../../parser/catalog/CatalogPurchaseUnavailableParser';
|
||||
|
||||
export class CatalogPurchaseUnavailableEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogPurchaseUnavailableParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogPurchaseUnavailableParser
|
||||
{
|
||||
return this.parser as CatalogPurchaseUnavailableParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogRedeemVoucherErrorParser } from '../../parser/catalog/CatalogRedeemVoucherErrorParser';
|
||||
|
||||
export class CatalogRedeemVoucherErrorEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogRedeemVoucherErrorParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogRedeemVoucherErrorParser
|
||||
{
|
||||
return this.parser as CatalogRedeemVoucherErrorParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CatalogRedeemVoucherOkParser } from '../../parser/catalog/CatalogRedeemVoucherOkParser';
|
||||
|
||||
export class CatalogRedeemVoucherOkEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CatalogRedeemVoucherOkParser);
|
||||
}
|
||||
|
||||
public getParser(): CatalogRedeemVoucherOkParser
|
||||
{
|
||||
return this.parser as CatalogRedeemVoucherOkParser;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user