mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-30 03:00:51 +01:00
More changes
This commit is contained in:
parent
dbf3e8c107
commit
5c0ed553e0
@ -1,4 +1,4 @@
|
||||
import { IDisposable } from '../../api';
|
||||
import { IDisposable } from '../../common';
|
||||
|
||||
export interface IAvatarEffectListener extends IDisposable
|
||||
{
|
@ -1,11 +1,10 @@
|
||||
import { RenderTexture } from '@pixi/core';
|
||||
import { Sprite } from '@pixi/sprite';
|
||||
import { IDisposable, IGraphicAsset } from '../../api';
|
||||
import { IAnimationLayerData } from './animation/IAnimationLayerData';
|
||||
import { IAvatarDataContainer } from './animation/IAvatarDataContainer';
|
||||
import { ISpriteDataContainer } from './animation/ISpriteDataContainer';
|
||||
import { IGraphicAsset } from '../../asset';
|
||||
import { IDisposable } from '../../common';
|
||||
import { IAnimationLayerData, IAvatarDataContainer, ISpriteDataContainer } from './animation';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IPartColor } from './structure/figure/IPartColor';
|
||||
import { IPartColor } from './structure';
|
||||
|
||||
export interface IAvatarImage extends IDisposable
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
import { IDisposable } from '../../api';
|
||||
import { IDisposable } from '../../common';
|
||||
|
||||
export interface IAvatarImageListener extends IDisposable
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
import { IAssetManager, IGraphicAsset, INitroManager } from '../../api';
|
||||
import { AvatarAssetDownloadManager } from './AvatarAssetDownloadManager';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
import { AvatarAssetDownloadManager, AvatarStructure } from '../../../nitro';
|
||||
import { IAssetManager, IGraphicAsset } from '../../asset';
|
||||
import { INitroManager } from '../../common';
|
||||
import { IAvatarEffectListener } from './IAvatarEffectListener';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarImage } from './IAvatarImage';
|
||||
import { IAvatarImageListener } from './IAvatarImageListener';
|
||||
import { IStructureData } from './structure/IStructureData';
|
||||
import { IStructureData } from './structure';
|
||||
|
||||
export interface IAvatarRenderManager extends INitroManager
|
||||
{
|
@ -1,4 +1,3 @@
|
||||
|
||||
export interface IActionDefinition
|
||||
{
|
||||
id: string;
|
2
src/api/nitro/avatar/actions/index.ts
Normal file
2
src/api/nitro/avatar/actions/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './IActionDefinition';
|
||||
export * from './IActiveActionData';
|
@ -1,4 +1,4 @@
|
||||
import { IActiveActionData } from '../actions/IActiveActionData';
|
||||
import { IActiveActionData } from '../actions';
|
||||
|
||||
export interface IAnimationLayerData
|
||||
{
|
5
src/api/nitro/avatar/animation/index.ts
Normal file
5
src/api/nitro/avatar/animation/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export * from './IAnimation';
|
||||
export * from './IAnimationLayerData';
|
||||
export * from './IAnimationManager';
|
||||
export * from './IAvatarDataContainer';
|
||||
export * from './ISpriteDataContainer';
|
@ -1 +1,12 @@
|
||||
export * from './actions';
|
||||
export * from './animation';
|
||||
export * from './enum';
|
||||
export * from './figuredata';
|
||||
export * from './IAvatarEffectListener';
|
||||
export * from './IAvatarFigureContainer';
|
||||
export * from './IAvatarImage';
|
||||
export * from './IAvatarImageListener';
|
||||
export * from './IAvatarRenderManager';
|
||||
export * from './IOutfit';
|
||||
export * from './pet';
|
||||
export * from './structure';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IFigureData } from '../interfaces';
|
||||
import { IFigureData } from '../figuredata';
|
||||
|
||||
export interface IFigureSetData
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
import { AdvancedMap } from '../../../../core';
|
||||
import { IAdvancedMap } from '../../../IAdvancedMap';
|
||||
import { IPartColor } from './IPartColor';
|
||||
|
||||
export interface IPalette
|
||||
{
|
||||
getColor(id: number): IPartColor;
|
||||
id: number;
|
||||
colors: AdvancedMap<string, IPartColor>;
|
||||
colors: IAdvancedMap<string, IPartColor>;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IFigurePartSet } from './figure/IFigurePartSet';
|
||||
import { IPalette } from './figure/IPalette';
|
||||
import { ISetType } from './figure/ISetType';
|
||||
import { IFigurePartSet } from './IFigurePartSet';
|
||||
import { IPalette } from './IPalette';
|
||||
import { ISetType } from './ISetType';
|
||||
|
||||
export interface IStructureData
|
||||
{
|
7
src/api/nitro/avatar/structure/index.ts
Normal file
7
src/api/nitro/avatar/structure/index.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export * from './IFigurePart';
|
||||
export * from './IFigurePartSet';
|
||||
export * from './IFigureSetData';
|
||||
export * from './IPalette';
|
||||
export * from './IPartColor';
|
||||
export * from './ISetType';
|
||||
export * from './IStructureData';
|
@ -1,5 +1,10 @@
|
||||
export * from './avatar';
|
||||
export * from './avatar/actions';
|
||||
export * from './avatar/animation';
|
||||
export * from './avatar/enum';
|
||||
export * from './avatar/figuredata';
|
||||
export * from './avatar/pet';
|
||||
export * from './avatar/structure';
|
||||
export * from './camera';
|
||||
export * from './communication';
|
||||
export * from './enums';
|
||||
@ -12,3 +17,4 @@ export * from './room/object/data/type';
|
||||
export * from './room/utils';
|
||||
export * from './session';
|
||||
export * from './session/enum';
|
||||
export * from './sound';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { INitroManager } from '../../../api';
|
||||
|
||||
import { INitroManager } from '../../common';
|
||||
|
||||
export interface IMusicManager extends INitroManager
|
||||
{
|
7
src/api/nitro/sound/ISoundManager.ts
Normal file
7
src/api/nitro/sound/ISoundManager.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { INitroManager } from '../../common';
|
||||
import { IMusicManager } from './IMusicManager';
|
||||
|
||||
export interface ISoundManager extends INitroManager
|
||||
{
|
||||
musicManager: IMusicManager;
|
||||
}
|
2
src/api/nitro/sound/index.ts
Normal file
2
src/api/nitro/sound/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './IMusicManager';
|
||||
export * from './ISoundManager';
|
@ -2,6 +2,7 @@ import { BaseTexture, Resource, Texture } from '@pixi/core';
|
||||
import { Spritesheet } from '@pixi/spritesheet';
|
||||
import { Dict } from '@pixi/utils';
|
||||
import { IAsset, IAssetData, IAssetPalette, IGraphicAsset, IGraphicAssetCollection } from '../../api';
|
||||
import { GetTickerTime } from '../../pixi-proxy';
|
||||
import { GraphicAsset } from './GraphicAsset';
|
||||
import { GraphicAssetPalette } from './GraphicAssetPalette';
|
||||
|
||||
@ -69,7 +70,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
||||
public addReference(): void
|
||||
{
|
||||
this._referenceCount++;
|
||||
//this._referenceTimestamp = Nitro.instance.time;
|
||||
this._referenceTimestamp = GetTickerTime();
|
||||
}
|
||||
|
||||
public removeReference(): void
|
||||
@ -79,7 +80,7 @@ export class GraphicAssetCollection implements IGraphicAssetCollection
|
||||
if (this._referenceCount <= 0)
|
||||
{
|
||||
this._referenceCount = 0;
|
||||
//this._referenceTimestamp = Nitro.instance.time;
|
||||
this._referenceTimestamp = GetTickerTime();
|
||||
|
||||
this.disposePaletteAssets(false);
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { Application } from '@pixi/app';
|
||||
import { Ticker } from '@pixi/ticker';
|
||||
import { IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, IWorkerEventTracker } from '../api';
|
||||
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
||||
import { ISoundManager } from './sound/ISoundManager';
|
||||
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker } from '../api';
|
||||
|
||||
export interface INitro
|
||||
{
|
||||
|
@ -2,25 +2,21 @@ import { Application, IApplicationOptions } from '@pixi/app';
|
||||
import { SCALE_MODES } from '@pixi/constants';
|
||||
import { settings } from '@pixi/settings';
|
||||
import { Ticker } from '@pixi/ticker';
|
||||
import { IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, IWorkerEventTracker } from '../api';
|
||||
import { IAvatarRenderManager, IEventDispatcher, ILinkEventTracker, INitroCommunicationManager, INitroCore, INitroLocalizationManager, IRoomCameraWidgetManager, IRoomEngine, IRoomManager, IRoomSessionManager, ISessionDataManager, ISoundManager, IWorkerEventTracker } from '../api';
|
||||
import { ConfigurationEvent, EventDispatcher, NitroCore, NitroEvent } from '../core';
|
||||
import { PixiApplicationProxy } from '../pixi-proxy';
|
||||
import { RoomManager } from '../room/RoomManager';
|
||||
import { AvatarRenderManager } from './avatar/AvatarRenderManager';
|
||||
import { IAvatarRenderManager } from './avatar/IAvatarRenderManager';
|
||||
import { RoomCameraWidgetManager } from './camera/RoomCameraWidgetManager';
|
||||
import { NitroCommunicationManager } from './communication/NitroCommunicationManager';
|
||||
import { LegacyExternalInterface } from './externalInterface/LegacyExternalInterface';
|
||||
import { GameMessageHandler } from './game/GameMessageHandler';
|
||||
import { RoomManager } from '../room';
|
||||
import { AvatarRenderManager } from './avatar';
|
||||
import { RoomCameraWidgetManager } from './camera';
|
||||
import { NitroCommunicationManager } from './communication';
|
||||
import { LegacyExternalInterface } from './externalInterface';
|
||||
import { GameMessageHandler } from './game';
|
||||
import { INitro } from './INitro';
|
||||
import { NitroLocalizationManager } from './localization/NitroLocalizationManager';
|
||||
import { NitroLocalizationManager } from './localization';
|
||||
import './Plugins';
|
||||
import { RoomEngineEvent } from './room';
|
||||
import { RoomEngine } from './room/RoomEngine';
|
||||
import { RoomSessionManager } from './session/RoomSessionManager';
|
||||
import { SessionDataManager } from './session/SessionDataManager';
|
||||
import { ISoundManager } from './sound/ISoundManager';
|
||||
import { SoundManager } from './sound/SoundManager';
|
||||
import { RoomEngine, RoomEngineEvent } from './room';
|
||||
import { RoomSessionManager, SessionDataManager } from './session';
|
||||
import { SoundManager } from './sound';
|
||||
import { HabboWebTools } from './utils/HabboWebTools';
|
||||
|
||||
LegacyExternalInterface.available;
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { IAssetManager } from '../../api';
|
||||
import { IAssetManager, IAvatarFigureContainer, IAvatarImageListener } from '../../api';
|
||||
import { EventDispatcher, NitroEvent } from '../../core';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { AvatarAssetDownloadLibrary } from './AvatarAssetDownloadLibrary';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
import { AvatarRenderEvent, AvatarRenderLibraryEvent } from './events';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarImageListener } from './IAvatarImageListener';
|
||||
|
||||
export class AvatarAssetDownloadManager extends EventDispatcher
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarFigureContainer } from '../../api';
|
||||
|
||||
export class AvatarFigureContainer implements IAvatarFigureContainer
|
||||
{
|
||||
|
@ -3,29 +3,15 @@ import { Container } from '@pixi/display';
|
||||
import { ColorMatrixFilter } from '@pixi/filter-color-matrix';
|
||||
import { Rectangle } from '@pixi/math';
|
||||
import { Sprite } from '@pixi/sprite';
|
||||
import { IGraphicAsset } from '../../api';
|
||||
import { AvatarAction, AvatarDirectionAngle, AvatarScaleType, AvatarSetType, IActionDefinition, IActiveActionData, IAnimationLayerData, IAvatarDataContainer, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IGraphicAsset, IPartColor, ISpriteDataContainer } from '../../api';
|
||||
import { AdvancedMap } from '../../core';
|
||||
import { NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { ActiveActionData } from './actions/ActiveActionData';
|
||||
import { IActionDefinition } from './actions/IActionDefinition';
|
||||
import { IActiveActionData } from './actions/IActiveActionData';
|
||||
import { AssetAliasCollection } from './alias/AssetAliasCollection';
|
||||
import { IAnimationLayerData } from './animation/IAnimationLayerData';
|
||||
import { IAvatarDataContainer } from './animation/IAvatarDataContainer';
|
||||
import { ISpriteDataContainer } from './animation/ISpriteDataContainer';
|
||||
import { GetTickerTime, NitroContainer, NitroSprite, PaletteMapFilter, PixiApplicationProxy, TextureUtils } from '../../pixi-proxy';
|
||||
import { ActiveActionData } from './actions';
|
||||
import { AssetAliasCollection } from './alias';
|
||||
import { AvatarFigureContainer } from './AvatarFigureContainer';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
import { AvatarImageCache } from './cache/AvatarImageCache';
|
||||
import { AvatarImageCache } from './cache';
|
||||
import { EffectAssetDownloadManager } from './EffectAssetDownloadManager';
|
||||
import { AvatarAction } from './enum/AvatarAction';
|
||||
import { AvatarDirectionAngle } from './enum/AvatarDirectionAngle';
|
||||
import { AvatarScaleType } from './enum/AvatarScaleType';
|
||||
import { AvatarSetType } from './enum/AvatarSetType';
|
||||
import { IAvatarEffectListener } from './IAvatarEffectListener';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarImage } from './IAvatarImage';
|
||||
import { IPartColor } from './structure/figure/IPartColor';
|
||||
|
||||
export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
{
|
||||
@ -925,7 +911,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
||||
{
|
||||
if (!this._sortedActions == null) return;
|
||||
|
||||
const _local_3: number = Nitro.instance.time;
|
||||
const _local_3: number = GetTickerTime();
|
||||
const _local_4: string[] = [];
|
||||
|
||||
for (const k of this._sortedActions) _local_4.push(k.actionType);
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { AdjustmentFilter } from '@pixi/filter-adjustment';
|
||||
import { IActionDefinition } from './actions/IActionDefinition';
|
||||
import { AvatarAnimationFrame } from './structure/animation/AvatarAnimationFrame';
|
||||
import { IPartColor } from './structure/figure/IPartColor';
|
||||
import { IActionDefinition, IPartColor } from '../../api';
|
||||
import { AvatarAnimationFrame } from './structure';
|
||||
|
||||
export class AvatarImagePartContainer
|
||||
{
|
||||
@ -17,18 +16,18 @@ export class AvatarImagePartContainer
|
||||
private _blendTransform: AdjustmentFilter;
|
||||
private _paletteMapId: number;
|
||||
|
||||
constructor(k: string, _arg_2: string, _arg_3: string, _arg_4: IPartColor, _arg_5: AvatarAnimationFrame[], _arg_6: IActionDefinition, _arg_7: boolean, _arg_8: number, _arg_9: string = '', _arg_10: boolean = false, _arg_11: number = 1)
|
||||
constructor(bodyPartId: string, partType: string, partId: string, partColor: IPartColor, frames: AvatarAnimationFrame[], action: IActionDefinition, isColorable: boolean, paletteMapId: number, flippedPartType: string = '', isBlendable: boolean = false, _arg_11: number = 1)
|
||||
{
|
||||
this._bodyPartId = k;
|
||||
this._partType = _arg_2;
|
||||
this._partId = _arg_3;
|
||||
this._color = _arg_4;
|
||||
this._frames = _arg_5;
|
||||
this._action = _arg_6;
|
||||
this._isColorable = _arg_7;
|
||||
this._paletteMapId = _arg_8;
|
||||
this._flippedPartType = _arg_9;
|
||||
this._isBlendable = _arg_10;
|
||||
this._bodyPartId = bodyPartId;
|
||||
this._partType = partType;
|
||||
this._partId = partId;
|
||||
this._color = partColor;
|
||||
this._frames = frames;
|
||||
this._action = action;
|
||||
this._isColorable = isColorable;
|
||||
this._paletteMapId = paletteMapId;
|
||||
this._flippedPartType = flippedPartType;
|
||||
this._isBlendable = isBlendable;
|
||||
this._blendTransform = null;
|
||||
|
||||
if (this._partType === 'ey') this._isColorable = false;
|
||||
|
@ -1,29 +1,19 @@
|
||||
import { IAssetManager, IGraphicAsset } from '../../api';
|
||||
import { AvatarSetType, IAssetManager, IAvatarEffectListener, IAvatarFigureContainer, IAvatarImage, IAvatarImageListener, IAvatarRenderManager, IFigureData, IFigurePartSet, IFigureSetData, IGraphicAsset, IStructureData } from '../../api';
|
||||
import { NitroEvent, NitroManager } from '../../core';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { FigureDataContainer } from '../utils/FigureDataContainer';
|
||||
import { AssetAliasCollection } from './alias/AssetAliasCollection';
|
||||
import { FigureDataContainer } from '../utils';
|
||||
import { AssetAliasCollection } from './alias';
|
||||
import { AvatarAssetDownloadManager } from './AvatarAssetDownloadManager';
|
||||
import { AvatarFigureContainer } from './AvatarFigureContainer';
|
||||
import { AvatarImage } from './AvatarImage';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
import { HabboAvatarAnimations } from './data/HabboAvatarAnimations';
|
||||
import { HabboAvatarAnimations } from "./data/HabboAvatarAnimations";
|
||||
import { HabboAvatarGeometry } from './data/HabboAvatarGeometry';
|
||||
import { HabboAvatarPartSets } from './data/HabboAvatarPartSets';
|
||||
import { EffectAssetDownloadManager } from './EffectAssetDownloadManager';
|
||||
import { AvatarSetType } from './enum/AvatarSetType';
|
||||
import { AvatarRenderEvent } from './events/AvatarRenderEvent';
|
||||
import { IAvatarEffectListener } from './IAvatarEffectListener';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarImage } from './IAvatarImage';
|
||||
import { IAvatarImageListener } from './IAvatarImageListener';
|
||||
import { IAvatarRenderManager } from './IAvatarRenderManager';
|
||||
import { IFigureData } from './interfaces';
|
||||
import { AvatarRenderEvent } from './events';
|
||||
import { PlaceHolderAvatarImage } from './PlaceHolderAvatarImage';
|
||||
import { AvatarStructureDownload } from './structure/AvatarStructureDownload';
|
||||
import { IFigurePartSet } from './structure/figure/IFigurePartSet';
|
||||
import { IFigureSetData } from './structure/IFigureSetData';
|
||||
import { IStructureData } from './structure/IStructureData';
|
||||
import { AvatarStructureDownload } from './structure';
|
||||
|
||||
export class AvatarRenderManager extends NitroManager implements IAvatarRenderManager
|
||||
{
|
||||
@ -407,11 +397,11 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
return !!(partSet && ((partSet.gender.toUpperCase() === 'U') || (partSet.gender.toUpperCase() === gender.toUpperCase())));
|
||||
}
|
||||
|
||||
public getFigureStringWithFigureIds(k: string, _arg_2: string, _arg_3: number[]): string
|
||||
public getFigureStringWithFigureIds(figure: string, gender: string, _arg_3: number[]): string
|
||||
{
|
||||
const container = new FigureDataContainer();
|
||||
|
||||
container.loadAvatarData(k, _arg_2);
|
||||
container.loadAvatarData(figure, gender);
|
||||
|
||||
const partSets: IFigurePartSet[] = this.resolveFigureSets(_arg_3);
|
||||
|
||||
@ -423,14 +413,14 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
||||
return container.getFigureString();
|
||||
}
|
||||
|
||||
private resolveFigureSets(k: number[]): IFigurePartSet[]
|
||||
private resolveFigureSets(setIds: number[]): IFigurePartSet[]
|
||||
{
|
||||
const structure = this.structureData;
|
||||
const partSets: IFigurePartSet[] = [];
|
||||
|
||||
for(const _local_4 of k)
|
||||
for (const setId of setIds)
|
||||
{
|
||||
const partSet = structure.getFigurePartSet(_local_4);
|
||||
const partSet = structure.getFigurePartSet(setId);
|
||||
|
||||
if (partSet) partSets.push(partSet);
|
||||
}
|
||||
|
@ -1,30 +1,12 @@
|
||||
import { Point } from '@pixi/math';
|
||||
import { IAssetAnimation, IAssetManager } from '../../api';
|
||||
import { AvatarDirectionAngle, IActionDefinition, IActiveActionData, IAssetAnimation, IAssetManager, IAvatarFigureContainer, IAvatarImage, IAvatarRenderManager, IFigureData, IFigurePartSet, IPartColor, IStructureData } from '../../api';
|
||||
import { EventDispatcher } from '../../core';
|
||||
import { ActionDefinition } from './actions/ActionDefinition';
|
||||
import { AvatarActionManager } from './actions/AvatarActionManager';
|
||||
import { IActionDefinition } from './actions/IActionDefinition';
|
||||
import { IActiveActionData } from './actions/IActiveActionData';
|
||||
import { Animation } from './animation/Animation';
|
||||
import { AnimationManager } from './animation/AnimationManager';
|
||||
import { AvatarAnimationLayerData } from './animation/AvatarAnimationLayerData';
|
||||
import { ActionDefinition, AvatarActionManager } from './actions';
|
||||
import { Animation, AnimationManager, AvatarAnimationLayerData } from './animation';
|
||||
import { AvatarImagePartContainer } from './AvatarImagePartContainer';
|
||||
import { AvatarRenderManager } from './AvatarRenderManager';
|
||||
import { AvatarDirectionAngle } from './enum/AvatarDirectionAngle';
|
||||
import { AvatarModelGeometry } from './geometry/AvatarModelGeometry';
|
||||
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
|
||||
import { IAvatarImage } from './IAvatarImage';
|
||||
import { IAvatarRenderManager } from './IAvatarRenderManager';
|
||||
import { IFigureData } from './interfaces';
|
||||
import { AnimationAction } from './structure/animation/AnimationAction';
|
||||
import { AvatarAnimationFrame } from './structure/animation/AvatarAnimationFrame';
|
||||
import { AvatarAnimationData } from './structure/AvatarAnimationData';
|
||||
import { AvatarCanvas } from './structure/AvatarCanvas';
|
||||
import { IFigurePartSet } from './structure/figure/IFigurePartSet';
|
||||
import { IPartColor } from './structure/figure/IPartColor';
|
||||
import { FigureSetData } from './structure/FigureSetData';
|
||||
import { IStructureData } from './structure/IStructureData';
|
||||
import { PartSetsData } from './structure/PartSetsData';
|
||||
import { AvatarModelGeometry } from './geometry';
|
||||
import { AnimationAction, AvatarAnimationData, AvatarAnimationFrame, AvatarCanvas, FigureSetData, PartSetsData } from './structure';
|
||||
|
||||
export class AvatarStructure extends EventDispatcher
|
||||
{
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { IAssetManager } from '../../api';
|
||||
import { IAssetManager, IAvatarEffectListener } from '../../api';
|
||||
import { EventDispatcher, NitroEvent } from '../../core';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
import { EffectAssetDownloadLibrary } from './EffectAssetDownloadLibrary';
|
||||
import { AvatarRenderEffectLibraryEvent, AvatarRenderEvent } from './events';
|
||||
import { IAvatarEffectListener } from './IAvatarEffectListener';
|
||||
|
||||
export class EffectAssetDownloadManager extends EventDispatcher
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AssetAliasCollection } from './alias/AssetAliasCollection';
|
||||
import { AssetAliasCollection } from './alias';
|
||||
import { AvatarFigureContainer } from './AvatarFigureContainer';
|
||||
import { AvatarImage } from './AvatarImage';
|
||||
import { AvatarStructure } from './AvatarStructure';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IActionDefinition } from '../../../api';
|
||||
import { ActionType } from './ActionType';
|
||||
import { IActionDefinition } from './IActionDefinition';
|
||||
|
||||
export class ActionDefinition implements IActionDefinition
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { IActionDefinition } from './IActionDefinition';
|
||||
import { IActiveActionData } from './IActiveActionData';
|
||||
import { IActionDefinition, IActiveActionData } from '../../../api';
|
||||
|
||||
export class ActiveActionData implements IActiveActionData
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { IAssetManager } from '../../../api';
|
||||
import { IActiveActionData, IAssetManager } from '../../../api';
|
||||
import { ActionDefinition } from './ActionDefinition';
|
||||
import { IActiveActionData } from './IActiveActionData';
|
||||
|
||||
export class AvatarActionManager
|
||||
{
|
||||
|
@ -2,5 +2,3 @@ export * from './ActionDefinition';
|
||||
export * from './ActionType';
|
||||
export * from './ActiveActionData';
|
||||
export * from './AvatarActionManager';
|
||||
export * from './IActionDefinition';
|
||||
export * from './IActiveActionData';
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { IAssetAnimation, IAssetAnimationFrame } from '../../../api';
|
||||
import { IAnimation, IAssetAnimation, IAssetAnimationFrame } from '../../../api';
|
||||
import { AvatarStructure } from '../AvatarStructure';
|
||||
import { AddDataContainer } from './AddDataContainer';
|
||||
import { AvatarAnimationLayerData } from './AvatarAnimationLayerData';
|
||||
import { AvatarDataContainer } from './AvatarDataContainer';
|
||||
import { DirectionDataContainer } from './DirectionDataContainer';
|
||||
import { IAnimation } from './IAnimation';
|
||||
import { SpriteDataContainer } from './SpriteDataContainer';
|
||||
|
||||
export class Animation implements IAnimation
|
||||
|
@ -1,9 +1,6 @@
|
||||
import { IAssetAnimation } from '../../../api';
|
||||
import { IAnimation, IAnimationLayerData, IAnimationManager, IAssetAnimation } from '../../../api';
|
||||
import { AvatarStructure } from '../AvatarStructure';
|
||||
import { Animation } from './Animation';
|
||||
import { IAnimation } from './IAnimation';
|
||||
import { IAnimationLayerData } from './IAnimationLayerData';
|
||||
import { IAnimationManager } from './IAnimationManager';
|
||||
|
||||
export class AnimationManager implements IAnimationManager
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
import { IAssetAnimationFramePart } from '../../../api';
|
||||
import { ActiveActionData } from '../actions/ActiveActionData';
|
||||
import { IActionDefinition } from '../actions/IActionDefinition';
|
||||
import { IActiveActionData } from '../actions/IActiveActionData';
|
||||
import { IAnimationLayerData } from './IAnimationLayerData';
|
||||
import { IActionDefinition, IActiveActionData, IAnimationLayerData, IAssetAnimationFramePart } from '../../../api';
|
||||
import { ActiveActionData } from '../actions';
|
||||
|
||||
export class AvatarAnimationLayerData implements IAnimationLayerData
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { AdjustmentFilter } from '@pixi/filter-adjustment';
|
||||
import { IAssetAnimationAvatar } from '../../../api';
|
||||
import { IAvatarDataContainer } from './IAvatarDataContainer';
|
||||
import { IAssetAnimationAvatar, IAvatarDataContainer } from '../../../api';
|
||||
|
||||
export class AvatarDataContainer implements IAvatarDataContainer
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { IAssetAnimationSprite } from '../../../api';
|
||||
import { IAnimation } from './IAnimation';
|
||||
import { ISpriteDataContainer } from './ISpriteDataContainer';
|
||||
import { IAnimation, IAssetAnimationSprite, ISpriteDataContainer } from '../../../api';
|
||||
|
||||
export class SpriteDataContainer implements ISpriteDataContainer
|
||||
{
|
||||
|
@ -4,9 +4,4 @@ export * from './AnimationManager';
|
||||
export * from './AvatarAnimationLayerData';
|
||||
export * from './AvatarDataContainer';
|
||||
export * from './DirectionDataContainer';
|
||||
export * from './IAnimation';
|
||||
export * from './IAnimationLayerData';
|
||||
export * from './IAnimationManager';
|
||||
export * from './IAvatarDataContainer';
|
||||
export * from './ISpriteDataContainer';
|
||||
export * from './SpriteDataContainer';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Nitro } from '../../Nitro';
|
||||
import { GetTickerTime } from '../../../pixi-proxy';
|
||||
import { AvatarImageDirectionCache } from './AvatarImageDirectionCache';
|
||||
|
||||
export class AvatarImageActionCache
|
||||
@ -10,7 +10,7 @@ export class AvatarImageActionCache
|
||||
{
|
||||
this._cache = new Map();
|
||||
|
||||
this.setLastAccessTime(Nitro.instance.time);
|
||||
this.setLastAccessTime(GetTickerTime());
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IActiveActionData } from '../actions/IActiveActionData';
|
||||
import { IActiveActionData } from '../../../api';
|
||||
import { AvatarImageActionCache } from './AvatarImageActionCache';
|
||||
|
||||
export class AvatarImageBodyPartCache
|
||||
|
18
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
18
src/nitro/avatar/cache/AvatarImageCache.ts
vendored
@ -1,19 +1,13 @@
|
||||
import { Texture } from '@pixi/core';
|
||||
import { Matrix, Point, Rectangle } from '@pixi/math';
|
||||
import { RoomObjectSpriteData } from '../../../api';
|
||||
import { NitroContainer, NitroSprite, PixiApplicationProxy } from '../../../pixi-proxy';
|
||||
import { IActiveActionData } from '../actions/IActiveActionData';
|
||||
import { AssetAliasCollection } from '../alias/AssetAliasCollection';
|
||||
import { AvatarAnimationLayerData } from '../animation/AvatarAnimationLayerData';
|
||||
import { AvatarDirectionAngle, AvatarFigurePartType, AvatarScaleType, GeometryType, IActiveActionData, IAvatarImage, RoomObjectSpriteData } from '../../../api';
|
||||
import { GetTickerTime, NitroContainer, NitroSprite } from '../../../pixi-proxy';
|
||||
import { AssetAliasCollection } from '../alias';
|
||||
import { AvatarAnimationLayerData } from '../animation';
|
||||
import { AvatarImageBodyPartContainer } from '../AvatarImageBodyPartContainer';
|
||||
import { AvatarImagePartContainer } from '../AvatarImagePartContainer';
|
||||
import { AvatarStructure } from '../AvatarStructure';
|
||||
import { AvatarDirectionAngle } from '../enum/AvatarDirectionAngle';
|
||||
import { AvatarFigurePartType } from '../enum/AvatarFigurePartType';
|
||||
import { AvatarScaleType } from '../enum/AvatarScaleType';
|
||||
import { GeometryType } from '../enum/GeometryType';
|
||||
import { IAvatarImage } from '../IAvatarImage';
|
||||
import { AvatarCanvas } from '../structure/AvatarCanvas';
|
||||
import { AvatarCanvas } from '../structure';
|
||||
import { AvatarImageActionCache } from './AvatarImageActionCache';
|
||||
import { AvatarImageBodyPartCache } from './AvatarImageBodyPartCache';
|
||||
import { AvatarImageDirectionCache } from './AvatarImageDirectionCache';
|
||||
@ -86,7 +80,7 @@ export class AvatarImageCache
|
||||
|
||||
public disposeInactiveActions(k: number = 60000): void
|
||||
{
|
||||
const time = PixiApplicationProxy.instance.ticker.lastTime;
|
||||
const time = GetTickerTime();
|
||||
|
||||
if (this._cache)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IAvatarImage } from '../IAvatarImage';
|
||||
import { AvatarCanvas } from '../structure/AvatarCanvas';
|
||||
import { IAvatarImage } from '../../../api';
|
||||
import { AvatarCanvas } from '../structure';
|
||||
import { AvatarSet } from './AvatarSet';
|
||||
import { GeometryBodyPart } from './GeometryBodyPart';
|
||||
import { Matrix4x4 } from './Matrix4x4';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IAvatarImage } from '../IAvatarImage';
|
||||
import { IAvatarImage } from '../../../api';
|
||||
import { GeometryItem } from './GeometryItem';
|
||||
import { Matrix4x4 } from './Matrix4x4';
|
||||
import { Node3D } from './Node3D';
|
||||
|
@ -10,17 +10,16 @@ export * from './AvatarImagePartContainer';
|
||||
export * from './AvatarRenderManager';
|
||||
export * from './AvatarStructure';
|
||||
export * from './cache';
|
||||
export * from './data/HabboAvatarAnimations';
|
||||
export * from './data/HabboAvatarGeometry';
|
||||
export * from './data/HabboAvatarPartSets';
|
||||
export * from './EffectAssetDownloadLibrary';
|
||||
export * from './EffectAssetDownloadManager';
|
||||
export * from './enum';
|
||||
export * from './events';
|
||||
export * from './geometry';
|
||||
export * from './IAvatarEffectListener';
|
||||
export * from './IAvatarFigureContainer';
|
||||
export * from './IAvatarImage';
|
||||
export * from './IAvatarImageListener';
|
||||
export * from './IAvatarRenderManager';
|
||||
export * from './IOutfit';
|
||||
export * from './pets';
|
||||
export * from './PlaceHolderAvatarImage';
|
||||
export * from './structure';
|
||||
export * from './structure/animation';
|
||||
export * from './structure/figure';
|
||||
export * from './structure/parts';
|
||||
|
@ -1 +0,0 @@
|
||||
export * from './figuredata';
|
@ -1,6 +1,5 @@
|
||||
import { IActionDefinition } from '../actions/IActionDefinition';
|
||||
import { AnimationAction } from './animation/AnimationAction';
|
||||
import { IFigureSetData } from './IFigureSetData';
|
||||
import { IActionDefinition, IFigureSetData } from '../../../api';
|
||||
import { AnimationAction } from './animation';
|
||||
|
||||
export class AvatarAnimationData implements IFigureSetData
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Point } from '@pixi/math';
|
||||
import { AvatarScaleType } from '../enum/AvatarScaleType';
|
||||
import { AvatarScaleType } from '../../../api';
|
||||
|
||||
export class AvatarCanvas
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IFigureSetData } from '../../../api';
|
||||
import { EventDispatcher, NitroEvent } from '../../../core';
|
||||
import { IFigureSetData } from './IFigureSetData';
|
||||
|
||||
export class AvatarStructureDownload extends EventDispatcher
|
||||
{
|
||||
|
@ -1,11 +1,5 @@
|
||||
import { IFigureData } from '../interfaces';
|
||||
import { IFigurePartSet } from './figure/IFigurePartSet';
|
||||
import { IPalette } from './figure/IPalette';
|
||||
import { ISetType } from './figure/ISetType';
|
||||
import { Palette } from './figure/Palette';
|
||||
import { SetType } from './figure/SetType';
|
||||
import { IFigureSetData } from './IFigureSetData';
|
||||
import { IStructureData } from './IStructureData';
|
||||
import { IFigureData, IFigurePartSet, IFigureSetData, IPalette, ISetType, IStructureData } from '../../../api';
|
||||
import { Palette, SetType } from './figure';
|
||||
|
||||
export class FigureSetData implements IFigureSetData, IStructureData
|
||||
{
|
||||
@ -100,13 +94,13 @@ export class FigureSetData implements IFigureSetData, IStructureData
|
||||
return types;
|
||||
}
|
||||
|
||||
public getDefaultPartSet(k: string, _arg_2: string): IFigurePartSet
|
||||
public getDefaultPartSet(type: string, gender: string): IFigurePartSet
|
||||
{
|
||||
const setType = this._setTypes.get(k);
|
||||
const setType = this._setTypes.get(type);
|
||||
|
||||
if (!setType) return null;
|
||||
|
||||
return setType.getDefaultPartSet(_arg_2);
|
||||
return setType.getDefaultPartSet(gender);
|
||||
}
|
||||
|
||||
public getSetType(k: string): ISetType
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { ActionDefinition } from '../actions/ActionDefinition';
|
||||
import { IActionDefinition } from '../actions/IActionDefinition';
|
||||
import { IFigureSetData } from './IFigureSetData';
|
||||
import { ActivePartSet } from './parts/ActivePartSet';
|
||||
import { PartDefinition } from './parts/PartDefinition';
|
||||
import { IActionDefinition, IFigureSetData } from '../../../api';
|
||||
import { ActionDefinition } from '../actions';
|
||||
import { ActivePartSet, PartDefinition } from './parts';
|
||||
|
||||
export class PartSetsData implements IFigureSetData
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { IFigureDataPart } from '../../interfaces';
|
||||
import { IFigurePart } from './IFigurePart';
|
||||
import { IFigureDataPart, IFigurePart } from '../../../../api';
|
||||
|
||||
export class FigurePart implements IFigurePart
|
||||
{
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { IFigureDataSet } from '../../interfaces';
|
||||
import { IFigureDataSet, IFigurePart, IFigurePartSet } from '../../../../api';
|
||||
import { FigurePart } from './FigurePart';
|
||||
import { IFigurePart } from './IFigurePart';
|
||||
import { IFigurePartSet } from './IFigurePartSet';
|
||||
|
||||
export class FigurePartSet implements IFigurePartSet
|
||||
{
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { IFigureDataPalette, IPalette, IPartColor } from '../../../../api';
|
||||
import { AdvancedMap } from '../../../../core';
|
||||
import { IFigureDataPalette } from '../../interfaces';
|
||||
import { IPalette } from './IPalette';
|
||||
import { IPartColor } from './IPartColor';
|
||||
import { PartColor } from './PartColor';
|
||||
|
||||
export class Palette implements IPalette
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { IFigureDataColor } from '../../interfaces';
|
||||
import { IPartColor } from './IPartColor';
|
||||
import { IFigureDataColor, IPartColor } from '../../../../api';
|
||||
|
||||
export class PartColor implements IPartColor
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { IFigureDataSetType, IFigurePartSet, ISetType } from '../../../../api';
|
||||
import { AdvancedMap } from '../../../../core';
|
||||
import { IFigureDataSetType } from '../../interfaces';
|
||||
import { FigurePartSet } from './FigurePartSet';
|
||||
import { IFigurePartSet } from './IFigurePartSet';
|
||||
import { ISetType } from './ISetType';
|
||||
|
||||
export class SetType implements ISetType
|
||||
{
|
||||
|
@ -1,10 +1,5 @@
|
||||
export * from './FigurePart';
|
||||
export * from './FigurePartSet';
|
||||
export * from './IFigurePart';
|
||||
export * from './IFigurePartSet';
|
||||
export * from './IPalette';
|
||||
export * from './IPartColor';
|
||||
export * from './ISetType';
|
||||
export * from './Palette';
|
||||
export * from './PartColor';
|
||||
export * from './SetType';
|
||||
|
@ -4,7 +4,5 @@ export * from './AvatarCanvas';
|
||||
export * from './AvatarStructureDownload';
|
||||
export * from './figure';
|
||||
export * from './FigureSetData';
|
||||
export * from './IFigureSetData';
|
||||
export * from './IStructureData';
|
||||
export * from './parts';
|
||||
export * from './PartSetsData';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { IConnection, INitroCommunicationDemo, INitroCommunicationManager } from '../../../api';
|
||||
import { NitroManager, SocketConnectionEvent } from '../../../core';
|
||||
import { GetTickerTime } from '../../../pixi-proxy';
|
||||
import { Nitro } from '../../Nitro';
|
||||
import { AuthenticatedEvent, ClientHelloMessageComposer, ClientPingEvent, InfoRetrieveMessageComposer, PongMessageComposer, SSOTicketMessageComposer } from '../messages';
|
||||
import { NitroCommunicationDemoEvent } from './NitroCommunicationDemoEvent';
|
||||
@ -118,7 +119,7 @@ export class NitroCommunicationDemo extends NitroManager implements INitroCommun
|
||||
return;
|
||||
}
|
||||
|
||||
connection.send(new SSOTicketMessageComposer(this.getSSO(), Nitro.instance.time));
|
||||
connection.send(new SSOTicketMessageComposer(this.getSSO(), GetTickerTime()));
|
||||
}
|
||||
|
||||
private onClientPingEvent(event: ClientPingEvent): void
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper } from '../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
|
||||
export class FrontPageItem
|
||||
{
|
||||
@ -62,7 +62,7 @@ export class FrontPageItem
|
||||
|
||||
const time = wrapper.readInt();
|
||||
|
||||
this._expirationTime = ((time > 0) ? ((time * 1000) + PixiApplicationProxy.instance.ticker.lastTime) : 0);
|
||||
this._expirationTime = ((time > 0) ? ((time * 1000) + GetTickerTime()) : 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper } from '../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
|
||||
export class TargetedOfferData
|
||||
{
|
||||
@ -31,7 +31,7 @@ export class TargetedOfferData
|
||||
this._Str_9772 = wrapper.readInt();
|
||||
|
||||
const time = wrapper.readInt();
|
||||
this._expirationTime = ((time > 0) ? ((time * 1000) + PixiApplicationProxy.instance.ticker.lastTime) : 0);
|
||||
this._expirationTime = ((time > 0) ? ((time * 1000) + GetTickerTime()) : 0);
|
||||
|
||||
this._title = wrapper.readString();
|
||||
this._Str_1858 = wrapper.readString();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper, IObjectData } from '../../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../../pixi-proxy';
|
||||
import { FurnitureDataParser } from '../../room';
|
||||
import { IFurnitureItemData } from './IFurnitureItemData';
|
||||
|
||||
@ -76,7 +76,7 @@ export class FurnitureListItemParser implements IFurnitureItemData
|
||||
this._isGroupable = wrapper.readBoolean();
|
||||
this._sellable = wrapper.readBoolean();
|
||||
this._secondsToExpiration = wrapper.readInt();
|
||||
this._expirationTimeStamp = PixiApplicationProxy.instance.ticker.lastTime;
|
||||
this._expirationTimeStamp = GetTickerTime();
|
||||
|
||||
if (this.secondsToExpiration > -1)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper, IObjectData } from '../../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../../pixi-proxy';
|
||||
import { FurnitureDataParser } from '../../room';
|
||||
import { IFurnitureItemData } from '../furniture';
|
||||
|
||||
@ -34,7 +34,7 @@ export class ItemDataStructure implements IFurnitureItemData
|
||||
this._isGroupable = wrapper.readBoolean();
|
||||
this._stuffData = FurnitureDataParser.parseObjectData(wrapper);
|
||||
this._secondsToExpiration = -1;
|
||||
this._expirationTimeStamp = PixiApplicationProxy.instance.ticker.lastTime;
|
||||
this._expirationTimeStamp = GetTickerTime();
|
||||
this._hasRentPeriodStarted = false;
|
||||
this._creationDay = wrapper.readInt();
|
||||
this._creationMonth = wrapper.readInt();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
import { PatternMatchData } from './PatternMatchData';
|
||||
|
||||
export class IssueMessageData
|
||||
@ -47,7 +47,7 @@ export class IssueMessageData
|
||||
this._message = message;
|
||||
this._chatRecordId = chatRecordId;
|
||||
this._patterns = patterns;
|
||||
this._creationTimeInMilliseconds = PixiApplicationProxy.instance.ticker.lastTime; //getTimer()
|
||||
this._creationTimeInMilliseconds = GetTickerTime(); //getTimer()
|
||||
}
|
||||
|
||||
public get issueId(): number
|
||||
|
@ -3,7 +3,7 @@ import { Container, DisplayObject } from '@pixi/display';
|
||||
import { Matrix, Point, Rectangle } from '@pixi/math';
|
||||
import { IConnection, IDisposable, IFurnitureStackingHeightMap, IGetImageListener, IImageResult, ILegacyWallGeometry, IMessageComposer, INitroCommunicationManager, IObjectData, IPetColorResult, IPetCustomPart, IRoomContentListener, IRoomContentLoader, IRoomCreator, IRoomEngine, IRoomEngineServices, IRoomGeometry, IRoomInstance, IRoomManager, IRoomManagerListener, IRoomObject, IRoomObjectController, IRoomObjectLogicFactory, IRoomObjectVisualizationFactory, IRoomRenderer, IRoomRendererFactory, IRoomRenderingCanvas, IRoomSessionManager, ISelectedRoomObjectData, ISessionDataManager, ITileObjectMap, IUpdateReceiver, IVector3D, LegacyDataType, ObjectDataFactory, RoomControllerLevel, RoomObjectCategory, RoomObjectUserType, RoomObjectVariable, ToolbarIconEnum, Vector3d } from '../../api';
|
||||
import { NitroEvent, NitroManager } from '../../core';
|
||||
import { NitroSprite, TextureUtils } from '../../pixi-proxy';
|
||||
import { GetTickerTime, NitroSprite, TextureUtils } from '../../pixi-proxy';
|
||||
import { NumberBank, RoomEnterEffect, RoomGeometry, RoomInstance, RoomObjectEvent, RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomRendererFactory } from '../../room';
|
||||
import { PetFigureData } from '../avatar';
|
||||
import { RenderRoomMessageComposer, RenderRoomThumbnailMessageComposer } from '../communication';
|
||||
@ -813,7 +813,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
||||
{
|
||||
if (!this._roomManager) return;
|
||||
|
||||
time = Nitro.instance.time;
|
||||
time = GetTickerTime();
|
||||
|
||||
RoomEnterEffect.turnVisualizationOn();
|
||||
|
||||
@ -966,7 +966,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
||||
model.setValue(RoomObjectVariable.FURNITURE_AD_URL, this.getRoomObjectAdUrl(data.type));
|
||||
model.setValue(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT, (data.realRoomObject ? 1 : 0));
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, data.expiryTime);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, GetTickerTime());
|
||||
model.setValue(RoomObjectVariable.FURNITURE_USAGE_POLICY, data.usagePolicy);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_OWNER_ID, data.ownerId);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_OWNER_NAME, data.ownerName);
|
||||
@ -1026,7 +1026,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
||||
model.setValue(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT, (data.realRoomObject ? 1 : 0));
|
||||
model.setValue(RoomObjectVariable.OBJECT_ACCURATE_Z_VALUE, 1);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, data.expiryTime);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, GetTickerTime());
|
||||
model.setValue(RoomObjectVariable.FURNITURE_USAGE_POLICY, data.usagePolicy);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_OWNER_ID, data.ownerId);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_OWNER_NAME, data.ownerName);
|
||||
@ -1934,7 +1934,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
||||
if (!object) return false;
|
||||
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, expires);
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time);
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, GetTickerTime());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1946,7 +1946,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
|
||||
if (!object) return false;
|
||||
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRY_TIME, expires);
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, Nitro.instance.time);
|
||||
object.model.setValue(RoomObjectVariable.FURNITURE_EXPIRTY_TIMESTAMP, GetTickerTime());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { IConnection, IRoomCreator, IVector3D, LegacyDataType, ObjectRolling, PetType, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
|
||||
import { AvatarGuideStatus, IConnection, IRoomCreator, IVector3D, LegacyDataType, ObjectRolling, PetType, RoomObjectType, RoomObjectUserType, RoomObjectVariable, Vector3d } from '../../api';
|
||||
import { Disposable } from '../../core';
|
||||
import { AvatarGuideStatus } from '../avatar/enum/AvatarGuideStatus';
|
||||
import { DiceValueMessageEvent, FloorHeightMapEvent, FurnitureAliasesComposer, FurnitureAliasesEvent, FurnitureDataEvent, FurnitureFloorAddEvent, FurnitureFloorDataParser, FurnitureFloorEvent, FurnitureFloorRemoveEvent, FurnitureFloorUpdateEvent, FurnitureWallAddEvent, FurnitureWallDataParser, FurnitureWallEvent, FurnitureWallRemoveEvent, FurnitureWallUpdateEvent, GetRoomEntryDataMessageComposer, GuideSessionEndedMessageEvent, GuideSessionErrorMessageEvent, GuideSessionStartedMessageEvent, IgnoreResultEvent, ItemDataUpdateMessageEvent, ObjectsDataUpdateEvent, ObjectsRollingEvent, OneWayDoorStatusMessageEvent, PetExperienceEvent, PetFigureUpdateEvent, RoomEntryTileMessageEvent, RoomEntryTileMessageParser, RoomHeightMapEvent, RoomHeightMapUpdateEvent, RoomPaintEvent, RoomReadyMessageEvent, RoomUnitChatEvent, RoomUnitChatShoutEvent, RoomUnitChatWhisperEvent, RoomUnitDanceEvent, RoomUnitEffectEvent, RoomUnitEvent, RoomUnitExpressionEvent, RoomUnitHandItemEvent, RoomUnitIdleEvent, RoomUnitInfoEvent, RoomUnitNumberEvent, RoomUnitRemoveEvent, RoomUnitStatusEvent, RoomUnitTypingEvent, RoomVisualizationSettingsEvent, UserInfoEvent, YouArePlayingGameEvent } from '../communication';
|
||||
import { RoomPlaneParser } from './object/RoomPlaneParser';
|
||||
import { RoomVariableEnum } from './RoomVariableEnum';
|
||||
import { FurnitureStackingHeightMap } from './utils/FurnitureStackingHeightMap';
|
||||
import { LegacyWallGeometry } from './utils/LegacyWallGeometry';
|
||||
import { FurnitureStackingHeightMap, LegacyWallGeometry } from './utils';
|
||||
|
||||
export class RoomMessageHandler extends Disposable
|
||||
{
|
||||
|
@ -1,8 +1,7 @@
|
||||
|
||||
import { IRoomGeometry, IRoomObjectModel, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||
import { AvatarAction, IRoomGeometry, IRoomObjectModel, RoomObjectVariable, Vector3d } from '../../../../../api';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
import { RoomObjectMouseEvent, RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
||||
import { AvatarAction } from '../../../../avatar';
|
||||
import { Nitro } from '../../../../Nitro';
|
||||
import { MouseEventType } from '../../../../ui';
|
||||
import { RoomObjectFurnitureActionEvent, RoomObjectMoveEvent } from '../../../events';
|
||||
import { ObjectAvatarCarryObjectUpdateMessage, ObjectAvatarChatUpdateMessage, ObjectAvatarDanceUpdateMessage, ObjectAvatarEffectUpdateMessage, ObjectAvatarExpressionUpdateMessage, ObjectAvatarFigureUpdateMessage, ObjectAvatarFlatControlUpdateMessage, ObjectAvatarGestureUpdateMessage, ObjectAvatarMutedUpdateMessage, ObjectAvatarOwnMessage, ObjectAvatarPlayerValueUpdateMessage, ObjectAvatarPlayingGameUpdateMessage, ObjectAvatarPostureUpdateMessage, ObjectAvatarSelectedMessage, ObjectAvatarSignUpdateMessage, ObjectAvatarSleepUpdateMessage, ObjectAvatarTypingUpdateMessage, ObjectAvatarUpdateMessage, ObjectAvatarUseObjectUpdateMessage } from '../../../messages';
|
||||
@ -43,7 +42,7 @@ export class AvatarLogic extends MovingObjectLogic
|
||||
this._reportedLocation = null;
|
||||
this._effectChangeTimeStamp = 0;
|
||||
this._newEffect = 0;
|
||||
this._blinkingStartTimestamp = Nitro.instance.time + this.randomBlinkStartTimestamp();
|
||||
this._blinkingStartTimestamp = GetTickerTime() + this.randomBlinkStartTimestamp();
|
||||
this._blinkingEndTimestamp = 0;
|
||||
this._talkingEndTimestamp = 0;
|
||||
this._talkingPauseStartTimestamp = 0;
|
||||
@ -412,19 +411,19 @@ export class AvatarLogic extends MovingObjectLogic
|
||||
{
|
||||
if (effect === AvatarLogic.EFFECT_TYPE_SPLASH)
|
||||
{
|
||||
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._effectChangeTimeStamp = (GetTickerTime() + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM;
|
||||
}
|
||||
|
||||
else if (effect === AvatarLogic.EFFECT_TYPE_SPLASH_DARK)
|
||||
{
|
||||
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._effectChangeTimeStamp = (GetTickerTime() + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM_DARK;
|
||||
}
|
||||
|
||||
else if (model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM)
|
||||
{
|
||||
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._effectChangeTimeStamp = (GetTickerTime() + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._newEffect = effect;
|
||||
|
||||
effect = AvatarLogic.EFFECT_TYPE_SPLASH;
|
||||
@ -432,7 +431,7 @@ export class AvatarLogic extends MovingObjectLogic
|
||||
|
||||
else if (model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM_DARK)
|
||||
{
|
||||
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._effectChangeTimeStamp = (GetTickerTime() + AvatarLogic.EFFECT_SPLASH_LENGTH);
|
||||
this._newEffect = effect;
|
||||
|
||||
effect = AvatarLogic.EFFECT_TYPE_SPLASH_DARK;
|
||||
@ -445,7 +444,7 @@ export class AvatarLogic extends MovingObjectLogic
|
||||
|
||||
else
|
||||
{
|
||||
this._effectChangeTimeStamp = (Nitro.instance.time + delay);
|
||||
this._effectChangeTimeStamp = (GetTickerTime() + delay);
|
||||
this._newEffect = effect;
|
||||
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { RoomObjectVariable, StringDataType } from '../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||
import { RoomObjectBadgeAssetEvent, RoomObjectWidgetRequestEvent } from '../../../events';
|
||||
import { ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage } from '../../../messages';
|
||||
@ -36,7 +36,7 @@ export class FurnitureBadgeDisplayLogic extends FurnitureLogic
|
||||
this.object.model.setValue(RoomObjectVariable.FURNITURE_BADGE_ASSET_NAME, message.assetName);
|
||||
this.object.model.setValue(RoomObjectVariable.FURNITURE_BADGE_IMAGE_STATUS, 1);
|
||||
|
||||
this.update(PixiApplicationProxy.instance.ticker.lastTime);
|
||||
this.update(GetTickerTime());
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IRoomGeometry, RoomObjectVariable, StringDataType } from '../../../../../api';
|
||||
import { PixiApplicationProxy } from '../../../../../pixi-proxy';
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
import { RoomObjectUpdateMessage, RoomSpriteMouseEvent } from '../../../../../room';
|
||||
import { MouseEventType } from '../../../../ui';
|
||||
import { RoomObjectBadgeAssetEvent, RoomObjectWidgetRequestEvent } from '../../../events';
|
||||
@ -46,7 +46,7 @@ export class FurnitureGuildCustomizedLogic extends FurnitureMultiStateLogic
|
||||
{
|
||||
this.object.model.setValue(RoomObjectVariable.FURNITURE_GUILD_CUSTOMIZED_ASSET_NAME, message.assetName);
|
||||
|
||||
this.update(PixiApplicationProxy.instance.ticker.lastTime);
|
||||
this.update(GetTickerTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { GetTickerTime } from '../../../../../pixi-proxy';
|
||||
import { RoomObjectUpdateMessage } from '../../../../../room';
|
||||
import { Nitro } from '../../../../Nitro';
|
||||
import { ObjectDataUpdateMessage } from '../../../messages';
|
||||
import { FurnitureLogic } from './FurnitureLogic';
|
||||
|
||||
@ -43,7 +43,7 @@ export class FurnitureScoreLogic extends FurnitureLogic
|
||||
if ((difference * FurnitureScoreLogic.UPDATE_INTERVAL) > FurnitureScoreLogic.MAX_UPDATE_TIME) this._scoreIncreaser = (FurnitureScoreLogic.MAX_UPDATE_TIME / difference);
|
||||
else this._scoreIncreaser = FurnitureScoreLogic.UPDATE_INTERVAL;
|
||||
|
||||
this._scoreTimer = Nitro.instance.time;
|
||||
this._scoreTimer = GetTickerTime();
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user