mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-31 11:12:35 +01:00
Merge branch 'dev' of https://github.com/billsonnn/nitro-renderer into dev
This commit is contained in:
commit
1d346749e6
@ -10,12 +10,6 @@ import { InitCameraMessageEvent } from './messages/incoming/camera/InitCameraMes
|
|||||||
import { ThumbnailStatusMessageEvent } from './messages/incoming/camera/ThumbnailStatusMessageEvent';
|
import { ThumbnailStatusMessageEvent } from './messages/incoming/camera/ThumbnailStatusMessageEvent';
|
||||||
import { CampaignCalendarDataMessageEvent, CampaignCalendarDoorOpenedMessageEvent } from './messages/incoming/campaign';
|
import { CampaignCalendarDataMessageEvent, CampaignCalendarDoorOpenedMessageEvent } from './messages/incoming/campaign';
|
||||||
import { CatalogPageExpirationEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPageWithEarliestExpiryMessageEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, ClubGiftSelectedEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, VoucherRedeemErrorMessageEvent, VoucherRedeemOkMessageEvent } from './messages/incoming/catalog';
|
import { CatalogPageExpirationEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPageWithEarliestExpiryMessageEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, ClubGiftSelectedEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, VoucherRedeemErrorMessageEvent, VoucherRedeemOkMessageEvent } from './messages/incoming/catalog';
|
||||||
import { MarketplaceBuyOfferResultEvent } from './messages/incoming/catalog/marketplace/MarketplaceBuyOfferResultEvent';
|
|
||||||
import { MarketplaceCancelItemEvent } from './messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
|
|
||||||
import { MarketplaceConfigEvent } from './messages/incoming/catalog/marketplace/MarketplaceConfigEvent';
|
|
||||||
import { MarketplaceItemStatsEvent } from './messages/incoming/catalog/marketplace/MarketplaceItemStatsEvent';
|
|
||||||
import { MarketplaceOffersReceivedEvent } from './messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
|
|
||||||
import { MarketplaceOwnItemsEvent } from './messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
|
|
||||||
import { ClientPingEvent } from './messages/incoming/client/ClientPingEvent';
|
import { ClientPingEvent } from './messages/incoming/client/ClientPingEvent';
|
||||||
import { CraftableProductsEvent } from './messages/incoming/crafting/CraftableProductsEvent';
|
import { CraftableProductsEvent } from './messages/incoming/crafting/CraftableProductsEvent';
|
||||||
import { CraftingRecipeEvent } from './messages/incoming/crafting/CraftingRecipeEvent';
|
import { CraftingRecipeEvent } from './messages/incoming/crafting/CraftingRecipeEvent';
|
||||||
@ -66,8 +60,6 @@ import { FurnitureListInvalidateEvent } from './messages/incoming/inventory/furn
|
|||||||
import { FurnitureListRemovedEvent } from './messages/incoming/inventory/furni/FurnitureListRemovedEvent';
|
import { FurnitureListRemovedEvent } from './messages/incoming/inventory/furni/FurnitureListRemovedEvent';
|
||||||
import { FurniturePostItPlacedEvent } from './messages/incoming/inventory/furni/FurniturePostItPlacedEvent';
|
import { FurniturePostItPlacedEvent } from './messages/incoming/inventory/furni/FurniturePostItPlacedEvent';
|
||||||
import { PresentOpenedMessageEvent } from './messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent';
|
import { PresentOpenedMessageEvent } from './messages/incoming/inventory/furni/gifts/PresentOpenedMessageEvent';
|
||||||
import { MarketplaceItemPostedEvent } from './messages/incoming/inventory/marketplace/MarketplaceItemPostedEvent';
|
|
||||||
import { MarketplaceSellItemEvent } from './messages/incoming/inventory/marketplace/MarketplaceSellItemEvent';
|
|
||||||
import { PetAddedToInventoryEvent } from './messages/incoming/inventory/pets/PetAddedToInventoryEvent';
|
import { PetAddedToInventoryEvent } from './messages/incoming/inventory/pets/PetAddedToInventoryEvent';
|
||||||
import { PetInventoryEvent } from './messages/incoming/inventory/pets/PetInventoryEvent';
|
import { PetInventoryEvent } from './messages/incoming/inventory/pets/PetInventoryEvent';
|
||||||
import { PetRemovedFromInventory } from './messages/incoming/inventory/pets/PetRemovedFromInventoryEvent';
|
import { PetRemovedFromInventory } from './messages/incoming/inventory/pets/PetRemovedFromInventoryEvent';
|
||||||
@ -83,6 +75,14 @@ import { TradingOtherNotAllowedEvent } from './messages/incoming/inventory/tradi
|
|||||||
import { TradingYouAreNotAllowedEvent } from './messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent';
|
import { TradingYouAreNotAllowedEvent } from './messages/incoming/inventory/trading/TradingYouAreNotAllowedEvent';
|
||||||
import { PromoArticlesMessageEvent } from './messages/incoming/landingview/PromoArticlesMessageEvent';
|
import { PromoArticlesMessageEvent } from './messages/incoming/landingview/PromoArticlesMessageEvent';
|
||||||
import { CommunityGoalVoteMessageEvent } from './messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent';
|
import { CommunityGoalVoteMessageEvent } from './messages/incoming/landingview/votes/CommunityGoalVoteMessageEvent';
|
||||||
|
import { MarketplaceBuyOfferResultEvent } from './messages/incoming/marketplace/MarketplaceBuyOfferResultEvent';
|
||||||
|
import { MarketplaceCancelOfferResultEvent } from './messages/incoming/marketplace/MarketplaceCancelOfferResultEvent';
|
||||||
|
import { MarketplaceCanMakeOfferResult } from './messages/incoming/marketplace/MarketplaceCanMakeOfferResult';
|
||||||
|
import { MarketplaceConfigurationEvent } from './messages/incoming/marketplace/MarketplaceConfigurationEvent';
|
||||||
|
import { MarketplaceItemStatsEvent } from './messages/incoming/marketplace/MarketplaceItemStatsEvent';
|
||||||
|
import { MarketplaceMakeOfferResult } from './messages/incoming/marketplace/MarketplaceMakeOfferResult';
|
||||||
|
import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/MarketplaceOffersEvent';
|
||||||
|
import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent';
|
||||||
import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent';
|
import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent';
|
||||||
import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent';
|
import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent';
|
||||||
import { ModtoolReceivedRoomsUserEvent } from './messages/incoming/modtool/ModtoolReceivedRoomsUserEvent';
|
import { ModtoolReceivedRoomsUserEvent } from './messages/incoming/modtool/ModtoolReceivedRoomsUserEvent';
|
||||||
@ -802,14 +802,14 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent);
|
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent);
|
||||||
|
|
||||||
// MARKETPLACE
|
// MARKETPLACE
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_SELL_ITEM, MarketplaceSellItemEvent);
|
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_CONFIG, MarketplaceConfigEvent);
|
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_ITEM_STATS, MarketplaceItemStatsEvent);
|
|
||||||
this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, MarketplaceOwnItemsEvent);
|
|
||||||
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, MarketplaceBuyOfferResultEvent);
|
this._events.set(IncomingHeader.MARKETPLACE_AFTER_ORDER_STATUS, MarketplaceBuyOfferResultEvent);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_CANCEL_SALE, MarketplaceCancelOfferResultEvent);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_SELL_ITEM, MarketplaceCanMakeOfferResult);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_CONFIG, MarketplaceConfigurationEvent);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_ITEM_STATS, MarketplaceItemStatsEvent);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_ITEM_POSTED, MarketplaceMakeOfferResult);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_ITEMS_SEARCHED, MarketPlaceOffersEvent);
|
||||||
|
this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, MarketplaceOwnOffersEvent);
|
||||||
|
|
||||||
// LANDING VIEW
|
// LANDING VIEW
|
||||||
this._events.set(IncomingHeader.COMMUNITY_GOAL_VOTE_EVENT, CommunityGoalVoteMessageEvent);
|
this._events.set(IncomingHeader.COMMUNITY_GOAL_VOTE_EVENT, CommunityGoalVoteMessageEvent);
|
||||||
|
@ -25,7 +25,6 @@ export * from './HabboClubOffersMessageEvent';
|
|||||||
export * from './IsOfferGiftableMessageEvent';
|
export * from './IsOfferGiftableMessageEvent';
|
||||||
export * from './LimitedEditionSoldOutEvent';
|
export * from './LimitedEditionSoldOutEvent';
|
||||||
export * from './LimitedOfferAppearingNextMessageEvent';
|
export * from './LimitedOfferAppearingNextMessageEvent';
|
||||||
export * from './marketplace';
|
|
||||||
export * from './NodeData';
|
export * from './NodeData';
|
||||||
export * from './NotEnoughBalanceMessageEvent';
|
export * from './NotEnoughBalanceMessageEvent';
|
||||||
export * from './ProductOfferEvent';
|
export * from './ProductOfferEvent';
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceCancelItemParser } from '../../../parser/catalog/marketplace/MarketplaceCancelItemParser';
|
|
||||||
|
|
||||||
export class MarketplaceCancelItemEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceCancelItemParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceCancelItemParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceCancelItemParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceConfigParser } from '../../../parser/catalog/marketplace/MarketplaceConfigParser';
|
|
||||||
|
|
||||||
|
|
||||||
export class MarketplaceConfigEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceConfigParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceConfigParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceConfigParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceOffersReceivedParser } from '../../../parser/catalog/marketplace/MarketplaceOffersReceivedParser';
|
|
||||||
|
|
||||||
|
|
||||||
export class MarketplaceOffersReceivedEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceOffersReceivedParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceOffersReceivedParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceOffersReceivedParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceOwnItemsParser } from '../../../parser/catalog/marketplace/MarketplaceOwnItemsParser';
|
|
||||||
|
|
||||||
export class MarketplaceOwnItemsEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceOwnItemsParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceOwnItemsParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceOwnItemsParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export * from './MarketplaceBuyOfferResultEvent';
|
|
||||||
export * from './MarketplaceCancelItemEvent';
|
|
||||||
export * from './MarketplaceOffersReceivedEvent';
|
|
||||||
export * from './MarketplaceOwnItemsEvent';
|
|
@ -3,7 +3,6 @@ export * from './availability';
|
|||||||
export * from './avatar';
|
export * from './avatar';
|
||||||
export * from './camera';
|
export * from './camera';
|
||||||
export * from './catalog';
|
export * from './catalog';
|
||||||
export * from './catalog/marketplace';
|
|
||||||
export * from './client';
|
export * from './client';
|
||||||
export * from './desktop';
|
export * from './desktop';
|
||||||
export * from './friendlist';
|
export * from './friendlist';
|
||||||
@ -20,10 +19,10 @@ export * from './inventory/bots';
|
|||||||
export * from './inventory/clothes';
|
export * from './inventory/clothes';
|
||||||
export * from './inventory/furni';
|
export * from './inventory/furni';
|
||||||
export * from './inventory/furni/gifts';
|
export * from './inventory/furni/gifts';
|
||||||
export * from './inventory/marketplace';
|
|
||||||
export * from './inventory/pets';
|
export * from './inventory/pets';
|
||||||
export * from './inventory/trading';
|
export * from './inventory/trading';
|
||||||
export * from './landingview';
|
export * from './landingview';
|
||||||
|
export * from './marketplace';
|
||||||
export * from './modtool';
|
export * from './modtool';
|
||||||
export * from './mysterybox';
|
export * from './mysterybox';
|
||||||
export * from './navigator';
|
export * from './navigator';
|
||||||
|
@ -4,6 +4,5 @@ export * from './badges';
|
|||||||
export * from './bots';
|
export * from './bots';
|
||||||
export * from './clothes';
|
export * from './clothes';
|
||||||
export * from './furni';
|
export * from './furni';
|
||||||
export * from './marketplace';
|
|
||||||
export * from './pets';
|
export * from './pets';
|
||||||
export * from './trading';
|
export * from './trading';
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceItemPostedParser } from '../../../parser/inventory/marketplace/MarketplaceItemPostedParser';
|
|
||||||
|
|
||||||
export class MarketplaceItemPostedEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceItemPostedParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceItemPostedParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceItemPostedParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { MarketplaceCanMakeOfferResultParser } from '../../../parser/inventory/marketplace/MarketplaceCanMakeOfferResultParser';
|
|
||||||
|
|
||||||
export class MarketplaceSellItemEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, MarketplaceCanMakeOfferResultParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): MarketplaceCanMakeOfferResultParser
|
|
||||||
{
|
|
||||||
return this.parser as MarketplaceCanMakeOfferResultParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
export * from './MarketplaceItemPostedEvent';
|
|
||||||
export * from './MarketplaceSellItemEvent';
|
|
@ -1,6 +1,7 @@
|
|||||||
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 { MarketplaceBuyOfferResultParser } from '../../../parser/catalog/marketplace/MarketplaceBuyOfferResultParser';
|
import { MarketplaceBuyOfferResultParser } from '../../parser/marketplace/MarketplaceBuyOfferResultParser';
|
||||||
|
|
||||||
|
|
||||||
export class MarketplaceBuyOfferResultEvent extends MessageEvent implements IMessageEvent
|
export class MarketplaceBuyOfferResultEvent extends MessageEvent implements IMessageEvent
|
||||||
{
|
{
|
@ -0,0 +1,17 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceCanMakeOfferResultParser } from '../../parser/marketplace/MarketplaceCanMakeOfferResultParser';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceCanMakeOfferResult extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceCanMakeOfferResultParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceCanMakeOfferResultParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceCanMakeOfferResultParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceCancelOfferResultParser } from '../../parser/marketplace/MarketplaceCancelOfferResultParser';
|
||||||
|
|
||||||
|
export class MarketplaceCancelOfferResultEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceCancelOfferResultParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceCancelOfferResultParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceCancelOfferResultParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceConfigurationMessageParser } from '../../parser/marketplace/MarketplaceConfigurationMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceConfigurationEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceConfigurationMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceConfigurationMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceConfigurationMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
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 { MarketplaceItemStatsParser } from '../../../parser';
|
import { MarketplaceItemStatsParser } from '../../parser/marketplace/MarketplaceItemStatsParser';
|
||||||
|
|
||||||
|
|
||||||
export class MarketplaceItemStatsEvent extends MessageEvent implements IMessageEvent
|
export class MarketplaceItemStatsEvent extends MessageEvent implements IMessageEvent
|
||||||
{
|
{
|
@ -0,0 +1,17 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceMakeOfferResultParser } from '../../parser/marketplace/MarketplaceItemPostedParser';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceMakeOfferResult extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceMakeOfferResultParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceMakeOfferResultParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceMakeOfferResultParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
import { IObjectData } from '../../../../room/object/data/IObjectData';
|
||||||
|
|
||||||
export class MarketplaceOffer
|
export class MarketplaceOffer
|
||||||
{
|
{
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceOffersParser } from '../../parser/marketplace/MarketplaceOffersParser';
|
||||||
|
|
||||||
|
export class MarketPlaceOffersEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceOffersParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceOffersParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceOffersParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceOwnOffersParser } from '../../parser/marketplace/MarketplaceOwnOffersParser';
|
||||||
|
|
||||||
|
export class MarketplaceOwnOffersEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceOwnOffersParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceOwnOffersParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceOwnOffersParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
export * from './MarketplaceBuyOfferResultEvent';
|
||||||
|
export * from './MarketplaceCancelOfferResultEvent';
|
||||||
|
export * from './MarketplaceCanMakeOfferResult';
|
||||||
|
export * from './MarketplaceConfigurationEvent';
|
||||||
|
export * from './MarketplaceItemStatsEvent';
|
||||||
|
export * from './MarketplaceMakeOfferResult';
|
||||||
|
export * from './MarketplaceOffer';
|
||||||
|
export * from './MarketplaceOffersEvent';
|
||||||
|
export * from './MarketplaceOwnOffersEvent';
|
@ -1,4 +1,5 @@
|
|||||||
import { IMessageEvent, MessageEvent } from '../../../../../../core/communication/messages';
|
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
import { PetExperienceParser } from '../../../parser';
|
import { PetExperienceParser } from '../../../parser';
|
||||||
|
|
||||||
export class PetExperienceEvent extends MessageEvent implements IMessageEvent
|
export class PetExperienceEvent extends MessageEvent implements IMessageEvent
|
||||||
|
@ -17,7 +17,6 @@ export * from './HabboClubOffersMessageParser';
|
|||||||
export * from './IsOfferGiftableMessageParser';
|
export * from './IsOfferGiftableMessageParser';
|
||||||
export * from './LimitedEditionSoldOutParser';
|
export * from './LimitedEditionSoldOutParser';
|
||||||
export * from './LimitedOfferAppearingNextMessageParser';
|
export * from './LimitedOfferAppearingNextMessageParser';
|
||||||
export * from './marketplace';
|
|
||||||
export * from './NotEnoughBalanceMessageParser';
|
export * from './NotEnoughBalanceMessageParser';
|
||||||
export * from './ProductOfferMessageParser';
|
export * from './ProductOfferMessageParser';
|
||||||
export * from './PurchaseErrorMessageParser';
|
export * from './PurchaseErrorMessageParser';
|
||||||
|
@ -1,128 +0,0 @@
|
|||||||
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
|
||||||
|
|
||||||
export class MarketplaceOfferData
|
|
||||||
{
|
|
||||||
public static TYPE_LANDSCAPE:number = 1;
|
|
||||||
public static TYPE_FLOOR:number = 2;
|
|
||||||
|
|
||||||
private _offerId:number;
|
|
||||||
private _furniId:number;
|
|
||||||
private _furniType:number;
|
|
||||||
private _extraData:string;
|
|
||||||
private _stuffData:IObjectData;
|
|
||||||
private _price:number;
|
|
||||||
private _averagePrice:number;
|
|
||||||
private _imageCallback:number;
|
|
||||||
private _status:number;
|
|
||||||
private _timeLeftMinutes:number = -1;
|
|
||||||
private _offerCount:number;
|
|
||||||
private _image:string;
|
|
||||||
|
|
||||||
constructor(offerId:number, furniId:number, furniType:number, extraData:string, stuffData:IObjectData, price:number, status:number, averagePrice:number, offerCount:number=-1)
|
|
||||||
{
|
|
||||||
this._offerId = offerId;
|
|
||||||
this._furniId = furniId;
|
|
||||||
this._furniType = furniType;
|
|
||||||
this._extraData = extraData;
|
|
||||||
this._stuffData = stuffData;
|
|
||||||
this._price = price;
|
|
||||||
this._status = status;
|
|
||||||
this._averagePrice = averagePrice;
|
|
||||||
this._offerCount = offerCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get offerId():number
|
|
||||||
{
|
|
||||||
return this._offerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set offerId(k:number)
|
|
||||||
{
|
|
||||||
this._offerId = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 set price(k:number)
|
|
||||||
{
|
|
||||||
this._price = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get averagePrice():number
|
|
||||||
{
|
|
||||||
return this._averagePrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get image():string
|
|
||||||
{
|
|
||||||
return this._image;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set image(k:string)
|
|
||||||
{
|
|
||||||
this._image = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set imageCallback(k:number)
|
|
||||||
{
|
|
||||||
this._imageCallback = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get imageCallback():number
|
|
||||||
{
|
|
||||||
return this._imageCallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get status():number
|
|
||||||
{
|
|
||||||
return this._status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get timeLeftMinutes():number
|
|
||||||
{
|
|
||||||
return this._timeLeftMinutes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set timeLeftMinutes(k:number)
|
|
||||||
{
|
|
||||||
this._timeLeftMinutes = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get offerCount():number
|
|
||||||
{
|
|
||||||
return this._offerCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set offerCount(k:number)
|
|
||||||
{
|
|
||||||
this._offerCount = k;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get isUniqueLimitedItem():boolean
|
|
||||||
{
|
|
||||||
return (!(this.stuffData == null)) && (this.stuffData.uniqueSeries > 0);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,102 +0,0 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
|
||||||
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
|
||||||
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
|
|
||||||
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
|
|
||||||
import { MarketplaceOffer } from './MarketplaceOffer';
|
|
||||||
|
|
||||||
|
|
||||||
export class MarketplaceOffersReceivedParser implements IMessageParser
|
|
||||||
{
|
|
||||||
|
|
||||||
private static readonly FURNITYPE_STUFF = 1;
|
|
||||||
private static readonly FURNITYPE_WALL = 2;
|
|
||||||
private static readonly FAKE_FURNITYPE_UNIQUE = 3;
|
|
||||||
|
|
||||||
private readonly MAX_LIST_LENGTH = 500;
|
|
||||||
|
|
||||||
private _offers: MarketplaceOffer[];
|
|
||||||
private _totalItemsFound: number;
|
|
||||||
|
|
||||||
public flush(): boolean
|
|
||||||
{
|
|
||||||
this._offers = [];
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public parse(wrapper: IMessageDataWrapper): boolean
|
|
||||||
{
|
|
||||||
if(!wrapper) return false;
|
|
||||||
|
|
||||||
this._offers = [];
|
|
||||||
|
|
||||||
const offerCount = wrapper.readInt();
|
|
||||||
|
|
||||||
for(let i = 0; i < offerCount; i++)
|
|
||||||
{
|
|
||||||
const offerId = wrapper.readInt();
|
|
||||||
const local3 = wrapper.readInt();
|
|
||||||
let itemId = wrapper.readInt();
|
|
||||||
|
|
||||||
let local5: number;
|
|
||||||
let local6: string;
|
|
||||||
let local7: IObjectData;
|
|
||||||
if(itemId === MarketplaceOffersReceivedParser.FURNITYPE_STUFF)
|
|
||||||
{
|
|
||||||
local5 = wrapper.readInt();
|
|
||||||
local7 = this.getStuffData(wrapper);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(itemId == MarketplaceOffersReceivedParser.FURNITYPE_WALL)
|
|
||||||
{
|
|
||||||
local5 = wrapper.readInt();
|
|
||||||
local6 = wrapper.readString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(itemId == MarketplaceOffersReceivedParser.FAKE_FURNITYPE_UNIQUE)
|
|
||||||
{
|
|
||||||
local5 = wrapper.readInt();
|
|
||||||
local7 = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY);
|
|
||||||
local7.uniqueNumber = wrapper.readInt();
|
|
||||||
local7.uniqueSeries = wrapper.readInt();
|
|
||||||
itemId = MarketplaceOffersReceivedParser.FURNITYPE_STUFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const local8 = wrapper.readInt();
|
|
||||||
const local9 = wrapper.readInt();
|
|
||||||
const local10 = wrapper.readInt();
|
|
||||||
const local11 = wrapper.readInt();
|
|
||||||
|
|
||||||
const offerItem = new MarketplaceOffer(offerId, local5, itemId, local6, local7, local8, local3, local9, local10, local11);
|
|
||||||
if(i < this.MAX_LIST_LENGTH)
|
|
||||||
{
|
|
||||||
this._offers.push(offerItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this._totalItemsFound = wrapper.readInt();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get offers():MarketplaceOffer[]
|
|
||||||
{
|
|
||||||
return this._offers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get totalItemsFound():number
|
|
||||||
{
|
|
||||||
return this._totalItemsFound;
|
|
||||||
}
|
|
||||||
|
|
||||||
private getStuffData(wrapper: IMessageDataWrapper): IObjectData
|
|
||||||
{
|
|
||||||
const local2 = wrapper.readInt();
|
|
||||||
const local3 = ObjectDataFactory.getData(local2);
|
|
||||||
local3.parseWrapper(wrapper);
|
|
||||||
return local3;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
export * from './MarketplaceBuyOfferResultParser';
|
|
||||||
export * from './MarketplaceCancelItemParser';
|
|
||||||
export * from './MarketplaceConfigParser';
|
|
||||||
export * from './MarketplaceItemStatsParser';
|
|
||||||
export * from './MarketplaceOffer';
|
|
||||||
export * from './MarketplaceOfferData';
|
|
||||||
export * from './MarketplaceOffersReceivedParser';
|
|
||||||
export * from './MarketplaceOwnItemsParser';
|
|
@ -12,6 +12,7 @@ export * from './group';
|
|||||||
export * from './help';
|
export * from './help';
|
||||||
export * from './inventory';
|
export * from './inventory';
|
||||||
export * from './landingview';
|
export * from './landingview';
|
||||||
|
export * from './marketplace';
|
||||||
export * from './modtool';
|
export * from './modtool';
|
||||||
export * from './mysterybox';
|
export * from './mysterybox';
|
||||||
export * from './navigator';
|
export * from './navigator';
|
||||||
|
@ -4,7 +4,6 @@ export * from './badges';
|
|||||||
export * from './bots';
|
export * from './bots';
|
||||||
export * from './clothing';
|
export * from './clothing';
|
||||||
export * from './furniture';
|
export * from './furniture';
|
||||||
export * from './marketplace';
|
|
||||||
export * from './pets';
|
export * from './pets';
|
||||||
export * from './purse';
|
export * from './purse';
|
||||||
export * from './trading';
|
export * from './trading';
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
export * from './MarketplaceCanMakeOfferResultParser';
|
|
||||||
export * from './MarketplaceItemPostedParser';
|
|
@ -1,14 +1,18 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceBuyOfferResultParser implements IMessageParser
|
export class MarketplaceBuyOfferResultParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _result: number;
|
private _result: number;
|
||||||
private _newOfferId: number = -1;
|
private _newOfferId: number;
|
||||||
private _newPrice: number = -1;
|
private _newPrice: number;
|
||||||
private _requestedOfferId: number = -1;
|
private _requestedOfferId: number;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
this._newOfferId = -1;
|
||||||
|
this._newPrice = 0;
|
||||||
|
this._requestedOfferId = -1;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,22 +28,22 @@ export class MarketplaceBuyOfferResultParser implements IMessageParser
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get result():number
|
public get result(): number
|
||||||
{
|
{
|
||||||
return this._result;
|
return this._result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get offerId():number
|
public get offerId(): number
|
||||||
{
|
{
|
||||||
return this._newOfferId;
|
return this._newOfferId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get newPrice():number
|
public get newPrice(): number
|
||||||
{
|
{
|
||||||
return this._newPrice;
|
return this._newPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get requestedOfferId():number
|
public get requestedOfferId(): number
|
||||||
{
|
{
|
||||||
return this._requestedOfferId;
|
return this._requestedOfferId;
|
||||||
}
|
}
|
@ -1,14 +1,14 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceCanMakeOfferResultParser implements IMessageParser
|
export class MarketplaceCanMakeOfferResultParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _tokenCount: number = null;
|
private _tokenCount: number;
|
||||||
private _result: number = null;
|
private _result: number;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
this._tokenCount = null;
|
this._tokenCount = 0;
|
||||||
this._result = null;
|
this._result = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -1,14 +1,15 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceCancelItemParser implements IMessageParser
|
export class MarketplaceCancelOfferResultParser implements IMessageParser
|
||||||
{
|
{
|
||||||
|
|
||||||
private _offerId: number;
|
private _offerId: number;
|
||||||
private _success: boolean;
|
private _success: boolean;
|
||||||
|
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
this._offerId = 0;
|
||||||
|
this._success = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1,59 +1,27 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceConfigParser implements IMessageParser
|
export class MarketplaceConfigurationMessageParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _enabled:boolean;
|
private _enabled: boolean;
|
||||||
private _commission:number;
|
private _commission: number;
|
||||||
private _credits:number;
|
private _credits: number;
|
||||||
private _advertisements:number;
|
private _advertisements: number;
|
||||||
private _maximumPrice:number;
|
private _maximumPrice: number;
|
||||||
private _minimumPrice:number;
|
private _minimumPrice: number;
|
||||||
private _offerTime:number;
|
private _offerTime: number;
|
||||||
private _displayTime:number;
|
private _displayTime: number;
|
||||||
|
|
||||||
|
|
||||||
public get enabled():boolean
|
|
||||||
{
|
|
||||||
return this._enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get commission():number
|
|
||||||
{
|
|
||||||
return this._commission;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get credits():number
|
|
||||||
{
|
|
||||||
return this._credits;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get advertisements():number
|
|
||||||
{
|
|
||||||
return this._advertisements;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get minimumPrice():number
|
|
||||||
{
|
|
||||||
return this._minimumPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get maximumPrice():number
|
|
||||||
{
|
|
||||||
return this._maximumPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get offerTime():number
|
|
||||||
{
|
|
||||||
return this._offerTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get displayTime():number
|
|
||||||
{
|
|
||||||
return this._displayTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
this._enabled = false;
|
||||||
|
this._commission = 0;
|
||||||
|
this._credits = 0;
|
||||||
|
this._advertisements = 0;
|
||||||
|
this._maximumPrice = 0;
|
||||||
|
this._minimumPrice = 0;
|
||||||
|
this._offerTime = 0;
|
||||||
|
this._displayTime = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,5 +41,43 @@ export class MarketplaceConfigParser implements IMessageParser
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get enabled(): boolean
|
||||||
|
{
|
||||||
|
return this._enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get commission(): number
|
||||||
|
{
|
||||||
|
return this._commission;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get credits(): number
|
||||||
|
{
|
||||||
|
return this._credits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get advertisements(): number
|
||||||
|
{
|
||||||
|
return this._advertisements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get minimumPrice(): number
|
||||||
|
{
|
||||||
|
return this._minimumPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get maximumPrice(): number
|
||||||
|
{
|
||||||
|
return this._maximumPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerTime(): number
|
||||||
|
{
|
||||||
|
return this._offerTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get displayTime(): number
|
||||||
|
{
|
||||||
|
return this._displayTime;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,12 +1,12 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceItemPostedParser implements IMessageParser
|
export class MarketplaceMakeOfferResultParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _result: number;
|
private _result: number;
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
this._result = null;
|
this._result = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -1,58 +1,27 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
export class MarketplaceItemStatsParser implements IMessageParser
|
export class MarketplaceItemStatsParser implements IMessageParser
|
||||||
{
|
{
|
||||||
private _averagePrice:number;
|
private _averagePrice: number;
|
||||||
private _currentOfferCount:number;
|
private _currentOfferCount: number;
|
||||||
private _historyLength:number;
|
private _historyLength: number;
|
||||||
private _dayOffsets:number[];
|
private _dayOffsets: number[];
|
||||||
private _averagePrices:number[];
|
private _averagePrices: number[];
|
||||||
private _soldAmounts:number[];
|
private _soldAmounts: number[];
|
||||||
private _furniTypeId:number;
|
private _furniTypeId: number;
|
||||||
private _furniCategoryId:number;
|
private _furniCategoryId: number;
|
||||||
|
|
||||||
public get averagePrice():number
|
|
||||||
{
|
|
||||||
return this._averagePrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get offerCount():number
|
|
||||||
{
|
|
||||||
return this._currentOfferCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get historyLength():number
|
|
||||||
{
|
|
||||||
return this._historyLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get dayOffsets():any[]
|
|
||||||
{
|
|
||||||
return this._dayOffsets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get averagePrices():any[]
|
|
||||||
{
|
|
||||||
return this._averagePrices;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get soldAmounts():any[]
|
|
||||||
{
|
|
||||||
return this._soldAmounts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get furniTypeId():number
|
|
||||||
{
|
|
||||||
return this._furniTypeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get furniCategoryId():number
|
|
||||||
{
|
|
||||||
return this._furniCategoryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public flush(): boolean
|
public flush(): boolean
|
||||||
{
|
{
|
||||||
|
this._averagePrice = 0;
|
||||||
|
this._currentOfferCount = 0;
|
||||||
|
this._historyLength = 0;
|
||||||
|
this._dayOffsets = [];
|
||||||
|
this._averagePrices = [];
|
||||||
|
this._soldAmounts = [];
|
||||||
|
this._furniTypeId = 0;
|
||||||
|
this._furniCategoryId = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,22 +33,60 @@ export class MarketplaceItemStatsParser implements IMessageParser
|
|||||||
this._currentOfferCount = wrapper.readInt();
|
this._currentOfferCount = wrapper.readInt();
|
||||||
this._historyLength = wrapper.readInt();
|
this._historyLength = wrapper.readInt();
|
||||||
|
|
||||||
const count = wrapper.readInt();
|
let count = wrapper.readInt();
|
||||||
this._dayOffsets = [];
|
|
||||||
this._averagePrices = [];
|
|
||||||
this._soldAmounts = [];
|
|
||||||
|
|
||||||
for(let i = 0; i < count; i++)
|
while(count > 0)
|
||||||
{
|
{
|
||||||
this._dayOffsets.push(wrapper.readInt());
|
this._dayOffsets.push(wrapper.readInt());
|
||||||
this._averagePrices.push(wrapper.readInt());
|
this._averagePrices.push(wrapper.readInt());
|
||||||
this._soldAmounts.push(wrapper.readInt());
|
this._soldAmounts.push(wrapper.readInt());
|
||||||
|
|
||||||
|
count--;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._furniCategoryId = wrapper.readInt();
|
this._furniCategoryId = wrapper.readInt();
|
||||||
this._furniTypeId = wrapper.readInt();
|
this._furniTypeId = wrapper.readInt();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get averagePrice(): number
|
||||||
|
{
|
||||||
|
return this._averagePrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerCount(): number
|
||||||
|
{
|
||||||
|
return this._currentOfferCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get historyLength(): number
|
||||||
|
{
|
||||||
|
return this._historyLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get dayOffsets(): number[]
|
||||||
|
{
|
||||||
|
return this._dayOffsets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get averagePrices(): number[]
|
||||||
|
{
|
||||||
|
return this._averagePrices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get soldAmounts(): number[]
|
||||||
|
{
|
||||||
|
return this._soldAmounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get furniTypeId(): number
|
||||||
|
{
|
||||||
|
return this._furniTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get furniCategoryId(): number
|
||||||
|
{
|
||||||
|
return this._furniCategoryId;
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,128 @@
|
|||||||
|
import { IObjectData } from '../../../../room/object/data/IObjectData';
|
||||||
|
|
||||||
|
export class MarketplaceOfferData
|
||||||
|
{
|
||||||
|
public static TYPE_LANDSCAPE: number = 1;
|
||||||
|
public static TYPE_FLOOR: number = 2;
|
||||||
|
|
||||||
|
private _offerId: number;
|
||||||
|
private _furniId: number;
|
||||||
|
private _furniType: number;
|
||||||
|
private _extraData: string;
|
||||||
|
private _stuffData: IObjectData;
|
||||||
|
private _price: number;
|
||||||
|
private _averagePrice: number;
|
||||||
|
private _imageCallback: number;
|
||||||
|
private _status: number;
|
||||||
|
private _timeLeftMinutes: number = -1;
|
||||||
|
private _offerCount: number;
|
||||||
|
private _image: string;
|
||||||
|
|
||||||
|
constructor(offerId: number, furniId: number, furniType: number, extraData: string, stuffData: IObjectData, price: number, status: number, averagePrice: number, offerCount: number = -1)
|
||||||
|
{
|
||||||
|
this._offerId = offerId;
|
||||||
|
this._furniId = furniId;
|
||||||
|
this._furniType = furniType;
|
||||||
|
this._extraData = extraData;
|
||||||
|
this._stuffData = stuffData;
|
||||||
|
this._price = price;
|
||||||
|
this._status = status;
|
||||||
|
this._averagePrice = averagePrice;
|
||||||
|
this._offerCount = offerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerId(): number
|
||||||
|
{
|
||||||
|
return this._offerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set offerId(offerId: number)
|
||||||
|
{
|
||||||
|
this._offerId = 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 set price(price: number)
|
||||||
|
{
|
||||||
|
this._price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get averagePrice(): number
|
||||||
|
{
|
||||||
|
return this._averagePrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get image(): string
|
||||||
|
{
|
||||||
|
return this._image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set image(image: string)
|
||||||
|
{
|
||||||
|
this._image = image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get imageCallback(): number
|
||||||
|
{
|
||||||
|
return this._imageCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set imageCallback(callback: number)
|
||||||
|
{
|
||||||
|
this._imageCallback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get status(): number
|
||||||
|
{
|
||||||
|
return this._status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get timeLeftMinutes(): number
|
||||||
|
{
|
||||||
|
return this._timeLeftMinutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set timeLeftMinutes(minutes: number)
|
||||||
|
{
|
||||||
|
this._timeLeftMinutes = minutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerCount(): number
|
||||||
|
{
|
||||||
|
return this._offerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set offerCount(count: number)
|
||||||
|
{
|
||||||
|
this._offerCount = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isUniqueLimitedItem():boolean
|
||||||
|
{
|
||||||
|
return (this.stuffData && (this.stuffData.uniqueSeries > 0));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
import { IObjectData } from '../../../../room/object/data/IObjectData';
|
||||||
|
import { ObjectDataFactory } from '../../../../room/object/data/ObjectDataFactory';
|
||||||
|
import { LegacyDataType } from '../../../../room/object/data/type/LegacyDataType';
|
||||||
|
import { MarketplaceOffer } from '../../incoming/marketplace/MarketplaceOffer';
|
||||||
|
import { FurnitureDataParser } from '../room/furniture/FurnitureDataParser';
|
||||||
|
|
||||||
|
export class MarketplaceOffersParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private static FURNITYPE_STUFF: number = 1;
|
||||||
|
private static FURNITYPE_WALL: number = 2;
|
||||||
|
private static FAKE_FURNITYPE_UNIQUE: number = 3;
|
||||||
|
|
||||||
|
private readonly MAX_LIST_LENGTH = 500;
|
||||||
|
|
||||||
|
private _offers: MarketplaceOffer[];
|
||||||
|
private _totalItemsFound: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._offers = [];
|
||||||
|
this._totalItemsFound = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
const count = wrapper.readInt();
|
||||||
|
|
||||||
|
let i = 0;
|
||||||
|
|
||||||
|
while(i < count)
|
||||||
|
{
|
||||||
|
const offerId = wrapper.readInt();
|
||||||
|
const status = wrapper.readInt();
|
||||||
|
let furniType = wrapper.readInt();
|
||||||
|
|
||||||
|
let furniId = -1;
|
||||||
|
let extraData = '';
|
||||||
|
let stuffData: IObjectData = null;
|
||||||
|
|
||||||
|
if(furniType === MarketplaceOffersParser.FURNITYPE_STUFF)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
stuffData = FurnitureDataParser.parseObjectData(wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(furniType === MarketplaceOffersParser.FURNITYPE_WALL)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
extraData = wrapper.readString();
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(furniType == MarketplaceOffersParser.FAKE_FURNITYPE_UNIQUE)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
stuffData = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY);
|
||||||
|
stuffData.uniqueNumber = wrapper.readInt();
|
||||||
|
stuffData.uniqueSeries = wrapper.readInt();
|
||||||
|
furniType = MarketplaceOffersParser.FURNITYPE_STUFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
const price = wrapper.readInt();
|
||||||
|
const timeLeftMinutes = wrapper.readInt();
|
||||||
|
const averagePrice = wrapper.readInt();
|
||||||
|
const offerCount = wrapper.readInt();
|
||||||
|
|
||||||
|
const offerItem = new MarketplaceOffer(offerId, furniId, furniType, extraData, stuffData, price, status, timeLeftMinutes, averagePrice, offerCount);
|
||||||
|
|
||||||
|
if(i < this.MAX_LIST_LENGTH) this._offers.push(offerItem);
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._totalItemsFound = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offers(): MarketplaceOffer[]
|
||||||
|
{
|
||||||
|
return this._offers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get totalItemsFound(): number
|
||||||
|
{
|
||||||
|
return this._totalItemsFound;
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,10 @@
|
|||||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
import { IObjectData } from '../../../../room/object/data/IObjectData';
|
||||||
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
|
import { ObjectDataFactory } from '../../../../room/object/data/ObjectDataFactory';
|
||||||
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
|
import { LegacyDataType } from '../../../../room/object/data/type/LegacyDataType';
|
||||||
import { MarketplaceOffer } from './MarketplaceOffer';
|
import { MarketplaceOffer } from '../../incoming/marketplace/MarketplaceOffer';
|
||||||
|
|
||||||
|
export class MarketplaceOwnOffersParser implements IMessageParser
|
||||||
export class MarketplaceOwnItemsParser implements IMessageParser
|
|
||||||
{
|
{
|
||||||
private static MAX_LIST_LENGTH = 500;
|
private static MAX_LIST_LENGTH = 500;
|
||||||
private _offers: MarketplaceOffer[];
|
private _offers: MarketplaceOffer[];
|
||||||
@ -63,7 +62,7 @@ export class MarketplaceOwnItemsParser implements IMessageParser
|
|||||||
const local10 = wrapper.readInt();
|
const local10 = wrapper.readInt();
|
||||||
const local13 = new MarketplaceOffer(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.MAX_LIST_LENGTH)
|
if(i < MarketplaceOwnOffersParser.MAX_LIST_LENGTH)
|
||||||
{
|
{
|
||||||
this._offers.push(local13);
|
this._offers.push(local13);
|
||||||
}
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
export * from './MarketplaceBuyOfferResultParser';
|
||||||
|
export * from './MarketplaceCancelOfferResultParser';
|
||||||
|
export * from './MarketplaceCanMakeOfferResultParser';
|
||||||
|
export * from './MarketplaceConfigurationMessageParser';
|
||||||
|
export * from './MarketplaceItemPostedParser';
|
||||||
|
export * from './MarketplaceItemStatsParser';
|
||||||
|
export * from './MarketplaceOfferData';
|
||||||
|
export * from './MarketplaceOffersParser';
|
||||||
|
export * from './MarketplaceOwnOffersParser';
|
Loading…
x
Reference in New Issue
Block a user