mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-12-03 12:16:28 +01:00
Merge branch 'fix/variable-cleanup' into 'main'
Fix/variable cleanup See merge request nitro/nitro-renderer!4
This commit is contained in:
commit
821126f63e
896
package-lock.json
generated
896
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -6,20 +6,20 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pixi/filter-adjustment": "^3.1.1",
|
"@pixi/filter-adjustment": "^4.1.3",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"pako": "^2.0.3",
|
"pako": "^2.0.3",
|
||||||
"pixi.js": "^5.3.3",
|
"pixi.js": "^6.0.4",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.3.0",
|
||||||
"xml2js": "^0.4.23"
|
"xml2js": "^0.4.23"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^14.14.35",
|
"@types/node": "^14.17.5",
|
||||||
"@types/pako": "^1.0.1",
|
"@types/pako": "^1.0.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.15.0",
|
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
||||||
"@typescript-eslint/parser": "^4.15.0",
|
"@typescript-eslint/parser": "^4.28.3",
|
||||||
"create-ts-index": "^1.13.6",
|
"create-ts-index": "^1.13.6",
|
||||||
"eslint": "^7.19.0",
|
"eslint": "^7.30.0",
|
||||||
"typescript": "~4.2.3"
|
"typescript": "^4.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BaseTexture, ILoaderOptions, Loader, LoaderResource, Spritesheet, Texture } from 'pixi.js';
|
import { BaseTexture, ILoaderResource, Loader, LoaderResource, Resource, Spritesheet, Texture } from 'pixi.js';
|
||||||
|
import { IGraphicAsset } from '../../room';
|
||||||
import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection';
|
import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection';
|
||||||
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
|
||||||
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
||||||
import { Disposable } from '../common/disposable/Disposable';
|
import { Disposable } from '../common/disposable/Disposable';
|
||||||
import { INitroLogger } from '../common/logger/INitroLogger';
|
import { INitroLogger } from '../common/logger/INitroLogger';
|
||||||
@ -12,9 +12,8 @@ import { NitroBundle } from './NitroBundle';
|
|||||||
export class AssetManager extends Disposable implements IAssetManager
|
export class AssetManager extends Disposable implements IAssetManager
|
||||||
{
|
{
|
||||||
private _logger: INitroLogger;
|
private _logger: INitroLogger;
|
||||||
private _textures: Map<string, Texture>;
|
private _textures: Map<string, Texture<Resource>>;
|
||||||
private _collections: Map<string, GraphicAssetCollection>;
|
private _collections: Map<string, IGraphicAssetCollection>;
|
||||||
private _pendingUrls: Map<string, Function[]>;
|
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
@ -23,7 +22,6 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
this._logger = new NitroLogger(this.constructor.name);
|
this._logger = new NitroLogger(this.constructor.name);
|
||||||
this._textures = new Map();
|
this._textures = new Map();
|
||||||
this._collections = new Map();
|
this._collections = new Map();
|
||||||
this._pendingUrls = new Map();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static removeFileExtension(name: string): string
|
public static removeFileExtension(name: string): string
|
||||||
@ -31,7 +29,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
return (name.substring(0, name.lastIndexOf('.')) || name);
|
return (name.substring(0, name.lastIndexOf('.')) || name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTexture(name: string): Texture
|
public getTexture(name: string): Texture<Resource>
|
||||||
{
|
{
|
||||||
if(!name) return null;
|
if(!name) return null;
|
||||||
|
|
||||||
@ -42,7 +40,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setTexture(name: string, texture: Texture): void
|
public setTexture(name: string, texture: Texture<Resource>): void
|
||||||
{
|
{
|
||||||
if(!name || !texture) return;
|
if(!name || !texture) return;
|
||||||
|
|
||||||
@ -90,6 +88,8 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
|
|
||||||
this._collections.set(collection.name, collection);
|
this._collections.set(collection.name, collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public downloadAsset(assetUrl: string, cb: Function): boolean
|
public downloadAsset(assetUrl: string, cb: Function): boolean
|
||||||
@ -110,7 +110,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
|
|
||||||
let totalDownloaded = 0;
|
let totalDownloaded = 0;
|
||||||
|
|
||||||
const onDownloaded = (loader: Loader, resource: LoaderResource, flag: boolean) =>
|
const onDownloaded = (loader: Loader, resource: ILoaderResource, flag: boolean) =>
|
||||||
{
|
{
|
||||||
if(loader) loader.destroy();
|
if(loader) loader.destroy();
|
||||||
|
|
||||||
@ -134,21 +134,25 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
|
|
||||||
const loader = new Loader();
|
const loader = new Loader();
|
||||||
|
|
||||||
const options: ILoaderOptions = {
|
|
||||||
crossOrigin: false,
|
|
||||||
xhrType: url.endsWith('.nitro') ? 'arraybuffer' : 'json'
|
|
||||||
};
|
|
||||||
|
|
||||||
loader
|
loader
|
||||||
.use((resource: LoaderResource, next: Function) => this.assetLoader(loader, resource, next, onDownloaded))
|
.add({
|
||||||
.add(url, options)
|
url,
|
||||||
|
crossOrigin: 'anonymous',
|
||||||
|
xhrType: url.endsWith('.nitro') ? LoaderResource.XHR_RESPONSE_TYPE.BUFFER : LoaderResource.XHR_RESPONSE_TYPE.JSON
|
||||||
|
})
|
||||||
|
.use((resource: ILoaderResource, next: Function) =>
|
||||||
|
{
|
||||||
|
this.assetLoader(loader, resource, onDownloaded);
|
||||||
|
|
||||||
|
next();
|
||||||
|
})
|
||||||
.load();
|
.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private assetLoader(loader: Loader, resource: LoaderResource, next: Function, onDownloaded: Function): void
|
private assetLoader(loader: Loader, resource: ILoaderResource, onDownloaded: Function): void
|
||||||
{
|
{
|
||||||
if(!resource || resource.error)
|
if(!resource || resource.error)
|
||||||
{
|
{
|
||||||
@ -186,7 +190,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
{
|
{
|
||||||
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
||||||
|
|
||||||
spritesheet.parse(textures =>
|
spritesheet.parse(() =>
|
||||||
{
|
{
|
||||||
this.createCollection(assetData, spritesheet);
|
this.createCollection(assetData, spritesheet);
|
||||||
|
|
||||||
@ -201,7 +205,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
|
|
||||||
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
||||||
|
|
||||||
spritesheet.parse(textures =>
|
spritesheet.parse(() =>
|
||||||
{
|
{
|
||||||
this.createCollection(assetData, spritesheet);
|
this.createCollection(assetData, spritesheet);
|
||||||
|
|
||||||
@ -254,7 +258,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
{
|
{
|
||||||
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
||||||
|
|
||||||
spritesheet.parse(textures =>
|
spritesheet.parse(() =>
|
||||||
{
|
{
|
||||||
this.createCollection(assetData, spritesheet);
|
this.createCollection(assetData, spritesheet);
|
||||||
|
|
||||||
@ -269,7 +273,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
|
|
||||||
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
const spritesheet = new Spritesheet(baseTexture, assetData.spritesheet);
|
||||||
|
|
||||||
spritesheet.parse(textures =>
|
spritesheet.parse(() =>
|
||||||
{
|
{
|
||||||
this.createCollection(assetData, spritesheet);
|
this.createCollection(assetData, spritesheet);
|
||||||
|
|
||||||
@ -312,7 +316,7 @@ export class AssetManager extends Disposable implements IAssetManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public get collections(): Map<string, GraphicAssetCollection>
|
public get collections(): Map<string, IGraphicAssetCollection>
|
||||||
{
|
{
|
||||||
return this._collections;
|
return this._collections;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
import { Spritesheet, Texture } from 'pixi.js';
|
import { Resource, Spritesheet, Texture } from 'pixi.js';
|
||||||
import { GraphicAssetCollection } from '../../room/object/visualization/utils/GraphicAssetCollection';
|
|
||||||
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
import { IGraphicAsset } from '../../room/object/visualization/utils/IGraphicAsset';
|
||||||
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
import { IGraphicAssetCollection } from '../../room/object/visualization/utils/IGraphicAssetCollection';
|
||||||
import { IAssetData } from './interfaces';
|
import { IAssetData } from './interfaces';
|
||||||
@ -8,12 +7,12 @@ import { IAssetData } from './interfaces';
|
|||||||
export interface IAssetManager
|
export interface IAssetManager
|
||||||
{
|
{
|
||||||
dispose(): void;
|
dispose(): void;
|
||||||
getTexture(name: string): Texture;
|
getTexture(name: string): Texture<Resource>;
|
||||||
setTexture(name: string, texture: Texture): void;
|
setTexture(name: string, texture: Texture<Resource>): void;
|
||||||
getAsset(name: string): IGraphicAsset;
|
getAsset(name: string): IGraphicAsset;
|
||||||
getCollection(name: string): IGraphicAssetCollection;
|
getCollection(name: string): IGraphicAssetCollection;
|
||||||
createCollection(data: IAssetData, spritesheet: Spritesheet): IGraphicAssetCollection;
|
createCollection(data: IAssetData, spritesheet: Spritesheet): IGraphicAssetCollection;
|
||||||
downloadAssets(urls: string[], cb: Function): void;
|
downloadAssets(urls: string[], cb: Function): void;
|
||||||
downloadAsset(url: string, cb: Function): void;
|
downloadAsset(url: string, cb: Function): void;
|
||||||
collections: Map<string, GraphicAssetCollection>;
|
collections: Map<string, IGraphicAssetCollection>;
|
||||||
}
|
}
|
@ -3,7 +3,7 @@ import { IAsset } from './IAsset';
|
|||||||
import { IAssetAlias } from './IAssetAlias';
|
import { IAssetAlias } from './IAssetAlias';
|
||||||
import { IAssetDimension } from './IAssetDimension';
|
import { IAssetDimension } from './IAssetDimension';
|
||||||
import { IAssetPalette } from './IAssetPalette';
|
import { IAssetPalette } from './IAssetPalette';
|
||||||
import { ISpritesheetData } from './spritesheet';
|
import { ISpritesheet } from './spritesheet';
|
||||||
import { IAssetVisualizationData } from './visualization';
|
import { IAssetVisualizationData } from './visualization';
|
||||||
|
|
||||||
export interface IAssetData {
|
export interface IAssetData {
|
||||||
@ -15,7 +15,7 @@ export interface IAssetData {
|
|||||||
credits?: string;
|
credits?: string;
|
||||||
soundSample?: number;
|
soundSample?: number;
|
||||||
action?: { link?: string, startState?: number };
|
action?: { link?: string, startState?: number };
|
||||||
spritesheet?: ISpritesheetData;
|
spritesheet?: ISpritesheet;
|
||||||
dimensions?: IAssetDimension;
|
dimensions?: IAssetDimension;
|
||||||
directions?: number[];
|
directions?: number[];
|
||||||
assets?: { [index: string]: IAsset };
|
assets?: { [index: string]: IAsset };
|
||||||
|
@ -2,6 +2,10 @@ export interface IAssetPalette
|
|||||||
{
|
{
|
||||||
id?: number;
|
id?: number;
|
||||||
source?: string;
|
source?: string;
|
||||||
|
master?: boolean;
|
||||||
|
tags?: string[];
|
||||||
|
breed?: number;
|
||||||
|
colorTag?: number;
|
||||||
color1?: string;
|
color1?: string;
|
||||||
color2?: string;
|
color2?: string;
|
||||||
rgb?: [ number, number, number ][];
|
rgb?: [ number, number, number ][];
|
||||||
|
7
src/core/asset/interfaces/spritesheet/ISpritesheet.ts
Normal file
7
src/core/asset/interfaces/spritesheet/ISpritesheet.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { ISpritesheetData } from '@pixi/spritesheet';
|
||||||
|
import { ISpritesheetMeta } from './ISpritesheetMeta';
|
||||||
|
|
||||||
|
export interface ISpritesheet extends ISpritesheetData
|
||||||
|
{
|
||||||
|
meta: ISpritesheetMeta;
|
||||||
|
}
|
@ -1,8 +0,0 @@
|
|||||||
import { ISpritesheetFrame } from './ISpritesheetFrame';
|
|
||||||
import { ISpritesheetMeta } from './ISpritesheetMeta';
|
|
||||||
|
|
||||||
export interface ISpritesheetData
|
|
||||||
{
|
|
||||||
meta?: ISpritesheetMeta;
|
|
||||||
frames?: { [index: string]: ISpritesheetFrame };
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
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,3 +1,2 @@
|
|||||||
export * from './ISpritesheetData';
|
export * from './ISpritesheet';
|
||||||
export * from './ISpritesheetFrame';
|
|
||||||
export * from './ISpritesheetMeta';
|
export * from './ISpritesheetMeta';
|
||||||
|
@ -4,6 +4,7 @@ import { IDisposable } from '../common/disposable/IDisposable';
|
|||||||
import { INitroLogger } from '../common/logger/INitroLogger';
|
import { INitroLogger } from '../common/logger/INitroLogger';
|
||||||
import { NitroLogger } from '../common/logger/NitroLogger';
|
import { NitroLogger } from '../common/logger/NitroLogger';
|
||||||
import { IEventDispatcher } from './IEventDispatcher';
|
import { IEventDispatcher } from './IEventDispatcher';
|
||||||
|
import { NitroEvent } from './NitroEvent';
|
||||||
|
|
||||||
export class EventDispatcher extends Disposable implements IEventDispatcher, IDisposable
|
export class EventDispatcher extends Disposable implements IEventDispatcher, IDisposable
|
||||||
{
|
{
|
||||||
@ -61,7 +62,7 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispatchEvent(event: Event): boolean
|
public dispatchEvent(event: NitroEvent): boolean
|
||||||
{
|
{
|
||||||
if(!event) return false;
|
if(!event) return false;
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private processEvent(event: Event): void
|
private processEvent(event: NitroEvent): void
|
||||||
{
|
{
|
||||||
const existing = this._listeners.get(event.type);
|
const existing = this._listeners.get(event.type);
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { IDisposable } from '../common/disposable/IDisposable';
|
import { IDisposable } from '../common/disposable/IDisposable';
|
||||||
|
import { NitroEvent } from './NitroEvent';
|
||||||
|
|
||||||
export interface IEventDispatcher extends IDisposable
|
export interface IEventDispatcher extends IDisposable
|
||||||
{
|
{
|
||||||
addEventListener(type: string, callback: Function): void
|
addEventListener(type: string, callback: Function): void
|
||||||
removeEventListener(type: string, callback: Function): void;
|
removeEventListener(type: string, callback: Function): void;
|
||||||
removeAllListeners(): void;
|
removeAllListeners(): void;
|
||||||
dispatchEvent(event: Event): boolean;
|
dispatchEvent(event: NitroEvent): boolean;
|
||||||
}
|
}
|
@ -1,4 +1,14 @@
|
|||||||
export class NitroEvent extends Event
|
export class NitroEvent
|
||||||
{
|
{
|
||||||
public static COMPLETE: string = 'NITRO_COMPLETE';
|
private _type: string;
|
||||||
|
|
||||||
|
constructor(type: string)
|
||||||
|
{
|
||||||
|
this._type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get type(): string
|
||||||
|
{
|
||||||
|
return this._type;
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,12 +7,14 @@ export class AdvancedMap<T, U> implements IDisposable
|
|||||||
private _array: U[];
|
private _array: U[];
|
||||||
private _keys: T[];
|
private _keys: T[];
|
||||||
|
|
||||||
constructor()
|
constructor(map: Map<T, U> = null)
|
||||||
{
|
{
|
||||||
this._length = 0;
|
this._length = 0;
|
||||||
this._dictionary = new Map();
|
this._dictionary = new Map();
|
||||||
this._array = [];
|
this._array = [];
|
||||||
this._keys = [];
|
this._keys = [];
|
||||||
|
|
||||||
|
if(map) for(const [ key, value ] of map.entries()) this.add(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get length(): number
|
public get length(): number
|
||||||
|
4
src/core/utils/NitroContainer.ts
Normal file
4
src/core/utils/NitroContainer.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { Container } from 'pixi.js';
|
||||||
|
|
||||||
|
export class NitroContainer extends Container
|
||||||
|
{}
|
4
src/core/utils/NitroFilter.ts
Normal file
4
src/core/utils/NitroFilter.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { Filter } from 'pixi.js';
|
||||||
|
|
||||||
|
export class NitroFilter extends Filter
|
||||||
|
{}
|
4
src/core/utils/NitroRectangle.ts
Normal file
4
src/core/utils/NitroRectangle.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { Rectangle } from 'pixi.js';
|
||||||
|
|
||||||
|
export class NitroRectangle extends Rectangle
|
||||||
|
{}
|
4
src/core/utils/NitroSprite.ts
Normal file
4
src/core/utils/NitroSprite.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { Sprite } from 'pixi.js';
|
||||||
|
|
||||||
|
export class NitroSprite extends Sprite
|
||||||
|
{}
|
4
src/core/utils/NitroTexture.ts
Normal file
4
src/core/utils/NitroTexture.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { Texture } from 'pixi.js';
|
||||||
|
|
||||||
|
export class NitroTexture extends Texture
|
||||||
|
{}
|
@ -1,3 +1,10 @@
|
|||||||
export * from './AdvancedMap';
|
export * from './AdvancedMap';
|
||||||
|
export * from './INitroPoint';
|
||||||
export * from './NitroAdjustmentFilter';
|
export * from './NitroAdjustmentFilter';
|
||||||
|
export * from './NitroContainer';
|
||||||
|
export * from './NitroFilter';
|
||||||
|
export * from './NitroPoint';
|
||||||
|
export * from './NitroRectangle';
|
||||||
|
export * from './NitroSprite';
|
||||||
|
export * from './NitroTexture';
|
||||||
export * from './NitroTimer';
|
export * from './NitroTimer';
|
||||||
|
@ -6,6 +6,7 @@ import { INitroCore } from '../core/INitroCore';
|
|||||||
import { NitroTimer } from '../core/utils/NitroTimer';
|
import { NitroTimer } from '../core/utils/NitroTimer';
|
||||||
import { IRoomManager } from '../room/IRoomManager';
|
import { IRoomManager } from '../room/IRoomManager';
|
||||||
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
||||||
|
import { IRoomCameraWidgetManager } from './camera/IRoomCameraWidgetManager';
|
||||||
import { INitroCommunicationManager } from './communication/INitroCommunicationManager';
|
import { INitroCommunicationManager } from './communication/INitroCommunicationManager';
|
||||||
import { INitroLocalizationManager } from './localization/INitroLocalizationManager';
|
import { INitroLocalizationManager } from './localization/INitroLocalizationManager';
|
||||||
import { IRoomEngine } from './room/IRoomEngine';
|
import { IRoomEngine } from './room/IRoomEngine';
|
||||||
@ -38,6 +39,7 @@ export interface INitro extends Application
|
|||||||
sessionDataManager: ISessionDataManager;
|
sessionDataManager: ISessionDataManager;
|
||||||
roomSessionManager: IRoomSessionManager;
|
roomSessionManager: IRoomSessionManager;
|
||||||
roomManager: IRoomManager;
|
roomManager: IRoomManager;
|
||||||
|
cameraManager: IRoomCameraWidgetManager;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
time: number;
|
time: number;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Application, SCALE_MODES, settings } from 'pixi.js';
|
import { Application, IApplicationOptions, SCALE_MODES, settings } from 'pixi.js';
|
||||||
|
import { INitroManager } from '..';
|
||||||
import { ConfigurationEvent } from '../core/configuration/ConfigurationEvent';
|
import { ConfigurationEvent } from '../core/configuration/ConfigurationEvent';
|
||||||
import { EventDispatcher } from '../core/events/EventDispatcher';
|
import { EventDispatcher } from '../core/events/EventDispatcher';
|
||||||
import { IEventDispatcher } from '../core/events/IEventDispatcher';
|
import { IEventDispatcher } from '../core/events/IEventDispatcher';
|
||||||
@ -12,6 +13,8 @@ import { IRoomManager } from '../room/IRoomManager';
|
|||||||
import { RoomManager } from '../room/RoomManager';
|
import { RoomManager } from '../room/RoomManager';
|
||||||
import { AvatarRenderManager } from './avatar/AvatarRenderManager';
|
import { AvatarRenderManager } from './avatar/AvatarRenderManager';
|
||||||
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
||||||
|
import { IRoomCameraWidgetManager } from './camera/IRoomCameraWidgetManager';
|
||||||
|
import { RoomCameraWidgetManager } from './camera/RoomCameraWidgetManager';
|
||||||
import { INitroCommunicationManager } from './communication/INitroCommunicationManager';
|
import { INitroCommunicationManager } from './communication/INitroCommunicationManager';
|
||||||
import { NitroCommunicationManager } from './communication/NitroCommunicationManager';
|
import { NitroCommunicationManager } from './communication/NitroCommunicationManager';
|
||||||
import { LegacyExternalInterface } from './externalInterface/LegacyExternalInterface';
|
import { LegacyExternalInterface } from './externalInterface/LegacyExternalInterface';
|
||||||
@ -26,21 +29,22 @@ import { IRoomSessionManager } from './session/IRoomSessionManager';
|
|||||||
import { ISessionDataManager } from './session/ISessionDataManager';
|
import { ISessionDataManager } from './session/ISessionDataManager';
|
||||||
import { RoomSessionManager } from './session/RoomSessionManager';
|
import { RoomSessionManager } from './session/RoomSessionManager';
|
||||||
import { SessionDataManager } from './session/SessionDataManager';
|
import { SessionDataManager } from './session/SessionDataManager';
|
||||||
|
import { SoundManager } from './sound/SoundManager';
|
||||||
import { HabboWebTools } from './utils/HabboWebTools';
|
import { HabboWebTools } from './utils/HabboWebTools';
|
||||||
|
|
||||||
LegacyExternalInterface.available;
|
LegacyExternalInterface.available;
|
||||||
|
|
||||||
settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = false;
|
|
||||||
settings.SCALE_MODE = SCALE_MODES.NEAREST;
|
settings.SCALE_MODE = SCALE_MODES.NEAREST;
|
||||||
|
settings.ROUND_PIXELS = true;
|
||||||
|
|
||||||
export class Nitro extends Application implements INitro
|
export class Nitro extends Application implements INitro
|
||||||
{
|
{
|
||||||
public static WEBGL_CONTEXT_LOST: string = 'NE_WEBGL_CONTEXT_LOST';
|
public static WEBGL_CONTEXT_LOST: string = 'NE_WEBGL_CONTEXT_LOST';
|
||||||
public static WEBGL_UNAVAILABLE: string = 'NE_WEBGL_UNAVAILABLE';
|
public static WEBGL_UNAVAILABLE: string = 'NE_WEBGL_UNAVAILABLE';
|
||||||
public static RELEASE_VERSION: string = 'NITRO-0-4-0';
|
public static RELEASE_VERSION: string = 'NITRO-2-0-0';
|
||||||
public static READY: string = 'NE_READY';
|
public static READY: string = 'NE_READY';
|
||||||
|
|
||||||
private static INSTANCE: INitro = null;
|
private static INSTANCE: INitro = null;
|
||||||
|
|
||||||
private _nitroTimer: NitroTimer;
|
private _nitroTimer: NitroTimer;
|
||||||
private _worker: Worker;
|
private _worker: Worker;
|
||||||
@ -53,30 +57,15 @@ export class Nitro extends Application implements INitro
|
|||||||
private _sessionDataManager: ISessionDataManager;
|
private _sessionDataManager: ISessionDataManager;
|
||||||
private _roomSessionManager: IRoomSessionManager;
|
private _roomSessionManager: IRoomSessionManager;
|
||||||
private _roomManager: IRoomManager;
|
private _roomManager: IRoomManager;
|
||||||
|
private _cameraManager: IRoomCameraWidgetManager;
|
||||||
|
private _soundManager: INitroManager;
|
||||||
private _linkTrackers: ILinkEventTracker[];
|
private _linkTrackers: ILinkEventTracker[];
|
||||||
private _workerTrackers: IWorkerEventTracker[];
|
private _workerTrackers: IWorkerEventTracker[];
|
||||||
|
|
||||||
private _isReady: boolean;
|
private _isReady: boolean;
|
||||||
private _isDisposed: boolean;
|
private _isDisposed: boolean;
|
||||||
|
|
||||||
constructor(core: INitroCore, options?: {
|
constructor(core: INitroCore, options?: IApplicationOptions)
|
||||||
autoStart?: boolean;
|
|
||||||
width?: number;
|
|
||||||
height?: number;
|
|
||||||
view?: HTMLCanvasElement;
|
|
||||||
transparent?: boolean;
|
|
||||||
autoDensity?: boolean;
|
|
||||||
antialias?: boolean;
|
|
||||||
preserveDrawingBuffer?: boolean;
|
|
||||||
resolution?: number;
|
|
||||||
forceCanvas?: boolean;
|
|
||||||
backgroundColor?: number;
|
|
||||||
clearBeforeRender?: boolean;
|
|
||||||
powerPreference?: string;
|
|
||||||
sharedTicker?: boolean;
|
|
||||||
sharedLoader?: boolean;
|
|
||||||
resizeTo?: Window | HTMLElement;
|
|
||||||
})
|
|
||||||
{
|
{
|
||||||
super(options);
|
super(options);
|
||||||
|
|
||||||
@ -93,6 +82,8 @@ export class Nitro extends Application implements INitro
|
|||||||
this._sessionDataManager = new SessionDataManager(this._communication);
|
this._sessionDataManager = new SessionDataManager(this._communication);
|
||||||
this._roomSessionManager = new RoomSessionManager(this._communication, this._roomEngine);
|
this._roomSessionManager = new RoomSessionManager(this._communication, this._roomEngine);
|
||||||
this._roomManager = new RoomManager(this._roomEngine, this._roomEngine.visualizationFactory, this._roomEngine.logicFactory);
|
this._roomManager = new RoomManager(this._roomEngine, this._roomEngine.visualizationFactory, this._roomEngine.logicFactory);
|
||||||
|
this._cameraManager = new RoomCameraWidgetManager();
|
||||||
|
this._soundManager = new SoundManager();
|
||||||
this._linkTrackers = [];
|
this._linkTrackers = [];
|
||||||
this._workerTrackers = [];
|
this._workerTrackers = [];
|
||||||
|
|
||||||
@ -120,7 +111,6 @@ export class Nitro extends Application implements INitro
|
|||||||
canvas.className = 'client-canvas';
|
canvas.className = 'client-canvas';
|
||||||
|
|
||||||
const instance = new this(new NitroCore(), {
|
const instance = new this(new NitroCore(), {
|
||||||
transparent: true,
|
|
||||||
autoDensity: true,
|
autoDensity: true,
|
||||||
resolution: window.devicePixelRatio,
|
resolution: window.devicePixelRatio,
|
||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
@ -142,6 +132,8 @@ export class Nitro extends Application implements INitro
|
|||||||
|
|
||||||
if(this._avatar) this._avatar.init();
|
if(this._avatar) this._avatar.init();
|
||||||
|
|
||||||
|
if(this._soundManager) this._soundManager.init();
|
||||||
|
|
||||||
if(this._roomEngine)
|
if(this._roomEngine)
|
||||||
{
|
{
|
||||||
this._roomEngine.sessionDataManager = this._sessionDataManager;
|
this._roomEngine.sessionDataManager = this._sessionDataManager;
|
||||||
@ -203,6 +195,13 @@ export class Nitro extends Application implements INitro
|
|||||||
this._avatar = null;
|
this._avatar = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this._soundManager)
|
||||||
|
{
|
||||||
|
this._soundManager.dispose();
|
||||||
|
|
||||||
|
this._soundManager = null;
|
||||||
|
}
|
||||||
|
|
||||||
if(this._communication)
|
if(this._communication)
|
||||||
{
|
{
|
||||||
this._communication.dispose();
|
this._communication.dispose();
|
||||||
@ -221,7 +220,7 @@ export class Nitro extends Application implements INitro
|
|||||||
const animationFPS = this.getConfiguration<number>('animation.fps', 24);
|
const animationFPS = this.getConfiguration<number>('animation.fps', 24);
|
||||||
const limitsFPS = this.getConfiguration<boolean>('limits.fps', true);
|
const limitsFPS = this.getConfiguration<boolean>('limits.fps', true);
|
||||||
|
|
||||||
Nitro.instance.ticker.maxFPS = animationFPS;
|
if(limitsFPS) Nitro.instance.ticker.maxFPS = animationFPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onRoomEngineReady(event: RoomEngineEvent): void
|
private onRoomEngineReady(event: RoomEngineEvent): void
|
||||||
@ -391,6 +390,11 @@ export class Nitro extends Application implements INitro
|
|||||||
return this._roomManager;
|
return this._roomManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get cameraManager(): IRoomCameraWidgetManager
|
||||||
|
{
|
||||||
|
return this._cameraManager;
|
||||||
|
}
|
||||||
|
|
||||||
public get width(): number
|
public get width(): number
|
||||||
{
|
{
|
||||||
return (this.renderer.width / this.renderer.resolution);
|
return (this.renderer.width / this.renderer.resolution);
|
||||||
|
@ -240,19 +240,19 @@ export class AvatarAssetDownloadManager extends EventDispatcher
|
|||||||
|
|
||||||
if(!figureData) return pendingLibraries;
|
if(!figureData) return pendingLibraries;
|
||||||
|
|
||||||
const setKeys = container._Str_1016();
|
const setKeys = container.getPartTypeIds();
|
||||||
|
|
||||||
for(const key of setKeys)
|
for(const key of setKeys)
|
||||||
{
|
{
|
||||||
const set = figureData._Str_740(key);
|
const set = figureData.getSetType(key);
|
||||||
|
|
||||||
if(!set) continue;
|
if(!set) continue;
|
||||||
|
|
||||||
const figurePartSet = set._Str_1020(container.getPartSetId(key));
|
const figurePartSet = set.getPartSet(container.getPartSetId(key));
|
||||||
|
|
||||||
if(!figurePartSet) continue;
|
if(!figurePartSet) continue;
|
||||||
|
|
||||||
for(const part of figurePartSet._Str_806)
|
for(const part of figurePartSet.parts)
|
||||||
{
|
{
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ export class AvatarAssetDownloadManager extends EventDispatcher
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const figure = container._Str_1008();
|
const figure = container.getFigureString();
|
||||||
const pendingLibraries = this.getAvatarFigurePendingLibraries(container);
|
const pendingLibraries = this.getAvatarFigurePendingLibraries(container);
|
||||||
|
|
||||||
if(pendingLibraries && pendingLibraries.length)
|
if(pendingLibraries && pendingLibraries.length)
|
||||||
|
@ -11,12 +11,12 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
this.parseFigure(figure);
|
this.parseFigure(figure);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1016(): IterableIterator<string>
|
public getPartTypeIds(): IterableIterator<string>
|
||||||
{
|
{
|
||||||
return this.partSets().keys();
|
return this.partSets().keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_744(k: string): boolean
|
public hasPartType(k: string): boolean
|
||||||
{
|
{
|
||||||
return this.partSets().get(k) !== null;
|
return this.partSets().get(k) !== null;
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
return existing.get('setid');
|
return existing.get('setid');
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_815(k: string): number[]
|
public getPartColorIds(k: string): number[]
|
||||||
{
|
{
|
||||||
const existing = this.partSets().get(k);
|
const existing = this.partSets().get(k);
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
return existing.get('colorids');
|
return existing.get('colorids');
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_830(k: string, _arg_2: number, _arg_3: number[]): void
|
public updatePart(k: string, _arg_2: number, _arg_3: number[]): void
|
||||||
{
|
{
|
||||||
const set: Map<string, any> = new Map();
|
const set: Map<string, any> = new Map();
|
||||||
|
|
||||||
@ -53,12 +53,12 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
existingSets.set(k, set);
|
existingSets.set(k, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_923(k: string): void
|
public removePart(k: string): void
|
||||||
{
|
{
|
||||||
this.partSets().delete(k);
|
this.partSets().delete(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1008(): string
|
public getFigureString(): string
|
||||||
{
|
{
|
||||||
const parts: string[] = [];
|
const parts: string[] = [];
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
setParts.push(key);
|
setParts.push(key);
|
||||||
setParts.push(this.getPartSetId(key));
|
setParts.push(this.getPartSetId(key));
|
||||||
|
|
||||||
setParts = setParts.concat(this._Str_815(key));
|
setParts = setParts.concat(this.getPartColorIds(key));
|
||||||
|
|
||||||
parts.push(setParts.join('-'));
|
parts.push(setParts.join('-'));
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ export class AvatarFigureContainer implements IAvatarFigureContainer
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._Str_830(type, setId, colors);
|
this.updatePart(type, setId, colors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
this.setDirection(AvatarImage.DEFAULT_AVATAR_SET, AvatarImage.DEFAULT_DIRECTION);
|
this.setDirection(AvatarImage.DEFAULT_AVATAR_SET, AvatarImage.DEFAULT_DIRECTION);
|
||||||
this._actions = [];
|
this._actions = [];
|
||||||
this._defaultAction = new ActiveActionData(AvatarAction.POSTURE_STAND);
|
this._defaultAction = new ActiveActionData(AvatarAction.POSTURE_STAND);
|
||||||
this._defaultAction._Str_742 = this._structure._Str_1675(AvatarImage.DEFAULT_ACTION);
|
this._defaultAction.definition = this._structure.getActionDefinition(AvatarImage.DEFAULT_ACTION);
|
||||||
this.resetActions();
|
this.resetActions();
|
||||||
this._fullImageCache = new AdvancedMap();
|
this._fullImageCache = new AdvancedMap();
|
||||||
this._animationFrameCount = 0;
|
this._animationFrameCount = 0;
|
||||||
@ -109,7 +109,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
{
|
{
|
||||||
this.getAvatarPartsForCamera(AvatarSetType.FULL);
|
this.getAvatarPartsForCamera(AvatarSetType.FULL);
|
||||||
|
|
||||||
return this._cache._Str_1009();
|
return this._cache.getServerRenderData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
@ -165,7 +165,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
public getPartColor(k: string): IPartColor
|
public getPartColor(k: string): IPartColor
|
||||||
{
|
{
|
||||||
return this._structure._Str_867(this._figure, k);
|
return this._structure.getPartColor(this._figure, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public setDirection(k: string, _arg_2: number): void
|
public setDirection(k: string, _arg_2: number): void
|
||||||
@ -182,7 +182,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
_arg_2 = (_arg_2 - (AvatarDirectionAngle.MAX_DIRECTION + 1));
|
_arg_2 = (_arg_2 - (AvatarDirectionAngle.MAX_DIRECTION + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this._structure._Str_1939(k))
|
if(this._structure.isMainAvatarSet(k))
|
||||||
{
|
{
|
||||||
this._mainDirection = _arg_2;
|
this._mainDirection = _arg_2;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
public getLayerData(k: ISpriteDataContainer): IAnimationLayerData
|
public getLayerData(k: ISpriteDataContainer): IAnimationLayerData
|
||||||
{
|
{
|
||||||
return this._structure._Str_1881(k.animation.id, this._frameCounter, k.id);
|
return this._structure.getBodyPartData(k.animation.id, this._frameCounter, k.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateAnimationByFrames(k: number = 1): void
|
public updateAnimationByFrames(k: number = 1): void
|
||||||
@ -246,25 +246,25 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
{
|
{
|
||||||
for(const k of this._sortedActions)
|
for(const k of this._sortedActions)
|
||||||
{
|
{
|
||||||
if(((k._Str_695 == 'fx') && ((((k._Str_727 == '33') || (k._Str_727 == '34')) || (k._Str_727 == '35')) || (k._Str_727 == '36'))))
|
if(((k.actionType == 'fx') && ((((k.actionParameter == '33') || (k.actionParameter == '34')) || (k.actionParameter == '35')) || (k.actionParameter == '36'))))
|
||||||
{
|
{
|
||||||
return (this._mainDirection + this._currentActionsString) + 0;
|
return (this._mainDirection + this._currentActionsString) + 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((k._Str_695 == 'fx') && ((k._Str_727 == '38') || (k._Str_727 == '39'))))
|
if(((k.actionType == 'fx') && ((k.actionParameter == '38') || (k.actionParameter == '39'))))
|
||||||
{
|
{
|
||||||
return (((this._mainDirection + '_') + this._headDirection) + this._currentActionsString) + (this._frameCounter % 11);
|
return (((this._mainDirection + '_') + this._headDirection) + this._currentActionsString) + (this._frameCounter % 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((k._Str_695 === 'dance') && ((k._Str_727 === '1') || (k._Str_727 === '2') || (k._Str_727 === '3') || (k._Str_727 === '4')))
|
if((k.actionType === 'dance') && ((k.actionParameter === '1') || (k.actionParameter === '2') || (k.actionParameter === '3') || (k.actionParameter === '4')))
|
||||||
{
|
{
|
||||||
let frame = (this._frameCounter % 8);
|
let frame = (this._frameCounter % 8);
|
||||||
|
|
||||||
if((k._Str_727 === '3')) frame = (this._frameCounter % 10);
|
if((k.actionParameter === '3')) frame = (this._frameCounter % 10);
|
||||||
|
|
||||||
if((k._Str_727 === '4')) frame = (this._frameCounter % 16);
|
if((k.actionParameter === '4')) frame = (this._frameCounter % 16);
|
||||||
|
|
||||||
return (((this._mainDirection + k._Str_695) + k._Str_727) + frame);
|
return (((this._mainDirection + k.actionType) + k.actionParameter) + frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -279,7 +279,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
this._cachedBodyPartsDirection = _arg_3;
|
this._cachedBodyPartsDirection = _arg_3;
|
||||||
this._cachedBodyPartsGeometryType = _arg_2;
|
this._cachedBodyPartsGeometryType = _arg_2;
|
||||||
this._cachedBodyPartsAvatarSet = k;
|
this._cachedBodyPartsAvatarSet = k;
|
||||||
this._cachedBodyParts = this._structure._Str_755(k, _arg_2, _arg_3);
|
this._cachedBodyParts = this._structure.getBodyParts(k, _arg_2, _arg_3);
|
||||||
}
|
}
|
||||||
return this._cachedBodyParts;
|
return this._cachedBodyParts;
|
||||||
}
|
}
|
||||||
@ -291,17 +291,17 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const _local_2 = this._structure._Str_1664(this._scale, this._mainAction._Str_742._Str_868);
|
const _local_2 = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
|
||||||
if(_local_2 == null)
|
if(_local_2 == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const _local_3 = this.getBodyParts(k, this._mainAction._Str_742._Str_868, this._mainDirection);
|
const _local_3 = this.getBodyParts(k, this._mainAction.definition.geometryType, this._mainDirection);
|
||||||
let _local_6 = (_local_3.length - 1);
|
let _local_6 = (_local_3.length - 1);
|
||||||
while(_local_6 >= 0)
|
while(_local_6 >= 0)
|
||||||
{
|
{
|
||||||
_local_4 = _local_3[_local_6];
|
_local_4 = _local_3[_local_6];
|
||||||
const _local_5 = this._cache._Str_1629(_local_4, this._frameCounter, true);
|
const _local_5 = this._cache.getImageContainer(_local_4, this._frameCounter, true);
|
||||||
_local_6--;
|
_local_6--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
if(!this._actionsSorted) this.endActionAppends();
|
if(!this._actionsSorted) this.endActionAppends();
|
||||||
|
|
||||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction._Str_742._Str_868);
|
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
|
||||||
|
|
||||||
if(!avatarCanvas) return null;
|
if(!avatarCanvas) return null;
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
this._isCachedImage = false;
|
this._isCachedImage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _local_6 = this.getBodyParts(setType, this._mainAction._Str_742._Str_868, this._mainDirection);
|
const _local_6 = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
||||||
|
|
||||||
this._image = null;
|
this._image = null;
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
while(partCount >= 0)
|
while(partCount >= 0)
|
||||||
{
|
{
|
||||||
const set = _local_6[partCount];
|
const set = _local_6[partCount];
|
||||||
const part = this._cache._Str_1629(set, this._frameCounter);
|
const part = this._cache.getImageContainer(set, this._frameCounter);
|
||||||
|
|
||||||
if(part)
|
if(part)
|
||||||
{
|
{
|
||||||
@ -358,17 +358,17 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
isCachable = ((isCachable) && (part._Str_1807));
|
isCachable = ((isCachable) && (part.isCacheable));
|
||||||
|
|
||||||
const point = part._Str_1076.clone();
|
const point = part.regPoint.clone();
|
||||||
|
|
||||||
if(point)
|
if(point)
|
||||||
{
|
{
|
||||||
point.x += avatarCanvas.offset.x;
|
point.x += avatarCanvas.offset.x;
|
||||||
point.y += avatarCanvas.offset.y;
|
point.y += avatarCanvas.offset.y;
|
||||||
|
|
||||||
point.x += avatarCanvas._Str_1076.x;
|
point.x += avatarCanvas.regPoint.x;
|
||||||
point.y += avatarCanvas._Str_1076.y;
|
point.y += avatarCanvas.regPoint.y;
|
||||||
|
|
||||||
const partContainer = new Container();
|
const partContainer = new Container();
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
partCount--;
|
partCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this._avatarSpriteData && this._avatarSpriteData._Str_832) this.convertToGrayscale(container);
|
if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale) this.convertToGrayscale(container);
|
||||||
|
|
||||||
if(!cache)
|
if(!cache)
|
||||||
{
|
{
|
||||||
@ -395,7 +395,10 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
if(this._reusableTexture)
|
if(this._reusableTexture)
|
||||||
{
|
{
|
||||||
Nitro.instance.renderer.render(container, this._reusableTexture, true);
|
Nitro.instance.renderer.render(container, {
|
||||||
|
renderTexture: this._reusableTexture,
|
||||||
|
clear: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -404,7 +407,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
if(!this._reusableTexture) return null;
|
if(!this._reusableTexture) return null;
|
||||||
|
|
||||||
if(this._avatarSpriteData && this._avatarSpriteData._Str_832)
|
if(this._avatarSpriteData && this._avatarSpriteData.paletteIsGrayscale)
|
||||||
{
|
{
|
||||||
//this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds);
|
//this._reusableTexture = this.applyPalette(this._reusableTexture, this._avatarSpriteData.reds);
|
||||||
}
|
}
|
||||||
@ -444,11 +447,11 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
if(!this._actionsSorted) this.endActionAppends();
|
if(!this._actionsSorted) this.endActionAppends();
|
||||||
|
|
||||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction._Str_742._Str_868);
|
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
|
||||||
|
|
||||||
if(!avatarCanvas) return null;
|
if(!avatarCanvas) return null;
|
||||||
|
|
||||||
const setTypes = this.getBodyParts(setType, this._mainAction._Str_742._Str_868, this._mainDirection);
|
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
||||||
const container = new Sprite();
|
const container = new Sprite();
|
||||||
const sprite = new Sprite(Texture.EMPTY);
|
const sprite = new Sprite(Texture.EMPTY);
|
||||||
|
|
||||||
@ -462,7 +465,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
while(partCount >= 0)
|
while(partCount >= 0)
|
||||||
{
|
{
|
||||||
const set = setTypes[partCount];
|
const set = setTypes[partCount];
|
||||||
const part = this._cache._Str_1629(set, this._frameCounter);
|
const part = this._cache.getImageContainer(set, this._frameCounter);
|
||||||
|
|
||||||
if(part)
|
if(part)
|
||||||
{
|
{
|
||||||
@ -477,15 +480,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const point = part._Str_1076.clone();
|
const point = part.regPoint.clone();
|
||||||
|
|
||||||
if(point)
|
if(point)
|
||||||
{
|
{
|
||||||
point.x += avatarCanvas.offset.x;
|
point.x += avatarCanvas.offset.x;
|
||||||
point.y += avatarCanvas.offset.y;
|
point.y += avatarCanvas.offset.y;
|
||||||
|
|
||||||
point.x += avatarCanvas._Str_1076.x;
|
point.x += avatarCanvas.regPoint.x;
|
||||||
point.y += avatarCanvas._Str_1076.y;
|
point.y += avatarCanvas.regPoint.y;
|
||||||
|
|
||||||
const partContainer = new Container();
|
const partContainer = new Container();
|
||||||
|
|
||||||
@ -509,11 +512,11 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
if(!this._actionsSorted) this.endActionAppends();
|
if(!this._actionsSorted) this.endActionAppends();
|
||||||
|
|
||||||
const avatarCanvas = this._structure._Str_1664(this._scale, this._mainAction._Str_742._Str_868);
|
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
|
||||||
|
|
||||||
if(!avatarCanvas) return null;
|
if(!avatarCanvas) return null;
|
||||||
|
|
||||||
const setTypes = this.getBodyParts(setType, this._mainAction._Str_742._Str_868, this._mainDirection);
|
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
||||||
const container = new Container();
|
const container = new Container();
|
||||||
const sprite = new Sprite(Texture.EMPTY);
|
const sprite = new Sprite(Texture.EMPTY);
|
||||||
|
|
||||||
@ -527,7 +530,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
while(partCount >= 0)
|
while(partCount >= 0)
|
||||||
{
|
{
|
||||||
const set = setTypes[partCount];
|
const set = setTypes[partCount];
|
||||||
const part = this._cache._Str_1629(set, this._frameCounter);
|
const part = this._cache.getImageContainer(set, this._frameCounter);
|
||||||
|
|
||||||
if(part)
|
if(part)
|
||||||
{
|
{
|
||||||
@ -542,15 +545,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const point = part._Str_1076.clone();
|
const point = part.regPoint.clone();
|
||||||
|
|
||||||
if(point)
|
if(point)
|
||||||
{
|
{
|
||||||
point.x += avatarCanvas.offset.x;
|
point.x += avatarCanvas.offset.x;
|
||||||
point.y += avatarCanvas.offset.y;
|
point.y += avatarCanvas.offset.y;
|
||||||
|
|
||||||
point.x += avatarCanvas._Str_1076.x;
|
point.x += avatarCanvas.regPoint.x;
|
||||||
point.y += avatarCanvas._Str_1076.y;
|
point.y += avatarCanvas.regPoint.y;
|
||||||
|
|
||||||
const partContainer = new Container();
|
const partContainer = new Container();
|
||||||
|
|
||||||
@ -568,7 +571,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
partCount--;
|
partCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
const image = Nitro.instance.renderer.extract.image(container);
|
const image = TextureUtils.generateImage(container);
|
||||||
|
|
||||||
if(!image) return null;
|
if(!image) return null;
|
||||||
|
|
||||||
@ -646,9 +649,9 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
for(const k of this._sortedActions)
|
for(const k of this._sortedActions)
|
||||||
{
|
{
|
||||||
if(k._Str_695 === AvatarAction.EFFECT)
|
if(k.actionType === AvatarAction.EFFECT)
|
||||||
{
|
{
|
||||||
if(!this._effectManager.isAvatarEffectReady(parseInt(k._Str_727))) this._effectManager.downloadAvatarEffect(parseInt(k._Str_727), this);
|
if(!this._effectManager.isAvatarEffectReady(parseInt(k.actionParameter))) this._effectManager.downloadAvatarEffect(parseInt(k.actionParameter), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -741,8 +744,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
break;
|
break;
|
||||||
case AvatarAction.CARRY_OBJECT:
|
case AvatarAction.CARRY_OBJECT:
|
||||||
case AvatarAction.USE_OBJECT: {
|
case AvatarAction.USE_OBJECT: {
|
||||||
const _local_4 = this._structure._Str_2018(k);
|
const _local_4 = this._structure.getActionDefinitionWithState(k);
|
||||||
if(_local_4) _local_3 = _local_4._Str_1350(_local_3);
|
if(_local_4) _local_3 = _local_4.getParameterValue(_local_3);
|
||||||
this.addActionData(k, _local_3);
|
this.addActionData(k, _local_3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -760,7 +763,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
while(_local_4 < this._actions.length)
|
while(_local_4 < this._actions.length)
|
||||||
{
|
{
|
||||||
_local_3 = this._actions[_local_4];
|
_local_3 = this._actions[_local_4];
|
||||||
if(((_local_3._Str_695 == k) && (_local_3._Str_727 == _arg_2)))
|
if(((_local_3.actionType == k) && (_local_3.actionParameter == _arg_2)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -781,9 +784,9 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
this._sprites = [];
|
this._sprites = [];
|
||||||
this._avatarSpriteData = null;
|
this._avatarSpriteData = null;
|
||||||
this._directionOffset = 0;
|
this._directionOffset = 0;
|
||||||
this._structure._Str_2101(this);
|
this._structure.removeDynamicItems(this);
|
||||||
this._mainAction = this._defaultAction;
|
this._mainAction = this._defaultAction;
|
||||||
this._mainAction._Str_742 = this._defaultAction._Str_742;
|
this._mainAction.definition = this._defaultAction.definition;
|
||||||
this.resetBodyPartCache(this._defaultAction);
|
this.resetBodyPartCache(this._defaultAction);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -799,8 +802,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
}
|
}
|
||||||
for(const _local_3 of this._sortedActions)
|
for(const _local_3 of this._sortedActions)
|
||||||
{
|
{
|
||||||
_local_2 = this._structure._Str_2018(_local_3._Str_695);
|
_local_2 = this._structure.getActionDefinitionWithState(_local_3.actionType);
|
||||||
if(((!(_local_2 == null)) && (_local_2._Str_715(_local_3._Str_727))))
|
if(((!(_local_2 == null)) && (_local_2.getPreventHeadTurn(_local_3.actionParameter))))
|
||||||
{
|
{
|
||||||
k = true;
|
k = true;
|
||||||
}
|
}
|
||||||
@ -817,8 +820,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
let k: boolean;
|
let k: boolean;
|
||||||
|
|
||||||
this._currentActionsString = '';
|
this._currentActionsString = '';
|
||||||
this._sortedActions = this._structure._Str_711(this._actions);
|
this._sortedActions = this._structure.sortActions(this._actions);
|
||||||
this._animationFrameCount = this._structure._Str_1936(this._sortedActions);
|
this._animationFrameCount = this._structure.maxFrames(this._sortedActions);
|
||||||
|
|
||||||
if(!this._sortedActions)
|
if(!this._sortedActions)
|
||||||
{
|
{
|
||||||
@ -833,15 +836,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this._canvasOffsets = this._structure._Str_781(this._sortedActions, this._scale, this._mainDirection);
|
this._canvasOffsets = this._structure.getCanvasOffsets(this._sortedActions, this._scale, this._mainDirection);
|
||||||
|
|
||||||
for(const _local_4 of this._sortedActions)
|
for(const _local_4 of this._sortedActions)
|
||||||
{
|
{
|
||||||
this._currentActionsString = (this._currentActionsString + (_local_4._Str_695 + _local_4._Str_727));
|
this._currentActionsString = (this._currentActionsString + (_local_4.actionType + _local_4.actionParameter));
|
||||||
|
|
||||||
if(_local_4._Str_695 === AvatarAction.EFFECT)
|
if(_local_4.actionType === AvatarAction.EFFECT)
|
||||||
{
|
{
|
||||||
const _local_5 = parseInt(_local_4._Str_727);
|
const _local_5 = parseInt(_local_4.actionParameter);
|
||||||
|
|
||||||
if(this._effectIdInUse !== _local_5) _local_2 = true;
|
if(this._effectIdInUse !== _local_5) _local_2 = true;
|
||||||
|
|
||||||
@ -858,7 +861,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
this._effectIdInUse = -1;
|
this._effectIdInUse = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_local_2) this._cache._Str_1086(0);
|
if(_local_2) this._cache.disposeInactiveActions(0);
|
||||||
|
|
||||||
if(this._lastActionsString != this._currentActionsString)
|
if(this._lastActionsString != this._currentActionsString)
|
||||||
{
|
{
|
||||||
@ -880,23 +883,23 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
const _local_3: number = Nitro.instance.time;
|
const _local_3: number = Nitro.instance.time;
|
||||||
const _local_4: string[] = [];
|
const _local_4: string[] = [];
|
||||||
|
|
||||||
for(const k of this._sortedActions) _local_4.push(k._Str_695);
|
for(const k of this._sortedActions) _local_4.push(k.actionType);
|
||||||
|
|
||||||
for(const k of this._sortedActions)
|
for(const k of this._sortedActions)
|
||||||
{
|
{
|
||||||
if((k && k._Str_742) && k._Str_742._Str_861)
|
if((k && k.definition) && k.definition.isAnimation)
|
||||||
{
|
{
|
||||||
const _local_2 = this._structure._Str_720(((k._Str_742.state + '.') + k._Str_727));
|
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
|
||||||
|
|
||||||
if(_local_2 && _local_2._Str_1892())
|
if(_local_2 && _local_2.hasOverriddenActions())
|
||||||
{
|
{
|
||||||
const _local_5 = _local_2._Str_1571();
|
const _local_5 = _local_2.overriddenActionNames();
|
||||||
|
|
||||||
if(_local_5)
|
if(_local_5)
|
||||||
{
|
{
|
||||||
for(const _local_6 of _local_5)
|
for(const _local_6 of _local_5)
|
||||||
{
|
{
|
||||||
if(_local_4.indexOf(_local_6) >= 0) k._Str_707 = _local_2._Str_707(_local_6);
|
if(_local_4.indexOf(_local_6) >= 0) k.overridingAction = _local_2.overridingAction(_local_6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -910,25 +913,25 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
for(const k of this._sortedActions)
|
for(const k of this._sortedActions)
|
||||||
{
|
{
|
||||||
if(!((!(k)) || (!(k._Str_742))))
|
if(!((!(k)) || (!(k.definition))))
|
||||||
{
|
{
|
||||||
if(k._Str_742._Str_861 && (k._Str_727 === '')) k._Str_727 = '1';
|
if(k.definition.isAnimation && (k.actionParameter === '')) k.actionParameter = '1';
|
||||||
|
|
||||||
this.setActionToParts(k, _local_3);
|
this.setActionToParts(k, _local_3);
|
||||||
|
|
||||||
if(k._Str_742._Str_861)
|
if(k.definition.isAnimation)
|
||||||
{
|
{
|
||||||
this._isAnimating = k._Str_742._Str_801(k._Str_727);
|
this._isAnimating = k.definition.isAnimated(k.actionParameter);
|
||||||
|
|
||||||
const _local_2 = this._structure._Str_720(((k._Str_742.state + '.') + k._Str_727));
|
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
|
||||||
|
|
||||||
if(_local_2)
|
if(_local_2)
|
||||||
{
|
{
|
||||||
this._sprites = this._sprites.concat(_local_2._Str_786);
|
this._sprites = this._sprites.concat(_local_2.spriteData);
|
||||||
|
|
||||||
if(_local_2._Str_776()) this._directionOffset = _local_2._Str_1493.offset;
|
if(_local_2.hasDirectionData()) this._directionOffset = _local_2.directionData.offset;
|
||||||
|
|
||||||
if(_local_2._Str_872()) this._avatarSpriteData = _local_2._Str_1475;
|
if(_local_2.hasAvatarData()) this._avatarSpriteData = _local_2.avatarData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -937,20 +940,20 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
private setActionToParts(k: IActiveActionData, _arg_2: number): void
|
private setActionToParts(k: IActiveActionData, _arg_2: number): void
|
||||||
{
|
{
|
||||||
if(((k == null) || (k._Str_742 == null)))
|
if(((k == null) || (k.definition == null)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(k._Str_742._Str_778 == '')
|
if(k.definition.assetPartDefinition == '')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(k._Str_742._Str_779)
|
if(k.definition.isMain)
|
||||||
{
|
{
|
||||||
this._mainAction = k;
|
this._mainAction = k;
|
||||||
this._cache._Str_2014(k._Str_742._Str_868);
|
this._cache.setGeometryType(k.definition.geometryType);
|
||||||
}
|
}
|
||||||
this._cache._Str_1565(k, _arg_2);
|
this._cache.setAction(k, _arg_2);
|
||||||
this._changes = true;
|
this._changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -958,15 +961,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
{
|
{
|
||||||
if(!k) return;
|
if(!k) return;
|
||||||
|
|
||||||
if(k._Str_742._Str_778 === '') return;
|
if(k.definition.assetPartDefinition === '') return;
|
||||||
|
|
||||||
if(k._Str_742._Str_779)
|
if(k.definition.isMain)
|
||||||
{
|
{
|
||||||
this._mainAction = k;
|
this._mainAction = k;
|
||||||
this._cache._Str_2014(k._Str_742._Str_868);
|
this._cache.setGeometryType(k.definition.geometryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._cache._Str_741(k);
|
this._cache.resetBodyPartCache(k);
|
||||||
this._changes = true;
|
this._changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1045,7 +1048,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
public get mainAction(): string
|
public get mainAction(): string
|
||||||
{
|
{
|
||||||
return this._mainAction._Str_695;
|
return this._mainAction.actionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public resetEffect(effect: number): void
|
public resetEffect(effect: number): void
|
||||||
|
@ -15,7 +15,7 @@ export class AvatarImageBodyPartContainer
|
|||||||
this._regPoint = _arg_2;
|
this._regPoint = _arg_2;
|
||||||
this._isCacheable = _arg_3;
|
this._isCacheable = _arg_3;
|
||||||
|
|
||||||
this._Str_1225();
|
this.cleanPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
@ -32,7 +32,7 @@ export class AvatarImageBodyPartContainer
|
|||||||
this._offset = null;
|
this._offset = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1225(): void
|
private cleanPoints(): void
|
||||||
{
|
{
|
||||||
// this._regPoint.x = this._regPoint.x;
|
// this._regPoint.x = this._regPoint.x;
|
||||||
// this._regPoint.y = this._regPoint.y;
|
// this._regPoint.y = this._regPoint.y;
|
||||||
@ -40,11 +40,11 @@ export class AvatarImageBodyPartContainer
|
|||||||
// this._offset.y = this._offset.y;
|
// this._offset.y = this._offset.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1387(k: Point): void
|
public setRegPoint(k: Point): void
|
||||||
{
|
{
|
||||||
this._regPoint = k;
|
this._regPoint = k;
|
||||||
|
|
||||||
this._Str_1225();
|
this.cleanPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
public get image(): Container
|
public get image(): Container
|
||||||
@ -64,7 +64,7 @@ export class AvatarImageBodyPartContainer
|
|||||||
this._image = k;
|
this._image = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1076(): Point
|
public get regPoint(): Point
|
||||||
{
|
{
|
||||||
const clone = this._regPoint.clone();
|
const clone = this._regPoint.clone();
|
||||||
|
|
||||||
@ -78,10 +78,10 @@ export class AvatarImageBodyPartContainer
|
|||||||
{
|
{
|
||||||
this._offset = k;
|
this._offset = k;
|
||||||
|
|
||||||
this._Str_1225();
|
this.cleanPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1807(): boolean
|
public get isCacheable(): boolean
|
||||||
{
|
{
|
||||||
return this._isCacheable;
|
return this._isCacheable;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ export class AvatarImagePartContainer
|
|||||||
if(this._partType === 'ey') this._isColorable = false;
|
if(this._partType === 'ey') this._isColorable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1674(k: number): number
|
public getFrameIndex(k: number): number
|
||||||
{
|
{
|
||||||
if(!this._frames || !this._frames.length) return 0;
|
if(!this._frames || !this._frames.length) return 0;
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export class AvatarImagePartContainer
|
|||||||
return frameNumber;
|
return frameNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2258(k: number): AvatarAnimationFrame
|
public getFrameDefinition(k: number): AvatarAnimationFrame
|
||||||
{
|
{
|
||||||
const frameNumber = (k % this._frames.length);
|
const frameNumber = (k % this._frames.length);
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ export class AvatarImagePartContainer
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1206(k: number): string
|
public getCacheableKey(k: number): string
|
||||||
{
|
{
|
||||||
const frameNumber = (k % this._frames.length);
|
const frameNumber = (k % this._frames.length);
|
||||||
|
|
||||||
@ -73,24 +73,24 @@ export class AvatarImagePartContainer
|
|||||||
{
|
{
|
||||||
const frame = this._frames[frameNumber];
|
const frame = this._frames[frameNumber];
|
||||||
|
|
||||||
return (this._Str_1502 + ':' + frame._Str_778 + ':' + frame.number);
|
return (this.partId + ':' + frame.assetPartDefinition + ':' + frame.number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (this._Str_1502 + ':' + frameNumber);
|
return (this.partId + ':' + frameNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1360(): string
|
public get bodyPartId(): string
|
||||||
{
|
{
|
||||||
return this._bodyPartId;
|
return this._bodyPartId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1669(): string
|
public get partType(): string
|
||||||
{
|
{
|
||||||
return this._partType;
|
return this._partType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1502(): string
|
public get partId(): string
|
||||||
{
|
{
|
||||||
return this._partId;
|
return this._partId;
|
||||||
}
|
}
|
||||||
@ -115,17 +115,17 @@ export class AvatarImagePartContainer
|
|||||||
this._isColorable = k;
|
this._isColorable = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1406(): number
|
public get paletteMapId(): number
|
||||||
{
|
{
|
||||||
return this._paletteMapId;
|
return this._paletteMapId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1666(): string
|
public get flippedPartType(): string
|
||||||
{
|
{
|
||||||
return this._flippedPartType;
|
return this._flippedPartType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1184(): boolean
|
public get isBlendable(): boolean
|
||||||
{
|
{
|
||||||
return this._isBlendable;
|
return this._isBlendable;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
if(!this._structure) return;
|
if(!this._structure) return;
|
||||||
|
|
||||||
this._structure._Str_1825(HabboAvatarGeometry.geometry);
|
this._structure.initGeometry(HabboAvatarGeometry.geometry);
|
||||||
|
|
||||||
this._geometryReady = true;
|
this._geometryReady = true;
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
if(!this._structure) return;
|
if(!this._structure) return;
|
||||||
|
|
||||||
this._structure._Str_1296(HabboAvatarPartSets.partSets);
|
this._structure.initPartSets(HabboAvatarPartSets.partSets);
|
||||||
|
|
||||||
this._partSetsReady = true;
|
this._partSetsReady = true;
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
const defaultActions = Nitro.instance.getConfiguration<string>('avatar.default.actions');
|
const defaultActions = Nitro.instance.getConfiguration<string>('avatar.default.actions');
|
||||||
|
|
||||||
if(defaultActions) this._structure._Str_1060(Nitro.instance.core.asset, defaultActions);
|
if(defaultActions) this._structure.initActions(Nitro.instance.core.asset, defaultActions);
|
||||||
|
|
||||||
const request = new XMLHttpRequest();
|
const request = new XMLHttpRequest();
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
if(!this._structure) return;
|
if(!this._structure) return;
|
||||||
|
|
||||||
this._structure._Str_1620(JSON.parse(request.responseText));
|
this._structure.updateActions(JSON.parse(request.responseText));
|
||||||
|
|
||||||
this._actionsReady = true;
|
this._actionsReady = true;
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
if(!this._structure) return;
|
if(!this._structure) return;
|
||||||
|
|
||||||
this._structure._Str_2229(HabboAvatarAnimations.animations);
|
this._structure.initAnimation(HabboAvatarAnimations.animations);
|
||||||
|
|
||||||
this._animationsReady = true;
|
this._animationsReady = true;
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
if(err || !results || !results.figuredata) throw new Error('invalid_default_figure_data');
|
if(err || !results || !results.figuredata) throw new Error('invalid_default_figure_data');
|
||||||
|
|
||||||
if(this._structure) this._structure._Str_1569(results.figuredata);
|
if(this._structure) this._structure.initFigureData(results.figuredata);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
let isValid = false;
|
let isValid = false;
|
||||||
|
|
||||||
const typeIds = this._structure._Str_1733(gender, 2);
|
const typeIds = this._structure.getMandatorySetTypeIds(gender, 2);
|
||||||
|
|
||||||
if(typeIds)
|
if(typeIds)
|
||||||
{
|
{
|
||||||
@ -316,32 +316,32 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
|
|
||||||
for(const id of typeIds)
|
for(const id of typeIds)
|
||||||
{
|
{
|
||||||
if(!container._Str_744(id))
|
if(!container.hasPartType(id))
|
||||||
{
|
{
|
||||||
const figurePartSet = this._structure._Str_2264(id, gender);
|
const figurePartSet = this._structure.getDefaultPartSet(id, gender);
|
||||||
|
|
||||||
if(figurePartSet)
|
if(figurePartSet)
|
||||||
{
|
{
|
||||||
container._Str_830(id, figurePartSet.id, [0]);
|
container.updatePart(id, figurePartSet.id, [0]);
|
||||||
|
|
||||||
isValid = true;
|
isValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const setType = figureData._Str_740(id);
|
const setType = figureData.getSetType(id);
|
||||||
|
|
||||||
if(setType)
|
if(setType)
|
||||||
{
|
{
|
||||||
const figurePartSet = setType._Str_1020(container.getPartSetId(id));
|
const figurePartSet = setType.getPartSet(container.getPartSetId(id));
|
||||||
|
|
||||||
if(!figurePartSet)
|
if(!figurePartSet)
|
||||||
{
|
{
|
||||||
const partSet = this._structure._Str_2264(id, gender);
|
const partSet = this._structure.getDefaultPartSet(id, gender);
|
||||||
|
|
||||||
if(partSet)
|
if(partSet)
|
||||||
{
|
{
|
||||||
container._Str_830(id, partSet.id, [0]);
|
container.updatePart(id, partSet.id, [0]);
|
||||||
|
|
||||||
isValid = true;
|
isValid = true;
|
||||||
}
|
}
|
||||||
@ -359,39 +359,39 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
if(!this._structure) return 0;
|
if(!this._structure) return 0;
|
||||||
|
|
||||||
const figureData = this._structure.figureData;
|
const figureData = this._structure.figureData;
|
||||||
const parts = Array.from(container._Str_1016());
|
const parts = Array.from(container.getPartTypeIds());
|
||||||
|
|
||||||
let clubLevel = 0;
|
let clubLevel = 0;
|
||||||
|
|
||||||
for(const part of parts)
|
for(const part of parts)
|
||||||
{
|
{
|
||||||
const set = figureData._Str_740(part);
|
const set = figureData.getSetType(part);
|
||||||
const setId = container.getPartSetId(part);
|
const setId = container.getPartSetId(part);
|
||||||
const partSet = set._Str_1020(setId);
|
const partSet = set.getPartSet(setId);
|
||||||
|
|
||||||
if(partSet)
|
if(partSet)
|
||||||
{
|
{
|
||||||
clubLevel = Math.max(partSet.clubLevel, clubLevel);
|
clubLevel = Math.max(partSet.clubLevel, clubLevel);
|
||||||
|
|
||||||
const palette = figureData._Str_783(set._Str_734);
|
const palette = figureData.getPalette(set.paletteID);
|
||||||
const colors = container._Str_815(part);
|
const colors = container.getPartColorIds(part);
|
||||||
|
|
||||||
for(const colorId of colors)
|
for(const colorId of colors)
|
||||||
{
|
{
|
||||||
const color = palette._Str_751(colorId);
|
const color = palette.getColor(colorId);
|
||||||
|
|
||||||
clubLevel = Math.max(color.clubLevel, clubLevel);
|
clubLevel = Math.max(color.clubLevel, clubLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!searchParts) searchParts = this._structure._Str_1695(AvatarSetType.FULL);
|
if(!searchParts) searchParts = this._structure.getBodyPartsUnordered(AvatarSetType.FULL);
|
||||||
|
|
||||||
for(const part of searchParts)
|
for(const part of searchParts)
|
||||||
{
|
{
|
||||||
const set = figureData._Str_740(part);
|
const set = figureData.getSetType(part);
|
||||||
|
|
||||||
if(parts.indexOf(part) === -1) clubLevel = Math.max(set._Str_1002(gender), clubLevel);
|
if(parts.indexOf(part) === -1) clubLevel = Math.max(set.optionalFromClubLevel(gender), clubLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
return clubLevel;
|
return clubLevel;
|
||||||
@ -400,7 +400,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
public isValidFigureSetForGender(setId: number, gender: string): boolean
|
public isValidFigureSetForGender(setId: number, gender: string): boolean
|
||||||
{
|
{
|
||||||
const structure = this.structureData;
|
const structure = this.structureData;
|
||||||
const partSet = structure._Str_938(setId);
|
const partSet = structure.getFigurePartSet(setId);
|
||||||
|
|
||||||
return !!(partSet && ((partSet.gender.toUpperCase() === 'U') || (partSet.gender.toUpperCase() === gender.toUpperCase())));
|
return !!(partSet && ((partSet.gender.toUpperCase() === 'U') || (partSet.gender.toUpperCase() === gender.toUpperCase())));
|
||||||
}
|
}
|
||||||
@ -409,26 +409,26 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
const container = new FigureDataContainer();
|
const container = new FigureDataContainer();
|
||||||
|
|
||||||
container._Str_2153(k, _arg_2);
|
container.loadAvatarData(k, _arg_2);
|
||||||
|
|
||||||
const partSets: IFigurePartSet[] = this._Str_1667(_arg_3);
|
const partSets: IFigurePartSet[] = this.resolveFigureSets(_arg_3);
|
||||||
|
|
||||||
for(const partSet of partSets)
|
for(const partSet of partSets)
|
||||||
{
|
{
|
||||||
container._Str_2088(partSet.type, partSet.id, container.getColourIds(partSet.type));
|
container.savePartData(partSet.type, partSet.id, container.getColourIds(partSet.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
return container._Str_1008();
|
return container.getFigureString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1667(k: number[]): IFigurePartSet[]
|
private resolveFigureSets(k: number[]): IFigurePartSet[]
|
||||||
{
|
{
|
||||||
const structure = this.structureData;
|
const structure = this.structureData;
|
||||||
const partSets: IFigurePartSet[] = [];
|
const partSets: IFigurePartSet[] = [];
|
||||||
|
|
||||||
for(const _local_4 of k)
|
for(const _local_4 of k)
|
||||||
{
|
{
|
||||||
const partSet = structure._Str_938(_local_4);
|
const partSet = structure.getFigurePartSet(_local_4);
|
||||||
|
|
||||||
if(partSet) partSets.push(partSet);
|
if(partSet) partSets.push(partSet);
|
||||||
}
|
}
|
||||||
@ -436,11 +436,11 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
return partSets;
|
return partSets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_838(k: string, _arg_2: number): string[]
|
public getMandatoryAvatarPartSetIds(k: string, _arg_2: number): string[]
|
||||||
{
|
{
|
||||||
if(!this._structure) return null;
|
if(!this._structure) return null;
|
||||||
|
|
||||||
return this._structure._Str_1733(k, _arg_2);
|
return this._structure.getMandatorySetTypeIds(k, _arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAssetByName(name: string): IGraphicAsset
|
public getAssetByName(name: string): IGraphicAsset
|
||||||
|
@ -71,36 +71,36 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
this._mandatorySetTypeIds = null;
|
this._mandatorySetTypeIds = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1825(k: any): void
|
public initGeometry(k: any): void
|
||||||
{
|
{
|
||||||
if(!k) return;
|
if(!k) return;
|
||||||
|
|
||||||
this._geometry = new AvatarModelGeometry(k);
|
this._geometry = new AvatarModelGeometry(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1060(k: IAssetManager, _arg_2: any): void
|
public initActions(k: IAssetManager, _arg_2: any): void
|
||||||
{
|
{
|
||||||
if(!_arg_2) return;
|
if(!_arg_2) return;
|
||||||
|
|
||||||
this._actionManager = new AvatarActionManager(k, _arg_2);
|
this._actionManager = new AvatarActionManager(k, _arg_2);
|
||||||
this._defaultAction = this._actionManager._Str_1027();
|
this._defaultAction = this._actionManager.getDefaultAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1620(data: any): void
|
public updateActions(data: any): void
|
||||||
{
|
{
|
||||||
this._actionManager._Str_1620(data);
|
this._actionManager.updateActions(data);
|
||||||
|
|
||||||
this._defaultAction = this._actionManager._Str_1027();
|
this._defaultAction = this._actionManager.getDefaultAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1296(k: any): boolean
|
public initPartSets(k: any): boolean
|
||||||
{
|
{
|
||||||
if(!k) return false;
|
if(!k) return false;
|
||||||
|
|
||||||
if(this._partSetsData.parse(k))
|
if(this._partSetsData.parse(k))
|
||||||
{
|
{
|
||||||
this._partSetsData._Str_1102('ri')._Str_1583 = true;
|
this._partSetsData.getPartDefinition('ri').appendToFigure = true;
|
||||||
this._partSetsData._Str_1102('li')._Str_1583 = true;
|
this._partSetsData.getPartDefinition('li').appendToFigure = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -108,26 +108,26 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2229(k: any): boolean
|
public initAnimation(k: any): boolean
|
||||||
{
|
{
|
||||||
if(!k) return false;
|
if(!k) return false;
|
||||||
|
|
||||||
return this._animationData.parse(k);
|
return this._animationData.parse(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1569(k: any): boolean
|
public initFigureData(k: any): boolean
|
||||||
{
|
{
|
||||||
if(!k) return false;
|
if(!k) return false;
|
||||||
|
|
||||||
return this._figureData.parse(k);
|
return this._figureData.parse(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_882(data: any): void
|
public injectFigureData(data: any): void
|
||||||
{
|
{
|
||||||
this._figureData._Str_1133(data);
|
this._figureData.injectXML(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1849(k: IAssetManager, _arg_2: string = 'fx', _arg_3: number = 200): void
|
public registerAnimations(k: IAssetManager, _arg_2: string = 'fx', _arg_3: number = 200): void
|
||||||
{
|
{
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
@ -139,77 +139,77 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
{
|
{
|
||||||
const animationData = collection.data;
|
const animationData = collection.data;
|
||||||
|
|
||||||
this._animationManager._Str_2061(this, animationData.animations);
|
this._animationManager.registerAnimation(this, animationData.animations);
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2061(data: { [index: string]: IAssetAnimation }): void
|
public registerAnimation(data: { [index: string]: IAssetAnimation }): void
|
||||||
{
|
{
|
||||||
this._animationManager._Str_2061(this, data);
|
this._animationManager.registerAnimation(this, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_867(k: IAvatarFigureContainer, _arg_2: string, _arg_3: number = 0): IPartColor
|
public getPartColor(k: IAvatarFigureContainer, _arg_2: string, _arg_3: number = 0): IPartColor
|
||||||
{
|
{
|
||||||
const _local_4 = k._Str_815(_arg_2);
|
const _local_4 = k.getPartColorIds(_arg_2);
|
||||||
|
|
||||||
if((!(_local_4)) || (_local_4.length < _arg_3)) return null;
|
if((!(_local_4)) || (_local_4.length < _arg_3)) return null;
|
||||||
|
|
||||||
const _local_5 = this._figureData._Str_740(_arg_2);
|
const _local_5 = this._figureData.getSetType(_arg_2);
|
||||||
|
|
||||||
if(_local_5 == null) return null;
|
if(_local_5 == null) return null;
|
||||||
|
|
||||||
const _local_6 = this._figureData._Str_783(_local_5._Str_734);
|
const _local_6 = this._figureData.getPalette(_local_5.paletteID);
|
||||||
|
|
||||||
if(!_local_6) return null;
|
if(!_local_6) return null;
|
||||||
|
|
||||||
return _local_6._Str_751(_local_4[_arg_3]);
|
return _local_6.getColor(_local_4[_arg_3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1881(animation: string, frameCount: number, spriteId: string): AvatarAnimationLayerData
|
public getBodyPartData(animation: string, frameCount: number, spriteId: string): AvatarAnimationLayerData
|
||||||
{
|
{
|
||||||
return this._animationManager._Str_607(animation, frameCount, spriteId) as AvatarAnimationLayerData;
|
return this._animationManager.getLayerData(animation, frameCount, spriteId) as AvatarAnimationLayerData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_720(k: string): Animation
|
public getAnimation(k: string): Animation
|
||||||
{
|
{
|
||||||
return this._animationManager._Str_720(k) as Animation;
|
return this._animationManager.getAnimation(k) as Animation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1675(k: string): ActionDefinition
|
public getActionDefinition(k: string): ActionDefinition
|
||||||
{
|
{
|
||||||
return this._actionManager._Str_1675(k);
|
return this._actionManager.getActionDefinition(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2018(k: string): ActionDefinition
|
public getActionDefinitionWithState(k: string): ActionDefinition
|
||||||
{
|
{
|
||||||
return this._actionManager._Str_2018(k);
|
return this._actionManager.getActionDefinitionWithState(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1939(k: string): boolean
|
public isMainAvatarSet(k: string): boolean
|
||||||
{
|
{
|
||||||
return this._geometry._Str_1939(k);
|
return this._geometry.isMainAvatarSet(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_711(k: IActiveActionData[]): IActiveActionData[]
|
public sortActions(k: IActiveActionData[]): IActiveActionData[]
|
||||||
{
|
{
|
||||||
return this._actionManager._Str_711(k);
|
return this._actionManager.sortActions(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1936(k: IActiveActionData[]): number
|
public maxFrames(k: IActiveActionData[]): number
|
||||||
{
|
{
|
||||||
let _local_2 = 0;
|
let _local_2 = 0;
|
||||||
|
|
||||||
for(const _local_3 of k)
|
for(const _local_3 of k)
|
||||||
{
|
{
|
||||||
_local_2 = Math.max(_local_2, this._animationData._Str_1408(_local_3._Str_742));
|
_local_2 = Math.max(_local_2, this._animationData.getFrameCount(_local_3.definition));
|
||||||
}
|
}
|
||||||
return _local_2;
|
return _local_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1733(k: string, _arg_2: number): string[]
|
public getMandatorySetTypeIds(k: string, _arg_2: number): string[]
|
||||||
{
|
{
|
||||||
if(!this._mandatorySetTypeIds[k])
|
if(!this._mandatorySetTypeIds[k])
|
||||||
{
|
{
|
||||||
@ -221,48 +221,48 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
return this._mandatorySetTypeIds[k][_arg_2];
|
return this._mandatorySetTypeIds[k][_arg_2];
|
||||||
}
|
}
|
||||||
|
|
||||||
this._mandatorySetTypeIds[k][_arg_2] = this._figureData._Str_1733(k, _arg_2);
|
this._mandatorySetTypeIds[k][_arg_2] = this._figureData.getMandatorySetTypeIds(k, _arg_2);
|
||||||
|
|
||||||
return this._mandatorySetTypeIds[k][_arg_2];
|
return this._mandatorySetTypeIds[k][_arg_2];
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2264(k: string, _arg_2: string): IFigurePartSet
|
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||||
{
|
{
|
||||||
return this._figureData._Str_2264(k, _arg_2);
|
return this._figureData.getDefaultPartSet(k, _arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_781(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
public getCanvasOffsets(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||||
{
|
{
|
||||||
return this._actionManager._Str_781(k, _arg_2, _arg_3);
|
return this._actionManager.getCanvasOffsets(k, _arg_2, _arg_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1664(k: string, _arg_2: string): AvatarCanvas
|
public getCanvas(k: string, _arg_2: string): AvatarCanvas
|
||||||
{
|
{
|
||||||
return this._geometry._Str_1664(k, _arg_2);
|
return this._geometry.getCanvas(k, _arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2101(k: IAvatarImage): void
|
public removeDynamicItems(k: IAvatarImage): void
|
||||||
{
|
{
|
||||||
this._geometry._Str_2101(k);
|
this._geometry.removeDynamicItems(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2021(k: IActiveActionData, _arg_2: IAvatarImage): string[]
|
public getActiveBodyPartIds(k: IActiveActionData, _arg_2: IAvatarImage): string[]
|
||||||
{
|
{
|
||||||
let _local_3: string[] = [];
|
let _local_3: string[] = [];
|
||||||
|
|
||||||
const _local_4: string[] = [];
|
const _local_4: string[] = [];
|
||||||
const _local_5 = k._Str_742._Str_868;
|
const _local_5 = k.definition.geometryType;
|
||||||
|
|
||||||
if(k._Str_742._Str_861)
|
if(k.definition.isAnimation)
|
||||||
{
|
{
|
||||||
const _local_7 = ((k._Str_742.state + '.') + k._Str_727);
|
const _local_7 = ((k.definition.state + '.') + k.actionParameter);
|
||||||
const _local_8 = this._animationManager._Str_720(_local_7);
|
const _local_8 = this._animationManager.getAnimation(_local_7);
|
||||||
|
|
||||||
if(_local_8)
|
if(_local_8)
|
||||||
{
|
{
|
||||||
_local_3 = _local_8._Str_1065(0, k._Str_707);
|
_local_3 = _local_8.getAnimatedBodyPartIds(0, k.overridingAction);
|
||||||
|
|
||||||
if(_local_8._Str_706())
|
if(_local_8.hasAddData())
|
||||||
{
|
{
|
||||||
const _local_11 = {
|
const _local_11 = {
|
||||||
id: '',
|
id: '',
|
||||||
@ -280,21 +280,21 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
setType: ''
|
setType: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
for(const _local_13 of _local_8._Str_687)
|
for(const _local_13 of _local_8.addData)
|
||||||
{
|
{
|
||||||
const _local_6 = this._geometry._Str_1919(_local_5, _local_13.align);
|
const _local_6 = this._geometry.getBodyPart(_local_5, _local_13.align);
|
||||||
|
|
||||||
if(_local_6)
|
if(_local_6)
|
||||||
{
|
{
|
||||||
_local_11.id = _local_13.id;
|
_local_11.id = _local_13.id;
|
||||||
_local_6._Str_2020(_local_11, _arg_2);
|
_local_6.addPart(_local_11, _arg_2);
|
||||||
|
|
||||||
_local_12.setType = _local_13.id;
|
_local_12.setType = _local_13.id;
|
||||||
|
|
||||||
const _local_10 = this._partSetsData._Str_1520(_local_12);
|
const _local_10 = this._partSetsData.addPartDefinition(_local_12);
|
||||||
_local_10._Str_1583 = true;
|
_local_10.appendToFigure = true;
|
||||||
|
|
||||||
if(_local_13.base === '') _local_10._Str_1734 = 1;
|
if(_local_13.base === '') _local_10.staticId = 1;
|
||||||
|
|
||||||
if(_local_4.indexOf(_local_6.id) === -1) _local_4.push(_local_6.id);
|
if(_local_4.indexOf(_local_6.id) === -1) _local_4.push(_local_6.id);
|
||||||
}
|
}
|
||||||
@ -304,18 +304,18 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
|
|
||||||
for(const _local_9 of _local_3)
|
for(const _local_9 of _local_3)
|
||||||
{
|
{
|
||||||
const _local_6 = this._geometry._Str_1919(_local_5, _local_9);
|
const _local_6 = this._geometry.getBodyPart(_local_5, _local_9);
|
||||||
|
|
||||||
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_local_3 = this._partSetsData._Str_1795(k._Str_742);
|
_local_3 = this._partSetsData.getActiveParts(k.definition);
|
||||||
|
|
||||||
for(const _local_14 of _local_3)
|
for(const _local_14 of _local_3)
|
||||||
{
|
{
|
||||||
const _local_6 = this._geometry._Str_1701(_local_5, _local_14, _arg_2);
|
const _local_6 = this._geometry.getBodyPartOfItem(_local_5, _local_14, _arg_2);
|
||||||
|
|
||||||
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
if(_local_6 && (_local_4.indexOf(_local_6.id) === -1)) _local_4.push(_local_6.id);
|
||||||
}
|
}
|
||||||
@ -324,28 +324,28 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
return _local_4;
|
return _local_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1695(k: string): string[]
|
public getBodyPartsUnordered(k: string): string[]
|
||||||
{
|
{
|
||||||
return this._geometry._Str_1307(k);
|
return this._geometry.getBodyPartIdsInAvatarSet(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_755(k: string, _arg_2: string, _arg_3: number): string[]
|
public getBodyParts(k: string, _arg_2: string, _arg_3: number): string[]
|
||||||
{
|
{
|
||||||
const _local_4 = AvatarDirectionAngle.DIRECTION_TO_ANGLE[_arg_3];
|
const _local_4 = AvatarDirectionAngle.DIRECTION_TO_ANGLE[_arg_3];
|
||||||
|
|
||||||
return this._geometry._Str_2250(k, _local_4, _arg_2);
|
return this._geometry.getBodyPartsAtAngle(k, _local_4, _arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1888(k:IActiveActionData, _arg_2: number, _arg_3: number, _arg_4: string): Point
|
public getFrameBodyPartOffset(k:IActiveActionData, _arg_2: number, _arg_3: number, _arg_4: string): Point
|
||||||
{
|
{
|
||||||
const _local_5 = this._animationData._Str_2244(k._Str_742);
|
const _local_5 = this._animationData.getAction(k.definition);
|
||||||
|
|
||||||
if(_local_5) return _local_5._Str_1888(_arg_2, _arg_3, _arg_4);
|
if(_local_5) return _local_5.getFrameBodyPartOffset(_arg_2, _arg_3, _arg_4);
|
||||||
|
|
||||||
return AnimationAction._Str_1934;
|
return AnimationAction.DEFAULT_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_713(k: string, _arg_2:IAvatarFigureContainer, _arg_3:IActiveActionData, _arg_4: string, _arg_5: number, removes: string[], _arg_7: IAvatarImage, _arg_8: Map<string, string> = null): AvatarImagePartContainer[]
|
public getParts(k: string, _arg_2:IAvatarFigureContainer, _arg_3:IActiveActionData, _arg_4: string, _arg_5: number, removes: string[], _arg_7: IAvatarImage, _arg_8: Map<string, string> = null): AvatarImagePartContainer[]
|
||||||
{
|
{
|
||||||
const _local_10: Animation = null;
|
const _local_10: Animation = null;
|
||||||
let _local_34: IActionDefinition = null;
|
let _local_34: IActionDefinition = null;
|
||||||
@ -355,29 +355,29 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
|
|
||||||
if(!_arg_3 == null) return [];
|
if(!_arg_3 == null) return [];
|
||||||
|
|
||||||
const _local_9 = this._partSetsData._Str_1795(_arg_3._Str_742);
|
const _local_9 = this._partSetsData.getActiveParts(_arg_3.definition);
|
||||||
const _local_11: AvatarImagePartContainer[] = [];
|
const _local_11: AvatarImagePartContainer[] = [];
|
||||||
let _local_14: any[] = [ 0 ];
|
let _local_14: any[] = [ 0 ];
|
||||||
const _local_15 = this._animationData._Str_2244(_arg_3._Str_742);
|
const _local_15 = this._animationData.getAction(_arg_3.definition);
|
||||||
|
|
||||||
if(_arg_3._Str_742._Str_861)
|
if(_arg_3.definition.isAnimation)
|
||||||
{
|
{
|
||||||
const _local_24 = ((_arg_3._Str_742.state + '.') + _arg_3._Str_727);
|
const _local_24 = ((_arg_3.definition.state + '.') + _arg_3.actionParameter);
|
||||||
const _local_10 = this._animationManager._Str_720(_local_24);
|
const _local_10 = this._animationManager.getAnimation(_local_24);
|
||||||
|
|
||||||
if(_local_10)
|
if(_local_10)
|
||||||
{
|
{
|
||||||
_local_14 = this._Str_1768(_local_10._Str_2185(_arg_3._Str_707));
|
_local_14 = this.getPopulatedArray(_local_10.frameCount(_arg_3.overridingAction));
|
||||||
|
|
||||||
for(const _local_25 of _local_10._Str_1065(0, _arg_3._Str_707))
|
for(const _local_25 of _local_10.getAnimatedBodyPartIds(0, _arg_3.overridingAction))
|
||||||
{
|
{
|
||||||
if(_local_25 === k)
|
if(_local_25 === k)
|
||||||
{
|
{
|
||||||
const _local_26 = this._geometry._Str_1919(_arg_4, _local_25);
|
const _local_26 = this._geometry.getBodyPart(_arg_4, _local_25);
|
||||||
|
|
||||||
if(_local_26)
|
if(_local_26)
|
||||||
{
|
{
|
||||||
for(const _local_27 of _local_26._Str_1883(_arg_7))
|
for(const _local_27 of _local_26.getDynamicParts(_arg_7))
|
||||||
{
|
{
|
||||||
_local_9.push(_local_27.id);
|
_local_9.push(_local_27.id);
|
||||||
}
|
}
|
||||||
@ -387,8 +387,8 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const _local_16 = this._geometry._Str_713(_arg_4, k, _arg_5, _local_9, _arg_7);
|
const _local_16 = this._geometry.getParts(_arg_4, k, _arg_5, _local_9, _arg_7);
|
||||||
const _local_21 = _arg_2._Str_1016();
|
const _local_21 = _arg_2.getPartTypeIds();
|
||||||
|
|
||||||
for(const _local_17 of _local_21)
|
for(const _local_17 of _local_21)
|
||||||
{
|
{
|
||||||
@ -398,30 +398,30 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
}
|
}
|
||||||
|
|
||||||
const _local_28 = _arg_2.getPartSetId(_local_17);
|
const _local_28 = _arg_2.getPartSetId(_local_17);
|
||||||
const _local_29 = _arg_2._Str_815(_local_17);
|
const _local_29 = _arg_2.getPartColorIds(_local_17);
|
||||||
const _local_30 = this._figureData._Str_740(_local_17);
|
const _local_30 = this._figureData.getSetType(_local_17);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(_local_30)
|
if(_local_30)
|
||||||
{
|
{
|
||||||
const _local_31 = this._figureData._Str_783(_local_30._Str_734);
|
const _local_31 = this._figureData.getPalette(_local_30.paletteID);
|
||||||
|
|
||||||
if(_local_31)
|
if(_local_31)
|
||||||
{
|
{
|
||||||
const _local_32 = _local_30._Str_1020(_local_28);
|
const _local_32 = _local_30.getPartSet(_local_28);
|
||||||
|
|
||||||
if(_local_32)
|
if(_local_32)
|
||||||
{
|
{
|
||||||
removes = removes.concat(_local_32._Str_790);
|
removes = removes.concat(_local_32.hiddenLayers);
|
||||||
|
|
||||||
for(const _local_33 of _local_32._Str_806)
|
for(const _local_33 of _local_32.parts)
|
||||||
{
|
{
|
||||||
if(_local_16.indexOf(_local_33.type) > -1)
|
if(_local_16.indexOf(_local_33.type) > -1)
|
||||||
{
|
{
|
||||||
if(_local_15)
|
if(_local_15)
|
||||||
{
|
{
|
||||||
const _local_19 = _local_15._Str_989(_local_33.type);
|
const _local_19 = _local_15.getPart(_local_33.type);
|
||||||
|
|
||||||
if(_local_19)
|
if(_local_19)
|
||||||
{
|
{
|
||||||
@ -437,22 +437,22 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
_local_20 = _local_14;
|
_local_20 = _local_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
_local_34 = _arg_3._Str_742;
|
_local_34 = _arg_3.definition;
|
||||||
|
|
||||||
if(_local_9.indexOf(_local_33.type) === -1) _local_34 = this._defaultAction;
|
if(_local_9.indexOf(_local_33.type) === -1) _local_34 = this._defaultAction;
|
||||||
|
|
||||||
const _local_13 = this._partSetsData._Str_1102(_local_33.type);
|
const _local_13 = this._partSetsData.getPartDefinition(_local_33.type);
|
||||||
|
|
||||||
let _local_35 = (!_local_13) ? _local_33.type : _local_13._Str_1693;
|
let _local_35 = (!_local_13) ? _local_33.type : _local_13.flippedSetType;
|
||||||
|
|
||||||
if(!_local_35 || (_local_35 === '')) _local_35 = _local_33.type;
|
if(!_local_35 || (_local_35 === '')) _local_35 = _local_33.type;
|
||||||
|
|
||||||
if(_local_29 && (_local_29.length > (_local_33._Str_827 - 1)))
|
if(_local_29 && (_local_29.length > (_local_33.colorLayerIndex - 1)))
|
||||||
{
|
{
|
||||||
_local_36 = _local_31._Str_751(_local_29[(_local_33._Str_827 - 1)]);
|
_local_36 = _local_31.getColor(_local_29[(_local_33.colorLayerIndex - 1)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const _local_37 = (_local_33._Str_827 > 0);
|
const _local_37 = (_local_33.colorLayerIndex > 0);
|
||||||
const _local_18 = new AvatarImagePartContainer(k, _local_33.type, _local_33.id.toString(), _local_36, _local_20, _local_34, _local_37, _local_33.paletteMap, _local_35);
|
const _local_18 = new AvatarImagePartContainer(k, _local_33.type, _local_33.id.toString(), _local_36, _local_20, _local_34, _local_37, _local_33.paletteMap, _local_35);
|
||||||
|
|
||||||
_local_11.push(_local_18);
|
_local_11.push(_local_18);
|
||||||
@ -474,7 +474,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
|
|
||||||
for(const _local_23 of _local_11)
|
for(const _local_23 of _local_11)
|
||||||
{
|
{
|
||||||
if(_local_23._Str_1669 === _local_12)
|
if(_local_23.partType === _local_12)
|
||||||
{
|
{
|
||||||
if(_local_40)
|
if(_local_40)
|
||||||
{
|
{
|
||||||
@ -506,7 +506,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
|
|
||||||
if(_local_15)
|
if(_local_15)
|
||||||
{
|
{
|
||||||
const _local_19 = _local_15._Str_989(_local_12);
|
const _local_19 = _local_15.getPart(_local_12);
|
||||||
|
|
||||||
if(_local_19)
|
if(_local_19)
|
||||||
{
|
{
|
||||||
@ -522,7 +522,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
_local_20 = _local_14;
|
_local_20 = _local_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_41, _local_39, _local_20, _arg_3._Str_742, (!(_local_39 == null)), -1, _local_12, false, 1);
|
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_41, _local_39, _local_20, _arg_3.definition, (!(_local_39 == null)), -1, _local_12, false, 1);
|
||||||
|
|
||||||
_local_22.push(_local_18);
|
_local_22.push(_local_18);
|
||||||
}
|
}
|
||||||
@ -530,7 +530,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
{
|
{
|
||||||
if(_local_9.indexOf(_local_12) > -1)
|
if(_local_9.indexOf(_local_12) > -1)
|
||||||
{
|
{
|
||||||
const _local_44 = this._geometry._Str_1701(_arg_4, _local_12, _arg_7);
|
const _local_44 = this._geometry.getBodyPartOfItem(_arg_4, _local_12, _arg_7);
|
||||||
|
|
||||||
if(k !== _local_44.id)
|
if(k !== _local_44.id)
|
||||||
{
|
{
|
||||||
@ -538,39 +538,39 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const _local_13 = this._partSetsData._Str_1102(_local_12);
|
const _local_13 = this._partSetsData.getPartDefinition(_local_12);
|
||||||
|
|
||||||
let _local_45 = false;
|
let _local_45 = false;
|
||||||
let _local_46 = 1;
|
let _local_46 = 1;
|
||||||
|
|
||||||
if(_local_13._Str_1583)
|
if(_local_13.appendToFigure)
|
||||||
{
|
{
|
||||||
let _local_47 = '1';
|
let _local_47 = '1';
|
||||||
|
|
||||||
if(_arg_3._Str_727 !== '')
|
if(_arg_3.actionParameter !== '')
|
||||||
{
|
{
|
||||||
_local_47 = _arg_3._Str_727;
|
_local_47 = _arg_3.actionParameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_local_13._Str_2234())
|
if(_local_13.hasStaticId())
|
||||||
{
|
{
|
||||||
_local_47 = _local_13._Str_1734.toString();
|
_local_47 = _local_13.staticId.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_local_10 != null)
|
if(_local_10 != null)
|
||||||
{
|
{
|
||||||
const _local_48 = _local_10._Str_1550(_local_12);
|
const _local_48 = _local_10.getAddData(_local_12);
|
||||||
|
|
||||||
if(_local_48)
|
if(_local_48)
|
||||||
{
|
{
|
||||||
_local_45 = _local_48._Str_1096;
|
_local_45 = _local_48.isBlended;
|
||||||
_local_46 = _local_48.blend;
|
_local_46 = _local_48.blend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_local_15)
|
if(_local_15)
|
||||||
{
|
{
|
||||||
const _local_19 = _local_15._Str_989(_local_12);
|
const _local_19 = _local_15.getPart(_local_12);
|
||||||
|
|
||||||
if(_local_19)
|
if(_local_19)
|
||||||
{
|
{
|
||||||
@ -586,7 +586,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
_local_20 = _local_14;
|
_local_20 = _local_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_47, null, _local_20, _arg_3._Str_742, false, -1, _local_12, _local_45, _local_46);
|
const _local_18 = new AvatarImagePartContainer(k, _local_12, _local_47, null, _local_20, _arg_3.definition, false, -1, _local_12, _local_45, _local_46);
|
||||||
|
|
||||||
_local_22.push(_local_18);
|
_local_22.push(_local_18);
|
||||||
}
|
}
|
||||||
@ -599,7 +599,7 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
return _local_22;
|
return _local_22;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1768(k: number): number[]
|
private getPopulatedArray(k: number): number[]
|
||||||
{
|
{
|
||||||
const _local_2: number[] = [];
|
const _local_2: number[] = [];
|
||||||
|
|
||||||
@ -615,11 +615,11 @@ export class AvatarStructure extends EventDispatcher
|
|||||||
return _local_2;
|
return _local_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_672(): string[]
|
public getItemIds(): string[]
|
||||||
{
|
{
|
||||||
if(this._actionManager)
|
if(this._actionManager)
|
||||||
{
|
{
|
||||||
const k = this._actionManager._Str_1675('CarryItem').params;
|
const k = this._actionManager.getActionDefinition('CarryItem').params;
|
||||||
|
|
||||||
const _local_2 = [];
|
const _local_2 = [];
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ export class EffectAssetDownloadManager extends EventDispatcher
|
|||||||
|
|
||||||
const loadedEffects: string[] = [];
|
const loadedEffects: string[] = [];
|
||||||
|
|
||||||
this._structure._Str_2061(event.library.animation);
|
this._structure.registerAnimation(event.library.animation);
|
||||||
|
|
||||||
for(const [ id, libraries ] of this._incompleteEffects.entries())
|
for(const [ id, libraries ] of this._incompleteEffects.entries())
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
export interface IAvatarFigureContainer
|
export interface IAvatarFigureContainer
|
||||||
{
|
{
|
||||||
_Str_1016(): IterableIterator<string>;
|
getPartTypeIds(): IterableIterator<string>;
|
||||||
_Str_744(_arg_1: string): boolean;
|
hasPartType(_arg_1: string): boolean;
|
||||||
getPartSetId(_arg_1: string): number;
|
getPartSetId(_arg_1: string): number;
|
||||||
_Str_815(_arg_1: string): number[];
|
getPartColorIds(_arg_1: string): number[];
|
||||||
_Str_830(_arg_1: string, _arg_2: number, _arg_3: number[]): void;
|
updatePart(_arg_1: string, _arg_2: number, _arg_3: number[]): void;
|
||||||
_Str_923(_arg_1: string): void;
|
removePart(_arg_1: string): void;
|
||||||
_Str_1008(): string;
|
getFigureString(): string;
|
||||||
}
|
}
|
@ -18,7 +18,7 @@ export interface IAvatarRenderManager extends INitroManager
|
|||||||
getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts: string[]): number;
|
getFigureClubLevel(container: IAvatarFigureContainer, gender: string, searchParts: string[]): number;
|
||||||
isValidFigureSetForGender(setId: number, gender: string): boolean;
|
isValidFigureSetForGender(setId: number, gender: string): boolean;
|
||||||
getFigureStringWithFigureIds(k: string, _arg_2: string, _arg_3: number[]): string;
|
getFigureStringWithFigureIds(k: string, _arg_2: string, _arg_3: number[]): string;
|
||||||
_Str_838(k: string, _arg_2: number): string[];
|
getMandatoryAvatarPartSetIds(k: string, _arg_2: number): string[];
|
||||||
getAssetByName(name: string): IGraphicAsset;
|
getAssetByName(name: string): IGraphicAsset;
|
||||||
assets: IAssetManager;
|
assets: IAssetManager;
|
||||||
isReady: boolean;
|
isReady: boolean;
|
||||||
|
@ -65,7 +65,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_772(k: string, _arg_2: number, _arg_3: number[]): void
|
public setOffsets(k: string, _arg_2: number, _arg_3: number[]): void
|
||||||
{
|
{
|
||||||
if(!this._canvasOffsets) this._canvasOffsets = new Map();
|
if(!this._canvasOffsets) this._canvasOffsets = new Map();
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
existing.set(_arg_2, _arg_3);
|
existing.set(_arg_2, _arg_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_805(k: string, _arg_2: number): number[]
|
public getOffsets(k: string, _arg_2: number): number[]
|
||||||
{
|
{
|
||||||
if(!this._canvasOffsets) return null;
|
if(!this._canvasOffsets) return null;
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1350(id: string): string
|
public getParameterValue(id: string): string
|
||||||
{
|
{
|
||||||
if(!id) return '';
|
if(!id) return '';
|
||||||
|
|
||||||
@ -114,12 +114,12 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_733(type: string): string[]
|
public getPrevents(type: string): string[]
|
||||||
{
|
{
|
||||||
return this._prevents.concat(this._Str_1889(type));
|
return this._prevents.concat(this.getTypePrevents(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1889(type: string): string[]
|
private getTypePrevents(type: string): string[]
|
||||||
{
|
{
|
||||||
if(!type) return [];
|
if(!type) return [];
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
return existing.prevents;
|
return existing.prevents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_715(k: string): boolean
|
public getPreventHeadTurn(k: string): boolean
|
||||||
{
|
{
|
||||||
if(!k) return this._preventHeadTurn;
|
if(!k) return this._preventHeadTurn;
|
||||||
|
|
||||||
@ -138,10 +138,10 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
|
|
||||||
if(!type) return this._preventHeadTurn;
|
if(!type) return this._preventHeadTurn;
|
||||||
|
|
||||||
return type._Str_1891;
|
return type.preventHeadTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_801(k: string): boolean
|
public isAnimated(k: string): boolean
|
||||||
{
|
{
|
||||||
if(!k) return true;
|
if(!k) return true;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
|
|
||||||
if(!type) return true;
|
if(!type) return true;
|
||||||
|
|
||||||
return type._Str_801;
|
return type.isAnimated;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get id(): string
|
public get id(): string
|
||||||
@ -172,7 +172,7 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
return this._activePartSet;
|
return this._activePartSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_778(): string
|
public get assetPartDefinition(): string
|
||||||
{
|
{
|
||||||
return this._assetPartDefinition;
|
return this._assetPartDefinition;
|
||||||
}
|
}
|
||||||
@ -182,27 +182,27 @@ export class ActionDefinition implements IActionDefinition
|
|||||||
return this._lay;
|
return this._lay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_868(): string
|
public get geometryType(): string
|
||||||
{
|
{
|
||||||
return this._geometryType;
|
return this._geometryType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_779(): boolean
|
public get isMain(): boolean
|
||||||
{
|
{
|
||||||
return this._isMain;
|
return this._isMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_804(): boolean
|
public get isDefault(): boolean
|
||||||
{
|
{
|
||||||
return this._isDefault;
|
return this._isDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_861(): boolean
|
public get isAnimation(): boolean
|
||||||
{
|
{
|
||||||
return this._isAnimation;
|
return this._isAnimation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_812(): boolean
|
public get startFromFrameZero(): boolean
|
||||||
{
|
{
|
||||||
return this._startFromFrameZero;
|
return this._startFromFrameZero;
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ export class ActionType
|
|||||||
return this._prevents;
|
return this._prevents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1891(): boolean
|
public get preventHeadTurn(): boolean
|
||||||
{
|
{
|
||||||
return this._preventHeadTurn;
|
return this._preventHeadTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_801(): boolean
|
public get isAnimated(): boolean
|
||||||
{
|
{
|
||||||
return this._isAnimated;
|
return this._isAnimated;
|
||||||
}
|
}
|
||||||
|
@ -32,42 +32,42 @@ export class ActiveActionData implements IActiveActionData
|
|||||||
return this._definition.id + '_' + this._actionParameter;
|
return this._definition.id + '_' + this._actionParameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_695(): string
|
public get actionType(): string
|
||||||
{
|
{
|
||||||
return this._actionType;
|
return this._actionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_727(): string
|
public get actionParameter(): string
|
||||||
{
|
{
|
||||||
return this._actionParameter;
|
return this._actionParameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_727(parameter: string)
|
public set actionParameter(parameter: string)
|
||||||
{
|
{
|
||||||
this._actionParameter = parameter;
|
this._actionParameter = parameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_742(): IActionDefinition
|
public get definition(): IActionDefinition
|
||||||
{
|
{
|
||||||
return this._definition;
|
return this._definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_742(definition: IActionDefinition)
|
public set definition(definition: IActionDefinition)
|
||||||
{
|
{
|
||||||
this._definition = definition;
|
this._definition = definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_664(): number
|
public get startFrame(): number
|
||||||
{
|
{
|
||||||
return this._startFrame;
|
return this._startFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_707(): string
|
public get overridingAction(): string
|
||||||
{
|
{
|
||||||
return this._overridingAction;
|
return this._overridingAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_707(action: string)
|
public set overridingAction(action: string)
|
||||||
{
|
{
|
||||||
this._overridingAction = action;
|
this._overridingAction = action;
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,10 @@ export class AvatarActionManager
|
|||||||
this._actions = new Map();
|
this._actions = new Map();
|
||||||
this._defaultAction = null;
|
this._defaultAction = null;
|
||||||
|
|
||||||
this._Str_1620(data);
|
this.updateActions(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1620(data: any): void
|
public updateActions(data: any): void
|
||||||
{
|
{
|
||||||
if(!data) return;
|
if(!data) return;
|
||||||
|
|
||||||
@ -30,10 +30,10 @@ export class AvatarActionManager
|
|||||||
this._actions.set(definition.state, definition);
|
this._actions.set(definition.state, definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.actionOffsets) this._Str_1767(data.actionOffsets);
|
if(data.actionOffsets) this.parseActionOffsets(data.actionOffsets);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1767(offsets: any): void
|
private parseActionOffsets(offsets: any): void
|
||||||
{
|
{
|
||||||
if(!offsets || !offsets.length) return;
|
if(!offsets || !offsets.length) return;
|
||||||
|
|
||||||
@ -54,12 +54,12 @@ export class AvatarActionManager
|
|||||||
const y = (canvasOffset.y || 0);
|
const y = (canvasOffset.y || 0);
|
||||||
const z = (canvasOffset.z || 0);
|
const z = (canvasOffset.z || 0);
|
||||||
|
|
||||||
action._Str_772(size, direction, [ x, y, z ]);
|
action.setOffsets(size, direction, [ x, y, z ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1675(id: string): ActionDefinition
|
public getActionDefinition(id: string): ActionDefinition
|
||||||
{
|
{
|
||||||
if(!id) return null;
|
if(!id) return null;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ export class AvatarActionManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2018(state: string): ActionDefinition
|
public getActionDefinitionWithState(state: string): ActionDefinition
|
||||||
{
|
{
|
||||||
const existing = this._actions.get(state);
|
const existing = this._actions.get(state);
|
||||||
|
|
||||||
@ -82,13 +82,13 @@ export class AvatarActionManager
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1027(): ActionDefinition
|
public getDefaultAction(): ActionDefinition
|
||||||
{
|
{
|
||||||
if(this._defaultAction) return this._defaultAction;
|
if(this._defaultAction) return this._defaultAction;
|
||||||
|
|
||||||
for(const action of this._actions.values())
|
for(const action of this._actions.values())
|
||||||
{
|
{
|
||||||
if(!action || !action._Str_804) continue;
|
if(!action || !action.isDefault) continue;
|
||||||
|
|
||||||
this._defaultAction = action;
|
this._defaultAction = action;
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ export class AvatarActionManager
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_781(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
public getCanvasOffsets(k: IActiveActionData[], _arg_2: string, _arg_3: number): number[]
|
||||||
{
|
{
|
||||||
let canvasOffsets: number[] = [];
|
let canvasOffsets: number[] = [];
|
||||||
|
|
||||||
@ -106,8 +106,8 @@ export class AvatarActionManager
|
|||||||
{
|
{
|
||||||
if(!activeAction) continue;
|
if(!activeAction) continue;
|
||||||
|
|
||||||
const action = this._actions.get(activeAction._Str_695);
|
const action = this._actions.get(activeAction.actionType);
|
||||||
const offsets = action && action._Str_805(_arg_2, _arg_3);
|
const offsets = action && action.getOffsets(_arg_2, _arg_3);
|
||||||
|
|
||||||
if(offsets) canvasOffsets = offsets;
|
if(offsets) canvasOffsets = offsets;
|
||||||
}
|
}
|
||||||
@ -115,11 +115,11 @@ export class AvatarActionManager
|
|||||||
return canvasOffsets;
|
return canvasOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_711(actions: IActiveActionData[]): IActiveActionData[]
|
public sortActions(actions: IActiveActionData[]): IActiveActionData[]
|
||||||
{
|
{
|
||||||
if(!actions) return null;
|
if(!actions) return null;
|
||||||
|
|
||||||
actions = this._Str_1247(actions);
|
actions = this.filterActions(actions);
|
||||||
|
|
||||||
const validatedActions: IActiveActionData[] = [];
|
const validatedActions: IActiveActionData[] = [];
|
||||||
|
|
||||||
@ -127,11 +127,11 @@ export class AvatarActionManager
|
|||||||
{
|
{
|
||||||
if(!action) continue;
|
if(!action) continue;
|
||||||
|
|
||||||
const definition = this._actions.get(action._Str_695);
|
const definition = this._actions.get(action.actionType);
|
||||||
|
|
||||||
if(!definition) continue;
|
if(!definition) continue;
|
||||||
|
|
||||||
action._Str_742 = definition;
|
action.definition = definition;
|
||||||
|
|
||||||
validatedActions.push(action);
|
validatedActions.push(action);
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ export class AvatarActionManager
|
|||||||
return validatedActions;
|
return validatedActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1247(actions: IActiveActionData[]): IActiveActionData[]
|
private filterActions(actions: IActiveActionData[]): IActiveActionData[]
|
||||||
{
|
{
|
||||||
let preventions: string[] = [];
|
let preventions: string[] = [];
|
||||||
const activeActions: IActiveActionData[] = [];
|
const activeActions: IActiveActionData[] = [];
|
||||||
@ -150,18 +150,18 @@ export class AvatarActionManager
|
|||||||
{
|
{
|
||||||
if(!action) continue;
|
if(!action) continue;
|
||||||
|
|
||||||
const localAction = this._actions.get(action._Str_695);
|
const localAction = this._actions.get(action.actionType);
|
||||||
|
|
||||||
if(localAction) preventions = preventions.concat(localAction._Str_733(action._Str_727));
|
if(localAction) preventions = preventions.concat(localAction.getPrevents(action.actionParameter));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(const action of actions)
|
for(const action of actions)
|
||||||
{
|
{
|
||||||
if(!action) continue;
|
if(!action) continue;
|
||||||
|
|
||||||
let actionType = action._Str_695;
|
let actionType = action.actionType;
|
||||||
|
|
||||||
if(action._Str_695 === 'fx') actionType = (actionType + ('.' + action._Str_727));
|
if(action.actionType === 'fx') actionType = (actionType + ('.' + action.actionParameter));
|
||||||
|
|
||||||
if(preventions.indexOf(actionType) >= 0) continue;
|
if(preventions.indexOf(actionType) >= 0) continue;
|
||||||
|
|
||||||
@ -175,8 +175,8 @@ export class AvatarActionManager
|
|||||||
{
|
{
|
||||||
if(!actionOne || !actionTwo) return 0;
|
if(!actionOne || !actionTwo) return 0;
|
||||||
|
|
||||||
const precedenceOne = actionOne._Str_742.precedence;
|
const precedenceOne = actionOne.definition.precedence;
|
||||||
const precedenceTwo = actionTwo._Str_742.precedence;
|
const precedenceTwo = actionTwo.definition.precedence;
|
||||||
|
|
||||||
if(precedenceOne < precedenceTwo) return 1;
|
if(precedenceOne < precedenceTwo) return 1;
|
||||||
|
|
||||||
|
@ -5,16 +5,16 @@ export interface IActionDefinition
|
|||||||
state: string;
|
state: string;
|
||||||
precedence: number;
|
precedence: number;
|
||||||
activePartSet: string;
|
activePartSet: string;
|
||||||
_Str_779: boolean;
|
isMain: boolean;
|
||||||
_Str_804: boolean;
|
isDefault: boolean;
|
||||||
_Str_778: string;
|
assetPartDefinition: string;
|
||||||
lay: string;
|
lay: string;
|
||||||
_Str_868: string;
|
geometryType: string;
|
||||||
_Str_861: boolean;
|
isAnimation: boolean;
|
||||||
_Str_812: boolean;
|
startFromFrameZero: boolean;
|
||||||
_Str_801(_arg_1: string): boolean;
|
isAnimated(_arg_1: string): boolean;
|
||||||
_Str_733(_arg_1: string): string[];
|
getPrevents(_arg_1: string): string[];
|
||||||
_Str_715(_arg_1: string): boolean;
|
getPreventHeadTurn(_arg_1: string): boolean;
|
||||||
_Str_772(_arg_1: string, _arg_2: number, _arg_3: []): void;
|
setOffsets(_arg_1: string, _arg_2: number, _arg_3: []): void;
|
||||||
_Str_805(_arg_1: string, _arg_2: number): number[];
|
getOffsets(_arg_1: string, _arg_2: number): number[];
|
||||||
}
|
}
|
@ -3,9 +3,9 @@ import { IActionDefinition } from './IActionDefinition';
|
|||||||
export interface IActiveActionData
|
export interface IActiveActionData
|
||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
_Str_695: string;
|
actionType: string;
|
||||||
_Str_727: string;
|
actionParameter: string;
|
||||||
_Str_664: number;
|
startFrame: number;
|
||||||
_Str_742: IActionDefinition;
|
definition: IActionDefinition;
|
||||||
_Str_707: string;
|
overridingAction: string;
|
||||||
}
|
}
|
@ -50,7 +50,7 @@ export class AssetAliasCollection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1044(k: string): boolean
|
public hasAlias(k: string): boolean
|
||||||
{
|
{
|
||||||
const alias = this._aliases.get(k);
|
const alias = this._aliases.get(k);
|
||||||
|
|
||||||
@ -59,12 +59,12 @@ export class AssetAliasCollection
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2125(k: string): string
|
public getAssetName(k: string): string
|
||||||
{
|
{
|
||||||
let _local_2 = k;
|
let _local_2 = k;
|
||||||
let _local_3 = 5;
|
let _local_3 = 5;
|
||||||
|
|
||||||
while(this._Str_1044(_local_2) && (_local_3 >= 0))
|
while(this.hasAlias(_local_2) && (_local_3 >= 0))
|
||||||
{
|
{
|
||||||
const _local_4 = this._aliases.get(_local_2);
|
const _local_4 = this._aliases.get(_local_2);
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ export class AssetAliasCollection
|
|||||||
{
|
{
|
||||||
if(!this._assets) return null;
|
if(!this._assets) return null;
|
||||||
|
|
||||||
name = this._Str_2125(name);
|
name = this.getAssetName(name);
|
||||||
|
|
||||||
const asset = this._assets.getAsset(name);
|
const asset = this._assets.getAsset(name);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ export class AddDataContainer
|
|||||||
return this._blend;
|
return this._blend;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1096(): boolean
|
public get isBlended(): boolean
|
||||||
{
|
{
|
||||||
return this._blend !== 1;
|
return this._blend !== 1;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { SpriteDataContainer } from './SpriteDataContainer';
|
|||||||
|
|
||||||
export class Animation implements IAnimation
|
export class Animation implements IAnimation
|
||||||
{
|
{
|
||||||
private static _Str_2211: any[] = [];
|
private static EMPTY_ARRAY: any[] = [];
|
||||||
|
|
||||||
private _id: string;
|
private _id: string;
|
||||||
private _description: string;
|
private _description: string;
|
||||||
@ -76,16 +76,16 @@ export class Animation implements IAnimation
|
|||||||
|
|
||||||
const frames: AvatarAnimationLayerData[][] = [];
|
const frames: AvatarAnimationLayerData[][] = [];
|
||||||
|
|
||||||
this._Str_1031(frames, override.frames, k);
|
this.parseFrames(frames, override.frames, k);
|
||||||
|
|
||||||
this._overrideFrames.set(name, frames);
|
this._overrideFrames.set(name, frames);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._Str_1031(this._frames, _arg_2.frames, k);
|
this.parseFrames(this._frames, _arg_2.frames, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1031(frames: AvatarAnimationLayerData[][], _arg_2: IAssetAnimationFrame[], _arg_3: AvatarStructure): void
|
private parseFrames(frames: AvatarAnimationLayerData[][], _arg_2: IAssetAnimationFrame[], _arg_3: AvatarStructure): void
|
||||||
{
|
{
|
||||||
if(!_arg_2 || !_arg_2.length) return;
|
if(!_arg_2 || !_arg_2.length) return;
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ export class Animation implements IAnimation
|
|||||||
{
|
{
|
||||||
for(const bodyPart of frame.bodyparts)
|
for(const bodyPart of frame.bodyparts)
|
||||||
{
|
{
|
||||||
const definition = _arg_3._Str_1675(bodyPart.action);
|
const definition = _arg_3.getActionDefinition(bodyPart.action);
|
||||||
const layer = new AvatarAnimationLayerData(bodyPart, AvatarAnimationLayerData.BODYPART, definition);
|
const layer = new AvatarAnimationLayerData(bodyPart, AvatarAnimationLayerData.BODYPART, definition);
|
||||||
|
|
||||||
layers.push(layer);
|
layers.push(layer);
|
||||||
@ -116,7 +116,7 @@ export class Animation implements IAnimation
|
|||||||
{
|
{
|
||||||
for(const fx of frame.fxs)
|
for(const fx of frame.fxs)
|
||||||
{
|
{
|
||||||
const definition = _arg_3._Str_1675(fx.action);
|
const definition = _arg_3.getActionDefinition(fx.action);
|
||||||
const layer = new AvatarAnimationLayerData(fx, AvatarAnimationLayerData.FX, definition);
|
const layer = new AvatarAnimationLayerData(fx, AvatarAnimationLayerData.FX, definition);
|
||||||
|
|
||||||
layers.push(layer);
|
layers.push(layer);
|
||||||
@ -130,7 +130,7 @@ export class Animation implements IAnimation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2185(k: string = null): number
|
public frameCount(k: string = null): number
|
||||||
{
|
{
|
||||||
if(!k) return this._frames.length;
|
if(!k) return this._frames.length;
|
||||||
|
|
||||||
@ -144,14 +144,14 @@ export class Animation implements IAnimation
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1892(): boolean
|
public hasOverriddenActions(): boolean
|
||||||
{
|
{
|
||||||
if(!this._overriddenActions) return false;
|
if(!this._overriddenActions) return false;
|
||||||
|
|
||||||
return (this._overriddenActions.size > 0);
|
return (this._overriddenActions.size > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1571(): string[]
|
public overriddenActionNames(): string[]
|
||||||
{
|
{
|
||||||
if(!this._overriddenActions) return null;
|
if(!this._overriddenActions) return null;
|
||||||
|
|
||||||
@ -162,14 +162,14 @@ export class Animation implements IAnimation
|
|||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_707(k: string): string
|
public overridingAction(k: string): string
|
||||||
{
|
{
|
||||||
if(!this._overriddenActions) return null;
|
if(!this._overriddenActions) return null;
|
||||||
|
|
||||||
return this._overriddenActions.get(k);
|
return this._overriddenActions.get(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_2259(frameCount: number, _arg_2: string = null): AvatarAnimationLayerData[]
|
private getFrame(frameCount: number, _arg_2: string = null): AvatarAnimationLayerData[]
|
||||||
{
|
{
|
||||||
if(frameCount < 0) frameCount = 0;
|
if(frameCount < 0) frameCount = 0;
|
||||||
|
|
||||||
@ -195,11 +195,11 @@ export class Animation implements IAnimation
|
|||||||
return layers;
|
return layers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1065(k: number, _arg_2: string=null): string[]
|
public getAnimatedBodyPartIds(k: number, _arg_2: string=null): string[]
|
||||||
{
|
{
|
||||||
const _local_3: string[] = [];
|
const _local_3: string[] = [];
|
||||||
|
|
||||||
for(const layer of this._Str_2259(k, _arg_2))
|
for(const layer of this.getFrame(k, _arg_2))
|
||||||
{
|
{
|
||||||
if(layer.type === AvatarAnimationLayerData.BODYPART)
|
if(layer.type === AvatarAnimationLayerData.BODYPART)
|
||||||
{
|
{
|
||||||
@ -221,9 +221,9 @@ export class Animation implements IAnimation
|
|||||||
return _local_3;
|
return _local_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_607(frameCount: number, spriteId: string, _arg_3: string = null): AvatarAnimationLayerData
|
public getLayerData(frameCount: number, spriteId: string, _arg_3: string = null): AvatarAnimationLayerData
|
||||||
{
|
{
|
||||||
for(const layer of this._Str_2259(frameCount, _arg_3))
|
for(const layer of this.getFrame(frameCount, _arg_3))
|
||||||
{
|
{
|
||||||
if(layer.id === spriteId) return layer;
|
if(layer.id === spriteId) return layer;
|
||||||
|
|
||||||
@ -242,22 +242,22 @@ export class Animation implements IAnimation
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_872(): boolean
|
public hasAvatarData(): boolean
|
||||||
{
|
{
|
||||||
return this._avatarData !== null;
|
return this._avatarData !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_776(): boolean
|
public hasDirectionData(): boolean
|
||||||
{
|
{
|
||||||
return this._directionData !== null;
|
return this._directionData !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_706(): boolean
|
public hasAddData(): boolean
|
||||||
{
|
{
|
||||||
return this._addData !== null;
|
return this._addData !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1550(k: string): AddDataContainer
|
public getAddData(k: string): AddDataContainer
|
||||||
{
|
{
|
||||||
if(this._addData)
|
if(this._addData)
|
||||||
{
|
{
|
||||||
@ -275,29 +275,29 @@ export class Animation implements IAnimation
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_786(): SpriteDataContainer[]
|
public get spriteData(): SpriteDataContainer[]
|
||||||
{
|
{
|
||||||
return this._spriteData || Animation._Str_2211;
|
return this._spriteData || Animation.EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1475(): AvatarDataContainer
|
public get avatarData(): AvatarDataContainer
|
||||||
{
|
{
|
||||||
return this._avatarData;
|
return this._avatarData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1493(): DirectionDataContainer
|
public get directionData(): DirectionDataContainer
|
||||||
{
|
{
|
||||||
return this._directionData;
|
return this._directionData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_652(): string[]
|
public get removeData(): string[]
|
||||||
{
|
{
|
||||||
return this._removeData || Animation._Str_2211;
|
return this._removeData || Animation.EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_687(): AddDataContainer[]
|
public get addData(): AddDataContainer[]
|
||||||
{
|
{
|
||||||
return this._addData || Animation._Str_2211;
|
return this._addData || Animation.EMPTY_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public toString(): string
|
public toString(): string
|
||||||
|
@ -14,7 +14,7 @@ export class AnimationManager implements IAnimationManager
|
|||||||
this._animations = new Map();
|
this._animations = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2061(structure: AvatarStructure, _arg_2: { [index: string]: IAssetAnimation }): boolean
|
public registerAnimation(structure: AvatarStructure, _arg_2: { [index: string]: IAssetAnimation }): boolean
|
||||||
{
|
{
|
||||||
const animationData = _arg_2[Object.keys(_arg_2)[0]];
|
const animationData = _arg_2[Object.keys(_arg_2)[0]];
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export class AnimationManager implements IAnimationManager
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_720(animation: string): Animation
|
public getAnimation(animation: string): Animation
|
||||||
{
|
{
|
||||||
const existing = this._animations.get(animation);
|
const existing = this._animations.get(animation);
|
||||||
|
|
||||||
@ -34,13 +34,13 @@ export class AnimationManager implements IAnimationManager
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_607(animation: string, frameCount: number, spriteId: string): IAnimationLayerData
|
public getLayerData(animation: string, frameCount: number, spriteId: string): IAnimationLayerData
|
||||||
{
|
{
|
||||||
const existing = this._Str_720(animation);
|
const existing = this.getAnimation(animation);
|
||||||
|
|
||||||
if(!existing) return null;
|
if(!existing) return null;
|
||||||
|
|
||||||
return existing._Str_607(frameCount, spriteId);
|
return existing.getLayerData(frameCount, spriteId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get animations(): Map<string, IAnimation>
|
public get animations(): Map<string, IAnimation>
|
||||||
|
@ -36,12 +36,12 @@ export class AvatarAnimationLayerData implements IAnimationLayerData
|
|||||||
|
|
||||||
let _local_5 = '';
|
let _local_5 = '';
|
||||||
|
|
||||||
if(this._base !== '') _local_5 = this._Str_2108().toString();
|
if(this._base !== '') _local_5 = this.baseAsInt().toString();
|
||||||
|
|
||||||
if(_arg_3)
|
if(_arg_3)
|
||||||
{
|
{
|
||||||
this._action = new ActiveActionData(_arg_3.state, this.base);
|
this._action = new ActiveActionData(_arg_3.state, this.base);
|
||||||
this._action._Str_742 = _arg_3;
|
this._action.definition = _arg_3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ export class AvatarAnimationLayerData implements IAnimationLayerData
|
|||||||
return this._items;
|
return this._items;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_2108(): number
|
private baseAsInt(): number
|
||||||
{
|
{
|
||||||
let k = 0;
|
let k = 0;
|
||||||
let index = 0;
|
let index = 0;
|
||||||
@ -70,7 +70,7 @@ export class AvatarAnimationLayerData implements IAnimationLayerData
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_891(): number
|
public get animationFrame(): number
|
||||||
{
|
{
|
||||||
return this._animationFrame;
|
return this._animationFrame;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ export class AvatarDataContainer implements IAvatarDataContainer
|
|||||||
this._paletteIsGrayscale = false;
|
this._paletteIsGrayscale = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._colorMap = this._Str_1181(this._backGround, this._foreGround);
|
this._colorMap = this.generatePaletteMapForGrayscale(this._backGround, this._foreGround);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get ink(): number
|
public get ink(): number
|
||||||
@ -81,12 +81,12 @@ export class AvatarDataContainer implements IAvatarDataContainer
|
|||||||
return this._colorMap.get('alphas');
|
return this._colorMap.get('alphas');
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_832(): boolean
|
public get paletteIsGrayscale(): boolean
|
||||||
{
|
{
|
||||||
return this._paletteIsGrayscale;
|
return this._paletteIsGrayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1181(k: number, _arg_2: number): Map<string, number[]>
|
private generatePaletteMapForGrayscale(k: number, _arg_2: number): Map<string, number[]>
|
||||||
{
|
{
|
||||||
const _local_3 = ((k >> 24) & 0xFF);
|
const _local_3 = ((k >> 24) & 0xFF);
|
||||||
const _local_4 = ((k >> 16) & 0xFF);
|
const _local_4 = ((k >> 16) & 0xFF);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
export interface IAnimation
|
export interface IAnimation
|
||||||
{
|
{
|
||||||
_Str_872(): boolean;
|
hasAvatarData(): boolean;
|
||||||
_Str_776(): boolean;
|
hasDirectionData(): boolean;
|
||||||
_Str_706(): boolean;
|
hasAddData(): boolean;
|
||||||
id: string;
|
id: string;
|
||||||
_Str_786: any;
|
spriteData: any;
|
||||||
_Str_652: any;
|
removeData: any;
|
||||||
_Str_687: any;
|
addData: any;
|
||||||
resetOnToggle: boolean;
|
resetOnToggle: boolean;
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ export interface IAnimationLayerData
|
|||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
action: IActiveActionData;
|
action: IActiveActionData;
|
||||||
_Str_891: number;
|
animationFrame: number;
|
||||||
dx: number;
|
dx: number;
|
||||||
dy: number;
|
dy: number;
|
||||||
dz: number;
|
dz: number;
|
||||||
|
@ -4,6 +4,6 @@ import { IAnimationLayerData } from './IAnimationLayerData';
|
|||||||
export interface IAnimationManager
|
export interface IAnimationManager
|
||||||
{
|
{
|
||||||
animations: Map<any, any>;
|
animations: Map<any, any>;
|
||||||
_Str_720(_arg_1: string): IAnimation;
|
getAnimation(_arg_1: string): IAnimation;
|
||||||
_Str_607(_arg_1: string, _arg_2: number, _arg_3: string): IAnimationLayerData;
|
getLayerData(_arg_1: string, _arg_2: number, _arg_3: string): IAnimationLayerData;
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ export interface IAvatarDataContainer
|
|||||||
{
|
{
|
||||||
ink: number;
|
ink: number;
|
||||||
colorTransform: AdjustmentFilter;
|
colorTransform: AdjustmentFilter;
|
||||||
_Str_832: boolean;
|
paletteIsGrayscale: boolean;
|
||||||
reds: number[];
|
reds: number[];
|
||||||
greens: number[];
|
greens: number[];
|
||||||
blues: number[];
|
blues: number[];
|
||||||
|
@ -6,9 +6,9 @@ export interface ISpriteDataContainer
|
|||||||
id: string;
|
id: string;
|
||||||
ink: number;
|
ink: number;
|
||||||
member: string;
|
member: string;
|
||||||
_Str_949: boolean;
|
hasDirections: boolean;
|
||||||
_Str_767: boolean;
|
hasStaticY: boolean;
|
||||||
_Str_809(_arg_1: number): number;
|
getDirectionOffsetX(_arg_1: number): number;
|
||||||
_Str_739(_arg_1: number): number;
|
getDirectionOffsetY(_arg_1: number): number;
|
||||||
_Str_839(_arg_1: number): number;
|
getDirectionOffsetZ(_arg_1: number): number;
|
||||||
}
|
}
|
@ -43,21 +43,21 @@ export class SpriteDataContainer implements ISpriteDataContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_809(k: number): number
|
public getDirectionOffsetX(k: number): number
|
||||||
{
|
{
|
||||||
if(k < this._dx.length) return this._dx[k];
|
if(k < this._dx.length) return this._dx[k];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_739(k: number): number
|
public getDirectionOffsetY(k: number): number
|
||||||
{
|
{
|
||||||
if(k < this._dy.length) return this._dy[k];
|
if(k < this._dy.length) return this._dy[k];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_839(k: number): number
|
public getDirectionOffsetZ(k: number): number
|
||||||
{
|
{
|
||||||
if(k < this._dz.length) return this._dz[k];
|
if(k < this._dz.length) return this._dz[k];
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ export class SpriteDataContainer implements ISpriteDataContainer
|
|||||||
return this._member;
|
return this._member;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_949(): boolean
|
public get hasDirections(): boolean
|
||||||
{
|
{
|
||||||
return this._hasDirections;
|
return this._hasDirections;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_767(): boolean
|
public get hasStaticY(): boolean
|
||||||
{
|
{
|
||||||
return this._hasStaticY;
|
return this._hasStaticY;
|
||||||
}
|
}
|
||||||
|
89
src/nitro/avatar/cache/AvatarImageActionCache.ts
vendored
89
src/nitro/avatar/cache/AvatarImageActionCache.ts
vendored
@ -1,96 +1,57 @@
|
|||||||
import { IActiveActionData } from '../actions/IActiveActionData';
|
import { Nitro } from '../../Nitro';
|
||||||
import { AvatarImageBodyPartCache } from './AvatarImageBodyPartCache';
|
import { AvatarImageDirectionCache } from './AvatarImageDirectionCache';
|
||||||
|
|
||||||
export class AvatarImageActionCache
|
export class AvatarImageActionCache
|
||||||
{
|
{
|
||||||
private _Str_586: Map<string, AvatarImageBodyPartCache>;
|
private _cache: Map<string, AvatarImageDirectionCache>;
|
||||||
private _Str_1233: IActiveActionData;
|
private _lastAccessTime: number;
|
||||||
private _Str_1188: number;
|
|
||||||
private _disposed: boolean;
|
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
this._Str_586 = new Map();
|
this._cache = new Map();
|
||||||
}
|
|
||||||
|
|
||||||
public _Str_1565(k: IActiveActionData, _arg_2: number): void
|
this.setLastAccessTime(Nitro.instance.time);
|
||||||
{
|
|
||||||
if(!this._Str_1233) this._Str_1233 = k;
|
|
||||||
|
|
||||||
const _local_3 = this._Str_1961(this._Str_1233);
|
|
||||||
|
|
||||||
if(_local_3) _local_3._Str_1108(_arg_2);
|
|
||||||
|
|
||||||
this._Str_1233 = k;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
{
|
{
|
||||||
if(!this._disposed)
|
this.debugInfo('[dispose]');
|
||||||
|
|
||||||
|
if(!this._cache) return;
|
||||||
|
|
||||||
|
for(const direction of this._cache.values())
|
||||||
{
|
{
|
||||||
if(!this._Str_586) return;
|
if(direction) direction.dispose();
|
||||||
|
|
||||||
this._Str_2089(0, 2147483647);
|
|
||||||
|
|
||||||
this._Str_586.clear();
|
|
||||||
|
|
||||||
this._Str_586 = null;
|
|
||||||
this._disposed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._cache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2089(k: number, _arg_2: number): void
|
public getDirectionCache(k: number): AvatarImageDirectionCache
|
||||||
{
|
{
|
||||||
if(!this._Str_586 || this._disposed) return;
|
const existing = this._cache.get(k.toString());
|
||||||
|
|
||||||
for(const [ key, cache ] of this._Str_586.entries())
|
if(!existing) return null;
|
||||||
{
|
|
||||||
if(!cache) continue;
|
|
||||||
|
|
||||||
const _local_3 = cache._Str_1815();
|
return existing;
|
||||||
|
|
||||||
if((_arg_2 - _local_3) >= k)
|
|
||||||
{
|
|
||||||
cache.dispose();
|
|
||||||
|
|
||||||
this._Str_586.delete(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2244():IActiveActionData
|
public updateDirectionCache(k: number, _arg_2: AvatarImageDirectionCache): void
|
||||||
{
|
{
|
||||||
return this._Str_1233;
|
this._cache.set(k.toString(), _arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public setDirection(k: number): void
|
public setLastAccessTime(k: number): void
|
||||||
{
|
{
|
||||||
this._Str_1188 = k;
|
this._lastAccessTime = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getDirection(): number
|
public getLastAccessTime(): number
|
||||||
{
|
{
|
||||||
return this._Str_1188;
|
return this._lastAccessTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1961(k: IActiveActionData=null): AvatarImageBodyPartCache
|
private debugInfo(k: string): void
|
||||||
{
|
|
||||||
if(!this._Str_1233) return null;
|
|
||||||
|
|
||||||
if(!k) k = this._Str_1233;
|
|
||||||
|
|
||||||
if(k._Str_707) return this._Str_586.get(k._Str_707);
|
|
||||||
|
|
||||||
return this._Str_586.get(k.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public _Str_1765(k: IActiveActionData, _arg_2: AvatarImageBodyPartCache): void
|
|
||||||
{
|
|
||||||
if(k._Str_707) this._Str_586.set(k._Str_707, _arg_2);
|
|
||||||
else this._Str_586.set(k.id, _arg_2);
|
|
||||||
}
|
|
||||||
|
|
||||||
private _Str_587(k: string): void
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,57 +1,96 @@
|
|||||||
import { Nitro } from '../../Nitro';
|
import { IActiveActionData } from '../actions/IActiveActionData';
|
||||||
import { AvatarImageDirectionCache } from './AvatarImageDirectionCache';
|
import { AvatarImageActionCache } from './AvatarImageActionCache';
|
||||||
|
|
||||||
export class AvatarImageBodyPartCache
|
export class AvatarImageBodyPartCache
|
||||||
{
|
{
|
||||||
private _Str_586: Map<string, AvatarImageDirectionCache>;
|
private _cache: Map<string, AvatarImageActionCache>;
|
||||||
private _Str_1509: number;
|
private _currentAction: IActiveActionData;
|
||||||
|
private _currentDirection: number;
|
||||||
|
private _disposed: boolean;
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
this._Str_586 = new Map();
|
this._cache = new Map();
|
||||||
|
}
|
||||||
|
|
||||||
this._Str_1108(Nitro.instance.time);
|
public setAction(k: IActiveActionData, _arg_2: number): void
|
||||||
|
{
|
||||||
|
if(!this._currentAction) this._currentAction = k;
|
||||||
|
|
||||||
|
const _local_3 = this.getActionCache(this._currentAction);
|
||||||
|
|
||||||
|
if(_local_3) _local_3.setLastAccessTime(_arg_2);
|
||||||
|
|
||||||
|
this._currentAction = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
{
|
{
|
||||||
this._Str_587('[dispose]');
|
if(!this._disposed)
|
||||||
|
|
||||||
if(!this._Str_586) return;
|
|
||||||
|
|
||||||
for(const direction of this._Str_586.values())
|
|
||||||
{
|
{
|
||||||
if(direction) direction.dispose();
|
if(!this._cache) return;
|
||||||
|
|
||||||
|
this.disposeActions(0, 2147483647);
|
||||||
|
|
||||||
|
this._cache.clear();
|
||||||
|
|
||||||
|
this._cache = null;
|
||||||
|
this._disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._Str_586.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2070(k: number): AvatarImageDirectionCache
|
public disposeActions(k: number, _arg_2: number): void
|
||||||
{
|
{
|
||||||
const existing = this._Str_586.get(k.toString());
|
if(!this._cache || this._disposed) return;
|
||||||
|
|
||||||
if(!existing) return null;
|
for(const [ key, cache ] of this._cache.entries())
|
||||||
|
{
|
||||||
|
if(!cache) continue;
|
||||||
|
|
||||||
return existing;
|
const _local_3 = cache.getLastAccessTime();
|
||||||
|
|
||||||
|
if((_arg_2 - _local_3) >= k)
|
||||||
|
{
|
||||||
|
cache.dispose();
|
||||||
|
|
||||||
|
this._cache.delete(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2168(k: number, _arg_2: AvatarImageDirectionCache): void
|
public getAction():IActiveActionData
|
||||||
{
|
{
|
||||||
this._Str_586.set(k.toString(), _arg_2);
|
return this._currentAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1108(k: number): void
|
public setDirection(k: number): void
|
||||||
{
|
{
|
||||||
this._Str_1509 = k;
|
this._currentDirection = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1815(): number
|
public getDirection(): number
|
||||||
{
|
{
|
||||||
return this._Str_1509;
|
return this._currentDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_587(k: string): void
|
public getActionCache(k: IActiveActionData=null): AvatarImageActionCache
|
||||||
|
{
|
||||||
|
if(!this._currentAction) return null;
|
||||||
|
|
||||||
|
if(!k) k = this._currentAction;
|
||||||
|
|
||||||
|
if(k.overridingAction) return this._cache.get(k.overridingAction);
|
||||||
|
|
||||||
|
return this._cache.get(k.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateActionCache(k: IActiveActionData, _arg_2: AvatarImageActionCache): void
|
||||||
|
{
|
||||||
|
if(k.overridingAction) this._cache.set(k.overridingAction, _arg_2);
|
||||||
|
else this._cache.set(k.id, _arg_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private debugInfo(k: string): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
122
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
122
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
@ -20,13 +20,13 @@ import { ImageData } from './ImageData';
|
|||||||
|
|
||||||
export class AvatarImageCache
|
export class AvatarImageCache
|
||||||
{
|
{
|
||||||
private static _Str_2189: number = 60000;
|
private static DEFAULT_MAX_CACHE_STORAGE_TIME_MS: number = 60000;
|
||||||
|
|
||||||
private _structure: AvatarStructure;
|
private _structure: AvatarStructure;
|
||||||
private _avatar: IAvatarImage;
|
private _avatar: IAvatarImage;
|
||||||
private _assets: AssetAliasCollection;
|
private _assets: AssetAliasCollection;
|
||||||
private _scale: string;
|
private _scale: string;
|
||||||
private _cache: Map<string, AvatarImageActionCache>;
|
private _cache: Map<string, AvatarImageBodyPartCache>;
|
||||||
private _canvas: AvatarCanvas;
|
private _canvas: AvatarCanvas;
|
||||||
private _disposed: boolean;
|
private _disposed: boolean;
|
||||||
private _geometryType: string;
|
private _geometryType: string;
|
||||||
@ -83,7 +83,7 @@ export class AvatarImageCache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1086(k: number = 60000): void
|
public disposeInactiveActions(k: number = 60000): void
|
||||||
{
|
{
|
||||||
const time = Nitro.instance.time;
|
const time = Nitro.instance.time;
|
||||||
|
|
||||||
@ -93,12 +93,12 @@ export class AvatarImageCache
|
|||||||
{
|
{
|
||||||
if(!cache) continue;
|
if(!cache) continue;
|
||||||
|
|
||||||
cache._Str_2089(k, time);
|
cache.disposeActions(k, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_741(k: IActiveActionData): void
|
public resetBodyPartCache(k: IActiveActionData): void
|
||||||
{
|
{
|
||||||
if(this._cache)
|
if(this._cache)
|
||||||
{
|
{
|
||||||
@ -106,20 +106,20 @@ export class AvatarImageCache
|
|||||||
{
|
{
|
||||||
if(!cache) continue;
|
if(!cache) continue;
|
||||||
|
|
||||||
cache._Str_1565(k, 0);
|
cache.setAction(k, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public setDirection(k: string, _arg_2: number): void
|
public setDirection(k: string, _arg_2: number): void
|
||||||
{
|
{
|
||||||
const parts = this._structure._Str_1695(k);
|
const parts = this._structure.getBodyPartsUnordered(k);
|
||||||
|
|
||||||
if(parts)
|
if(parts)
|
||||||
{
|
{
|
||||||
for(const part of parts)
|
for(const part of parts)
|
||||||
{
|
{
|
||||||
const actionCache = this._Str_1050(part);
|
const actionCache = this.getBodyPartCache(part);
|
||||||
|
|
||||||
if(!actionCache) continue;
|
if(!actionCache) continue;
|
||||||
|
|
||||||
@ -128,19 +128,19 @@ export class AvatarImageCache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1565(k: IActiveActionData, _arg_2: number): void
|
public setAction(k: IActiveActionData, _arg_2: number): void
|
||||||
{
|
{
|
||||||
const _local_3 = this._structure._Str_2021(k, this._avatar);
|
const _local_3 = this._structure.getActiveBodyPartIds(k, this._avatar);
|
||||||
|
|
||||||
for(const _local_4 of _local_3)
|
for(const _local_4 of _local_3)
|
||||||
{
|
{
|
||||||
const _local_5 = this._Str_1050(_local_4);
|
const _local_5 = this.getBodyPartCache(_local_4);
|
||||||
|
|
||||||
if(_local_5) _local_5._Str_1565(k, _arg_2);
|
if(_local_5) _local_5.setAction(k, _arg_2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2014(k: string): void
|
public setGeometryType(k: string): void
|
||||||
{
|
{
|
||||||
if(this._geometryType === k) return;
|
if(this._geometryType === k) return;
|
||||||
|
|
||||||
@ -152,46 +152,46 @@ export class AvatarImageCache
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._Str_1086(0);
|
this.disposeInactiveActions(0);
|
||||||
|
|
||||||
this._geometryType = k;
|
this._geometryType = k;
|
||||||
this._canvas = null;
|
this._canvas = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1629(k: string, frameNumber: number, _arg_3: boolean = false): AvatarImageBodyPartContainer
|
public getImageContainer(k: string, frameNumber: number, _arg_3: boolean = false): AvatarImageBodyPartContainer
|
||||||
{
|
{
|
||||||
let _local_4 = this._Str_1050(k);
|
let _local_4 = this.getBodyPartCache(k);
|
||||||
|
|
||||||
if(!_local_4)
|
if(!_local_4)
|
||||||
{
|
{
|
||||||
_local_4 = new AvatarImageActionCache();
|
_local_4 = new AvatarImageBodyPartCache();
|
||||||
|
|
||||||
this._cache.set(k, _local_4);
|
this._cache.set(k, _local_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
let _local_5 = _local_4.getDirection();
|
let _local_5 = _local_4.getDirection();
|
||||||
let _local_7 = _local_4._Str_2244();
|
let _local_7 = _local_4.getAction();
|
||||||
let frameCount = frameNumber;
|
let frameCount = frameNumber;
|
||||||
|
|
||||||
if(_local_7._Str_742._Str_812) frameCount -= _local_7._Str_664;
|
if(_local_7.definition.startFromFrameZero) frameCount -= _local_7.startFrame;
|
||||||
|
|
||||||
let _local_8 = _local_7;
|
let _local_8 = _local_7;
|
||||||
let _local_9: string[] = [];
|
let _local_9: string[] = [];
|
||||||
let _local_10: Map<string, string> = new Map();
|
let _local_10: Map<string, string> = new Map();
|
||||||
const _local_11 = new Point();
|
const _local_11 = new Point();
|
||||||
|
|
||||||
if(!((!(_local_7)) || (!(_local_7._Str_742))))
|
if(!((!(_local_7)) || (!(_local_7.definition))))
|
||||||
{
|
{
|
||||||
if(_local_7._Str_742._Str_861)
|
if(_local_7.definition.isAnimation)
|
||||||
{
|
{
|
||||||
let _local_15 = _local_5;
|
let _local_15 = _local_5;
|
||||||
|
|
||||||
const _local_16 = this._structure._Str_720(((_local_7._Str_742.state + '.') + _local_7._Str_727));
|
const _local_16 = this._structure.getAnimation(((_local_7.definition.state + '.') + _local_7.actionParameter));
|
||||||
const _local_17 = (frameNumber - _local_7._Str_664);
|
const _local_17 = (frameNumber - _local_7.startFrame);
|
||||||
|
|
||||||
if(_local_16)
|
if(_local_16)
|
||||||
{
|
{
|
||||||
const _local_18 = _local_16._Str_607(_local_17, k, _local_7._Str_707);
|
const _local_18 = _local_16.getLayerData(_local_17, k, _local_7.overridingAction);
|
||||||
|
|
||||||
if(_local_18)
|
if(_local_18)
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@ export class AvatarImageCache
|
|||||||
_local_11.y = (_local_18.dy / 2);
|
_local_11.y = (_local_18.dy / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
frameCount = _local_18._Str_891;
|
frameCount = _local_18.animationFrame;
|
||||||
|
|
||||||
if(_local_18.action)
|
if(_local_18.action)
|
||||||
{
|
{
|
||||||
@ -246,41 +246,41 @@ export class AvatarImageCache
|
|||||||
_local_10 = _local_18.items;
|
_local_10 = _local_18.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
_local_9 = _local_16._Str_652;
|
_local_9 = _local_16.removeData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let _local_12 = _local_4._Str_1961(_local_8);
|
let _local_12 = _local_4.getActionCache(_local_8);
|
||||||
|
|
||||||
if(!_local_12 || _arg_3)
|
if(!_local_12 || _arg_3)
|
||||||
{
|
{
|
||||||
_local_12 = new AvatarImageBodyPartCache();
|
_local_12 = new AvatarImageActionCache();
|
||||||
_local_4._Str_1765(_local_8, _local_12);
|
_local_4.updateActionCache(_local_8, _local_12);
|
||||||
}
|
}
|
||||||
|
|
||||||
let _local_13 = _local_12._Str_2070(_local_5);
|
let _local_13 = _local_12.getDirectionCache(_local_5);
|
||||||
|
|
||||||
if(!_local_13 || _arg_3)
|
if(!_local_13 || _arg_3)
|
||||||
{
|
{
|
||||||
const _local_19 = this._structure._Str_713(k, this._avatar.getFigure(), _local_8, this._geometryType, _local_5, _local_9, this._avatar, _local_10);
|
const _local_19 = this._structure.getParts(k, this._avatar.getFigure(), _local_8, this._geometryType, _local_5, _local_9, this._avatar, _local_10);
|
||||||
|
|
||||||
_local_13 = new AvatarImageDirectionCache(_local_19);
|
_local_13 = new AvatarImageDirectionCache(_local_19);
|
||||||
|
|
||||||
_local_12._Str_2168(_local_5, _local_13);
|
_local_12.updateDirectionCache(_local_5, _local_13);
|
||||||
}
|
}
|
||||||
|
|
||||||
let _local_14 = _local_13._Str_1629(frameCount);
|
let _local_14 = _local_13.getImageContainer(frameCount);
|
||||||
|
|
||||||
if(!_local_14 || _arg_3)
|
if(!_local_14 || _arg_3)
|
||||||
{
|
{
|
||||||
const _local_20 = _local_13._Str_1699();
|
const _local_20 = _local_13.getPartList();
|
||||||
|
|
||||||
_local_14 = this._Str_1834(_local_5, _local_20, frameCount, _local_7, _arg_3);
|
_local_14 = this.renderBodyPart(_local_5, _local_20, frameCount, _local_7, _arg_3);
|
||||||
|
|
||||||
if(_local_14 && !_arg_3)
|
if(_local_14 && !_arg_3)
|
||||||
{
|
{
|
||||||
if(_local_14._Str_1807) _local_13._Str_1924(_local_14, frameCount);
|
if(_local_14.isCacheable) _local_13.updateImageContainer(_local_14, frameCount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -288,7 +288,7 @@ export class AvatarImageCache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const offset = this._structure._Str_1888(_local_8, _local_5, frameCount, k);
|
const offset = this._structure.getFrameBodyPartOffset(_local_8, _local_5, frameCount, k);
|
||||||
|
|
||||||
_local_11.x += offset.x;
|
_local_11.x += offset.x;
|
||||||
_local_11.y += offset.y;
|
_local_11.y += offset.y;
|
||||||
@ -298,20 +298,20 @@ export class AvatarImageCache
|
|||||||
return _local_14;
|
return _local_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1009(): any[]
|
public getServerRenderData(): any[]
|
||||||
{
|
{
|
||||||
this._serverRenderData = [];
|
this._serverRenderData = [];
|
||||||
|
|
||||||
return this._serverRenderData;
|
return this._serverRenderData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1050(k: string): AvatarImageActionCache
|
public getBodyPartCache(k: string): AvatarImageBodyPartCache
|
||||||
{
|
{
|
||||||
let existing = this._cache.get(k);
|
let existing = this._cache.get(k);
|
||||||
|
|
||||||
if(!existing)
|
if(!existing)
|
||||||
{
|
{
|
||||||
existing = new AvatarImageActionCache();
|
existing = new AvatarImageBodyPartCache();
|
||||||
|
|
||||||
this._cache.set(k, existing);
|
this._cache.set(k, existing);
|
||||||
}
|
}
|
||||||
@ -319,19 +319,19 @@ export class AvatarImageCache
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1834(direction: number, containers: AvatarImagePartContainer[], frameCount: number, _arg_4: IActiveActionData, renderServerData: boolean = false): AvatarImageBodyPartContainer
|
private renderBodyPart(direction: number, containers: AvatarImagePartContainer[], frameCount: number, _arg_4: IActiveActionData, renderServerData: boolean = false): AvatarImageBodyPartContainer
|
||||||
{
|
{
|
||||||
if(!containers || !containers.length) return null;
|
if(!containers || !containers.length) return null;
|
||||||
|
|
||||||
if(!this._canvas)
|
if(!this._canvas)
|
||||||
{
|
{
|
||||||
this._canvas = this._structure._Str_1664(this._scale, this._geometryType);
|
this._canvas = this._structure.getCanvas(this._scale, this._geometryType);
|
||||||
|
|
||||||
if(!this._canvas) return null;
|
if(!this._canvas) return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isFlipped = AvatarDirectionAngle.DIRECTION_IS_FLIPPED[direction] || false;
|
const isFlipped = AvatarDirectionAngle.DIRECTION_IS_FLIPPED[direction] || false;
|
||||||
let assetPartDefinition = _arg_4._Str_742._Str_778;
|
let assetPartDefinition = _arg_4.definition.assetPartDefinition;
|
||||||
let isCacheable = true;
|
let isCacheable = true;
|
||||||
let containerIndex = (containers.length - 1);
|
let containerIndex = (containers.length - 1);
|
||||||
|
|
||||||
@ -341,23 +341,23 @@ export class AvatarImageCache
|
|||||||
|
|
||||||
let color = 16777215;
|
let color = 16777215;
|
||||||
|
|
||||||
if(!((direction == 7) && ((container._Str_1669 === 'fc') || (container._Str_1669 === 'ey'))))
|
if(!((direction == 7) && ((container.partType === 'fc') || (container.partType === 'ey'))))
|
||||||
{
|
{
|
||||||
if(!((container._Str_1669 === 'ri') && !container._Str_1502))
|
if(!((container.partType === 'ri') && !container.partId))
|
||||||
{
|
{
|
||||||
const partId = container._Str_1502;
|
const partId = container.partId;
|
||||||
const animationFrame = container._Str_2258(frameCount);
|
const animationFrame = container.getFrameDefinition(frameCount);
|
||||||
|
|
||||||
let partType = container._Str_1669;
|
let partType = container.partType;
|
||||||
let frameNumber = 0;
|
let frameNumber = 0;
|
||||||
|
|
||||||
if(animationFrame)
|
if(animationFrame)
|
||||||
{
|
{
|
||||||
frameNumber = animationFrame.number;
|
frameNumber = animationFrame.number;
|
||||||
|
|
||||||
if((animationFrame._Str_778) && (animationFrame._Str_778 !== '')) assetPartDefinition = animationFrame._Str_778;
|
if((animationFrame.assetPartDefinition) && (animationFrame.assetPartDefinition !== '')) assetPartDefinition = animationFrame.assetPartDefinition;
|
||||||
}
|
}
|
||||||
else frameNumber = container._Str_1674(frameCount);
|
else frameNumber = container.getFrameIndex(frameCount);
|
||||||
|
|
||||||
let assetDirection = direction;
|
let assetDirection = direction;
|
||||||
let flipH = false;
|
let flipH = false;
|
||||||
@ -374,7 +374,7 @@ export class AvatarImageCache
|
|||||||
else if(direction === 5) assetDirection = 1;
|
else if(direction === 5) assetDirection = 1;
|
||||||
else if(direction === 6) assetDirection = 0;
|
else if(direction === 6) assetDirection = 0;
|
||||||
|
|
||||||
if(container._Str_1666 !== partType) partType = container._Str_1666;
|
if(container.flippedPartType !== partType) partType = container.flippedPartType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ export class AvatarImageCache
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(container.isColorable && container.color) color = container.color._Str_915;
|
if(container.isColorable && container.color) color = container.color.rgb;
|
||||||
|
|
||||||
const offset = new Point(-(asset.x), -(asset.y));
|
const offset = new Point(-(asset.x), -(asset.y));
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ export class AvatarImageCache
|
|||||||
{
|
{
|
||||||
const spriteData = new RoomObjectSpriteData();
|
const spriteData = new RoomObjectSpriteData();
|
||||||
|
|
||||||
spriteData.name = this._assets._Str_2125(assetName);
|
spriteData.name = this._assets.getAssetName(assetName);
|
||||||
spriteData.x = (-(offset.x) - 33);
|
spriteData.x = (-(offset.x) - 33);
|
||||||
spriteData.y = -(offset.y);
|
spriteData.y = -(offset.y);
|
||||||
spriteData.z = (this._serverRenderData.length * -0.0001);
|
spriteData.z = (this._serverRenderData.length * -0.0001);
|
||||||
@ -441,9 +441,9 @@ export class AvatarImageCache
|
|||||||
|
|
||||||
if(!this._unionImages.length) return null;
|
if(!this._unionImages.length) return null;
|
||||||
|
|
||||||
const imageData = this._Str_1236(this._unionImages, isFlipped);
|
const imageData = this.createUnionImage(this._unionImages, isFlipped);
|
||||||
const canvasOffset = ((this._scale === AvatarScaleType.LARGE) ? (this._canvas.height - 16) : (this._canvas.height - 8));
|
const canvasOffset = ((this._scale === AvatarScaleType.LARGE) ? (this._canvas.height - 16) : (this._canvas.height - 8));
|
||||||
const offset = new Point(-(imageData._Str_1076.x), (canvasOffset - imageData._Str_1076.y));
|
const offset = new Point(-(imageData.regPoint.x), (canvasOffset - imageData.regPoint.y));
|
||||||
|
|
||||||
if(isFlipped && (assetPartDefinition !== 'lay')) offset.x = (offset.x + ((this._scale === AvatarScaleType.LARGE) ? 67 : 31));
|
if(isFlipped && (assetPartDefinition !== 'lay')) offset.x = (offset.x + ((this._scale === AvatarScaleType.LARGE) ? 67 : 31));
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ export class AvatarImageCache
|
|||||||
return new AvatarImageBodyPartContainer(imageData.container, offset, isCacheable);
|
return new AvatarImageBodyPartContainer(imageData.container, offset, isCacheable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1652(k: number): string
|
private convertColorToHex(k: number): string
|
||||||
{
|
{
|
||||||
let _local_2: string = (k * 0xFF).toString(16);
|
let _local_2: string = (k * 0xFF).toString(16);
|
||||||
if(_local_2.length < 2)
|
if(_local_2.length < 2)
|
||||||
@ -471,11 +471,11 @@ export class AvatarImageCache
|
|||||||
return _local_2;
|
return _local_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1236(k: ImageData[], isFlipped: boolean): ImageData
|
private createUnionImage(k: ImageData[], isFlipped: boolean): ImageData
|
||||||
{
|
{
|
||||||
const bounds = new Rectangle();
|
const bounds = new Rectangle();
|
||||||
|
|
||||||
for(const data of k) data && bounds.enlarge(data._Str_1567);
|
for(const data of k) data && bounds.enlarge(data.offsetRect);
|
||||||
|
|
||||||
const point = new Point(-(bounds.x), -(bounds.y));
|
const point = new Point(-(bounds.x), -(bounds.y));
|
||||||
const container = new Container();
|
const container = new Container();
|
||||||
@ -492,12 +492,12 @@ export class AvatarImageCache
|
|||||||
if(!data) continue;
|
if(!data) continue;
|
||||||
|
|
||||||
const texture = data.texture;
|
const texture = data.texture;
|
||||||
const color = data.color;
|
const color = data.colorTransform;
|
||||||
const flipH = (!(isFlipped && data.flipH) && (isFlipped || data.flipH));
|
const flipH = (!(isFlipped && data.flipH) && (isFlipped || data.flipH));
|
||||||
const regPoint = point.clone();
|
const regPoint = point.clone();
|
||||||
|
|
||||||
regPoint.x -= data._Str_1076.x;
|
regPoint.x -= data.regPoint.x;
|
||||||
regPoint.y -= data._Str_1076.y;
|
regPoint.y -= data.regPoint.y;
|
||||||
|
|
||||||
if(isFlipped) regPoint.x = (container.width - (regPoint.x + data.rect.width));
|
if(isFlipped) regPoint.x = (container.width - (regPoint.x + data.rect.width));
|
||||||
|
|
||||||
|
@ -19,23 +19,23 @@ export class AvatarImageDirectionCache
|
|||||||
this._images = null;
|
this._images = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1699(): AvatarImagePartContainer[]
|
public getPartList(): AvatarImagePartContainer[]
|
||||||
{
|
{
|
||||||
return this._partList;
|
return this._partList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1629(k: number): AvatarImageBodyPartContainer
|
public getImageContainer(k: number): AvatarImageBodyPartContainer
|
||||||
{
|
{
|
||||||
const existing = this._images.get(this._Str_2219(k));
|
const existing = this._images.get(this.getCacheKey(k));
|
||||||
|
|
||||||
if(!existing) return null;
|
if(!existing) return null;
|
||||||
|
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1924(k: AvatarImageBodyPartContainer, _arg_2: number): void
|
public updateImageContainer(k: AvatarImageBodyPartContainer, _arg_2: number): void
|
||||||
{
|
{
|
||||||
const name = this._Str_2219(_arg_2);
|
const name = this.getCacheKey(_arg_2);
|
||||||
|
|
||||||
const existing = this._images.get(name);
|
const existing = this._images.get(name);
|
||||||
|
|
||||||
@ -44,16 +44,16 @@ export class AvatarImageDirectionCache
|
|||||||
this._images.set(name, k);
|
this._images.set(name, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_2219(k: number): string
|
private getCacheKey(k: number): string
|
||||||
{
|
{
|
||||||
let name = '';
|
let name = '';
|
||||||
|
|
||||||
for(const part of this._partList) name += (part._Str_1206(k) + '/');
|
for(const part of this._partList) name += (part.getCacheableKey(k) + '/');
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_587(k: string): void
|
private debugInfo(k: string): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
22
src/nitro/avatar/cache/ImageData.ts
vendored
22
src/nitro/avatar/cache/ImageData.ts
vendored
@ -1,22 +1,22 @@
|
|||||||
import { Container, Point, Rectangle, Texture } from 'pixi.js';
|
import { Container, Point, Rectangle, Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
export class ImageData
|
export class ImageData
|
||||||
{
|
{
|
||||||
private _texture: Texture;
|
private _texture: Texture<Resource>;
|
||||||
private _container: Container;
|
private _container: Container;
|
||||||
private _rect: Rectangle;
|
private _rect: Rectangle;
|
||||||
private _regPoint: Point;
|
private _regPoint: Point;
|
||||||
private _flipH: boolean;
|
private _flipH: boolean;
|
||||||
private _color: number;
|
private _colorTransform: number;
|
||||||
|
|
||||||
constructor(texture: Texture, rectangle: Rectangle, _arg_3: Point, flipH: boolean, color: number, container: Container = null)
|
constructor(texture: Texture<Resource>, rectangle: Rectangle, _arg_3: Point, flipH: boolean, color: number, container: Container = null)
|
||||||
{
|
{
|
||||||
this._texture = texture;
|
this._texture = texture;
|
||||||
this._container = container;
|
this._container = container;
|
||||||
this._rect = rectangle;
|
this._rect = rectangle;
|
||||||
this._regPoint = _arg_3;
|
this._regPoint = _arg_3;
|
||||||
this._flipH = flipH;
|
this._flipH = flipH;
|
||||||
this._color = color;
|
this._colorTransform = color;
|
||||||
|
|
||||||
if(flipH) this._regPoint.x = (-(this._regPoint.x) + rectangle.width);
|
if(flipH) this._regPoint.x = (-(this._regPoint.x) + rectangle.width);
|
||||||
}
|
}
|
||||||
@ -25,10 +25,10 @@ export class ImageData
|
|||||||
{
|
{
|
||||||
this._texture = null;
|
this._texture = null;
|
||||||
this._regPoint = null;
|
this._regPoint = null;
|
||||||
this._color = null;
|
this._colorTransform = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get texture(): Texture
|
public get texture(): Texture<Resource>
|
||||||
{
|
{
|
||||||
return this._texture;
|
return this._texture;
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ export class ImageData
|
|||||||
return this._rect;
|
return this._rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1076(): Point
|
public get regPoint(): Point
|
||||||
{
|
{
|
||||||
return this._regPoint;
|
return this._regPoint;
|
||||||
}
|
}
|
||||||
@ -53,12 +53,12 @@ export class ImageData
|
|||||||
return this._flipH;
|
return this._flipH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get color(): number
|
public get colorTransform(): number
|
||||||
{
|
{
|
||||||
return this._color;
|
return this._colorTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1567(): Rectangle
|
public get offsetRect(): Rectangle
|
||||||
{
|
{
|
||||||
return new Rectangle(-(this._regPoint.x), -(this._regPoint.y), this._rect.width, this._rect.height);
|
return new Rectangle(-(this._regPoint.x), -(this._regPoint.y), this._rect.width, this._rect.height);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
export class AvatarEditorInstanceId
|
export class AvatarEditorInstanceId
|
||||||
{
|
{
|
||||||
public static _Str_3350: number = 0;
|
public static OWN_AVATAR_EDITOR: number = 0;
|
||||||
public static _Str_7195: number = 1;
|
public static FURNITURE_AVATAR_EDITOR: number = 1;
|
||||||
public static _Str_17909: number = 2;
|
public static BOT_EDITOR: number = 2;
|
||||||
public static _Str_16370: number = 3;
|
public static DEV_TOOL_EDITOR: number = 3;
|
||||||
}
|
}
|
@ -25,5 +25,5 @@
|
|||||||
public static RIGHT_HAND_ITEM: string = 'ri';
|
public static RIGHT_HAND_ITEM: string = 'ri';
|
||||||
public static LEFT_COAT_SLEEVE: string = 'lc';
|
public static LEFT_COAT_SLEEVE: string = 'lc';
|
||||||
public static RIGHT_COAT_SLEEVE: string = 'rc';
|
public static RIGHT_COAT_SLEEVE: string = 'rc';
|
||||||
public static _Str_1286: string[] = [ AvatarFigurePartType.SHOES, AvatarFigurePartType.LEGS, AvatarFigurePartType.CHEST, AvatarFigurePartType.WAIST_ACCESSORY, AvatarFigurePartType.CHEST_ACCESSORY, AvatarFigurePartType.HEAD, AvatarFigurePartType.HAIR, AvatarFigurePartType.FACE_ACCESSORY, AvatarFigurePartType.EYE_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, AvatarFigurePartType.COAT_CHEST, AvatarFigurePartType.CHEST_PRINT ];
|
public static FIGURE_SETS: string[] = [ AvatarFigurePartType.SHOES, AvatarFigurePartType.LEGS, AvatarFigurePartType.CHEST, AvatarFigurePartType.WAIST_ACCESSORY, AvatarFigurePartType.CHEST_ACCESSORY, AvatarFigurePartType.HEAD, AvatarFigurePartType.HAIR, AvatarFigurePartType.FACE_ACCESSORY, AvatarFigurePartType.EYE_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, AvatarFigurePartType.COAT_CHEST, AvatarFigurePartType.CHEST_PRINT ];
|
||||||
}
|
}
|
@ -1,311 +0,0 @@
|
|||||||
import { IAvatarImageListener } from '../IAvatarImageListener';
|
|
||||||
import { FigureDataView } from './FigureDataView';
|
|
||||||
|
|
||||||
export class FigureData implements IAvatarImageListener
|
|
||||||
{
|
|
||||||
public static M: string = 'M';
|
|
||||||
public static F: string = 'F';
|
|
||||||
public static U: string = 'U';
|
|
||||||
public static H: string = 'h';
|
|
||||||
public static STD: string = 'std';
|
|
||||||
public static _Str_2028: string = '0';
|
|
||||||
public static FACE: string = 'hd';
|
|
||||||
public static HR: string = 'hr';
|
|
||||||
public static HA: string = 'ha';
|
|
||||||
public static HE: string = 'he';
|
|
||||||
public static EA: string = 'ea';
|
|
||||||
public static FA: string = 'fa';
|
|
||||||
public static CC: string = 'cc';
|
|
||||||
public static CH: string = 'ch';
|
|
||||||
public static CHEST_ACCESSORIES: string = 'ca';
|
|
||||||
public static CHEST_PRINTS: string = 'cp';
|
|
||||||
public static LG: string = 'lg';
|
|
||||||
public static SH: string = 'sh';
|
|
||||||
public static WA: string = 'wa';
|
|
||||||
|
|
||||||
private _view: FigureDataView;
|
|
||||||
private _data: Map<string, number>;
|
|
||||||
private _colors: Map<string, number[]>;
|
|
||||||
private _gender: string = 'M';
|
|
||||||
private _isDisposed: boolean;
|
|
||||||
private _direction: number = 4;
|
|
||||||
private _avatarEffectType: number = -1;
|
|
||||||
|
|
||||||
constructor()
|
|
||||||
{
|
|
||||||
this._direction = FigureDataView._Str_9887;
|
|
||||||
this._view = new FigureDataView(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public loadAvatarData(figureString: string, gender: string): void
|
|
||||||
{
|
|
||||||
this._data = new Map();
|
|
||||||
this._colors = new Map();
|
|
||||||
this._gender = gender;
|
|
||||||
|
|
||||||
this.parseFigureString(figureString);
|
|
||||||
this.updateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
public dispose(): void
|
|
||||||
{
|
|
||||||
this._data = null;
|
|
||||||
this._colors = null;
|
|
||||||
this._isDisposed = true;
|
|
||||||
|
|
||||||
if(this._view)
|
|
||||||
{
|
|
||||||
this._view.dispose();
|
|
||||||
|
|
||||||
this._view = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public get disposed(): boolean
|
|
||||||
{
|
|
||||||
return this._isDisposed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private parseFigureString(figure: string): void
|
|
||||||
{
|
|
||||||
if(!figure) return;
|
|
||||||
|
|
||||||
const sets = figure.split('.');
|
|
||||||
|
|
||||||
if(!sets || !sets.length) return;
|
|
||||||
|
|
||||||
for(const set of sets)
|
|
||||||
{
|
|
||||||
const parts = set.split('-');
|
|
||||||
|
|
||||||
if(!parts.length) continue;
|
|
||||||
|
|
||||||
const setType = parts[0];
|
|
||||||
const setId = parseInt(parts[1]);
|
|
||||||
const colorIds: number[] = [];
|
|
||||||
|
|
||||||
let offset = 2;
|
|
||||||
|
|
||||||
while(offset < parts.length)
|
|
||||||
{
|
|
||||||
colorIds.push(parseInt(parts[offset]));
|
|
||||||
|
|
||||||
offset++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!colorIds.length) colorIds.push(0);
|
|
||||||
|
|
||||||
this.savePartSetId(setType, setId, false);
|
|
||||||
this.savePartSetColourId(setType, colorIds, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public getPartSetId(k: string): number
|
|
||||||
{
|
|
||||||
const existing = this._data.get(k);
|
|
||||||
|
|
||||||
if(existing !== undefined) return existing;
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getColourIds(k: string): number[]
|
|
||||||
{
|
|
||||||
const existing = this._colors.get(k);
|
|
||||||
|
|
||||||
if(existing !== undefined) return existing;
|
|
||||||
|
|
||||||
return [];
|
|
||||||
// return [this._avatarEditor._Str_24919(k)];
|
|
||||||
}
|
|
||||||
|
|
||||||
public getFigureString(): string
|
|
||||||
{
|
|
||||||
let figureString = '';
|
|
||||||
const setParts: string[] = [];
|
|
||||||
|
|
||||||
for(const [ setType, setId ] of this._data.entries())
|
|
||||||
{
|
|
||||||
const colorIds = this._colors.get(setType);
|
|
||||||
|
|
||||||
let setPart = ((setType + '-') + setId);
|
|
||||||
|
|
||||||
if(colorIds && colorIds.length)
|
|
||||||
{
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
while(i < colorIds.length)
|
|
||||||
{
|
|
||||||
setPart = (setPart + ('-' + colorIds[i]));
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setParts.push(setPart);
|
|
||||||
}
|
|
||||||
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
while(i < setParts.length)
|
|
||||||
{
|
|
||||||
figureString = (figureString + setParts[i]);
|
|
||||||
|
|
||||||
if(i < (setParts.length - 1)) figureString = (figureString + '.');
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return figureString;
|
|
||||||
}
|
|
||||||
|
|
||||||
public savePartData(k: string, _arg_2: number, _arg_3: number[], _arg_4: boolean = false): void
|
|
||||||
{
|
|
||||||
this.savePartSetId(k, _arg_2, _arg_4);
|
|
||||||
this.savePartSetColourId(k, _arg_3, _arg_4);
|
|
||||||
}
|
|
||||||
|
|
||||||
private savePartSetId(k: string, _arg_2: number, _arg_3: boolean = true): void
|
|
||||||
{
|
|
||||||
switch(k)
|
|
||||||
{
|
|
||||||
case FigureData.FACE:
|
|
||||||
case FigureData.HR:
|
|
||||||
case FigureData.HA:
|
|
||||||
case FigureData.HE:
|
|
||||||
case FigureData.EA:
|
|
||||||
case FigureData.FA:
|
|
||||||
case FigureData.CH:
|
|
||||||
case FigureData.CC:
|
|
||||||
case FigureData.CHEST_ACCESSORIES:
|
|
||||||
case FigureData.CHEST_PRINTS:
|
|
||||||
case FigureData.LG:
|
|
||||||
case FigureData.SH:
|
|
||||||
case FigureData.WA:
|
|
||||||
if(_arg_2 >= 0)
|
|
||||||
{
|
|
||||||
this._data.set(k, _arg_2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this._data.delete(k);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_arg_3) this.updateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
public savePartSetColourId(k: string, _arg_2: number[], _arg_3: boolean = true): void
|
|
||||||
{
|
|
||||||
switch(k)
|
|
||||||
{
|
|
||||||
case FigureData.FACE:
|
|
||||||
case FigureData.HR:
|
|
||||||
case FigureData.HA:
|
|
||||||
case FigureData.HE:
|
|
||||||
case FigureData.EA:
|
|
||||||
case FigureData.FA:
|
|
||||||
case FigureData.CH:
|
|
||||||
case FigureData.CC:
|
|
||||||
case FigureData.CHEST_ACCESSORIES:
|
|
||||||
case FigureData.CHEST_PRINTS:
|
|
||||||
case FigureData.LG:
|
|
||||||
case FigureData.SH:
|
|
||||||
case FigureData.WA:
|
|
||||||
this._colors.set(k, _arg_2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_arg_3) this.updateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
public getFigureStringWithFace(k: number, override = true): string
|
|
||||||
{
|
|
||||||
let figureString = '';
|
|
||||||
|
|
||||||
const setTypes: string[] = [ FigureData.FACE ];
|
|
||||||
const figureSets: string[] = [];
|
|
||||||
|
|
||||||
for(const setType of setTypes)
|
|
||||||
{
|
|
||||||
const colors = this._colors.get(setType);
|
|
||||||
|
|
||||||
if(colors === undefined) continue;
|
|
||||||
|
|
||||||
let setId = this._data.get(setType);
|
|
||||||
|
|
||||||
if((setType === FigureData.FACE) && override) setId = k;
|
|
||||||
|
|
||||||
let figureSet = ((setType + '-') + setId);
|
|
||||||
|
|
||||||
if(setId >= 0)
|
|
||||||
{
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
while(i < colors.length)
|
|
||||||
{
|
|
||||||
figureSet = (figureSet + ('-' + colors[i]));
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
figureSets.push(figureSet);
|
|
||||||
}
|
|
||||||
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
while(i < figureSets.length)
|
|
||||||
{
|
|
||||||
figureString = (figureString + figureSets[i]);
|
|
||||||
|
|
||||||
if(i < (figureSets.length - 1)) figureString = (figureString + '.');
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return figureString;
|
|
||||||
}
|
|
||||||
|
|
||||||
public updateView(): void
|
|
||||||
{
|
|
||||||
this._view.update(this.getFigureString(), this._avatarEffectType, this._direction);
|
|
||||||
}
|
|
||||||
|
|
||||||
public get view(): FigureDataView
|
|
||||||
{
|
|
||||||
return this._view;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get gender(): string
|
|
||||||
{
|
|
||||||
return this._gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public resetFigure(k: string): void
|
|
||||||
{
|
|
||||||
this.updateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
public set avatarEffectType(k: number)
|
|
||||||
{
|
|
||||||
this._avatarEffectType = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get avatarEffectType(): number
|
|
||||||
{
|
|
||||||
return this._avatarEffectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get direction(): number
|
|
||||||
{
|
|
||||||
return this._direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set direction(k: number)
|
|
||||||
{
|
|
||||||
this._direction = k;
|
|
||||||
this.updateView();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
import { IAvatarImageListener } from '../IAvatarImageListener';
|
|
||||||
import { FigureData } from './FigureData';
|
|
||||||
|
|
||||||
export class FigureDataView implements IAvatarImageListener
|
|
||||||
{
|
|
||||||
public static _Str_9887: number = 4;
|
|
||||||
|
|
||||||
private _model: FigureData;
|
|
||||||
private _figureString: string;
|
|
||||||
private _isDisposed: boolean;
|
|
||||||
|
|
||||||
constructor(k: FigureData)
|
|
||||||
{
|
|
||||||
this._model = k;
|
|
||||||
this._figureString = null;
|
|
||||||
this._isDisposed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public dispose(): void
|
|
||||||
{
|
|
||||||
this._isDisposed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public update(k: string, effectId: number = 0, direction: number = 4): void
|
|
||||||
{
|
|
||||||
this._figureString = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public resetFigure(k: string): void
|
|
||||||
{
|
|
||||||
if(k !== this._figureString) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get disposed(): boolean
|
|
||||||
{
|
|
||||||
return this._isDisposed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get figureString(): string
|
|
||||||
{
|
|
||||||
return this._figureString;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
export * from './FigureData';
|
|
||||||
export * from './FigureDataView';
|
|
@ -76,7 +76,7 @@ export class AvatarModelGeometry
|
|||||||
|
|
||||||
bodyParts.set(geometryBodyPart.id, geometryBodyPart);
|
bodyParts.set(geometryBodyPart.id, geometryBodyPart);
|
||||||
|
|
||||||
for(const part of geometryBodyPart._Str_1456(null))
|
for(const part of geometryBodyPart.getPartIds(null))
|
||||||
{
|
{
|
||||||
itemIds.set(part, geometryBodyPart);
|
itemIds.set(part, geometryBodyPart);
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ export class AvatarModelGeometry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2101(k: IAvatarImage): void
|
public removeDynamicItems(k: IAvatarImage): void
|
||||||
{
|
{
|
||||||
for(const geometry of this._geometryTypes.values())
|
for(const geometry of this._geometryTypes.values())
|
||||||
{
|
{
|
||||||
@ -99,30 +99,30 @@ export class AvatarModelGeometry
|
|||||||
{
|
{
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
part._Str_2004(k);
|
part.removeDynamicParts(k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1307(k: string): string[]
|
public getBodyPartIdsInAvatarSet(k: string): string[]
|
||||||
{
|
{
|
||||||
const avatarSet = this._avatarSet._Str_1498(k);
|
const avatarSet = this._avatarSet.findAvatarSet(k);
|
||||||
|
|
||||||
if(!avatarSet) return [];
|
if(!avatarSet) return [];
|
||||||
|
|
||||||
return avatarSet._Str_755();
|
return avatarSet.getBodyParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1939(k: string): boolean
|
public isMainAvatarSet(k: string): boolean
|
||||||
{
|
{
|
||||||
const avatarSet = this._avatarSet._Str_1498(k);
|
const avatarSet = this._avatarSet.findAvatarSet(k);
|
||||||
|
|
||||||
if(!avatarSet) return false;
|
if(!avatarSet) return false;
|
||||||
|
|
||||||
return avatarSet._Str_779;
|
return avatarSet.isMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1664(k: string, _arg_2: string): AvatarCanvas
|
public getCanvas(k: string, _arg_2: string): AvatarCanvas
|
||||||
{
|
{
|
||||||
const canvas = this._canvases.get(k);
|
const canvas = this._canvases.get(k);
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ export class AvatarModelGeometry
|
|||||||
return (canvas.get(_arg_2) || null);
|
return (canvas.get(_arg_2) || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1342(k: string): boolean
|
private typeExists(k: string): boolean
|
||||||
{
|
{
|
||||||
const existing = this._geometryTypes.get(k);
|
const existing = this._geometryTypes.get(k);
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ export class AvatarModelGeometry
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1332(k: string, _arg_2: string): boolean
|
private hasBodyPart(k: string, _arg_2: string): boolean
|
||||||
{
|
{
|
||||||
if(this._Str_1342(k))
|
if(this.typeExists(k))
|
||||||
{
|
{
|
||||||
const existing = this._geometryTypes.get(k);
|
const existing = this._geometryTypes.get(k);
|
||||||
|
|
||||||
@ -152,9 +152,9 @@ export class AvatarModelGeometry
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_2072(k: string): string[]
|
private getBodyPartIDs(k: string): string[]
|
||||||
{
|
{
|
||||||
const parts = this._Str_1280(k);
|
const parts = this.getBodyPartsOfType(k);
|
||||||
|
|
||||||
const types = [];
|
const types = [];
|
||||||
|
|
||||||
@ -171,19 +171,19 @@ export class AvatarModelGeometry
|
|||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1280(k: string): Map<string, GeometryBodyPart>
|
private getBodyPartsOfType(k: string): Map<string, GeometryBodyPart>
|
||||||
{
|
{
|
||||||
if(this._Str_1342(k)) return this._geometryTypes.get(k);
|
if(this.typeExists(k)) return this._geometryTypes.get(k);
|
||||||
|
|
||||||
return new Map();
|
return new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1919(k: string, _arg_2: string): GeometryBodyPart
|
public getBodyPart(k: string, _arg_2: string): GeometryBodyPart
|
||||||
{
|
{
|
||||||
return (this._Str_1280(k).get(_arg_2) || null);
|
return (this.getBodyPartsOfType(k).get(_arg_2) || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1701(k: string, _arg_2: string, _arg_3:IAvatarImage): GeometryBodyPart
|
public getBodyPartOfItem(k: string, _arg_2: string, _arg_3:IAvatarImage): GeometryBodyPart
|
||||||
{
|
{
|
||||||
const itemIds = this._itemIdToBodyPartMap.get(k);
|
const itemIds = this._itemIdToBodyPartMap.get(k);
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ export class AvatarModelGeometry
|
|||||||
|
|
||||||
if(part) return part;
|
if(part) return part;
|
||||||
|
|
||||||
const parts = this._Str_1280(k);
|
const parts = this.getBodyPartsOfType(k);
|
||||||
|
|
||||||
if(parts)
|
if(parts)
|
||||||
{
|
{
|
||||||
@ -201,7 +201,7 @@ export class AvatarModelGeometry
|
|||||||
{
|
{
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
if(part._Str_2030(_arg_2, _arg_3)) return part;
|
if(part.hasPart(_arg_2, _arg_3)) return part;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -209,9 +209,9 @@ export class AvatarModelGeometry
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1787(k: Map<string, GeometryBodyPart>, _arg_2: string): GeometryBodyPart[]
|
private getBodyPartsInAvatarSet(k: Map<string, GeometryBodyPart>, _arg_2: string): GeometryBodyPart[]
|
||||||
{
|
{
|
||||||
const parts = this._Str_1307(_arg_2);
|
const parts = this.getBodyPartIdsInAvatarSet(_arg_2);
|
||||||
const geometryParts = [];
|
const geometryParts = [];
|
||||||
|
|
||||||
for(const part of parts)
|
for(const part of parts)
|
||||||
@ -229,24 +229,24 @@ export class AvatarModelGeometry
|
|||||||
return geometryParts;
|
return geometryParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2250(k: string, _arg_2: number, _arg_3: string): string[]
|
public getBodyPartsAtAngle(k: string, _arg_2: number, _arg_3: string): string[]
|
||||||
{
|
{
|
||||||
if(!_arg_3) return [];
|
if(!_arg_3) return [];
|
||||||
|
|
||||||
const geometryParts = this._Str_1280(_arg_3);
|
const geometryParts = this.getBodyPartsOfType(_arg_3);
|
||||||
const parts = this._Str_1787(geometryParts, k);
|
const parts = this.getBodyPartsInAvatarSet(geometryParts, k);
|
||||||
const sets: [ number, GeometryBodyPart ][] = [];
|
const sets: [ number, GeometryBodyPart ][] = [];
|
||||||
const ids: string[] = [];
|
const ids: string[] = [];
|
||||||
|
|
||||||
this._transformation = Matrix4x4._Str_1560(_arg_2);
|
this._transformation = Matrix4x4.getYRotationMatrix(_arg_2);
|
||||||
|
|
||||||
for(const part of parts.values())
|
for(const part of parts.values())
|
||||||
{
|
{
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
part._Str_1101(this._transformation);
|
part.applyTransform(this._transformation);
|
||||||
|
|
||||||
sets.push([ part._Str_1522(this._camera), part ]);
|
sets.push([ part.getDistance(this._camera), part ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sets.sort((a, b) =>
|
sets.sort((a, b) =>
|
||||||
@ -271,15 +271,15 @@ export class AvatarModelGeometry
|
|||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_713(k: string, _arg_2: string, _arg_3: number, _arg_4: any[], _arg_5:IAvatarImage): string[]
|
public getParts(k: string, _arg_2: string, _arg_3: number, _arg_4: any[], _arg_5:IAvatarImage): string[]
|
||||||
{
|
{
|
||||||
if(this._Str_1332(k, _arg_2))
|
if(this.hasBodyPart(k, _arg_2))
|
||||||
{
|
{
|
||||||
const part = this._Str_1280(k).get(_arg_2);
|
const part = this.getBodyPartsOfType(k).get(_arg_2);
|
||||||
|
|
||||||
this._transformation = Matrix4x4._Str_1560(_arg_3);
|
this._transformation = Matrix4x4.getYRotationMatrix(_arg_3);
|
||||||
|
|
||||||
return part._Str_713(this._transformation, this._camera, _arg_4, _arg_5);
|
return part.getParts(this._transformation, this._camera, _arg_4, _arg_5);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
|
@ -42,13 +42,13 @@
|
|||||||
{
|
{
|
||||||
if(!avatarSet) continue;
|
if(!avatarSet) continue;
|
||||||
|
|
||||||
bodyParts = bodyParts.concat(avatarSet._Str_755());
|
bodyParts = bodyParts.concat(avatarSet.getBodyParts());
|
||||||
}
|
}
|
||||||
|
|
||||||
this._allBodyParts = bodyParts;
|
this._allBodyParts = bodyParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1498(k: string): AvatarSet
|
public findAvatarSet(k: string): AvatarSet
|
||||||
{
|
{
|
||||||
if(k === this._id) return this;
|
if(k === this._id) return this;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@
|
|||||||
{
|
{
|
||||||
if(!avatarSet) continue;
|
if(!avatarSet) continue;
|
||||||
|
|
||||||
if(!avatarSet._Str_1498(k)) continue;
|
if(!avatarSet.findAvatarSet(k)) continue;
|
||||||
|
|
||||||
return avatarSet;
|
return avatarSet;
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_755(): string[]
|
public getBodyParts(): string[]
|
||||||
{
|
{
|
||||||
return this._allBodyParts.concat();
|
return this._allBodyParts.concat();
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_779(): boolean
|
public get isMain(): boolean
|
||||||
{
|
{
|
||||||
if(this._isMain) return true;
|
if(this._isMain) return true;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@
|
|||||||
{
|
{
|
||||||
if(!avatarSet) continue;
|
if(!avatarSet) continue;
|
||||||
|
|
||||||
if(!avatarSet._Str_779) continue;
|
if(!avatarSet.isMain) continue;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export class GeometryBodyPart extends Node3D
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1883(k: IAvatarImage): GeometryItem[]
|
public getDynamicParts(k: IAvatarImage): GeometryItem[]
|
||||||
{
|
{
|
||||||
const existing = this._dynamicParts.get(k);
|
const existing = this._dynamicParts.get(k);
|
||||||
const parts: GeometryItem[] = [];
|
const parts: GeometryItem[] = [];
|
||||||
@ -53,7 +53,7 @@ export class GeometryBodyPart extends Node3D
|
|||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1456(k: IAvatarImage): string[]
|
public getPartIds(k: IAvatarImage): string[]
|
||||||
{
|
{
|
||||||
const ids: string[] = [];
|
const ids: string[] = [];
|
||||||
|
|
||||||
@ -84,16 +84,16 @@ export class GeometryBodyPart extends Node3D
|
|||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2004(k: IAvatarImage): boolean
|
public removeDynamicParts(k: IAvatarImage): boolean
|
||||||
{
|
{
|
||||||
this._dynamicParts.delete(k);
|
this._dynamicParts.delete(k);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2020(k: any, _arg_2: IAvatarImage): boolean
|
public addPart(k: any, _arg_2: IAvatarImage): boolean
|
||||||
{
|
{
|
||||||
if(this._Str_2030(k.id, _arg_2)) return false;
|
if(this.hasPart(k.id, _arg_2)) return false;
|
||||||
|
|
||||||
let existing = this._dynamicParts.get(_arg_2);
|
let existing = this._dynamicParts.get(_arg_2);
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ export class GeometryBodyPart extends Node3D
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2030(k: string, _arg_2: IAvatarImage): boolean
|
public hasPart(k: string, _arg_2: IAvatarImage): boolean
|
||||||
{
|
{
|
||||||
let existingPart = (this._parts.get(k) || null);
|
let existingPart = (this._parts.get(k) || null);
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ export class GeometryBodyPart extends Node3D
|
|||||||
return (existingPart !== null);
|
return (existingPart !== null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_713(k: Matrix4x4, _arg_2: Vector3D, _arg_3: any[], _arg_4: IAvatarImage): string[]
|
public getParts(k: Matrix4x4, _arg_2: Vector3D, _arg_3: any[], _arg_4: IAvatarImage): string[]
|
||||||
{
|
{
|
||||||
const parts: [ number, GeometryItem ][] = [];
|
const parts: [ number, GeometryItem ][] = [];
|
||||||
|
|
||||||
@ -129,9 +129,9 @@ export class GeometryBodyPart extends Node3D
|
|||||||
{
|
{
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
part._Str_1101(k);
|
part.applyTransform(k);
|
||||||
|
|
||||||
parts.push([ part._Str_1522(_arg_2), part ]);
|
parts.push([ part.getDistance(_arg_2), part ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const existingDynamic = this._dynamicParts.get(_arg_4);
|
const existingDynamic = this._dynamicParts.get(_arg_4);
|
||||||
@ -144,9 +144,9 @@ export class GeometryBodyPart extends Node3D
|
|||||||
|
|
||||||
if(!part) continue;
|
if(!part) continue;
|
||||||
|
|
||||||
part._Str_1101(k);
|
part.applyTransform(k);
|
||||||
|
|
||||||
parts.push([ part._Str_1522(_arg_2), part ]);
|
parts.push([ part.getDistance(_arg_2), part ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,10 +174,10 @@ export class GeometryBodyPart extends Node3D
|
|||||||
return partIds;
|
return partIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1522(k: Vector3D): number
|
public getDistance(k: Vector3D): number
|
||||||
{
|
{
|
||||||
const _local_2 = Math.abs(((k.z - this._Str_1604.z) - this._radius));
|
const _local_2 = Math.abs(((k.z - this.transformedLocation.z) - this._radius));
|
||||||
const _local_3 = Math.abs(((k.z - this._Str_1604.z) + this._radius));
|
const _local_3 = Math.abs(((k.z - this.transformedLocation.z) + this._radius));
|
||||||
|
|
||||||
return Math.min(_local_2, _local_3);
|
return Math.min(_local_2, _local_3);
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,10 @@ export class GeometryItem extends Node3D
|
|||||||
this._isDynamic = _arg_2;
|
this._isDynamic = _arg_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1522(k: Vector3D): number
|
public getDistance(k: Vector3D): number
|
||||||
{
|
{
|
||||||
const _local_2 = Math.abs(((k.z - this._Str_1604.z) - this._radius));
|
const _local_2 = Math.abs(((k.z - this.transformedLocation.z) - this._radius));
|
||||||
const _local_3 = Math.abs(((k.z - this._Str_1604.z) + this._radius));
|
const _local_3 = Math.abs(((k.z - this.transformedLocation.z) + this._radius));
|
||||||
|
|
||||||
return Math.min(_local_2, _local_3);
|
return Math.min(_local_2, _local_3);
|
||||||
}
|
}
|
||||||
@ -38,17 +38,17 @@ export class GeometryItem extends Node3D
|
|||||||
return this._normal;
|
return this._normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_2207(): boolean
|
public get isDoubleSided(): boolean
|
||||||
{
|
{
|
||||||
return this._isDoubleSided;
|
return this._isDoubleSided;
|
||||||
}
|
}
|
||||||
|
|
||||||
public toString(): string
|
public toString(): string
|
||||||
{
|
{
|
||||||
return ((((this._id + ': ') + this.location) + ' - ') + this._Str_1604);
|
return ((((this._id + ': ') + this.location) + ' - ') + this.transformedLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1457(): boolean
|
public get isDynamic(): boolean
|
||||||
{
|
{
|
||||||
return this._isDynamic;
|
return this._isDynamic;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ export class Matrix4x4
|
|||||||
this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_8, _arg_9];
|
this._data = [k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_8, _arg_9];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static _Str_1869(k: number): Matrix4x4
|
public static getXRotationMatrix(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
@ -21,7 +21,7 @@ export class Matrix4x4
|
|||||||
return new Matrix4x4(1, 0, 0, 0, _local_3, -(_local_4), 0, _local_4, _local_3);
|
return new Matrix4x4(1, 0, 0, 0, _local_3, -(_local_4), 0, _local_4, _local_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static _Str_1560(k: number): Matrix4x4
|
public static getYRotationMatrix(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
@ -30,7 +30,7 @@ export class Matrix4x4
|
|||||||
return new Matrix4x4(_local_3, 0, _local_4, 0, 1, 0, -(_local_4), 0, _local_3);
|
return new Matrix4x4(_local_3, 0, _local_4, 0, 1, 0, -(_local_4), 0, _local_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static _Str_1368(k: number): Matrix4x4
|
public static getZRotationMatrix(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
@ -46,7 +46,7 @@ export class Matrix4x4
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2186(k: Vector3D): Vector3D
|
public vectorMultiplication(k: Vector3D): Vector3D
|
||||||
{
|
{
|
||||||
const _local_2 = (((k.x * this._data[0]) + (k.y * this._data[3])) + (k.z * this._data[6]));
|
const _local_2 = (((k.x * this._data[0]) + (k.y * this._data[3])) + (k.z * this._data[6]));
|
||||||
const _local_3 = (((k.x * this._data[1]) + (k.y * this._data[4])) + (k.z * this._data[7]));
|
const _local_3 = (((k.x * this._data[1]) + (k.y * this._data[4])) + (k.z * this._data[7]));
|
||||||
@ -55,7 +55,7 @@ export class Matrix4x4
|
|||||||
return new Vector3D(_local_2, _local_3, _local_4);
|
return new Vector3D(_local_2, _local_3, _local_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1186(k:Matrix4x4): Matrix4x4
|
public multiply(k:Matrix4x4): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = (((this._data[0] * k.data[0]) + (this._data[1] * k.data[3])) + (this._data[2] * k.data[6]));
|
const _local_2 = (((this._data[0] * k.data[0]) + (this._data[1] * k.data[3])) + (this._data[2] * k.data[6]));
|
||||||
const _local_3 = (((this._data[0] * k.data[1]) + (this._data[1] * k.data[4])) + (this._data[2] * k.data[7]));
|
const _local_3 = (((this._data[0] * k.data[1]) + (this._data[1] * k.data[4])) + (this._data[2] * k.data[7]));
|
||||||
@ -70,7 +70,7 @@ export class Matrix4x4
|
|||||||
return new Matrix4x4(_local_2, _local_3, _local_4, _local_5, _local_6, _local_7, _local_8, _local_9, _local_10);
|
return new Matrix4x4(_local_2, _local_3, _local_4, _local_5, _local_6, _local_7, _local_8, _local_9, _local_10);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1157(k: number): void
|
public scalarMultiply(k: number): void
|
||||||
{
|
{
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
@ -82,46 +82,46 @@ export class Matrix4x4
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1089(k: number): Matrix4x4
|
public rotateX(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
const _local_4 = Math.sin(_local_2);
|
const _local_4 = Math.sin(_local_2);
|
||||||
const _local_5 = new Matrix4x4(1, 0, 0, 0, _local_3, -(_local_4), 0, _local_4, _local_3);
|
const _local_5 = new Matrix4x4(1, 0, 0, 0, _local_3, -(_local_4), 0, _local_4, _local_3);
|
||||||
|
|
||||||
return _local_5._Str_1186(this);
|
return _local_5.multiply(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2123(k: number): Matrix4x4
|
public rotateY(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
const _local_4 = Math.sin(_local_2);
|
const _local_4 = Math.sin(_local_2);
|
||||||
const _local_5 = new Matrix4x4(_local_3, 0, _local_4, 0, 1, 0, -(_local_4), 0, _local_3);
|
const _local_5 = new Matrix4x4(_local_3, 0, _local_4, 0, 1, 0, -(_local_4), 0, _local_3);
|
||||||
|
|
||||||
return _local_5._Str_1186(this);
|
return _local_5.multiply(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2232(k: number): Matrix4x4
|
public rotateZ(k: number): Matrix4x4
|
||||||
{
|
{
|
||||||
const _local_2 = ((k * Math.PI) / 180);
|
const _local_2 = ((k * Math.PI) / 180);
|
||||||
const _local_3 = Math.cos(_local_2);
|
const _local_3 = Math.cos(_local_2);
|
||||||
const _local_4 = Math.sin(_local_2);
|
const _local_4 = Math.sin(_local_2);
|
||||||
const _local_5 = new Matrix4x4(_local_3, -(_local_4), 0, _local_4, _local_3, 0, 0, 0, 1);
|
const _local_5 = new Matrix4x4(_local_3, -(_local_4), 0, _local_4, _local_3, 0, 0, 0, 1);
|
||||||
|
|
||||||
return _local_5._Str_1186(this);
|
return _local_5.multiply(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public skew(): void
|
public skew(): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1779(): Matrix4x4
|
public transpose(): Matrix4x4
|
||||||
{
|
{
|
||||||
return new Matrix4x4(this._data[0], this._data[3], this._data[6], this._data[1], this._data[4], this._data[7], this._data[2], this._data[5], this._data[8]);
|
return new Matrix4x4(this._data[0], this._data[3], this._data[6], this._data[1], this._data[4], this._data[7], this._data[2], this._data[5], this._data[8]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1451(k: Matrix4x4): boolean
|
public equals(k: Matrix4x4): boolean
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,13 @@ export class Node3D
|
|||||||
return this._location;
|
return this._location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1604(): Vector3D
|
public get transformedLocation(): Vector3D
|
||||||
{
|
{
|
||||||
return this._transformedLocation;
|
return this._transformedLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1101(k: Matrix4x4): void
|
public applyTransform(k: Matrix4x4): void
|
||||||
{
|
{
|
||||||
if(this._needsTransformation) this._transformedLocation = k._Str_2186(this._location);
|
if(this._needsTransformation) this._transformedLocation = k.vectorMultiplication(this._location);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,12 +11,12 @@
|
|||||||
this._z = _arg_3;
|
this._z = _arg_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static _Str_2224(k: Vector3D, _arg_2: Vector3D): number
|
public static dot(k: Vector3D, _arg_2: Vector3D): number
|
||||||
{
|
{
|
||||||
return ((k.x * _arg_2.x) + (k.y * _arg_2.y)) + (k.z * _arg_2.z);
|
return ((k.x * _arg_2.x) + (k.y * _arg_2.y)) + (k.z * _arg_2.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static _Str_1645(k: Vector3D, _arg_2: Vector3D): Vector3D
|
public static cross(k: Vector3D, _arg_2: Vector3D): Vector3D
|
||||||
{
|
{
|
||||||
const _local_3 = new Vector3D();
|
const _local_3 = new Vector3D();
|
||||||
|
|
||||||
@ -32,12 +32,12 @@
|
|||||||
return new Vector3D((k.x - _arg_2.x), (k.y - _arg_2.y), (k.z - _arg_2.z));
|
return new Vector3D((k.x - _arg_2.x), (k.y - _arg_2.y), (k.z - _arg_2.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2224(k: Vector3D): number
|
public dot(k: Vector3D): number
|
||||||
{
|
{
|
||||||
return ((this._x * k.x) + (this._y * k.y)) + (this._z * k.z);
|
return ((this._x * k.x) + (this._y * k.y)) + (this._z * k.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1645(k: Vector3D): Vector3D
|
public cross(k: Vector3D): Vector3D
|
||||||
{
|
{
|
||||||
const _local_2 = new Vector3D();
|
const _local_2 = new Vector3D();
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ export * from './EffectAssetDownloadLibrary';
|
|||||||
export * from './EffectAssetDownloadManager';
|
export * from './EffectAssetDownloadManager';
|
||||||
export * from './enum';
|
export * from './enum';
|
||||||
export * from './events';
|
export * from './events';
|
||||||
export * from './figuredata';
|
|
||||||
export * from './geometry';
|
export * from './geometry';
|
||||||
export * from './IAvatarEffectListener';
|
export * from './IAvatarEffectListener';
|
||||||
export * from './IAvatarFigureContainer';
|
export * from './IAvatarFigureContainer';
|
||||||
|
@ -28,7 +28,7 @@ export class AvatarAnimationData implements IFigureSetData
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1017(k: any): boolean
|
public appendXML(k: any): boolean
|
||||||
{
|
{
|
||||||
for(const _local_2 of k.action)
|
for(const _local_2 of k.action)
|
||||||
{
|
{
|
||||||
@ -38,7 +38,7 @@ export class AvatarAnimationData implements IFigureSetData
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2244(action: IActionDefinition): AnimationAction
|
public getAction(action: IActionDefinition): AnimationAction
|
||||||
{
|
{
|
||||||
const existing = this._actions.get(action.id);
|
const existing = this._actions.get(action.id);
|
||||||
|
|
||||||
@ -47,12 +47,12 @@ export class AvatarAnimationData implements IFigureSetData
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1408(k: IActionDefinition): number
|
public getFrameCount(k: IActionDefinition): number
|
||||||
{
|
{
|
||||||
const animationAction = this._Str_2244(k);
|
const animationAction = this.getAction(k);
|
||||||
|
|
||||||
if(!animationAction) return 0;
|
if(!animationAction) return 0;
|
||||||
|
|
||||||
return animationAction._Str_2185;
|
return animationAction.frameCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ export class AvatarCanvas
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1076(): Point
|
public get regPoint(): Point
|
||||||
{
|
{
|
||||||
return this._regPoint;
|
return this._regPoint;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ export class AvatarStructureDownload extends EventDispatcher
|
|||||||
{
|
{
|
||||||
if(err || !results || !results.figuredata) throw new Error('invalid_figure_data');
|
if(err || !results || !results.figuredata) throw new Error('invalid_figure_data');
|
||||||
|
|
||||||
if(this._dataReceiver) this._dataReceiver._Str_1017(results.figuredata);
|
if(this._dataReceiver) this._dataReceiver.appendXML(results.figuredata);
|
||||||
|
|
||||||
this.dispatchEvent(new NitroEvent(AvatarStructureDownload.AVATAR_STRUCTURE_DONE));
|
this.dispatchEvent(new NitroEvent(AvatarStructureDownload.AVATAR_STRUCTURE_DONE));
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,7 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1133(k: any): void
|
public injectXML(k: any): void
|
||||||
{
|
{
|
||||||
for(const _local_2 of k.sets[0].settype)
|
for(const _local_2 of k.sets[0].settype)
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
|
|
||||||
if(setType)
|
if(setType)
|
||||||
{
|
{
|
||||||
setType._Str_1874(_local_2);
|
setType.cleanUp(_local_2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -63,10 +63,10 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._Str_1017(k);
|
this.appendXML(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1017(k: any): boolean
|
public appendXML(k: any): boolean
|
||||||
{
|
{
|
||||||
if(!k) return false;
|
if(!k) return false;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_local_4._Str_2015(_local_2);
|
_local_4.append(_local_2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,20 +96,20 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_local_5._Str_2015(_local_3);
|
_local_5.append(_local_3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1733(k: string, _arg_2: number): string[]
|
public getMandatorySetTypeIds(k: string, _arg_2: number): string[]
|
||||||
{
|
{
|
||||||
const types: string[] = [];
|
const types: string[] = [];
|
||||||
|
|
||||||
for(const set of this._setTypes.values())
|
for(const set of this._setTypes.values())
|
||||||
{
|
{
|
||||||
if(!set || !set._Str_895(k, _arg_2)) continue;
|
if(!set || !set.isMandatory(k, _arg_2)) continue;
|
||||||
|
|
||||||
types.push(set.type);
|
types.push(set.type);
|
||||||
}
|
}
|
||||||
@ -117,30 +117,30 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
|||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2264(k: string, _arg_2: string): IFigurePartSet
|
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||||
{
|
{
|
||||||
const setType = this._setTypes.get(k);
|
const setType = this._setTypes.get(k);
|
||||||
|
|
||||||
if(!setType) return null;
|
if(!setType) return null;
|
||||||
|
|
||||||
return setType._Str_2264(_arg_2);
|
return setType.getDefaultPartSet(_arg_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_740(k: string): ISetType
|
public getSetType(k: string): ISetType
|
||||||
{
|
{
|
||||||
return (this._setTypes.get(k) || null);
|
return (this._setTypes.get(k) || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_783(k: number): IPalette
|
public getPalette(k: number): IPalette
|
||||||
{
|
{
|
||||||
return (this._palettes.get(k.toString()) || null);
|
return (this._palettes.get(k.toString()) || null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_938(k: number): IFigurePartSet
|
public getFigurePartSet(k: number): IFigurePartSet
|
||||||
{
|
{
|
||||||
for(const set of this._setTypes.values())
|
for(const set of this._setTypes.values())
|
||||||
{
|
{
|
||||||
const partSet = set._Str_1020(k);
|
const partSet = set.getPartSet(k);
|
||||||
|
|
||||||
if(!partSet) continue;
|
if(!partSet) continue;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export interface IFigureSetData
|
export interface IFigureSetData
|
||||||
{
|
{
|
||||||
parse(data: any): boolean;
|
parse(data: any): boolean;
|
||||||
_Str_1017(data: any): boolean;
|
appendXML(data: any): boolean;
|
||||||
}
|
}
|
@ -5,8 +5,8 @@ import { ISetType } from './figure/ISetType';
|
|||||||
export interface IStructureData
|
export interface IStructureData
|
||||||
{
|
{
|
||||||
parse(data: any): boolean;
|
parse(data: any): boolean;
|
||||||
_Str_1017(k: any): boolean;
|
appendXML(k: any): boolean;
|
||||||
_Str_740(_arg_1: string): ISetType;
|
getSetType(_arg_1: string): ISetType;
|
||||||
_Str_783(_arg_1: number): IPalette;
|
getPalette(_arg_1: number): IPalette;
|
||||||
_Str_938(_arg_1: number): IFigurePartSet;
|
getFigurePartSet(_arg_1: number): IFigurePartSet;
|
||||||
}
|
}
|
@ -40,7 +40,7 @@ export class PartSetsData implements IFigureSetData
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1017(data: any): boolean
|
public appendXML(data: any): boolean
|
||||||
{
|
{
|
||||||
if(data.partSet && (data.partSet.length > 0))
|
if(data.partSet && (data.partSet.length > 0))
|
||||||
{
|
{
|
||||||
@ -65,16 +65,16 @@ export class PartSetsData implements IFigureSetData
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1795(k:IActionDefinition): string[]
|
public getActiveParts(k:IActionDefinition): string[]
|
||||||
{
|
{
|
||||||
const activePartSet = this._activePartSets.get(k.activePartSet);
|
const activePartSet = this._activePartSets.get(k.activePartSet);
|
||||||
|
|
||||||
if(!activePartSet) return [];
|
if(!activePartSet) return [];
|
||||||
|
|
||||||
return activePartSet._Str_806;
|
return activePartSet.parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1102(part: string): PartDefinition
|
public getPartDefinition(part: string): PartDefinition
|
||||||
{
|
{
|
||||||
const existing = this._parts.get(part);
|
const existing = this._parts.get(part);
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ export class PartSetsData implements IFigureSetData
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1520(k: any): PartDefinition
|
public addPartDefinition(k: any): PartDefinition
|
||||||
{
|
{
|
||||||
const _local_2 = k.setType as string;
|
const _local_2 = k.setType as string;
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ export class PartSetsData implements IFigureSetData
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1113(k: ActionDefinition): ActivePartSet
|
public getActivePartSet(k: ActionDefinition): ActivePartSet
|
||||||
{
|
{
|
||||||
const existing = this._activePartSets.get(k.activePartSet);
|
const existing = this._activePartSets.get(k.activePartSet);
|
||||||
|
|
||||||
@ -108,12 +108,12 @@ export class PartSetsData implements IFigureSetData
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_806(): Map<string, PartDefinition>
|
public get parts(): Map<string, PartDefinition>
|
||||||
{
|
{
|
||||||
return this._parts;
|
return this._parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1979(): Map<string, ActivePartSet>
|
public get activePartSets(): Map<string, ActivePartSet>
|
||||||
{
|
{
|
||||||
return this._activePartSets;
|
return this._activePartSets;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { AnimationActionPart } from './AnimationActionPart';
|
|||||||
|
|
||||||
export class AnimationAction
|
export class AnimationAction
|
||||||
{
|
{
|
||||||
public static _Str_1934: Point = new Point(0, 0);
|
public static DEFAULT_OFFSET: Point = new Point(0, 0);
|
||||||
|
|
||||||
private _id: string;
|
private _id: string;
|
||||||
private _actionParts: Map<string, AnimationActionPart>;
|
private _actionParts: Map<string, AnimationActionPart>;
|
||||||
@ -91,7 +91,7 @@ export class AnimationAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_989(type: string): AnimationActionPart
|
public getPart(type: string): AnimationActionPart
|
||||||
{
|
{
|
||||||
if(!type) return null;
|
if(!type) return null;
|
||||||
|
|
||||||
@ -102,21 +102,21 @@ export class AnimationAction
|
|||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1888(frameId: number, frameCount: number, partId: string): Point
|
public getFrameBodyPartOffset(frameId: number, frameCount: number, partId: string): Point
|
||||||
{
|
{
|
||||||
const frameIndex = (frameCount % this._frameIndexes.length);
|
const frameIndex = (frameCount % this._frameIndexes.length);
|
||||||
const frameNumber = this._frameIndexes[frameIndex];
|
const frameNumber = this._frameIndexes[frameIndex];
|
||||||
const offsets = this._bodyPartOffsets.get(frameNumber);
|
const offsets = this._bodyPartOffsets.get(frameNumber);
|
||||||
|
|
||||||
if(!offsets) return AnimationAction._Str_1934;
|
if(!offsets) return AnimationAction.DEFAULT_OFFSET;
|
||||||
|
|
||||||
const frameOffset = offsets.get(frameId);
|
const frameOffset = offsets.get(frameId);
|
||||||
|
|
||||||
if(!frameOffset) return AnimationAction._Str_1934;
|
if(!frameOffset) return AnimationAction.DEFAULT_OFFSET;
|
||||||
|
|
||||||
const offset = frameOffset.get(partId);
|
const offset = frameOffset.get(partId);
|
||||||
|
|
||||||
if(!offset) return AnimationAction._Str_1934;
|
if(!offset) return AnimationAction.DEFAULT_OFFSET;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
@ -126,12 +126,12 @@ export class AnimationAction
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_806(): Map<string, AnimationActionPart>
|
public get parts(): Map<string, AnimationActionPart>
|
||||||
{
|
{
|
||||||
return this._actionParts;
|
return this._actionParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_2185(): number
|
public get frameCount(): number
|
||||||
{
|
{
|
||||||
return this._frameCount;
|
return this._frameCount;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ export class AvatarAnimationFrame
|
|||||||
return this._number;
|
return this._number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_778(): string
|
public get assetPartDefinition(): string
|
||||||
{
|
{
|
||||||
return this._assetPartDefinition;
|
return this._assetPartDefinition;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ export class FigurePart implements IFigurePart
|
|||||||
return this._index;
|
return this._index;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_827(): number
|
public get colorLayerIndex(): number
|
||||||
{
|
{
|
||||||
return this._colorLayerIndex;
|
return this._colorLayerIndex;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ export class FigurePartSet implements IFigurePartSet
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_989(k: string, _arg_2: number): IFigurePart
|
public getPart(k: string, _arg_2: number): IFigurePart
|
||||||
{
|
{
|
||||||
for(const part of this._parts)
|
for(const part of this._parts)
|
||||||
{
|
{
|
||||||
@ -117,27 +117,27 @@ export class FigurePartSet implements IFigurePartSet
|
|||||||
return this._isColorable;
|
return this._isColorable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_608(): boolean
|
public get isSelectable(): boolean
|
||||||
{
|
{
|
||||||
return this._isSelectable;
|
return this._isSelectable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_806(): IFigurePart[]
|
public get parts(): IFigurePart[]
|
||||||
{
|
{
|
||||||
return this._parts;
|
return this._parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_790(): string[]
|
public get hiddenLayers(): string[]
|
||||||
{
|
{
|
||||||
return this._hiddenLayers;
|
return this._hiddenLayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_653(): boolean
|
public get isPreSelectable(): boolean
|
||||||
{
|
{
|
||||||
return this._isPreSelectable;
|
return this._isPreSelectable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_651(): boolean
|
public get isSellable(): boolean
|
||||||
{
|
{
|
||||||
return this._isSellable;
|
return this._isSellable;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@ export interface IFigurePart
|
|||||||
type: string;
|
type: string;
|
||||||
breed: number;
|
breed: number;
|
||||||
index: number;
|
index: number;
|
||||||
_Str_827: number;
|
colorLayerIndex: number;
|
||||||
paletteMap: number;
|
paletteMap: number;
|
||||||
}
|
}
|
@ -2,15 +2,15 @@ import { IFigurePart } from './IFigurePart';
|
|||||||
|
|
||||||
export interface IFigurePartSet
|
export interface IFigurePartSet
|
||||||
{
|
{
|
||||||
_Str_989(_arg_1: string, _arg_2: number): IFigurePart;
|
getPart(_arg_1: string, _arg_2: number): IFigurePart;
|
||||||
id: number;
|
id: number;
|
||||||
type: string;
|
type: string;
|
||||||
gender: string;
|
gender: string;
|
||||||
clubLevel: number;
|
clubLevel: number;
|
||||||
isColorable: boolean;
|
isColorable: boolean;
|
||||||
_Str_608: boolean;
|
isSelectable: boolean;
|
||||||
_Str_806: IFigurePart[];
|
parts: IFigurePart[];
|
||||||
_Str_790: string[];
|
hiddenLayers: string[];
|
||||||
_Str_653: boolean;
|
isPreSelectable: boolean;
|
||||||
_Str_651: boolean;
|
isSellable: boolean;
|
||||||
}
|
}
|
@ -2,7 +2,7 @@ import { IPartColor } from './IPartColor';
|
|||||||
|
|
||||||
export interface IPalette
|
export interface IPalette
|
||||||
{
|
{
|
||||||
_Str_751(id: number): IPartColor;
|
getColor(id: number): IPartColor;
|
||||||
id: number;
|
id: number;
|
||||||
colors: Map<string, IPartColor>;
|
colors: Map<string, IPartColor>;
|
||||||
}
|
}
|
@ -4,5 +4,5 @@ export interface IPartColor
|
|||||||
index: number;
|
index: number;
|
||||||
clubLevel: number;
|
clubLevel: number;
|
||||||
isSelectable: boolean;
|
isSelectable: boolean;
|
||||||
_Str_915: number;
|
rgb: number;
|
||||||
}
|
}
|
@ -3,10 +3,10 @@ import { IFigurePartSet } from './IFigurePartSet';
|
|||||||
|
|
||||||
export interface ISetType
|
export interface ISetType
|
||||||
{
|
{
|
||||||
_Str_1020(_arg_1: number): IFigurePartSet;
|
getPartSet(_arg_1: number): IFigurePartSet;
|
||||||
_Str_895(_arg_1: string, _arg_2: number): boolean;
|
isMandatory(_arg_1: string, _arg_2: number): boolean;
|
||||||
_Str_1002(_arg_1: string): number;
|
optionalFromClubLevel(_arg_1: string): number;
|
||||||
type: string;
|
type: string;
|
||||||
_Str_734: number;
|
paletteID: number;
|
||||||
_Str_710: AdvancedMap<string, IFigurePartSet>;
|
partSets: AdvancedMap<string, IFigurePartSet>;
|
||||||
}
|
}
|
@ -14,10 +14,10 @@ export class Palette implements IPalette
|
|||||||
this._id = parseInt(data['$'].id);
|
this._id = parseInt(data['$'].id);
|
||||||
this._colors = new Map();
|
this._colors = new Map();
|
||||||
|
|
||||||
this._Str_2015(data);
|
this.append(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2015(data: any): void
|
public append(data: any): void
|
||||||
{
|
{
|
||||||
for(const color of data.color)
|
for(const color of data.color)
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ export class Palette implements IPalette
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_751(id: number): IPartColor
|
public getColor(id: number): IPartColor
|
||||||
{
|
{
|
||||||
if((id === undefined) || id < 0) return null;
|
if((id === undefined) || id < 0) return null;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export class PartColor implements IPartColor
|
|||||||
return this._isSelectable;
|
return this._isSelectable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_915(): number
|
public get rgb(): number
|
||||||
{
|
{
|
||||||
return this._rgb;
|
return this._rgb;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export class SetType implements ISetType
|
|||||||
this._isMandatory['M'] = [ (parseInt(data['$'].mand_m_0) === 1), (parseInt(data['$'].mand_m_1) === 1) ];
|
this._isMandatory['M'] = [ (parseInt(data['$'].mand_m_0) === 1), (parseInt(data['$'].mand_m_1) === 1) ];
|
||||||
this._partSets = new AdvancedMap();
|
this._partSets = new AdvancedMap();
|
||||||
|
|
||||||
this._Str_2015(data);
|
this.append(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
@ -36,7 +36,7 @@ export class SetType implements ISetType
|
|||||||
this._partSets = null;
|
this._partSets = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1874(k: any): void
|
public cleanUp(k: any): void
|
||||||
{
|
{
|
||||||
for(const _local_2 of k)
|
for(const _local_2 of k)
|
||||||
{
|
{
|
||||||
@ -52,14 +52,14 @@ export class SetType implements ISetType
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2015(k: any): void
|
public append(k: any): void
|
||||||
{
|
{
|
||||||
if(!k || !k.set) return;
|
if(!k || !k.set) return;
|
||||||
|
|
||||||
for(const set of k.set) this._partSets.add(set['$'].id, new FigurePartSet(this._type, set));
|
for(const set of k.set) this._partSets.add(set['$'].id, new FigurePartSet(this._type, set));
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2264(k: string): IFigurePartSet
|
public getDefaultPartSet(k: string): IFigurePartSet
|
||||||
{
|
{
|
||||||
for(const set of this._partSets.getValues())
|
for(const set of this._partSets.getValues())
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ export class SetType implements ISetType
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1020(k: number): IFigurePartSet
|
public getPartSet(k: number): IFigurePartSet
|
||||||
{
|
{
|
||||||
return this._partSets.getValue(k.toString());
|
return this._partSets.getValue(k.toString());
|
||||||
}
|
}
|
||||||
@ -81,24 +81,24 @@ export class SetType implements ISetType
|
|||||||
return this._type;
|
return this._type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_734(): number
|
public get paletteID(): number
|
||||||
{
|
{
|
||||||
return this._paletteId;
|
return this._paletteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_895(k: string, _arg_2: number): boolean
|
public isMandatory(k: string, _arg_2: number): boolean
|
||||||
{
|
{
|
||||||
return this._isMandatory[k.toUpperCase()][Math.min(_arg_2, 1)];
|
return this._isMandatory[k.toUpperCase()][Math.min(_arg_2, 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_1002(k: string): number
|
public optionalFromClubLevel(k: string): number
|
||||||
{
|
{
|
||||||
const _local_2 = this._isMandatory[k.toUpperCase()];
|
const _local_2 = this._isMandatory[k.toUpperCase()];
|
||||||
|
|
||||||
return _local_2.indexOf(false);
|
return _local_2.indexOf(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_710(): AdvancedMap<string, IFigurePartSet>
|
public get partSets(): AdvancedMap<string, IFigurePartSet>
|
||||||
{
|
{
|
||||||
return this._partSets;
|
return this._partSets;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export class ActivePartSet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_806(): string[]
|
public get parts(): string[]
|
||||||
{
|
{
|
||||||
return this._parts;
|
return this._parts;
|
||||||
}
|
}
|
||||||
|
@ -17,47 +17,47 @@ export class PartDefinition
|
|||||||
this._staticId = -1;
|
this._staticId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2234(): boolean
|
public hasStaticId(): boolean
|
||||||
{
|
{
|
||||||
return this._staticId >= 0;
|
return this._staticId >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1734(): number
|
public get staticId(): number
|
||||||
{
|
{
|
||||||
return this._staticId;
|
return this._staticId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_1734(k: number)
|
public set staticId(k: number)
|
||||||
{
|
{
|
||||||
this._staticId = k;
|
this._staticId = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_2174(): string
|
public get setType(): string
|
||||||
{
|
{
|
||||||
return this._setType;
|
return this._setType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1693(): string
|
public get flippedSetType(): string
|
||||||
{
|
{
|
||||||
return this._flippedSetType;
|
return this._flippedSetType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_1693(type: string)
|
public set flippedSetType(type: string)
|
||||||
{
|
{
|
||||||
this._flippedSetType = type;
|
this._flippedSetType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1209(): string
|
public get removeSetType(): string
|
||||||
{
|
{
|
||||||
return this._removeSetType;
|
return this._removeSetType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get _Str_1583(): boolean
|
public get appendToFigure(): boolean
|
||||||
{
|
{
|
||||||
return this._appendToFigure;
|
return this._appendToFigure;
|
||||||
}
|
}
|
||||||
|
|
||||||
public set _Str_1583(flag: boolean)
|
public set appendToFigure(flag: boolean)
|
||||||
{
|
{
|
||||||
this._appendToFigure = flag;
|
this._appendToFigure = flag;
|
||||||
}
|
}
|
||||||
|
11
src/nitro/camera/IRoomCameraWidgetEffect.ts
Normal file
11
src/nitro/camera/IRoomCameraWidgetEffect.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
||||||
|
import { Resource, Texture } from 'pixi.js';
|
||||||
|
|
||||||
|
export interface IRoomCameraWidgetEffect
|
||||||
|
{
|
||||||
|
name: string;
|
||||||
|
minLevel: number;
|
||||||
|
texture: Texture<Resource>;
|
||||||
|
colorMatrix: ColorMatrix;
|
||||||
|
blendMode: number;
|
||||||
|
}
|
12
src/nitro/camera/IRoomCameraWidgetManager.ts
Normal file
12
src/nitro/camera/IRoomCameraWidgetManager.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { IEventDispatcher } from '../../core';
|
||||||
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
import { IRoomCameraWidgetSelectedEffect } from './IRoomCameraWidgetSelectedEffect';
|
||||||
|
|
||||||
|
export interface IRoomCameraWidgetManager
|
||||||
|
{
|
||||||
|
init(): void;
|
||||||
|
applyEffects(image: HTMLImageElement, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement;
|
||||||
|
events: IEventDispatcher;
|
||||||
|
effects: Map<string, IRoomCameraWidgetEffect>;
|
||||||
|
isLoaded: boolean;
|
||||||
|
}
|
7
src/nitro/camera/IRoomCameraWidgetSelectedEffect.ts
Normal file
7
src/nitro/camera/IRoomCameraWidgetSelectedEffect.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
|
||||||
|
export interface IRoomCameraWidgetSelectedEffect
|
||||||
|
{
|
||||||
|
effect: IRoomCameraWidgetEffect;
|
||||||
|
alpha: number;
|
||||||
|
}
|
61
src/nitro/camera/RoomCameraWidgetEffect.ts
Normal file
61
src/nitro/camera/RoomCameraWidgetEffect.ts
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
||||||
|
import { Resource, Texture } from 'pixi.js';
|
||||||
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
|
||||||
|
export class RoomCameraWidgetEffect implements IRoomCameraWidgetEffect
|
||||||
|
{
|
||||||
|
private _name: string;
|
||||||
|
private _minLevel: number = -1;
|
||||||
|
private _texture: Texture<Resource> = null;
|
||||||
|
private _colorMatrix: ColorMatrix = null;
|
||||||
|
private _blendMode: number = null;
|
||||||
|
|
||||||
|
constructor(name: string, minLevel: number = -1, texture: Texture<Resource> = null, colorMatrix: ColorMatrix = null, blendMode: number = null)
|
||||||
|
{
|
||||||
|
this._name = name;
|
||||||
|
this._minLevel = minLevel;
|
||||||
|
this._texture = texture;
|
||||||
|
this._colorMatrix = colorMatrix;
|
||||||
|
this._blendMode = blendMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get name(): string
|
||||||
|
{
|
||||||
|
return this._name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get texture(): Texture<Resource>
|
||||||
|
{
|
||||||
|
return this._texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set texture(texture: Texture<Resource>)
|
||||||
|
{
|
||||||
|
this._texture = texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get colorMatrix(): ColorMatrix
|
||||||
|
{
|
||||||
|
return this._colorMatrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set colorMatrix(colorMatrix: ColorMatrix)
|
||||||
|
{
|
||||||
|
this._colorMatrix = colorMatrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get blendMode(): number
|
||||||
|
{
|
||||||
|
return this._blendMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set blendMode(blendMode: number)
|
||||||
|
{
|
||||||
|
this._blendMode = blendMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get minLevel(): number
|
||||||
|
{
|
||||||
|
return this._minLevel;
|
||||||
|
}
|
||||||
|
}
|
108
src/nitro/camera/RoomCameraWidgetManager.ts
Normal file
108
src/nitro/camera/RoomCameraWidgetManager.ts
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
import { ColorMatrix } from '@pixi/filter-color-matrix';
|
||||||
|
import { Container, filters, Sprite, Texture } from 'pixi.js';
|
||||||
|
import { EventDispatcher, IEventDispatcher } from '../../core';
|
||||||
|
import { TextureUtils } from '../../room';
|
||||||
|
import { Nitro } from '../Nitro';
|
||||||
|
import { RoomCameraWidgetManagerEvent } from './events/RoomCameraWidgetManagerEvent';
|
||||||
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
import { IRoomCameraWidgetManager } from './IRoomCameraWidgetManager';
|
||||||
|
import { IRoomCameraWidgetSelectedEffect } from './IRoomCameraWidgetSelectedEffect';
|
||||||
|
import { RoomCameraWidgetEffect } from './RoomCameraWidgetEffect';
|
||||||
|
|
||||||
|
export class RoomCameraWidgetManager implements IRoomCameraWidgetManager
|
||||||
|
{
|
||||||
|
private _effects: Map<string, IRoomCameraWidgetEffect>;
|
||||||
|
private _events: IEventDispatcher;
|
||||||
|
private _isLoaded: boolean;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._effects = new Map();
|
||||||
|
this._events = new EventDispatcher();
|
||||||
|
this._isLoaded = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(): void
|
||||||
|
{
|
||||||
|
if(this._isLoaded) return;
|
||||||
|
|
||||||
|
this._isLoaded = true;
|
||||||
|
|
||||||
|
const imagesUrl = Nitro.instance.getConfiguration<string>('image.library.url') + 'Habbo-Stories/';
|
||||||
|
const effects = Nitro.instance.getConfiguration<{ name: string, colorMatrix?: ColorMatrix, minLevel: number, blendMode?: number, enabled: boolean }[]>('camera.available.effects');
|
||||||
|
|
||||||
|
for(const effect of effects)
|
||||||
|
{
|
||||||
|
if(!effect.enabled) continue;
|
||||||
|
|
||||||
|
const cameraEffect = new RoomCameraWidgetEffect(effect.name, effect.minLevel);
|
||||||
|
|
||||||
|
if(effect.colorMatrix.length)
|
||||||
|
{
|
||||||
|
cameraEffect.colorMatrix = effect.colorMatrix;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cameraEffect.texture = Texture.from(imagesUrl + effect.name + '.png');
|
||||||
|
cameraEffect.blendMode = effect.blendMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._effects.set(cameraEffect.name, cameraEffect);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.events.dispatchEvent(new RoomCameraWidgetManagerEvent(RoomCameraWidgetManagerEvent.INITIALIZED));
|
||||||
|
}
|
||||||
|
|
||||||
|
public applyEffects(image: HTMLImageElement, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement
|
||||||
|
{
|
||||||
|
const container = new Container();
|
||||||
|
const texture = Texture.from(image);
|
||||||
|
const sprite = new Sprite(texture);
|
||||||
|
|
||||||
|
container.addChild(sprite);
|
||||||
|
|
||||||
|
for(const selectedEffect of selectedEffects)
|
||||||
|
{
|
||||||
|
const effect = selectedEffect.effect;
|
||||||
|
|
||||||
|
if(!effect) continue;
|
||||||
|
|
||||||
|
if(effect.colorMatrix)
|
||||||
|
{
|
||||||
|
const filter = new filters.ColorMatrixFilter();
|
||||||
|
|
||||||
|
filter.matrix = effect.colorMatrix;
|
||||||
|
filter.alpha = selectedEffect.alpha;
|
||||||
|
|
||||||
|
if(!sprite.filters) sprite.filters = [];
|
||||||
|
|
||||||
|
sprite.filters.push(filter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const effectSprite = new Sprite(effect.texture);
|
||||||
|
effectSprite.alpha = selectedEffect.alpha;
|
||||||
|
effectSprite.blendMode = effect.blendMode;
|
||||||
|
|
||||||
|
container.addChild(effectSprite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TextureUtils.generateImage(container);
|
||||||
|
}
|
||||||
|
|
||||||
|
public get effects(): Map<string, IRoomCameraWidgetEffect>
|
||||||
|
{
|
||||||
|
return this._effects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get events(): IEventDispatcher
|
||||||
|
{
|
||||||
|
return this._events;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isLoaded(): boolean
|
||||||
|
{
|
||||||
|
return this._isLoaded;
|
||||||
|
}
|
||||||
|
}
|
23
src/nitro/camera/RoomCameraWidgetSelectedEffect.ts
Normal file
23
src/nitro/camera/RoomCameraWidgetSelectedEffect.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { IRoomCameraWidgetEffect } from './IRoomCameraWidgetEffect';
|
||||||
|
|
||||||
|
export class RoomCameraWidgetSelectedEffect
|
||||||
|
{
|
||||||
|
private _effect: IRoomCameraWidgetEffect;
|
||||||
|
private _alpha: number;
|
||||||
|
|
||||||
|
constructor(effect: IRoomCameraWidgetEffect, alpha: number)
|
||||||
|
{
|
||||||
|
this._effect = effect;
|
||||||
|
this._alpha = alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get effect(): IRoomCameraWidgetEffect
|
||||||
|
{
|
||||||
|
return this._effect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get alpha(): number
|
||||||
|
{
|
||||||
|
return this._alpha;
|
||||||
|
}
|
||||||
|
}
|
11
src/nitro/camera/events/RoomCameraWidgetManagerEvent.ts
Normal file
11
src/nitro/camera/events/RoomCameraWidgetManagerEvent.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { NitroEvent } from '../../../core/events/NitroEvent';
|
||||||
|
|
||||||
|
export class RoomCameraWidgetManagerEvent extends NitroEvent
|
||||||
|
{
|
||||||
|
public static INITIALIZED: string = 'RCWM_INITIALIZED';
|
||||||
|
|
||||||
|
constructor(type: string)
|
||||||
|
{
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||||
import { ApproveNameMessageComposer, CatalogApproveNameResultEvent, SellablePetPalettesEvent } from './messages';
|
import { ApproveNameMessageComposer, BadgeReceivedEvent, BonusRareInfoMessageEvent, CatalogApproveNameResultEvent, ChangeUserNameResultMessageEvent, FurnitureGuildInfoComposer, GetBonusRareInfoMessageComposer, MysteryBoxKeysEvent, PetExperienceEvent, PetMountComposer, PetSupplementComposer, RemovePetSaddleComposer, RoomUnitGiveHandItemPetComposer, RoomWidgetCameraPublishedEvent, RoomWidgetCameraPurchaseComposer, SellablePetPalettesEvent, TogglePetBreedingComposer, TogglePetRidingComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UsePetProductComposer } from './messages';
|
||||||
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||||
import { ChangeNameUpdateEvent } from './messages/incoming/avatar/ChangeNameUpdateEvent';
|
|
||||||
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
||||||
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
||||||
import { CatalogGiftConfigurationEvent } from './messages/incoming/catalog/CatalogGiftConfigurationEvent';
|
import { CatalogGiftConfigurationEvent } from './messages/incoming/catalog/CatalogGiftConfigurationEvent';
|
||||||
@ -18,13 +17,17 @@ import { CatalogRedeemVoucherOkEvent } from './messages/incoming/catalog/Catalog
|
|||||||
import { CatalogSearchEvent } from './messages/incoming/catalog/CatalogSearchEvent';
|
import { CatalogSearchEvent } from './messages/incoming/catalog/CatalogSearchEvent';
|
||||||
import { CatalogSoldOutEvent } from './messages/incoming/catalog/CatalogSoldOutEvent';
|
import { CatalogSoldOutEvent } from './messages/incoming/catalog/CatalogSoldOutEvent';
|
||||||
import { CatalogUpdatedEvent } from './messages/incoming/catalog/CatalogUpdatedEvent';
|
import { CatalogUpdatedEvent } from './messages/incoming/catalog/CatalogUpdatedEvent';
|
||||||
import { MarketplaceAfterOrderStatusEvent } from './messages/incoming/catalog/marketplace/MarketplaceAfterOrderStatusEvent';
|
import { MarketplaceBuyOfferResultEvent } from './messages/incoming/catalog/marketplace/MarketplaceBuyOfferResultEvent';
|
||||||
import { MarketplaceCancelItemEvent } from './messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
|
import { MarketplaceCancelItemEvent } from './messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
|
||||||
import { MarketplaceOffersReceivedEvent } from './messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
|
import { MarketplaceOffersReceivedEvent } from './messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
|
||||||
import { MarketplaceOwnItemsEvent } from './messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
|
import { MarketplaceOwnItemsEvent } from './messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
|
||||||
import { MarketplaceConfigEvent } from './messages/incoming/catalog/MarketplaceConfigEvent';
|
import { MarketplaceConfigEvent } from './messages/incoming/catalog/MarketplaceConfigEvent';
|
||||||
import { MarketplaceItemStatsEvent } from './messages/incoming/catalog/MarketplaceItemStatsEvent';
|
import { MarketplaceItemStatsEvent } from './messages/incoming/catalog/MarketplaceItemStatsEvent';
|
||||||
import { ClientPingEvent } from './messages/incoming/client/ClientPingEvent';
|
import { ClientPingEvent } from './messages/incoming/client/ClientPingEvent';
|
||||||
|
import { CraftableProductsEvent } from './messages/incoming/crafting/CraftableProductsEvent';
|
||||||
|
import { CraftingRecipeEvent } from './messages/incoming/crafting/CraftingRecipeEvent';
|
||||||
|
import { CraftingRecipesAvailableEvent } from './messages/incoming/crafting/CraftingRecipesAvailableEvent';
|
||||||
|
import { CraftingResultEvent } from './messages/incoming/crafting/CraftingResultEvent';
|
||||||
import { DesktopViewEvent } from './messages/incoming/desktop/DesktopViewEvent';
|
import { DesktopViewEvent } from './messages/incoming/desktop/DesktopViewEvent';
|
||||||
import { AcceptFriendResultEvent } from './messages/incoming/friendlist/AcceptFriendResultEvent';
|
import { AcceptFriendResultEvent } from './messages/incoming/friendlist/AcceptFriendResultEvent';
|
||||||
import { FindFriendsProcessResultEvent } from './messages/incoming/friendlist/FindFriendsProcessResultEvent';
|
import { FindFriendsProcessResultEvent } from './messages/incoming/friendlist/FindFriendsProcessResultEvent';
|
||||||
@ -50,6 +53,7 @@ import { GroupConfirmMemberRemoveEvent } from './messages/incoming/group/GroupCo
|
|||||||
import { GroupInformationEvent } from './messages/incoming/group/GroupInformationEvent';
|
import { GroupInformationEvent } from './messages/incoming/group/GroupInformationEvent';
|
||||||
import { GroupMembersEvent } from './messages/incoming/group/GroupMembersEvent';
|
import { GroupMembersEvent } from './messages/incoming/group/GroupMembersEvent';
|
||||||
import { GroupSettingsEvent } from './messages/incoming/group/GroupSettingsEvent';
|
import { GroupSettingsEvent } from './messages/incoming/group/GroupSettingsEvent';
|
||||||
|
import { AuthenticationEvent } from './messages/incoming/handshake/AuthenticationEvent';
|
||||||
import { CallForHelpResultMessageEvent } from './messages/incoming/help/CallForHelpResultMessageEvent';
|
import { CallForHelpResultMessageEvent } from './messages/incoming/help/CallForHelpResultMessageEvent';
|
||||||
import { IncomingHeader } from './messages/incoming/IncomingHeader';
|
import { IncomingHeader } from './messages/incoming/IncomingHeader';
|
||||||
import { AchievementEvent } from './messages/incoming/inventory/achievements/AchievementEvent';
|
import { AchievementEvent } from './messages/incoming/inventory/achievements/AchievementEvent';
|
||||||
@ -69,7 +73,7 @@ import { FurnitureListEvent } from './messages/incoming/inventory/furni/Furnitur
|
|||||||
import { FurnitureListInvalidateEvent } from './messages/incoming/inventory/furni/FurnitureListInvalidateEvent';
|
import { FurnitureListInvalidateEvent } from './messages/incoming/inventory/furni/FurnitureListInvalidateEvent';
|
||||||
import { FurnitureListRemovedEvent } from './messages/incoming/inventory/furni/FurnitureListRemovedEvent';
|
import { FurnitureListRemovedEvent } from './messages/incoming/inventory/furni/FurnitureListRemovedEvent';
|
||||||
import { FurniturePostItPlacedEvent } from './messages/incoming/inventory/furni/FurniturePostItPlacedEvent';
|
import { FurniturePostItPlacedEvent } from './messages/incoming/inventory/furni/FurniturePostItPlacedEvent';
|
||||||
import { FurnitureGiftOpenedEvent } from './messages/incoming/inventory/furni/gifts/FurnitureGiftOpenedEvent';
|
import { PresentOpenedMessageEvent } from './messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent';
|
||||||
import { MarketplaceItemPostedEvent } from './messages/incoming/inventory/marketplace/MarketplaceItemPostedEvent';
|
import { MarketplaceItemPostedEvent } from './messages/incoming/inventory/marketplace/MarketplaceItemPostedEvent';
|
||||||
import { MarketplaceSellItemEvent } from './messages/incoming/inventory/marketplace/MarketplaceSellItemEvent';
|
import { MarketplaceSellItemEvent } from './messages/incoming/inventory/marketplace/MarketplaceSellItemEvent';
|
||||||
import { PetAddedToInventoryEvent } from './messages/incoming/inventory/pets/PetAddedToInventoryEvent';
|
import { PetAddedToInventoryEvent } from './messages/incoming/inventory/pets/PetAddedToInventoryEvent';
|
||||||
@ -85,6 +89,8 @@ import { TradingOpenEvent } from './messages/incoming/inventory/trading/TradingO
|
|||||||
import { TradingOpenFailedEvent } from './messages/incoming/inventory/trading/TradingOpenFailedEvent';
|
import { TradingOpenFailedEvent } from './messages/incoming/inventory/trading/TradingOpenFailedEvent';
|
||||||
import { TradingOtherNotAllowedEvent } from './messages/incoming/inventory/trading/TradingOtherNotAllowedEvent';
|
import { TradingOtherNotAllowedEvent } from './messages/incoming/inventory/trading/TradingOtherNotAllowedEvent';
|
||||||
import { TradingYouAreNotAllowedEvent } from './messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent';
|
import { TradingYouAreNotAllowedEvent } from './messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent';
|
||||||
|
import { PromoArticlesMessageEvent } from './messages/incoming/landingview/PromoArticlesMessageEvent';
|
||||||
|
import { CommunityGoalVoteMessageEvent } from './messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent';
|
||||||
import { ModeratorMessageEvent } from './messages/incoming/moderation/ModeratorMessageEvent';
|
import { ModeratorMessageEvent } from './messages/incoming/moderation/ModeratorMessageEvent';
|
||||||
import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent';
|
import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent';
|
||||||
import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent';
|
import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent';
|
||||||
@ -111,6 +117,17 @@ import { NotificationDialogMessageEvent } from './messages/incoming/notification
|
|||||||
import { PetPlacingErrorEvent } from './messages/incoming/notifications/PetPlacingErrorEvent';
|
import { PetPlacingErrorEvent } from './messages/incoming/notifications/PetPlacingErrorEvent';
|
||||||
import { RespectReceivedEvent } from './messages/incoming/notifications/RespectReceivedEvent';
|
import { RespectReceivedEvent } from './messages/incoming/notifications/RespectReceivedEvent';
|
||||||
import { UnseenItemsEvent } from './messages/incoming/notifications/UnseenItemsEvent';
|
import { UnseenItemsEvent } from './messages/incoming/notifications/UnseenItemsEvent';
|
||||||
|
import { CommunityGoalEarnedPrizesMessageEvent } from './messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent';
|
||||||
|
import { CommunityGoalHallOfFameMessageEvent } from './messages/incoming/quest/CommunityGoalHallOfFameMessageEvent';
|
||||||
|
import { CommunityGoalProgressMessageEvent } from './messages/incoming/quest/CommunityGoalProgressMessageEvent';
|
||||||
|
import { ConcurrentUsersGoalProgressMessageEvent } from './messages/incoming/quest/ConcurrentUsersGoalProgressMessageEvent';
|
||||||
|
import { EpicPopupMessageEvent } from './messages/incoming/quest/EpicPopupMessageEvent';
|
||||||
|
import { QuestCancelledMessageEvent } from './messages/incoming/quest/QuestCancelledMessageEvent';
|
||||||
|
import { QuestCompletedMessageEvent } from './messages/incoming/quest/QuestCompletedMessageEvent';
|
||||||
|
import { QuestDailyMessageEvent } from './messages/incoming/quest/QuestDailyMessageEvent';
|
||||||
|
import { QuestMessageEvent } from './messages/incoming/quest/QuestMessageEvent';
|
||||||
|
import { QuestsMessageEvent } from './messages/incoming/quest/QuestsMessageEvent';
|
||||||
|
import { SeasonalQuestsMessageEvent } from './messages/incoming/quest/SeasonalQuestsMessageEvent';
|
||||||
import { RoomDoorbellAcceptedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent';
|
import { RoomDoorbellAcceptedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellAcceptedEvent';
|
||||||
import { RoomDoorbellEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellEvent';
|
import { RoomDoorbellEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellEvent';
|
||||||
import { RoomDoorbellRejectedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent';
|
import { RoomDoorbellRejectedEvent } from './messages/incoming/room/access/doorbell/RoomDoorbellRejectedEvent';
|
||||||
@ -121,6 +138,8 @@ import { RoomEnterErrorEvent } from './messages/incoming/room/access/RoomEnterEr
|
|||||||
import { RoomEnterEvent } from './messages/incoming/room/access/RoomEnterEvent';
|
import { RoomEnterEvent } from './messages/incoming/room/access/RoomEnterEvent';
|
||||||
import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent';
|
import { RoomForwardEvent } from './messages/incoming/room/access/RoomForwardEvent';
|
||||||
import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent';
|
import { BotCommandConfigurationEvent } from './messages/incoming/room/bots/BotCommandConfigurationEvent';
|
||||||
|
import { RoomWidgetCameraConfigurationEvent } from './messages/incoming/room/camera/RoomWidgetCameraConfigurationEvent';
|
||||||
|
import { RoomWidgetCameraPurchaseSuccessfulEvent } from './messages/incoming/room/camera/RoomWidgetCameraPurchaseSuccessfulEvent';
|
||||||
import { RoomBannedUsersEvent } from './messages/incoming/room/data/RoomBannedUsersEvent';
|
import { RoomBannedUsersEvent } from './messages/incoming/room/data/RoomBannedUsersEvent';
|
||||||
import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent';
|
import { RoomChatSettingsEvent } from './messages/incoming/room/data/RoomChatSettingsEvent';
|
||||||
import { RoomInfoEvent } from './messages/incoming/room/data/RoomInfoEvent';
|
import { RoomInfoEvent } from './messages/incoming/room/data/RoomInfoEvent';
|
||||||
@ -131,6 +150,7 @@ import { RoomSettingsEvent } from './messages/incoming/room/data/RoomSettingsEve
|
|||||||
import { RoomSettingsSavedEvent } from './messages/incoming/room/data/RoomSettingsSavedEvent';
|
import { RoomSettingsSavedEvent } from './messages/incoming/room/data/RoomSettingsSavedEvent';
|
||||||
import { RoomSettingsUpdatedEvent } from './messages/incoming/room/data/RoomSettingsUpdatedEvent';
|
import { RoomSettingsUpdatedEvent } from './messages/incoming/room/data/RoomSettingsUpdatedEvent';
|
||||||
import { RoomUsersWithRightsEvent } from './messages/incoming/room/data/RoomUsersWithRightsEvent';
|
import { RoomUsersWithRightsEvent } from './messages/incoming/room/data/RoomUsersWithRightsEvent';
|
||||||
|
import { ObjectsDataUpdateEvent } from './messages/incoming/room/engine/ObjectsDataUpdateEvent';
|
||||||
import { ObjectsRollingEvent } from './messages/incoming/room/engine/ObjectsRollingEvent';
|
import { ObjectsRollingEvent } from './messages/incoming/room/engine/ObjectsRollingEvent';
|
||||||
import { RoomCreatedEvent } from './messages/incoming/room/engine/RoomCreatedEvent';
|
import { RoomCreatedEvent } from './messages/incoming/room/engine/RoomCreatedEvent';
|
||||||
import { FurnitureFloorAddEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorAddEvent';
|
import { FurnitureFloorAddEvent } from './messages/incoming/room/furniture/floor/FurnitureFloorAddEvent';
|
||||||
@ -228,6 +248,11 @@ import { RedeemItemClothingComposer } from './messages/outgoing/catalog/RedeemIt
|
|||||||
import { CatalogRedeemVoucherComposer } from './messages/outgoing/catalog/RedeemVoucherComposer';
|
import { CatalogRedeemVoucherComposer } from './messages/outgoing/catalog/RedeemVoucherComposer';
|
||||||
import { ClientPongComposer } from './messages/outgoing/client/ClientPongComposer';
|
import { ClientPongComposer } from './messages/outgoing/client/ClientPongComposer';
|
||||||
import { ClientReleaseVersionComposer } from './messages/outgoing/client/ClientReleaseVersionComposer';
|
import { ClientReleaseVersionComposer } from './messages/outgoing/client/ClientReleaseVersionComposer';
|
||||||
|
import { CraftComposer } from './messages/outgoing/crafting/CraftComposer';
|
||||||
|
import { CraftSecretComposer } from './messages/outgoing/crafting/CraftSecretComposer';
|
||||||
|
import { GetCraftableProductsComposer } from './messages/outgoing/crafting/GetCraftableProductsComposer';
|
||||||
|
import { GetCraftingRecipeComposer } from './messages/outgoing/crafting/GetCraftingRecipeComposer';
|
||||||
|
import { GetCraftingRecipesAvailableComposer } from './messages/outgoing/crafting/GetCraftingRecipesAvailableComposer';
|
||||||
import { DesktopViewComposer } from './messages/outgoing/desktop/DesktopViewComposer';
|
import { DesktopViewComposer } from './messages/outgoing/desktop/DesktopViewComposer';
|
||||||
import { AcceptFriendComposer } from './messages/outgoing/friendlist/AcceptFriendComposer';
|
import { AcceptFriendComposer } from './messages/outgoing/friendlist/AcceptFriendComposer';
|
||||||
import { DeclineFriendComposer } from './messages/outgoing/friendlist/DeclineFriendComposer';
|
import { DeclineFriendComposer } from './messages/outgoing/friendlist/DeclineFriendComposer';
|
||||||
@ -261,6 +286,7 @@ import { GroupSaveColorsComposer } from './messages/outgoing/group/GroupSaveColo
|
|||||||
import { GroupSaveInformationComposer } from './messages/outgoing/group/GroupSaveInformationComposer';
|
import { GroupSaveInformationComposer } from './messages/outgoing/group/GroupSaveInformationComposer';
|
||||||
import { GroupSavePreferencesComposer } from './messages/outgoing/group/GroupSavePreferencesComposer';
|
import { GroupSavePreferencesComposer } from './messages/outgoing/group/GroupSavePreferencesComposer';
|
||||||
import { GroupSettingsComposer } from './messages/outgoing/group/GroupSettingsComposer';
|
import { GroupSettingsComposer } from './messages/outgoing/group/GroupSettingsComposer';
|
||||||
|
import { AuthenticationMessageComposer } from './messages/outgoing/handshake/AuthenticationMessageComposer';
|
||||||
import { InfoRetrieveBaseMessageComposer } from './messages/outgoing/handshake/InfoRetrieveBaseMessageComposer';
|
import { InfoRetrieveBaseMessageComposer } from './messages/outgoing/handshake/InfoRetrieveBaseMessageComposer';
|
||||||
import { SecurityTicketComposer } from './messages/outgoing/handshake/SecurityTicketComposer';
|
import { SecurityTicketComposer } from './messages/outgoing/handshake/SecurityTicketComposer';
|
||||||
import { RequestBadgesComposer } from './messages/outgoing/inventory/badges/RequestBadgesComposer';
|
import { RequestBadgesComposer } from './messages/outgoing/inventory/badges/RequestBadgesComposer';
|
||||||
@ -280,6 +306,8 @@ import { TradingListAddItemsComposer } from './messages/outgoing/inventory/tradi
|
|||||||
import { TradingListItemRemoveComposer } from './messages/outgoing/inventory/trading/TradingListRemoveItemComposer';
|
import { TradingListItemRemoveComposer } from './messages/outgoing/inventory/trading/TradingListRemoveItemComposer';
|
||||||
import { TradingOpenComposer } from './messages/outgoing/inventory/trading/TradingOpenComposer';
|
import { TradingOpenComposer } from './messages/outgoing/inventory/trading/TradingOpenComposer';
|
||||||
import { TradingUnacceptComposer } from './messages/outgoing/inventory/trading/TradingUnacceptComposer';
|
import { TradingUnacceptComposer } from './messages/outgoing/inventory/trading/TradingUnacceptComposer';
|
||||||
|
import { GetPromoArticlesComposer } from './messages/outgoing/landingview/GetPromoArticlesComposer';
|
||||||
|
import { CommunityGoalVoteMessageComposer } from './messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer';
|
||||||
import { ModtoolChangeRoomSettingsComposer } from './messages/outgoing/modtool/ModtoolChangeRoomSettingsComposer';
|
import { ModtoolChangeRoomSettingsComposer } from './messages/outgoing/modtool/ModtoolChangeRoomSettingsComposer';
|
||||||
import { ModtoolEventAlertComposer } from './messages/outgoing/modtool/ModtoolEventAlertComposer';
|
import { ModtoolEventAlertComposer } from './messages/outgoing/modtool/ModtoolEventAlertComposer';
|
||||||
import { ModtoolRequestRoomChatlogComposer } from './messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer';
|
import { ModtoolRequestRoomChatlogComposer } from './messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer';
|
||||||
@ -306,6 +334,22 @@ import { NavigatorSettingsSaveComposer } from './messages/outgoing/navigator/Nav
|
|||||||
import { OutgoingHeader } from './messages/outgoing/OutgoingHeader';
|
import { OutgoingHeader } from './messages/outgoing/OutgoingHeader';
|
||||||
import { PetRespectComposer } from './messages/outgoing/pet/PetRespectComposer';
|
import { PetRespectComposer } from './messages/outgoing/pet/PetRespectComposer';
|
||||||
import { RequestPetInfoComposer } from './messages/outgoing/pet/RequestPetInfoComposer';
|
import { RequestPetInfoComposer } from './messages/outgoing/pet/RequestPetInfoComposer';
|
||||||
|
import { AcceptQuestMessageComposer } from './messages/outgoing/quest/AcceptQuestMessageComposer';
|
||||||
|
import { ActivateQuestMessageComposer } from './messages/outgoing/quest/ActivateQuestMessageComposer';
|
||||||
|
import { CancelQuestMessageComposer } from './messages/outgoing/quest/CancelQuestMessageComposer';
|
||||||
|
import { FriendRequestQuestCompleteMessageComposer } from './messages/outgoing/quest/FriendRequestQuestCompleteMessageComposer';
|
||||||
|
import { GetCommunityGoalEarnedPrizesMessageComposer } from './messages/outgoing/quest/GetCommunityGoalEarnedPrizesMessageComposer';
|
||||||
|
import { GetCommunityGoalHallOfFameMessageComposer } from './messages/outgoing/quest/GetCommunityGoalHallOfFameMessageComposer';
|
||||||
|
import { GetCommunityGoalProgressMessageComposer } from './messages/outgoing/quest/GetCommunityGoalProgressMessageComposer';
|
||||||
|
import { GetConcurrentUsersGoalProgressMessageComposer } from './messages/outgoing/quest/GetConcurrentUsersGoalProgressMessageComposer';
|
||||||
|
import { GetConcurrentUsersRewardMessageComposer } from './messages/outgoing/quest/GetConcurrentUsersRewardMessageComposer';
|
||||||
|
import { GetDailyQuestMessageComposer } from './messages/outgoing/quest/GetDailyQuestMessageComposer';
|
||||||
|
import { GetQuestsMessageComposer } from './messages/outgoing/quest/GetQuestsMessageComposer';
|
||||||
|
import { GetSeasonalQuestsOnlyMessageComposer } from './messages/outgoing/quest/GetSeasonalQuestsOnlyMessageComposer';
|
||||||
|
import { OpenQuestTrackerMessageComposer } from './messages/outgoing/quest/OpenQuestTrackerMessageComposer';
|
||||||
|
import { RedeemCommunityGoalPrizeMessageComposer } from './messages/outgoing/quest/RedeemCommunityGoalPrizeMessageComposer';
|
||||||
|
import { RejectQuestMessageComposer } from './messages/outgoing/quest/RejectQuestMessageComposer';
|
||||||
|
import { StartCampaignMessageComposer } from './messages/outgoing/quest/StartCampaignMessageComposer';
|
||||||
import { RoomDoorbellAccessComposer } from './messages/outgoing/room/access/RoomDoorbellAccessComposer';
|
import { RoomDoorbellAccessComposer } from './messages/outgoing/room/access/RoomDoorbellAccessComposer';
|
||||||
import { RoomEnterComposer } from './messages/outgoing/room/access/RoomEnterComposer';
|
import { RoomEnterComposer } from './messages/outgoing/room/access/RoomEnterComposer';
|
||||||
import { RoomAmbassadorAlertComposer } from './messages/outgoing/room/action/RoomAmbassadorAlertComposer';
|
import { RoomAmbassadorAlertComposer } from './messages/outgoing/room/action/RoomAmbassadorAlertComposer';
|
||||||
@ -319,6 +363,10 @@ import { RoomStaffPickComposer } from './messages/outgoing/room/action/RoomStaff
|
|||||||
import { RoomTakeRightsComposer } from './messages/outgoing/room/action/RoomTakeRightsComposer';
|
import { RoomTakeRightsComposer } from './messages/outgoing/room/action/RoomTakeRightsComposer';
|
||||||
import { RoomUnbanUserComposer } from './messages/outgoing/room/action/RoomUnbanUserComposer';
|
import { RoomUnbanUserComposer } from './messages/outgoing/room/action/RoomUnbanUserComposer';
|
||||||
import { RequestBotCommandConfigurationComposer } from './messages/outgoing/room/bots/RequestBotConfigurationComposer';
|
import { RequestBotCommandConfigurationComposer } from './messages/outgoing/room/bots/RequestBotConfigurationComposer';
|
||||||
|
import { RoomWidgetCameraConfigurationComposer } from './messages/outgoing/room/camera/RoomWidgetCameraConfigurationComposer';
|
||||||
|
import { RoomWidgetCameraPublishComposer } from './messages/outgoing/room/camera/RoomWidgetCameraPublishComposer';
|
||||||
|
import { RoomWidgetCameraRoomPictureComposer } from './messages/outgoing/room/camera/RoomWidgetCameraRoomPictureComposer';
|
||||||
|
import { RoomWidgetCameraRoomThumbnailComposer } from './messages/outgoing/room/camera/RoomWidgetCameraRoomThumbnailComposer';
|
||||||
import { RoomBannedUsersComposer } from './messages/outgoing/room/data/RoomBannedUsersComposer';
|
import { RoomBannedUsersComposer } from './messages/outgoing/room/data/RoomBannedUsersComposer';
|
||||||
import { RoomInfoComposer } from './messages/outgoing/room/data/RoomInfoComposer';
|
import { RoomInfoComposer } from './messages/outgoing/room/data/RoomInfoComposer';
|
||||||
import { RoomSettingsComposer } from './messages/outgoing/room/data/RoomSettingsComposer';
|
import { RoomSettingsComposer } from './messages/outgoing/room/data/RoomSettingsComposer';
|
||||||
@ -420,12 +468,15 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
private registerEvents(): void
|
private registerEvents(): void
|
||||||
{
|
{
|
||||||
|
// AUTHENTICATION
|
||||||
|
this._events.set(IncomingHeader.AUTHENTICATION, AuthenticationEvent);
|
||||||
|
|
||||||
// AVAILABILITY
|
// AVAILABILITY
|
||||||
this._events.set(IncomingHeader.AVAILABILITY_STATUS, AvailabilityStatusMessageEvent);
|
this._events.set(IncomingHeader.AVAILABILITY_STATUS, AvailabilityStatusMessageEvent);
|
||||||
this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent);
|
this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent);
|
||||||
|
|
||||||
// AVATAR
|
// AVATAR
|
||||||
this._events.set(IncomingHeader.USER_CHANGE_NAME, ChangeNameUpdateEvent);
|
this._events.set(IncomingHeader.USER_CHANGE_NAME, ChangeUserNameResultMessageEvent);
|
||||||
|
|
||||||
// CATALOG
|
// CATALOG
|
||||||
this._events.set(IncomingHeader.CATALOG_CLUB, CatalogClubEvent);
|
this._events.set(IncomingHeader.CATALOG_CLUB, CatalogClubEvent);
|
||||||
@ -445,6 +496,12 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.REDEEM_VOUCHER_OK, CatalogRedeemVoucherOkEvent);
|
this._events.set(IncomingHeader.REDEEM_VOUCHER_OK, CatalogRedeemVoucherOkEvent);
|
||||||
this._events.set(IncomingHeader.CATALOG_RECEIVE_PET_BREEDS, SellablePetPalettesEvent);
|
this._events.set(IncomingHeader.CATALOG_RECEIVE_PET_BREEDS, SellablePetPalettesEvent);
|
||||||
this._events.set(IncomingHeader.CATALOG_APPROVE_NAME_RESULT, CatalogApproveNameResultEvent);
|
this._events.set(IncomingHeader.CATALOG_APPROVE_NAME_RESULT, CatalogApproveNameResultEvent);
|
||||||
|
this._events.set(IncomingHeader.BONUS_RARE_INFO, BonusRareInfoMessageEvent);
|
||||||
|
|
||||||
|
// CAMERA
|
||||||
|
this._events.set(IncomingHeader.CAMERA_PRICE, RoomWidgetCameraConfigurationEvent);
|
||||||
|
this._events.set(IncomingHeader.CAMERA_PUBLISHED, RoomWidgetCameraPublishedEvent);
|
||||||
|
this._events.set(IncomingHeader.CAMERA_PURCHASE_SUCCESSFUL, RoomWidgetCameraPurchaseSuccessfulEvent);
|
||||||
|
|
||||||
// CLIENT
|
// CLIENT
|
||||||
this._events.set(IncomingHeader.CLIENT_PING, ClientPingEvent);
|
this._events.set(IncomingHeader.CLIENT_PING, ClientPingEvent);
|
||||||
@ -525,6 +582,9 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.MODTOOL_USER_CHATLOG, ModtoolUserChatlogEvent);
|
this._events.set(IncomingHeader.MODTOOL_USER_CHATLOG, ModtoolUserChatlogEvent);
|
||||||
this._events.set(IncomingHeader.MODTOOL_ROOM_CHATLOG, ModtoolRoomChatlogEvent);
|
this._events.set(IncomingHeader.MODTOOL_ROOM_CHATLOG, ModtoolRoomChatlogEvent);
|
||||||
|
|
||||||
|
// MYSTERY BOX
|
||||||
|
this._events.set(IncomingHeader.MYSTERY_BOX_KEYS, MysteryBoxKeysEvent);
|
||||||
|
|
||||||
// NAVIGATOR
|
// NAVIGATOR
|
||||||
this._events.set(IncomingHeader.NAVIGATOR_CATEGORIES, NavigatorCategoriesEvent);
|
this._events.set(IncomingHeader.NAVIGATOR_CATEGORIES, NavigatorCategoriesEvent);
|
||||||
this._events.set(IncomingHeader.NAVIGATOR_COLLAPSED, NavigatorCollapsedEvent);
|
this._events.set(IncomingHeader.NAVIGATOR_COLLAPSED, NavigatorCollapsedEvent);
|
||||||
@ -593,6 +653,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.LOVELOCK_FURNI_FINISHED, LoveLockFurniFinishedEvent);
|
this._events.set(IncomingHeader.LOVELOCK_FURNI_FINISHED, LoveLockFurniFinishedEvent);
|
||||||
this._events.set(IncomingHeader.LOVELOCK_FURNI_FRIEND_COMFIRMED, LoveLockFurniFriendConfirmedEvent);
|
this._events.set(IncomingHeader.LOVELOCK_FURNI_FRIEND_COMFIRMED, LoveLockFurniFriendConfirmedEvent);
|
||||||
this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent);
|
this._events.set(IncomingHeader.LOVELOCK_FURNI_START, LoveLockFurniStartEvent);
|
||||||
|
this._events.set(IncomingHeader.OBJECTS_DATA_UPDATE, ObjectsDataUpdateEvent);
|
||||||
|
|
||||||
// FLOOR
|
// FLOOR
|
||||||
this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent);
|
this._events.set(IncomingHeader.FURNITURE_FLOOR_ADD, FurnitureFloorAddEvent);
|
||||||
@ -619,6 +680,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
// PET
|
// PET
|
||||||
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
||||||
this._events.set(IncomingHeader.PET_INFO, PetInfoEvent);
|
this._events.set(IncomingHeader.PET_INFO, PetInfoEvent);
|
||||||
|
this._events.set(IncomingHeader.PET_EXPERIENCE, PetExperienceEvent);
|
||||||
|
|
||||||
// SESSION
|
// SESSION
|
||||||
this._events.set(IncomingHeader.PLAYING_GAME, YouArePlayingGameEvent);
|
this._events.set(IncomingHeader.PLAYING_GAME, YouArePlayingGameEvent);
|
||||||
@ -664,6 +726,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// BADGES
|
// BADGES
|
||||||
this._events.set(IncomingHeader.USER_BADGES, BadgesEvent);
|
this._events.set(IncomingHeader.USER_BADGES, BadgesEvent);
|
||||||
|
this._events.set(IncomingHeader.USER_BADGES_ADD, BadgeReceivedEvent);
|
||||||
|
|
||||||
// ACCESS
|
// ACCESS
|
||||||
this._events.set(IncomingHeader.USER_PERKS, UserPerksEvent);
|
this._events.set(IncomingHeader.USER_PERKS, UserPerksEvent);
|
||||||
@ -679,7 +742,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.MESSENGER_RELATIONSHIPS, UserRelationshipsEvent);
|
this._events.set(IncomingHeader.MESSENGER_RELATIONSHIPS, UserRelationshipsEvent);
|
||||||
|
|
||||||
// GIFTS
|
// GIFTS
|
||||||
this._events.set(IncomingHeader.GIFT_OPENED, FurnitureGiftOpenedEvent);
|
this._events.set(IncomingHeader.GIFT_OPENED, PresentOpenedMessageEvent);
|
||||||
|
|
||||||
// INVENTORY
|
// INVENTORY
|
||||||
this._events.set(IncomingHeader.GIFT_RECEIVER_NOT_FOUND, CatalogGiftUsernameUnavailableEvent);
|
this._events.set(IncomingHeader.GIFT_RECEIVER_NOT_FOUND, CatalogGiftUsernameUnavailableEvent);
|
||||||
@ -723,11 +786,37 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelItemEvent);
|
this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelItemEvent);
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceItemPostedEvent);
|
this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceItemPostedEvent);
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketplaceOffersReceivedEvent);
|
this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketplaceOffersReceivedEvent);
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceAfterOrderStatusEvent);
|
this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceBuyOfferResultEvent);
|
||||||
|
|
||||||
|
// LANDING VIEW
|
||||||
|
this._events.set(IncomingHeader.COMMUNITY_GOAL_VOTE_EVENT, CommunityGoalVoteMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.PROMO_ARTICLES, PromoArticlesMessageEvent);
|
||||||
|
|
||||||
|
// QUESTS
|
||||||
|
this._events.set(IncomingHeader.COMMUNITY_GOAL_EARNED_PRIZES, CommunityGoalEarnedPrizesMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.COMMUNITY_GOAL_PROGRESS, CommunityGoalProgressMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.CONCURRENT_USERS_GOAL_PROGRESS, ConcurrentUsersGoalProgressMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.QUEST_DAILY, QuestDailyMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.QUEST_CANCELLED, QuestCancelledMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.QUEST_COMPLETED, QuestCompletedMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.COMMUNITY_GOAL_HALL_OF_FAME, CommunityGoalHallOfFameMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.EPIC_POPUP, EpicPopupMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.SEASONAL_QUESTS, SeasonalQuestsMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.QUESTS, QuestsMessageEvent);
|
||||||
|
this._events.set(IncomingHeader.QUEST, QuestMessageEvent);
|
||||||
|
|
||||||
|
// CRAFTING
|
||||||
|
this._events.set(IncomingHeader.CRAFTABLE_PRODUCTS, CraftableProductsEvent);
|
||||||
|
this._events.set(IncomingHeader.CRAFTING_RECIPE, CraftingRecipeEvent);
|
||||||
|
this._events.set(IncomingHeader.CRAFTING_RECIPES_AVAILABLE, CraftingRecipesAvailableEvent);
|
||||||
|
this._events.set(IncomingHeader.CRAFTING_RESULT, CraftingResultEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private registerComposers(): void
|
private registerComposers(): void
|
||||||
{
|
{
|
||||||
|
// AUTHENTICATION
|
||||||
|
this._composers.set(OutgoingHeader.AUTHENTICATION, AuthenticationMessageComposer);
|
||||||
|
|
||||||
// CATALOG
|
// CATALOG
|
||||||
this._composers.set(OutgoingHeader.CATALOG_MODE, CatalogModeComposer);
|
this._composers.set(OutgoingHeader.CATALOG_MODE, CatalogModeComposer);
|
||||||
this._composers.set(OutgoingHeader.CATALOG_PAGE, CatalogPageComposer);
|
this._composers.set(OutgoingHeader.CATALOG_PAGE, CatalogPageComposer);
|
||||||
@ -742,6 +831,14 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.GIFT_CONFIG, CatalogRequestGiftConfigurationComposer);
|
this._composers.set(OutgoingHeader.GIFT_CONFIG, CatalogRequestGiftConfigurationComposer);
|
||||||
this._composers.set(OutgoingHeader.CATALOG_SELECT_VIP_GIFT, CatalogSelectClubGiftComposer);
|
this._composers.set(OutgoingHeader.CATALOG_SELECT_VIP_GIFT, CatalogSelectClubGiftComposer);
|
||||||
this._composers.set(OutgoingHeader.CATALOG_REQUESET_PET_BREEDS, CatalogRequestPetBreedsComposer);
|
this._composers.set(OutgoingHeader.CATALOG_REQUESET_PET_BREEDS, CatalogRequestPetBreedsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_BONUS_RARE_INFO, GetBonusRareInfoMessageComposer);
|
||||||
|
|
||||||
|
// CAMERA
|
||||||
|
this._composers.set(OutgoingHeader.CAMERA_PRICE, RoomWidgetCameraConfigurationComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CAMERA_PUBLISH, RoomWidgetCameraPublishComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CAMERA_PURCHASE, RoomWidgetCameraPurchaseComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CAMERA_SAVE, RoomWidgetCameraRoomPictureComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CAMERA_THUMBNAIL, RoomWidgetCameraRoomThumbnailComposer);
|
||||||
|
|
||||||
// CLIENT
|
// CLIENT
|
||||||
this._composers.set(OutgoingHeader.CLIENT_PONG, ClientPongComposer);
|
this._composers.set(OutgoingHeader.CLIENT_PONG, ClientPongComposer);
|
||||||
@ -804,17 +901,25 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// INVENTORY
|
// INVENTORY
|
||||||
|
|
||||||
// MARKETPLACE
|
//// BADGES
|
||||||
this._composers.set(OutgoingHeader.REQUEST_SELL_ITEM, RequestSellItemComposer);
|
this._composers.set(OutgoingHeader.USER_BADGES, RequestBadgesComposer);
|
||||||
this._composers.set(OutgoingHeader.REQUEST_MARKETPLACE_ITEM_STATS, MarketplaceRequesstItemStatsComposer);
|
this._composers.set(OutgoingHeader.USER_BADGES_CURRENT_UPDATE, SetActivatedBadgesComposer);
|
||||||
this._composers.set(OutgoingHeader.MARKETPLACE_REDEEM_CREDITS, MarketplaceRedeemCreditsComposer);
|
|
||||||
|
|
||||||
// FURNI
|
//// BOTS
|
||||||
|
this._composers.set(OutgoingHeader.USER_BOTS, GetBotInventoryComposer);
|
||||||
|
|
||||||
|
//// FURNI
|
||||||
this._composers.set(OutgoingHeader.USER_FURNITURE, FurnitureListComposer);
|
this._composers.set(OutgoingHeader.USER_FURNITURE, FurnitureListComposer);
|
||||||
this._composers.set(OutgoingHeader.USER_FURNITURE2, FurnitureList2Composer);
|
this._composers.set(OutgoingHeader.USER_FURNITURE2, FurnitureList2Composer);
|
||||||
this._composers.set(OutgoingHeader.ITEM_SAVE_BACKGROUND, RoomAdsUpdateComposer);
|
|
||||||
|
|
||||||
// TRADING
|
//// MARKETPLACE
|
||||||
|
this._composers.set(OutgoingHeader.REQUEST_SELL_ITEM, RequestSellItemComposer);
|
||||||
|
this._composers.set(OutgoingHeader.REQUEST_MARKETPLACE_ITEM_STATS, MarketplaceRequesstItemStatsComposer);
|
||||||
|
|
||||||
|
//// PETS
|
||||||
|
this._composers.set(OutgoingHeader.USER_PETS, RequestPetsComposer);
|
||||||
|
|
||||||
|
//// TRADING
|
||||||
this._composers.set(OutgoingHeader.TRADE_ACCEPT, TradingAcceptComposer);
|
this._composers.set(OutgoingHeader.TRADE_ACCEPT, TradingAcceptComposer);
|
||||||
this._composers.set(OutgoingHeader.TRADE_CANCEL, TradingCancelComposer);
|
this._composers.set(OutgoingHeader.TRADE_CANCEL, TradingCancelComposer);
|
||||||
this._composers.set(OutgoingHeader.TRADE_CLOSE, TradingCloseComposer);
|
this._composers.set(OutgoingHeader.TRADE_CLOSE, TradingCloseComposer);
|
||||||
@ -825,12 +930,22 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.TRADE, TradingOpenComposer);
|
this._composers.set(OutgoingHeader.TRADE, TradingOpenComposer);
|
||||||
this._composers.set(OutgoingHeader.TRADE_UNACCEPT, TradingUnacceptComposer);
|
this._composers.set(OutgoingHeader.TRADE_UNACCEPT, TradingUnacceptComposer);
|
||||||
|
|
||||||
|
//// UNSEEN
|
||||||
|
this._composers.set(OutgoingHeader.UNSEEN_RESET_CATEGORY, UnseenResetCategoryComposer);
|
||||||
|
this._composers.set(OutgoingHeader.UNSEEN_RESET_ITEMS, UnseenResetItemsComposer);
|
||||||
|
|
||||||
// ACHIVEMENTS
|
// ACHIVEMENTS
|
||||||
this._composers.set(OutgoingHeader.ACHIEVEMENT_LIST, RequestAchievementsMessageComposer);
|
this._composers.set(OutgoingHeader.ACHIEVEMENT_LIST, RequestAchievementsMessageComposer);
|
||||||
|
|
||||||
// PET
|
// PET
|
||||||
|
this._composers.set(OutgoingHeader.PET_MOUNT, PetMountComposer);
|
||||||
this._composers.set(OutgoingHeader.PET_RESPECT, PetRespectComposer);
|
this._composers.set(OutgoingHeader.PET_RESPECT, PetRespectComposer);
|
||||||
|
this._composers.set(OutgoingHeader.PET_SUPPLEMENT, PetSupplementComposer);
|
||||||
|
this._composers.set(OutgoingHeader.REMOVE_PET_SADDLE, RemovePetSaddleComposer);
|
||||||
this._composers.set(OutgoingHeader.PET_INFO, RequestPetInfoComposer);
|
this._composers.set(OutgoingHeader.PET_INFO, RequestPetInfoComposer);
|
||||||
|
this._composers.set(OutgoingHeader.TOGGLE_PET_BREEDING, TogglePetBreedingComposer);
|
||||||
|
this._composers.set(OutgoingHeader.TOGGLE_PET_RIDING, TogglePetRidingComposer);
|
||||||
|
this._composers.set(OutgoingHeader.USE_PET_PRODUCT, UsePetProductComposer);
|
||||||
|
|
||||||
// ROOM
|
// ROOM
|
||||||
this._composers.set(OutgoingHeader.ROOM_CREATE, RoomCreateComposer);
|
this._composers.set(OutgoingHeader.ROOM_CREATE, RoomCreateComposer);
|
||||||
@ -875,6 +990,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// FURNITURE
|
// FURNITURE
|
||||||
this._composers.set(OutgoingHeader.FURNITURE_ALIASES, FurnitureAliasesComposer);
|
this._composers.set(OutgoingHeader.FURNITURE_ALIASES, FurnitureAliasesComposer);
|
||||||
|
this._composers.set(OutgoingHeader.FURNITURE_GUILD_INFO, FurnitureGuildInfoComposer);
|
||||||
this._composers.set(OutgoingHeader.FURNITURE_PICKUP, FurniturePickupComposer);
|
this._composers.set(OutgoingHeader.FURNITURE_PICKUP, FurniturePickupComposer);
|
||||||
this._composers.set(OutgoingHeader.FURNITURE_PLACE, FurniturePlaceComposer);
|
this._composers.set(OutgoingHeader.FURNITURE_PLACE, FurniturePlaceComposer);
|
||||||
this._composers.set(OutgoingHeader.ITEM_PAINT, FurniturePlacePaintComposer);
|
this._composers.set(OutgoingHeader.ITEM_PAINT, FurniturePlacePaintComposer);
|
||||||
@ -905,6 +1021,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.ONE_WAY_DOOR_CLICK, FurnitureOneWayDoorComposer);
|
this._composers.set(OutgoingHeader.ONE_WAY_DOOR_CLICK, FurnitureOneWayDoorComposer);
|
||||||
this._composers.set(OutgoingHeader.ITEM_EXCHANGE_REDEEM, FurnitureExchangeComposer);
|
this._composers.set(OutgoingHeader.ITEM_EXCHANGE_REDEEM, FurnitureExchangeComposer);
|
||||||
this._composers.set(OutgoingHeader.ITEM_CLOTHING_REDEEM, RedeemItemClothingComposer);
|
this._composers.set(OutgoingHeader.ITEM_CLOTHING_REDEEM, RedeemItemClothingComposer);
|
||||||
|
this._composers.set(OutgoingHeader.ITEM_SAVE_BACKGROUND, RoomAdsUpdateComposer);
|
||||||
|
|
||||||
// MAPPING
|
// MAPPING
|
||||||
this._composers.set(OutgoingHeader.ROOM_MODEL, RoomModelComposer);
|
this._composers.set(OutgoingHeader.ROOM_MODEL, RoomModelComposer);
|
||||||
@ -917,6 +1034,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.UNIT_DANCE, RoomUnitDanceComposer);
|
this._composers.set(OutgoingHeader.UNIT_DANCE, RoomUnitDanceComposer);
|
||||||
this._composers.set(OutgoingHeader.UNIT_DROP_HAND_ITEM, RoomUnitDropHandItemComposer);
|
this._composers.set(OutgoingHeader.UNIT_DROP_HAND_ITEM, RoomUnitDropHandItemComposer);
|
||||||
this._composers.set(OutgoingHeader.UNIT_GIVE_HANDITEM, RoomUnitGiveHandItemComposer);
|
this._composers.set(OutgoingHeader.UNIT_GIVE_HANDITEM, RoomUnitGiveHandItemComposer);
|
||||||
|
this._composers.set(OutgoingHeader.UNIT_GIVE_HANDITEM_PET, RoomUnitGiveHandItemPetComposer);
|
||||||
this._composers.set(OutgoingHeader.UNIT_LOOK, RoomUnitLookComposer);
|
this._composers.set(OutgoingHeader.UNIT_LOOK, RoomUnitLookComposer);
|
||||||
this._composers.set(OutgoingHeader.UNIT_SIGN, RoomUnitSignComposer);
|
this._composers.set(OutgoingHeader.UNIT_SIGN, RoomUnitSignComposer);
|
||||||
this._composers.set(OutgoingHeader.UNIT_POSTURE, RoomUnitPostureComposer);
|
this._composers.set(OutgoingHeader.UNIT_POSTURE, RoomUnitPostureComposer);
|
||||||
@ -970,14 +1088,11 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.MARKETPLACE_TAKE_BACK_ITEM, MarketplaceTakeItemBackComposer);
|
this._composers.set(OutgoingHeader.MARKETPLACE_TAKE_BACK_ITEM, MarketplaceTakeItemBackComposer);
|
||||||
this._composers.set(OutgoingHeader.MARKETPLACE_REQUEST_OFFERS, MarketplaceRequestOffersComposer);
|
this._composers.set(OutgoingHeader.MARKETPLACE_REQUEST_OFFERS, MarketplaceRequestOffersComposer);
|
||||||
this._composers.set(OutgoingHeader.MARKETPLACE_BUY_OFFER, MarketplaceBuyOfferComposer);
|
this._composers.set(OutgoingHeader.MARKETPLACE_BUY_OFFER, MarketplaceBuyOfferComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_REDEEM_CREDITS, MarketplaceRedeemCreditsComposer);
|
||||||
|
|
||||||
// BOTS
|
// BOTS
|
||||||
this._composers.set(OutgoingHeader.USER_BOTS, GetBotInventoryComposer);
|
this._composers.set(OutgoingHeader.USER_BOTS, GetBotInventoryComposer);
|
||||||
|
|
||||||
// BADGES
|
|
||||||
this._composers.set(OutgoingHeader.USER_BADGES, RequestBadgesComposer);
|
|
||||||
this._composers.set(OutgoingHeader.USER_BADGES_CURRENT_UPDATE, SetActivatedBadgesComposer);
|
|
||||||
|
|
||||||
// PETS
|
// PETS
|
||||||
this._composers.set(OutgoingHeader.USER_PETS, RequestPetsComposer);
|
this._composers.set(OutgoingHeader.USER_PETS, RequestPetsComposer);
|
||||||
|
|
||||||
@ -1011,6 +1126,35 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._composers.set(OutgoingHeader.USER_SETTINGS_OLD_CHAT, UserSettingsOldChatComposer);
|
this._composers.set(OutgoingHeader.USER_SETTINGS_OLD_CHAT, UserSettingsOldChatComposer);
|
||||||
this._composers.set(OutgoingHeader.USER_SETTINGS_INVITES, UserSettingsRoomInvitesComposer);
|
this._composers.set(OutgoingHeader.USER_SETTINGS_INVITES, UserSettingsRoomInvitesComposer);
|
||||||
this._composers.set(OutgoingHeader.USER_SETTINGS_VOLUME, UserSettingsSoundComposer);
|
this._composers.set(OutgoingHeader.USER_SETTINGS_VOLUME, UserSettingsSoundComposer);
|
||||||
|
|
||||||
|
// LANDING VIEW
|
||||||
|
this._composers.set(OutgoingHeader.COMMUNITY_GOAL_VOTE_COMPOSER, CommunityGoalVoteMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_PROMO_ARTICLES, GetPromoArticlesComposer);
|
||||||
|
|
||||||
|
// QUEST
|
||||||
|
this._composers.set(OutgoingHeader.ACCEPT_QUEST, AcceptQuestMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.ACTIVATE_QUEST, ActivateQuestMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CANCEL_QUEST, CancelQuestMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.FRIEND_REQUEST_QUEST_COMPLETE, FriendRequestQuestCompleteMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_COMMUNITY_GOAL_EARNED_PRIZES, GetCommunityGoalEarnedPrizesMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_COMMUNITY_GOAL_HALL_OF_FAME, GetCommunityGoalHallOfFameMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_COMMUNITY_GOAL_PROGRESS, GetCommunityGoalProgressMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_CONCURRENT_USERS_GOAL_PROGRESS, GetConcurrentUsersGoalProgressMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_CONCURRENT_USERS_REWARD, GetConcurrentUsersRewardMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_DAILY_QUEST, GetDailyQuestMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_QUESTS, GetQuestsMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_SEASONAL_QUESTS_ONLY, GetSeasonalQuestsOnlyMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.OPEN_QUEST_TRACKER, OpenQuestTrackerMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.REDEEM_COMMUNITY_GOAL_PRIZE, RedeemCommunityGoalPrizeMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.REJECT_QUEST, RejectQuestMessageComposer);
|
||||||
|
this._composers.set(OutgoingHeader.START_CAMPAIGN, StartCampaignMessageComposer);
|
||||||
|
|
||||||
|
// CRAFTING
|
||||||
|
this._composers.set(OutgoingHeader.CRAFT, CraftComposer);
|
||||||
|
this._composers.set(OutgoingHeader.CRAFT_SECRET, CraftSecretComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_CRAFTABLE_PRODUCTS, GetCraftableProductsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_CRAFTING_RECIPE, GetCraftingRecipeComposer);
|
||||||
|
this._composers.set(OutgoingHeader.GET_CRAFTING_RECIPES_AVAILABLE, GetCraftingRecipesAvailableComposer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get events(): Map<number, Function>
|
public get events(): Map<number, Function>
|
||||||
|
@ -2,9 +2,12 @@ export class IncomingHeader
|
|||||||
{
|
{
|
||||||
public static ACHIEVEMENT_LIST = 305;
|
public static ACHIEVEMENT_LIST = 305;
|
||||||
public static AUTHENTICATED = 2491;
|
public static AUTHENTICATED = 2491;
|
||||||
|
public static AUTHENTICATION = -1;
|
||||||
public static AVAILABILITY_STATUS = 2033;
|
public static AVAILABILITY_STATUS = 2033;
|
||||||
public static BUILDERS_CLUB_EXPIRED = 1452;
|
public static BUILDERS_CLUB_EXPIRED = 1452;
|
||||||
public static CAMERA_PRICE = 3878;
|
public static CAMERA_PRICE = 3878;
|
||||||
|
public static CAMERA_PUBLISHED = 2057;
|
||||||
|
public static CAMERA_PURCHASE_SUCCESSFUL = 2783;
|
||||||
public static CAMERA_THUMBNAIL_SAVED = 3595;
|
public static CAMERA_THUMBNAIL_SAVED = 3595;
|
||||||
public static CAMERA_URL = 3696;
|
public static CAMERA_URL = 3696;
|
||||||
public static CATALOG_CLUB = 2405;
|
public static CATALOG_CLUB = 2405;
|
||||||
@ -138,7 +141,7 @@ export class IncomingHeader
|
|||||||
public static ROOM_THICKNESS = 3547;
|
public static ROOM_THICKNESS = 3547;
|
||||||
public static SECURITY_DEBUG = 3284;
|
public static SECURITY_DEBUG = 3284;
|
||||||
public static SECURITY_MACHINE = 1488;
|
public static SECURITY_MACHINE = 1488;
|
||||||
public static SECURITY_UNKNOWN2 = 2833;
|
public static MYSTERY_BOX_KEYS = 2833;
|
||||||
public static TRADE_ACCEPTED = 2568;
|
public static TRADE_ACCEPTED = 2568;
|
||||||
public static TRADE_CLOSED = 1373;
|
public static TRADE_CLOSED = 1373;
|
||||||
public static TRADE_COMPLETED = 1001;
|
public static TRADE_COMPLETED = 1001;
|
||||||
@ -247,4 +250,24 @@ export class IncomingHeader
|
|||||||
public static MARKETPLACE_AFTER_ORDER_STATUS = 2032;
|
public static MARKETPLACE_AFTER_ORDER_STATUS = 2032;
|
||||||
public static CATALOG_RECEIVE_PET_BREEDS = 3331;
|
public static CATALOG_RECEIVE_PET_BREEDS = 3331;
|
||||||
public static CATALOG_APPROVE_NAME_RESULT = 1503;
|
public static CATALOG_APPROVE_NAME_RESULT = 1503;
|
||||||
|
public static OBJECTS_DATA_UPDATE = 1453;
|
||||||
|
public static PET_EXPERIENCE = 2156;
|
||||||
|
public static COMMUNITY_GOAL_VOTE_EVENT = 1435;
|
||||||
|
public static PROMO_ARTICLES = 286;
|
||||||
|
public static COMMUNITY_GOAL_EARNED_PRIZES = 3319;
|
||||||
|
public static COMMUNITY_GOAL_PROGRESS = 2525;
|
||||||
|
public static CONCURRENT_USERS_GOAL_PROGRESS = 2737;
|
||||||
|
public static QUEST_DAILY = 1878;
|
||||||
|
public static QUEST_CANCELLED = 3027;
|
||||||
|
public static QUEST_COMPLETED = 949;
|
||||||
|
public static COMMUNITY_GOAL_HALL_OF_FAME = 3005;
|
||||||
|
public static EPIC_POPUP = 3945;
|
||||||
|
public static SEASONAL_QUESTS = 1122;
|
||||||
|
public static QUESTS = 3625;
|
||||||
|
public static QUEST = 230;
|
||||||
|
public static BONUS_RARE_INFO = 1533;
|
||||||
|
public static CRAFTABLE_PRODUCTS = 1000;
|
||||||
|
public static CRAFTING_RECIPE = 2774;
|
||||||
|
public static CRAFTING_RECIPES_AVAILABLE = 2124;
|
||||||
|
public static CRAFTING_RESULT = 618;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user