cleaned stuff

This commit is contained in:
Dank074 2021-06-23 03:15:04 -05:00
parent 09e90a8c93
commit c599e91349
17 changed files with 221 additions and 340 deletions

View File

@ -1,16 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { CatalogClubGiftsParser } from '../../parser/catalog/CatalogClubGiftsParser'; import { ClubGiftInfoParser } from '../../parser/catalog/ClubGiftInfoParser';
export class CatalogClubGiftsEvent extends MessageEvent implements IMessageEvent export class CatalogClubGiftsEvent extends MessageEvent implements IMessageEvent
{ {
constructor(callBack: Function) constructor(callBack: Function)
{ {
super(callBack, CatalogClubGiftsParser); super(callBack, ClubGiftInfoParser);
} }
public getParser(): CatalogClubGiftsParser public getParser(): ClubGiftInfoParser
{ {
return this.parser as CatalogClubGiftsParser; return this.parser as ClubGiftInfoParser;
} }
} }

View File

@ -23,18 +23,13 @@ export class TriggerDefinition extends Triggerable
} }
} }
public get type(): number
{
return this._triggerConf;
}
public get code(): number public get code(): number
{ {
return this._triggerConf; return this._triggerConf;
} }
public get _Str_21837(): number[] public get conflictingActions(): number[]
{ {
return this._conflictingActions; return this._conflictingActions;
} }
} }

View File

@ -1,15 +1,14 @@
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser'; import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
import { CatalogClubOfferData } from './utils/CatalogClubOfferData';
import { CatalogPageOfferData } from './utils/CatalogPageOfferData'; import { CatalogPageOfferData } from './utils/CatalogPageOfferData';
import { _Str_5178 } from './utils/_Str_5178'; import { ClubGiftData } from './utils/ClubGiftData';
export class CatalogClubGiftsParser implements IMessageParser export class ClubGiftInfoParser implements IMessageParser
{ {
private _daysUntilNextGift:number; private _daysUntilNextGift:number;
private _giftsAvailable:number; private _giftsAvailable:number;
private _offers: CatalogPageOfferData[]; private _offers: CatalogPageOfferData[];
private _Str_5759:Map<number, _Str_5178>; private _giftData:Map<number, ClubGiftData>;
public flush(): boolean public flush(): boolean
{ {
@ -22,28 +21,23 @@ export class CatalogClubGiftsParser implements IMessageParser
if(!wrapper) return false; if(!wrapper) return false;
this._offers = []; this._offers = [];
this._Str_5759 = new Map<number, _Str_5178>(); this._giftData = new Map<number, ClubGiftData>();
this._daysUntilNextGift = wrapper.readInt(); this._daysUntilNextGift = wrapper.readInt();
this._giftsAvailable = wrapper.readInt(); this._giftsAvailable = wrapper.readInt();
let local2 = wrapper.readInt(); const offerCount = wrapper.readInt();
let local3 = 0; for(let i = 0; i < offerCount; i ++)
while(local3 < local2)
{ {
this._offers.push(new CatalogPageOfferData(wrapper)); this._offers.push(new CatalogPageOfferData(wrapper));
local3++;
} }
local2 = wrapper.readInt(); const giftDataCount = wrapper.readInt();
local3 = 0;
while(local3 < local2) for(let i = 0; i < giftDataCount; i++)
{ {
const item = new _Str_5178(wrapper); const item = new ClubGiftData(wrapper);
this._Str_5759.set(item.offerId, item); this._giftData.set(item.offerId, item);
local3++;
} }
return true; return true;
@ -69,16 +63,16 @@ export class CatalogClubGiftsParser implements IMessageParser
this._giftsAvailable = gifts; this._giftsAvailable = gifts;
} }
public getOfferExtraData(offerId: number): _Str_5178 public getOfferExtraData(offerId: number): ClubGiftData
{ {
if(!offerId) return null; if(!offerId) return null;
return this._Str_5759.get(offerId); return this._giftData.get(offerId);
} }
public get _Str_24398():Map<number, _Str_5178> public get giftData():Map<number, ClubGiftData>
{ {
return this._Str_5759; return this._giftData;
} }
} }

View File

@ -3,53 +3,53 @@ import { IMessageParser } from '../../../../../core/communication/messages/IMess
export class MarketplaceItemStatsParser implements IMessageParser export class MarketplaceItemStatsParser implements IMessageParser
{ {
private _Str_5049:number; private _averagePrice:number;
private _Str_10039:number; private _currentOfferCount:number;
private _Str_10803:number; private _historyLength:number;
private _Str_8270:number[]; private _dayOffsets:number[];
private _Str_9670:number[]; private _averagePrices:number[];
private _Str_8961:number[]; private _soldAmounts:number[];
private _Str_10894:number; private _furniTypeId:number;
private _Str_10644:number; private _furniCategoryId:number;
public get _Str_3925():number public get averagePrice():number
{ {
return this._Str_5049; return this._averagePrice;
} }
public get _Str_4121():number public get offerCount():number
{ {
return this._Str_10039; return this._currentOfferCount;
} }
public get _Str_10461():number public get historyLength():number
{ {
return this._Str_10803; return this._historyLength;
} }
public get _Str_9174():any[] public get dayOffsets():any[]
{ {
return this._Str_8270; return this._dayOffsets;
} }
public get _Str_11365():any[] public get averagePrices():any[]
{ {
return this._Str_9670; return this._averagePrices;
} }
public get _Str_11956():any[] public get soldAmounts():any[]
{ {
return this._Str_8961; return this._soldAmounts;
} }
public get _Str_8798():number public get furniTypeId():number
{ {
return this._Str_10894; return this._furniTypeId;
} }
public get _Str_9431():number public get furniCategoryId():number
{ {
return this._Str_10644; return this._furniCategoryId;
} }
public flush(): boolean public flush(): boolean
@ -61,23 +61,24 @@ export class MarketplaceItemStatsParser implements IMessageParser
{ {
if(!wrapper) return false; if(!wrapper) return false;
this._Str_5049 = wrapper.readInt(); this._averagePrice = wrapper.readInt();
this._Str_10039 = wrapper.readInt(); this._currentOfferCount = wrapper.readInt();
this._Str_10803 = wrapper.readInt(); this._historyLength = wrapper.readInt();
const _local_2:number = wrapper.readInt();
this._Str_8270 = []; const count = wrapper.readInt();
this._Str_9670 = []; this._dayOffsets = [];
this._Str_8961 = []; this._averagePrices = [];
let _local_3 = 0; this._soldAmounts = [];
while(_local_3 < _local_2)
for(let i = 0; i < count; i++)
{ {
this._Str_8270.push(wrapper.readInt()); this._dayOffsets.push(wrapper.readInt());
this._Str_9670.push(wrapper.readInt()); this._averagePrices.push(wrapper.readInt());
this._Str_8961.push(wrapper.readInt()); this._soldAmounts.push(wrapper.readInt());
_local_3++;
} }
this._Str_10644 = wrapper.readInt();
this._Str_10894 = wrapper.readInt(); this._furniCategoryId = wrapper.readInt();
this._furniTypeId = wrapper.readInt();
return true; return true;
} }

View File

@ -1,5 +1,4 @@
export * from './CatalogApproveNameResultParser'; export * from './CatalogApproveNameResultParser';
export * from './CatalogClubGiftsParser';
export * from './CatalogClubParser'; export * from './CatalogClubParser';
export * from './CatalogGiftConfigurationParser'; export * from './CatalogGiftConfigurationParser';
export * from './CatalogGiftUsernameUnavailableParser'; export * from './CatalogGiftUsernameUnavailableParser';
@ -16,6 +15,7 @@ export * from './CatalogRedeemVoucherOkParser';
export * from './CatalogSearchParser'; export * from './CatalogSearchParser';
export * from './CatalogSoldOutParser'; export * from './CatalogSoldOutParser';
export * from './CatalogUpdatedParser'; export * from './CatalogUpdatedParser';
export * from './ClubGiftInfoParser';
export * from './marketplace'; export * from './marketplace';
export * from './MarketplaceConfigParser'; export * from './MarketplaceConfigParser';
export * from './MarketplaceItemStatsParser'; export * from './MarketplaceItemStatsParser';

View File

@ -1,23 +1,22 @@
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
import { IObjectData } from '../../../../../room/object/data/IObjectData'; import { IObjectData } from '../../../../../room/object/data/IObjectData';
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType'; import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
import { MarketplaceOwnItem } from '../utils/MarketplaceOwnItem'; import { MarketplaceOffer } from '../utils/MarketPlaceOffer';
import { MarketplaceOfferItem } from '../utils/MarketplaceOfferItem';
export class MarketplaceOffersReceivedParser implements IMessageParser export class MarketplaceOffersReceivedParser implements IMessageParser
{ {
private readonly _Str_8964 = 1; private static readonly FURNITYPE_STUFF = 1;
private readonly _Str_13000 = 2; private static readonly FURNITYPE_WALL = 2;
private readonly _Str_14245 = 3; private static readonly FAKE_FURNITYPE_UNIQUE = 3;
private readonly _Str_18070 = 500; private readonly MAX_LIST_LENGTH = 500;
private _offers: MarketplaceOfferItem[]; private _offers: MarketplaceOffer[];
private _Str_11687: number; private _totalItemsFound: number;
public flush(): boolean public flush(): boolean
{ {
@ -33,9 +32,8 @@ export class MarketplaceOffersReceivedParser implements IMessageParser
this._offers = []; this._offers = [];
const offerCount = wrapper.readInt(); const offerCount = wrapper.readInt();
let i = 0;
while(i < offerCount) for(let i = 0; i < offerCount; i++)
{ {
const offerId = wrapper.readInt(); const offerId = wrapper.readInt();
const local3 = wrapper.readInt(); const local3 = wrapper.readInt();
@ -44,27 +42,27 @@ export class MarketplaceOffersReceivedParser implements IMessageParser
let local5: number; let local5: number;
let local6: string; let local6: string;
let local7: IObjectData; let local7: IObjectData;
if(itemId === this._Str_8964) if(itemId === MarketplaceOffersReceivedParser.FURNITYPE_STUFF)
{ {
local5 = wrapper.readInt(); local5 = wrapper.readInt();
local7 = this.getStuffData(wrapper); local7 = this.getStuffData(wrapper);
} }
else else
{ {
if(itemId == this._Str_13000) if(itemId == MarketplaceOffersReceivedParser.FURNITYPE_WALL)
{ {
local5 = wrapper.readInt(); local5 = wrapper.readInt();
local6 = wrapper.readString(); local6 = wrapper.readString();
} }
else else
{ {
if(itemId == this._Str_14245) if(itemId == MarketplaceOffersReceivedParser.FAKE_FURNITYPE_UNIQUE)
{ {
local5 = wrapper.readInt(); local5 = wrapper.readInt();
local7 = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY); local7 = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY);
local7.uniqueNumber = wrapper.readInt(); local7.uniqueNumber = wrapper.readInt();
local7.uniqueSeries = wrapper.readInt(); local7.uniqueSeries = wrapper.readInt();
itemId = this._Str_8964; itemId = MarketplaceOffersReceivedParser.FURNITYPE_STUFF;
} }
} }
} }
@ -74,26 +72,25 @@ export class MarketplaceOffersReceivedParser implements IMessageParser
const local10 = wrapper.readInt(); const local10 = wrapper.readInt();
const local11 = wrapper.readInt(); const local11 = wrapper.readInt();
const offerItem = new MarketplaceOfferItem(offerId, local5, itemId, local6, local7, local8, local3, local9, local10, local11); const offerItem = new MarketplaceOffer(offerId, local5, itemId, local6, local7, local8, local3, local9, local10, local11);
if(i < this._Str_18070) if(i < this.MAX_LIST_LENGTH)
{ {
this._offers.push(offerItem); this._offers.push(offerItem);
} }
i++;
} }
this._Str_11687 = wrapper.readInt(); this._totalItemsFound = wrapper.readInt();
return true; return true;
} }
public get offers():MarketplaceOfferItem[] public get offers():MarketplaceOffer[]
{ {
return this._offers; return this._offers;
} }
public get totalItemsFound():number public get totalItemsFound():number
{ {
return this._Str_11687; return this._totalItemsFound;
} }
private getStuffData(wrapper: IMessageDataWrapper): IObjectData private getStuffData(wrapper: IMessageDataWrapper): IObjectData

View File

@ -1,16 +1,16 @@
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper'; import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser'; import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
import { IObjectData } from '../../../../../room/object/data/IObjectData'; import { IObjectData } from '../../../../../room/object/data/IObjectData';
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType'; import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
import { MarketplaceOwnItem } from '../utils/MarketplaceOwnItem'; import { MarketplaceOffer } from '../utils/MarketPlaceOffer';
export class MarketplaceOwnItemsParser implements IMessageParser export class MarketplaceOwnItemsParser implements IMessageParser
{ {
private static _Str_18070 = 500; private static MAX_LIST_LENGTH = 500;
private _offers: MarketplaceOwnItem[]; private _offers: MarketplaceOffer[];
private _Str_11581: number; private _creditsWaiting: number;
public flush(): boolean public flush(): boolean
@ -25,11 +25,10 @@ export class MarketplaceOwnItemsParser implements IMessageParser
if(!wrapper) return false; if(!wrapper) return false;
this._offers = []; this._offers = [];
this._Str_11581 = wrapper.readInt(); // SoldPriceTotal this._creditsWaiting = wrapper.readInt(); // SoldPriceTotal
const offerCount = wrapper.readInt(); const offerCount = wrapper.readInt();
let i = 0; for(let i = 0; i < offerCount; i++)
while(i < offerCount)
{ {
const offerId = wrapper.readInt(); const offerId = wrapper.readInt();
const status = wrapper.readInt(); const status = wrapper.readInt();
@ -63,27 +62,25 @@ export class MarketplaceOwnItemsParser implements IMessageParser
const price = wrapper.readInt(); const price = wrapper.readInt();
const local9 = wrapper.readInt(); const local9 = wrapper.readInt();
const local10 = wrapper.readInt(); const local10 = wrapper.readInt();
const local13 = new MarketplaceOwnItem(offerId, furniId, furniType, extraData, stuffData, price, status, local9, local10); const local13 = new MarketplaceOffer(offerId, furniId, furniType, extraData, stuffData, price, status, local9, local10);
if(i < MarketplaceOwnItemsParser._Str_18070) if(i < MarketplaceOwnItemsParser.MAX_LIST_LENGTH)
{ {
this._offers.push(local13); this._offers.push(local13);
} }
i++;
} }
return true; return true;
} }
public get offers():MarketplaceOwnItem[] public get offers():MarketplaceOffer[]
{ {
return this._offers; return this._offers;
} }
public get creditsWaiting():number public get creditsWaiting():number
{ {
return this._Str_11581; return this._creditsWaiting;
} }
private getStuffData(wrapper: IMessageDataWrapper): IObjectData private getStuffData(wrapper: IMessageDataWrapper): IObjectData

View File

@ -0,0 +1,48 @@
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
export class ClubGiftData
{
private _offerId:number;
private _isVip:boolean;
private _isSelectable:boolean;
private _daysRequired:number;
constructor(wrapper: IMessageDataWrapper)
{
if(!wrapper) throw new Error('invalid_wrapper');
this.parse(wrapper);
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._offerId = wrapper.readInt();
this._isVip = wrapper.readBoolean();
this._daysRequired = wrapper.readInt();
this._isSelectable = wrapper.readBoolean();
return true;
}
public get offerId():number
{
return this._offerId;
}
public get isVip():boolean
{
return this._isVip;
}
public get isSelectable():boolean
{
return this._isSelectable;
}
public get daysRequired():number
{
return this._daysRequired;
}
}

View File

@ -1,6 +1,6 @@
import { IObjectData } from '../../../../../room/object/data/IObjectData'; import { IObjectData } from 'nitro-renderer/src/nitro/room/object/data/IObjectData';
export class MarketplaceOfferItem export class MarketplaceOffer
{ {
private readonly _offerId:number; private readonly _offerId:number;
private readonly _furniId:number; private readonly _furniId:number;
@ -9,22 +9,22 @@ export class MarketplaceOfferItem
private readonly _stuffData:IObjectData; private readonly _stuffData:IObjectData;
private readonly _price:number; private readonly _price:number;
private readonly _status:number; private readonly _status:number;
private readonly _Str_12399:number = -1; private readonly _timeLeftMinutes:number = -1;
private readonly _Str_5049:number; private readonly _averagePrice:number;
private readonly _Str_4620:number; private readonly _offerCount:number;
constructor(offerId:number, furniId:number, _arg_3:number, extraData:string, stuffData:IObjectData, price:number, status:number, _arg_8:number, _arg_9:number, _arg_10:number=-1) constructor(offerId:number, furniId:number, furniType:number, extraData:string, stuffData:IObjectData, price:number, status:number, timeLeftMinutes:number, averagePrice:number, offerCount:number=-1)
{ {
this._offerId = offerId; this._offerId = offerId;
this._furniId = furniId; this._furniId = furniId;
this._furniType = _arg_3; this._furniType = furniType;
this._extraData = extraData; this._extraData = extraData;
this._stuffData = stuffData; this._stuffData = stuffData;
this._price = price; this._price = price;
this._status = status; this._status = status;
this._Str_12399 = _arg_8; this._timeLeftMinutes = timeLeftMinutes;
this._Str_5049 = _arg_9; this._averagePrice = averagePrice;
this._Str_4620 = _arg_10; this._offerCount = offerCount;
} }
public get offerId():number public get offerId():number
@ -62,19 +62,19 @@ export class MarketplaceOfferItem
return this._status; return this._status;
} }
public get _Str_5853():number public get timeLeftMinutes():number
{ {
return this._Str_12399; return this._timeLeftMinutes;
} }
public get _Str_3925():number public get averagePrice():number
{ {
return this._Str_5049; return this._averagePrice;
} }
public get _Str_4121():number public get offerCount():number
{ {
return this._Str_4620; return this._offerCount;
} }
public get isUniqueLimitedItem():boolean public get isUniqueLimitedItem():boolean

View File

@ -31,8 +31,6 @@ export class MarketplaceOfferData
this._offerCount = offerCount; this._offerCount = offerCount;
} }
public get offerId():number public get offerId():number
{ {
return this._offerId; return this._offerId;
@ -73,8 +71,7 @@ export class MarketplaceOfferData
this._price = k; this._price = k;
} }
public get averagePrice():number
public get _Str_3925():number
{ {
return this._averagePrice; return this._averagePrice;
} }
@ -86,16 +83,15 @@ export class MarketplaceOfferData
public set image(k:string) public set image(k:string)
{ {
this._image = k; this._image = k;
} }
public set _Str_4774(k:number) public set imageCallback(k:number)
{ {
this._imageCallback = k; this._imageCallback = k;
} }
public get _Str_4774():number public get imageCallback():number
{ {
return this._imageCallback; return this._imageCallback;
} }
@ -105,24 +101,22 @@ export class MarketplaceOfferData
return this._status; return this._status;
} }
public get _Str_5853():number public get timeLeftMinutes():number
{ {
return this._timeLeftMinutes; return this._timeLeftMinutes;
} }
public set _Str_5853(k:number) public set timeLeftMinutes(k:number)
{ {
this._timeLeftMinutes = k; this._timeLeftMinutes = k;
} }
public get offerCount():number
public get _Str_4121():number
{ {
return this._offerCount; return this._offerCount;
} }
public set _Str_4121(k:number) public set offerCount(k:number)
{ {
this._offerCount = k; this._offerCount = k;
} }

View File

@ -1,80 +0,0 @@
import { IObjectData } from '../../../../../room/object/data/IObjectData';
export class MarketplaceOwnItem
{
private readonly _offerId:number;
private readonly _furniId:number;
private readonly _furniType:number;
private readonly _extraData:string;
private readonly _stuffData:IObjectData;
private readonly _price:number;
private readonly _status:number;
private readonly _Str_12399:number = -1;
private readonly _Str_5049:number;
private readonly _Str_4620:number;
constructor(offerId: number, furniId: number, furniType: number, extraData: string, stuffData: IObjectData, price: number, status: number, arg8: number, arg9: number, arg10:number = -1)
{
this._offerId = offerId;
this._furniId = furniId;
this._furniType = furniType;
this._extraData = extraData;
this._stuffData = stuffData;
this._price = price;
this._status = status;
this._Str_12399 = arg8;
this._Str_5049 = arg9;
this._Str_4620 = arg10;
}
public get offerId():number
{
return this._offerId;
}
public get furniId():number
{
return this._furniId;
}
public get furniType():number
{
return this._furniType;
}
public get extraData():string
{
return this._extraData;
}
public get stuffData():IObjectData
{
return this._stuffData;
}
public get price():number
{
return this._price;
}
public get status():number
{
return this._status;
}
public get _Str_5853():number
{
return this._Str_12399;
}
public get _Str_3925():number
{
return this._Str_5049;
}
public get _Str_4121():number
{
return this._Str_4620;
}
}

View File

@ -1,64 +0,0 @@
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
export class _Str_5178
{
private _Str_2507:number;
private _Str_6052:boolean;
private _Str_693:boolean;
private _Str_19803:number;
constructor(wrapper: IMessageDataWrapper)
{
if(!wrapper) throw new Error('invalid_wrapper');
this.parse(wrapper);
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._Str_2507 = wrapper.readInt();
this._Str_6052 = wrapper.readBoolean();
this._Str_19803 = wrapper.readInt();
this._Str_693 = wrapper.readBoolean();
return true;
}
public get offerId():number
{
return this._Str_2507;
}
public get _Str_12313():boolean
{
return this._Str_6052;
}
public get isClubOnly(): boolean
{
return this._Str_6052;
}
public get isSelectable():boolean
{
return this._Str_693;
}
public get _Str_21146():number
{
return this._Str_19803;
}
public get availableInDays(): number
{
return this._Str_19803;
}
public get isAvailable(): boolean
{
return this._Str_693;
}
}

View File

@ -7,11 +7,10 @@ export * from './CatalogPageOfferData';
export * from './CatalogProductOfferData'; export * from './CatalogProductOfferData';
export * from './CatalogPurchaseData'; export * from './CatalogPurchaseData';
export * from './CatalogSearchData'; export * from './CatalogSearchData';
export * from './ClubGiftData';
export * from './ICatalogLocalizationData'; export * from './ICatalogLocalizationData';
export * from './ICatalogPageData'; export * from './ICatalogPageData';
export * from './ICatalogPageParser'; export * from './ICatalogPageParser';
export * from './MarketPlaceOffer';
export * from './MarketplaceOfferData'; export * from './MarketplaceOfferData';
export * from './MarketplaceOfferItem';
export * from './MarketplaceOwnItem';
export * from './SellablePetPaletteData'; export * from './SellablePetPaletteData';
export * from './_Str_5178';

View File

@ -36,11 +36,11 @@ export class AvatarLogic extends MovingObjectLogic
{ {
private static MAX_HAND_ID: number = 999999999; private static MAX_HAND_ID: number = 999999999;
private static MAX_HAND_USE_ID: number = 999; private static MAX_HAND_USE_ID: number = 999;
private static _Str_13364: number = 28; private static EFFECT_TYPE_SPLASH: number = 28;
private static _Str_8860: number = 500; private static EFFECT_SPLASH_LENGTH: number = 500;
private static _Str_15351: number = 29; private static EFFECT_TYPE_SWIM: number = 29;
private static _Str_13733: number = 184; private static EFFECT_TYPE_SPLASH_DARK: number = 184;
private static _Str_13094: number = 185; private static EFFECT_TYPE_SWIM_DARK: number = 185;
private _selected: boolean; private _selected: boolean;
private _reportedLocation: Vector3d; private _reportedLocation: Vector3d;
@ -434,32 +434,32 @@ export class AvatarLogic extends MovingObjectLogic
private updateAvatarEffect(effect: number, delay: number, model: IRoomObjectModel): void private updateAvatarEffect(effect: number, delay: number, model: IRoomObjectModel): void
{ {
if(effect === AvatarLogic._Str_13364) if(effect === AvatarLogic.EFFECT_TYPE_SPLASH)
{ {
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic._Str_8860); this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
this._newEffect = AvatarLogic._Str_15351; this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM;
} }
else if(effect === AvatarLogic._Str_13733) else if(effect === AvatarLogic.EFFECT_TYPE_SPLASH_DARK)
{ {
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic._Str_8860); this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
this._newEffect = AvatarLogic._Str_13094; this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM_DARK;
} }
else if(model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic._Str_15351) else if(model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM)
{ {
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic._Str_8860); this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
this._newEffect = effect; this._newEffect = effect;
effect = AvatarLogic._Str_13364; effect = AvatarLogic.EFFECT_TYPE_SPLASH;
} }
else if(model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic._Str_13094) else if(model.getValue<number>(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM_DARK)
{ {
this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic._Str_8860); this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH);
this._newEffect = effect; this._newEffect = effect;
effect = AvatarLogic._Str_13733; effect = AvatarLogic.EFFECT_TYPE_SPLASH_DARK;
} }
else if(delay === 0) else if(delay === 0)

View File

@ -65,7 +65,7 @@ export class PetSizeData extends AnimationSizeData
return this._posturesToAnimations.get(posture); return this._posturesToAnimations.get(posture);
} }
public _Str_18284(k: string): boolean public getGestureDisabled(k: string): boolean
{ {
if(k === 'ded') return true; if(k === 'ded') return true;
@ -79,7 +79,7 @@ export class PetSizeData extends AnimationSizeData
return this._gesturesToAnimations.get(gesture); return this._gesturesToAnimations.get(gesture);
} }
public _Str_14207(k: number, _arg_2: boolean): string public animationToPosture(k: number, _arg_2: boolean): string
{ {
if((k >= 0) && (k < this._posturesToAnimations.size)) if((k >= 0) && (k < this._posturesToAnimations.size))
{ {
@ -100,7 +100,7 @@ export class PetSizeData extends AnimationSizeData
return (_arg_2) ? this._defaultPosture : null; return (_arg_2) ? this._defaultPosture : null;
} }
public _Str_17844(index: number): string public animationToGesture(index: number): string
{ {
if((index >= 0) && (index < this._gesturesToAnimations.size)) if((index >= 0) && (index < this._gesturesToAnimations.size))
{ {
@ -121,7 +121,7 @@ export class PetSizeData extends AnimationSizeData
return null; return null;
} }
public _Str_17976(k: number): string public getGestureForAnimationId(k: number): string
{ {
for(const _local_2 of this._gesturesToAnimations.keys()) for(const _local_2 of this._gesturesToAnimations.keys())
{ {
@ -140,4 +140,4 @@ export class PetSizeData extends AnimationSizeData
{ {
return this._gesturesToAnimations.size; return this._gesturesToAnimations.size;
} }
} }

View File

@ -18,12 +18,12 @@ export class PetVisualization extends FurnitureAnimatedVisualization
private static HEAD: string = 'head'; private static HEAD: string = 'head';
private static SADDLE: string = 'saddle'; private static SADDLE: string = 'saddle';
private static HAIR: string = 'hair'; private static HAIR: string = 'hair';
private static _Str_7490: number = 1; private static ADDITIONAL_SPRITE_COUNT: number = 1;
private static _Str_13277: number = 1000; private static EXPERIENCE_BUBBLE_VISIBLE_IN_MS: number = 1000;
private static PET_EXPERIENCE_BUBBLE_PNG: string = 'pet_experience_bubble_png'; private static PET_EXPERIENCE_BUBBLE_PNG: string = 'pet_experience_bubble_png';
private static _Str_16082: number = 0; private static POSTURE_ANIMATION_INDEX: number = 0;
private static _Str_17658: number = 1; private static GESTURE_ANIMATION_INDEX: number = 1;
private static _Str_16677: number = 2; private static ANIMATION_INDEX_COUNT: number = 2;
protected _data: PetVisualizationData; protected _data: PetVisualizationData;
@ -73,7 +73,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
this._previousAnimationDirection = -1; this._previousAnimationDirection = -1;
this._animationStates = []; this._animationStates = [];
while(this._animationStates.length < PetVisualization._Str_16677) this._animationStates.push(new AnimationStateData()); while(this._animationStates.length < PetVisualization.ANIMATION_INDEX_COUNT) this._animationStates.push(new AnimationStateData());
} }
public initialize(data: IObjectVisualizationData): boolean public initialize(data: IObjectVisualizationData): boolean
@ -130,7 +130,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
// _local_16 = this._animationData._Str_17398(_Str_3289); // _local_16 = this._animationData._Str_17398(_Str_3289);
// if (_local_16 > 0) // if (_local_16 > 0)
// { // {
// _local_4 = this._animationData._Str_14207(_Str_3289, (_local_6 % _local_16), true); // _local_4 = this._animationData.animationToPosture(_Str_3289, (_local_6 % _local_16), true);
// _local_5 = null; // _local_5 = null;
// } // }
// } // }
@ -140,7 +140,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
// _local_17 = this._animationData._Str_16869(_Str_3289); // _local_17 = this._animationData._Str_16869(_Str_3289);
// if (_local_17 > 0) // if (_local_17 > 0)
// { // {
// _local_5 = this._animationData._Str_17844(_Str_3289, (_local_7 % _local_17)); // _local_5 = this._animationData.animationToGesture(_Str_3289, (_local_7 % _local_17));
// } // }
// } // }
// this._Str_14314(_local_4, _local_5); // this._Str_14314(_local_4, _local_5);
@ -227,29 +227,29 @@ export class PetVisualization extends FurnitureAnimatedVisualization
{ {
this._posture = posture; this._posture = posture;
this._Str_16058(PetVisualization._Str_16082, this._data.postureToAnimation(this._scale, posture)); this.setAnimationForIndex(PetVisualization.POSTURE_ANIMATION_INDEX, this._data.postureToAnimation(this._scale, posture));
} }
if(this._data._Str_18284(this._scale, posture)) gesture = null; if(this._data.getGestureDisabled(this._scale, posture)) gesture = null;
if(gesture !== this._gesture) if(gesture !== this._gesture)
{ {
this._gesture = gesture; this._gesture = gesture;
this._Str_16058(PetVisualization._Str_17658, this._data.gestureToAnimation(this._scale, gesture)); this.setAnimationForIndex(PetVisualization.GESTURE_ANIMATION_INDEX, this._data.gestureToAnimation(this._scale, gesture));
} }
} }
private _Str_22634(k: number): AnimationStateData private getAnimationStateData(k: number): AnimationStateData
{ {
if((k >= 0) && (k < this._animationStates.length)) return this._animationStates[k]; if((k >= 0) && (k < this._animationStates.length)) return this._animationStates[k];
return null; return null;
} }
private _Str_16058(k: number, _arg_2: number): void private setAnimationForIndex(k: number, _arg_2: number): void
{ {
const animationStateData = this._Str_22634(k); const animationStateData = this.getAnimationStateData(k);
if(animationStateData) if(animationStateData)
{ {
@ -301,7 +301,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
{ {
if(AnimationData.isTransitionFromAnimation(stateData.animationId) || AnimationData.isTransitionToAnimation(stateData.animationId)) if(AnimationData.isTransitionFromAnimation(stateData.animationId) || AnimationData.isTransitionToAnimation(stateData.animationId))
{ {
this._Str_16058(index, stateData.animationAfterTransitionId); this.setAnimationForIndex(index, stateData.animationAfterTransitionId);
animationOver = false; animationOver = false;
} }
@ -319,17 +319,17 @@ export class PetVisualization extends FurnitureAnimatedVisualization
protected getSpriteAssetName(scale: number, layerId: number): string protected getSpriteAssetName(scale: number, layerId: number): string
{ {
if(this._headOnly && this._Str_24824(layerId)) return null; if(this._headOnly && this.isNonHeadSprite(layerId)) return null;
if(this._isRiding && this._parser3(layerId)) return null; if(this._isRiding && this._parser3(layerId)) return null;
const totalSprites = this.totalSprites; const totalSprites = this.totalSprites;
if(layerId < (totalSprites - PetVisualization._Str_7490)) if(layerId < (totalSprites - PetVisualization.ADDITIONAL_SPRITE_COUNT))
{ {
const validScale = this.getValidSize(scale); const validScale = this.getValidSize(scale);
if(layerId < (totalSprites - (1 + PetVisualization._Str_7490))) if(layerId < (totalSprites - (1 + PetVisualization.ADDITIONAL_SPRITE_COUNT)))
{ {
if(layerId >= FurnitureVisualizationData.LAYER_LETTERS.length) return null; if(layerId >= FurnitureVisualizationData.LAYER_LETTERS.length) return null;
@ -348,7 +348,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
protected getLayerColor(scale: number, layerId: number, colorId: number): number protected getLayerColor(scale: number, layerId: number, colorId: number): number
{ {
if(layerId < (this.totalSprites - PetVisualization._Str_7490)) return this._color; if(layerId < (this.totalSprites - PetVisualization.ADDITIONAL_SPRITE_COUNT)) return this._color;
return 0xFFFFFF; return 0xFFFFFF;
} }
@ -406,7 +406,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
private getDirection(scale: number, layerId: number): number private getDirection(scale: number, layerId: number): number
{ {
if(!this._Str_23973(layerId)) return this._direction; if(!this.isHeadSprite(layerId)) return this._direction;
return this._data.getValidDirection(scale, this._headDirection); return this._data.getValidDirection(scale, this._headDirection);
} }
@ -432,7 +432,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
return super.getFrameNumber(scale, layerId); return super.getFrameNumber(scale, layerId);
} }
private _Str_23973(layerId: number): boolean private isHeadSprite(layerId: number): boolean
{ {
if(this._headSprites[layerId] === undefined) if(this._headSprites[layerId] === undefined)
{ {
@ -446,11 +446,11 @@ export class PetVisualization extends FurnitureAnimatedVisualization
return this._headSprites[layerId]; return this._headSprites[layerId];
} }
private _Str_24824(layerId: number): boolean private isNonHeadSprite(layerId: number): boolean
{ {
if(this._nonHeadSprites[layerId] === undefined) if(this._nonHeadSprites[layerId] === undefined)
{ {
if(layerId < (this.totalSprites - (1 + PetVisualization._Str_7490))) if(layerId < (this.totalSprites - (1 + PetVisualization.ADDITIONAL_SPRITE_COUNT)))
{ {
const tag = this._data.getLayerTag(this._scale, DirectionData.USE_DEFAULT_DIRECTION, layerId); const tag = this._data.getLayerTag(this._scale, DirectionData.USE_DEFAULT_DIRECTION, layerId);
@ -515,7 +515,7 @@ export class PetVisualization extends FurnitureAnimatedVisualization
protected getAdditionalLayerCount(): number protected getAdditionalLayerCount(): number
{ {
return super.getAdditionalLayerCount() + PetVisualization._Str_7490; return super.getAdditionalLayerCount() + PetVisualization.ADDITIONAL_SPRITE_COUNT;
} }
protected setLayerCount(count: number): void protected setLayerCount(count: number): void
@ -551,9 +551,9 @@ export class PetVisualization extends FurnitureAnimatedVisualization
part = part.split('@')[0]; part = part.split('@')[0];
posture = this._data._Str_14207(scale, (parseInt(part) / 100), false); posture = this._data.animationToPosture(scale, (parseInt(part) / 100), false);
if(!posture) posture = this._data._Str_17976(scale, (parseInt(part) / 100)); if(!posture) posture = this._data.getGestureForAnimationId(scale, (parseInt(part) / 100));
} }
return posture; return posture;

View File

@ -57,13 +57,13 @@ export class PetVisualizationData extends FurnitureAnimatedVisualizationData
return size.postureToAnimation(posture); return size.postureToAnimation(posture);
} }
public _Str_18284(scale: number, posture: string): boolean public getGestureDisabled(scale: number, posture: string): boolean
{ {
const size = this.getSizeData(scale) as PetSizeData; const size = this.getSizeData(scale) as PetSizeData;
if(!size) return false; if(!size) return false;
return size._Str_18284(posture); return size.getGestureDisabled(posture);
} }
public gestureToAnimation(scale: number, gesture: string): number public gestureToAnimation(scale: number, gesture: string): number
@ -75,31 +75,31 @@ export class PetVisualizationData extends FurnitureAnimatedVisualizationData
return size.gestureToAnimation(gesture); return size.gestureToAnimation(gesture);
} }
public _Str_14207(scale: number, index: number, useDefault: boolean): string public animationToPosture(scale: number, index: number, useDefault: boolean): string
{ {
const size = this.getSizeData(scale) as PetSizeData; const size = this.getSizeData(scale) as PetSizeData;
if(!size) return null; if(!size) return null;
return size._Str_14207(index, useDefault); return size.animationToPosture(index, useDefault);
} }
public _Str_17844(scale: number, index: number): string public animationToGesture(scale: number, index: number): string
{ {
const size = this.getSizeData(scale) as PetSizeData; const size = this.getSizeData(scale) as PetSizeData;
if(!size) return null; if(!size) return null;
return size._Str_17844(index); return size.animationToGesture(index);
} }
public _Str_17976(scale: number, _arg_2: number): string public getGestureForAnimationId(scale: number, _arg_2: number): string
{ {
const size = this.getSizeData(scale) as PetSizeData; const size = this.getSizeData(scale) as PetSizeData;
if(!size) return null; if(!size) return null;
return size._Str_17976(_arg_2); return size.getGestureForAnimationId(_arg_2);
} }
public totalPostures(scale: number): number public totalPostures(scale: number): number