mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
cleaned marketplace parsers
This commit is contained in:
parent
e6d53aba25
commit
b7a10a578e
@ -17,7 +17,7 @@ import { CatalogRedeemVoucherOkEvent } from './messages/incoming/catalog/Catalog
|
||||
import { CatalogSearchEvent } from './messages/incoming/catalog/CatalogSearchEvent';
|
||||
import { CatalogSoldOutEvent } from './messages/incoming/catalog/CatalogSoldOutEvent';
|
||||
import { CatalogUpdatedEvent } from './messages/incoming/catalog/CatalogUpdatedEvent';
|
||||
import { MarketplaceAfterOrderStatusEvent } from './messages/incoming/catalog/marketplace/MarketplaceAfterOrderStatusEvent';
|
||||
import { MarketplaceBuyOfferResultEvent } from './messages/incoming/catalog/marketplace/MarketplaceBuyOfferResultEvent';
|
||||
import { MarketplaceCancelItemEvent } from './messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
|
||||
import { MarketplaceOffersReceivedEvent } from './messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
|
||||
import { MarketplaceOwnItemsEvent } from './messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
|
||||
@ -740,7 +740,7 @@ export class NitroMessages implements IMessageConfiguration
|
||||
this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelItemEvent);
|
||||
this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceItemPostedEvent);
|
||||
this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketplaceOffersReceivedEvent);
|
||||
this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceAfterOrderStatusEvent);
|
||||
this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceBuyOfferResultEvent);
|
||||
}
|
||||
|
||||
private registerComposers(): void
|
||||
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { MarketplaceAfterOrderParser } from '../../../parser/catalog/marketplace/MarketplaceAfterOrderParser';
|
||||
|
||||
export class MarketplaceAfterOrderStatusEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, MarketplaceAfterOrderParser);
|
||||
}
|
||||
|
||||
public getParser(): MarketplaceAfterOrderParser
|
||||
{
|
||||
return this.parser as MarketplaceAfterOrderParser;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { MarketplaceBuyOfferResultParser } from '../../../parser/catalog/marketplace/MarketplaceBuyOfferResultParser';
|
||||
|
||||
export class MarketplaceBuyOfferResultEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, MarketplaceBuyOfferResultParser);
|
||||
}
|
||||
|
||||
public getParser(): MarketplaceBuyOfferResultParser
|
||||
{
|
||||
return this.parser as MarketplaceBuyOfferResultParser;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export * from './MarketplaceAfterOrderStatusEvent';
|
||||
export * from './MarketplaceBuyOfferResultEvent';
|
||||
export * from './MarketplaceCancelItemEvent';
|
||||
export * from './MarketplaceOffersReceivedEvent';
|
||||
export * from './MarketplaceOwnItemsEvent';
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { MarketplaceSellItemParser } from '../../../parser/inventory/marketplace/MarketplaceSellItemParser';
|
||||
import { MarketplaceCanMakeOfferResultParser } from '../../../parser/inventory/marketplace/MarketplaceCanMakeOfferResultParser';
|
||||
|
||||
export class MarketplaceSellItemEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, MarketplaceSellItemParser);
|
||||
super(callBack, MarketplaceCanMakeOfferResultParser);
|
||||
}
|
||||
|
||||
public getParser(): MarketplaceSellItemParser
|
||||
public getParser(): MarketplaceCanMakeOfferResultParser
|
||||
{
|
||||
return this.parser as MarketplaceSellItemParser;
|
||||
return this.parser as MarketplaceCanMakeOfferResultParser;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomEnterErrorParser } from '../../../parser/room/access/RoomEnterErrorParser';
|
||||
import { CantConnectMessageParser } from '../../../parser/room/access/CantConnectMessageParser';
|
||||
|
||||
export class RoomEnterErrorEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomEnterErrorParser);
|
||||
super(callBack, CantConnectMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomEnterErrorParser
|
||||
public getParser(): CantConnectMessageParser
|
||||
{
|
||||
return this.parser as RoomEnterErrorParser;
|
||||
return this.parser as CantConnectMessageParser;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,12 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class MarketplaceAfterOrderParser implements IMessageParser
|
||||
export class MarketplaceBuyOfferResultParser implements IMessageParser
|
||||
{
|
||||
|
||||
private _result: number;
|
||||
private _offerId: number = -1;
|
||||
private _Str_20780: number = -1;
|
||||
private _Str_8508: number = -1;
|
||||
private _newOfferId: number = -1;
|
||||
private _newPrice: number = -1;
|
||||
private _requestedOfferId: number = -1;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@ -19,9 +18,9 @@ export class MarketplaceAfterOrderParser implements IMessageParser
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._result = wrapper.readInt();
|
||||
this._offerId = wrapper.readInt();
|
||||
this._Str_20780 = wrapper.readInt();
|
||||
this._Str_8508 = wrapper.readInt();
|
||||
this._newOfferId = wrapper.readInt();
|
||||
this._newPrice = wrapper.readInt();
|
||||
this._requestedOfferId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -33,16 +32,16 @@ export class MarketplaceAfterOrderParser implements IMessageParser
|
||||
|
||||
public get offerId():number
|
||||
{
|
||||
return this._offerId;
|
||||
return this._newOfferId;
|
||||
}
|
||||
|
||||
public get _Str_24839():number
|
||||
public get newPrice():number
|
||||
{
|
||||
return this._Str_20780;
|
||||
return this._newPrice;
|
||||
}
|
||||
|
||||
public get _Str_7501():number
|
||||
public get requestedOfferId():number
|
||||
{
|
||||
return this._Str_8508;
|
||||
return this._requestedOfferId;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export * from './MarketplaceAfterOrderParser';
|
||||
export * from './MarketplaceBuyOfferResultParser';
|
||||
export * from './MarketplaceCancelItemParser';
|
||||
export * from './MarketplaceOffersReceivedParser';
|
||||
export * from './MarketplaceOwnItemsParser';
|
||||
|
@ -6,12 +6,12 @@ import { AchievementData } from '../../../incoming/inventory/achievements/Achiev
|
||||
export class AchievementsParser implements IMessageParser
|
||||
{
|
||||
private _achievements: AchievementData[];
|
||||
private _Str_19269: string;
|
||||
private _defaultCategory: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._achievements = [];
|
||||
this._Str_19269 = null;
|
||||
this._defaultCategory = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -31,7 +31,7 @@ export class AchievementsParser implements IMessageParser
|
||||
totalCount--;
|
||||
}
|
||||
|
||||
this._Str_19269 = k.readString();
|
||||
this._defaultCategory = k.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -41,8 +41,8 @@ export class AchievementsParser implements IMessageParser
|
||||
return this._achievements;
|
||||
}
|
||||
|
||||
public get _Str_16300(): string
|
||||
public get defaultCategory(): string
|
||||
{
|
||||
return this._Str_19269;
|
||||
return this._defaultCategory;
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class MarketplaceSellItemParser implements IMessageParser
|
||||
export class MarketplaceCanMakeOfferResultParser implements IMessageParser
|
||||
{
|
||||
private _Str_19825: number = null;
|
||||
private _tokenCount: number = null;
|
||||
private _result: number = null;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._Str_19825 = null;
|
||||
this._tokenCount = null;
|
||||
this._result = null;
|
||||
|
||||
return true;
|
||||
@ -19,20 +19,18 @@ export class MarketplaceSellItemParser implements IMessageParser
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._result = wrapper.readInt();
|
||||
this._Str_19825 = wrapper.readInt();
|
||||
this._tokenCount = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get _Str_24601(): number
|
||||
public get tokenCount(): number
|
||||
{
|
||||
return this._Str_19825;
|
||||
return this._tokenCount;
|
||||
}
|
||||
|
||||
public get _Str_3278(): number
|
||||
public get resultCode(): number
|
||||
{
|
||||
return this._result;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
export * from './MarketplaceCanMakeOfferResultParser';
|
||||
export * from './MarketplaceItemPostedParser';
|
||||
export * from './MarketplaceSellItemParser';
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class RoomEnterErrorParser implements IMessageParser
|
||||
export class CantConnectMessageParser implements IMessageParser
|
||||
{
|
||||
public static FULL_ERROR: number = 1;
|
||||
public static _Str_19431: number = 2;
|
||||
public static QUEUE_ERROR: number = 3;
|
||||
public static BANNED: number = 4;
|
||||
public static REASON_FULL: number = 1;
|
||||
public static REASON_CLOSED: number = 2;
|
||||
public static REASON_QUEUE_ERROR: number = 3;
|
||||
public static REASON_BANNED: number = 4;
|
||||
|
||||
private _reason: number;
|
||||
private _parameter: string;
|
||||
@ -38,4 +38,4 @@ export class RoomEnterErrorParser implements IMessageParser
|
||||
{
|
||||
return this._parameter;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
export * from './CantConnectMessageParser';
|
||||
export * from './doorbell';
|
||||
export * from './rights';
|
||||
export * from './RoomEnterErrorParser';
|
||||
export * from './RoomEnterParser';
|
||||
export * from './RoomFowardParser';
|
||||
|
Loading…
Reference in New Issue
Block a user