mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Add packets
This commit is contained in:
parent
3034b4f60c
commit
b4f4cc446b
@ -142,6 +142,7 @@ import { FurnitureWallAddEvent } from './messages/incoming/room/furniture/wall/F
|
|||||||
import { FurnitureWallEvent } from './messages/incoming/room/furniture/wall/FurnitureWallEvent';
|
import { FurnitureWallEvent } from './messages/incoming/room/furniture/wall/FurnitureWallEvent';
|
||||||
import { FurnitureWallRemoveEvent } from './messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent';
|
import { FurnitureWallRemoveEvent } from './messages/incoming/room/furniture/wall/FurnitureWallRemoveEvent';
|
||||||
import { FurnitureWallUpdateEvent } from './messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent';
|
import { FurnitureWallUpdateEvent } from './messages/incoming/room/furniture/wall/FurnitureWallUpdateEvent';
|
||||||
|
import { RoomBlockedTilesEvent } from './messages/incoming/room/mapping/RoomBlockedTilesEvent';
|
||||||
import { RoomDoorEvent } from './messages/incoming/room/mapping/RoomDoorEvent';
|
import { RoomDoorEvent } from './messages/incoming/room/mapping/RoomDoorEvent';
|
||||||
import { RoomHeightMapEvent } from './messages/incoming/room/mapping/RoomHeightMapEvent';
|
import { RoomHeightMapEvent } from './messages/incoming/room/mapping/RoomHeightMapEvent';
|
||||||
import { RoomHeightMapUpdateEvent } from './messages/incoming/room/mapping/RoomHeightMapUpdateEvent';
|
import { RoomHeightMapUpdateEvent } from './messages/incoming/room/mapping/RoomHeightMapUpdateEvent';
|
||||||
@ -338,7 +339,10 @@ import { FurnitureMannequinSaveNameComposer } from './messages/outgoing/room/fur
|
|||||||
import { OpenPresentComposer } from './messages/outgoing/room/furniture/presents/OpenPresentComposer';
|
import { OpenPresentComposer } from './messages/outgoing/room/furniture/presents/OpenPresentComposer';
|
||||||
import { ApplyTonerComposer } from './messages/outgoing/room/furniture/toner/ApplyTonerComposer';
|
import { ApplyTonerComposer } from './messages/outgoing/room/furniture/toner/ApplyTonerComposer';
|
||||||
import { FurnitureWallUpdateComposer } from './messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer';
|
import { FurnitureWallUpdateComposer } from './messages/outgoing/room/furniture/wall/FurnitureWallUpdateComposer';
|
||||||
|
import { RoomBlockedTilesComposer } from './messages/outgoing/room/mapping/RoomBlockedTilesComposer';
|
||||||
|
import { RoomDoorSettingsComposer } from './messages/outgoing/room/mapping/RoomDoorSettingsComposer';
|
||||||
import { RoomModelComposer } from './messages/outgoing/room/mapping/RoomModelComposer';
|
import { RoomModelComposer } from './messages/outgoing/room/mapping/RoomModelComposer';
|
||||||
|
import { RoomModelSaveComposer } from './messages/outgoing/room/mapping/RoomModelSaveComposer';
|
||||||
import { RoomCreateComposer } from './messages/outgoing/room/RoomCreateComposer';
|
import { RoomCreateComposer } from './messages/outgoing/room/RoomCreateComposer';
|
||||||
import { RoomUnitChatComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatComposer';
|
import { RoomUnitChatComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatComposer';
|
||||||
import { RoomUnitChatShoutComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatShoutComposer';
|
import { RoomUnitChatShoutComposer } from './messages/outgoing/room/unit/chat/RoomUnitChatShoutComposer';
|
||||||
@ -380,6 +384,23 @@ import { UserRespectComposer } from './messages/outgoing/user/UserRespectCompose
|
|||||||
import { UserWardrobePageComposer } from './messages/outgoing/user/wardrobe/UserWardrobePageComposer';
|
import { UserWardrobePageComposer } from './messages/outgoing/user/wardrobe/UserWardrobePageComposer';
|
||||||
import { UserWardrobeSaveComposer } from './messages/outgoing/user/wardrobe/UserWardrobeSaveComposer';
|
import { UserWardrobeSaveComposer } from './messages/outgoing/user/wardrobe/UserWardrobeSaveComposer';
|
||||||
import { MiniMailUnreadCountParser } from './messages/parser/friendlist/MiniMailUnreadCountParser';
|
import { MiniMailUnreadCountParser } from './messages/parser/friendlist/MiniMailUnreadCountParser';
|
||||||
|
import { RequestSellItemComposer } from './messages/outgoing/inventory/marketplace/RequestSellItemComposer';
|
||||||
|
import { MarketplaceSellItemEvent } from './messages/incoming/inventory/marketplace/MarketplaceSellItemEvent';
|
||||||
|
import { MarketplaceConfigEvent } from './messages/incoming/catalog/MarketplaceConfigEvent';
|
||||||
|
import { MarketplaceItemStatsEvent } from './messages/incoming/catalog/MarketplaceItemStatsEvent';
|
||||||
|
import { MarketplaceSellItemComposer } from './messages/outgoing/inventory/marketplace/MarketplaceSellItemComposer';
|
||||||
|
import { MarketplaceRequesstItemStatsComposer } from './messages/outgoing/catalog/marketplace/MarketplaceRequesstItemStatsComposer';
|
||||||
|
import { MarketplaceRequestComposer } from './messages/outgoing/catalog/marketplace/MarketplaceRequestComposer';
|
||||||
|
import { MarketplaceRequestOwnItemsComposer } from './messages/outgoing/catalog/marketplace/MarketplaceRequestOwnItemsComposer';
|
||||||
|
import { MarketplaceOwnItemsEvent } from './messages/incoming/catalog/marketplace/MarketplaceOwnItemsEvent';
|
||||||
|
import { MarketplaceTakeItemBackComposer } from './messages/outgoing/catalog/marketplace/MarketplaceTakeItemBackComposer';
|
||||||
|
import { MarketplaceCancelItemEvent } from './messages/incoming/catalog/marketplace/MarketplaceCancelItemEvent';
|
||||||
|
import { MarketplaceRedeemCreditsComposer } from './messages/outgoing/catalog/marketplace/MarketplaceRedeemCreditsComposer';
|
||||||
|
import { MarketplaceItemPostedEvent } from './messages/incoming/inventory/marketplace/MarketplaceItemPostedEvent';
|
||||||
|
import { MarketplaceRequestOffersComposer } from './messages/outgoing/catalog/marketplace/MarketplaceRequestOffersComposer';
|
||||||
|
import { MarketplaceOffersReceivedEvent } from './messages/incoming/catalog/marketplace/MarketplaceOffersReceivedEvent';
|
||||||
|
import { MarketplaceBuyOfferComposer } from './messages/outgoing/catalog/marketplace/MarketplaceBuyOfferComposer';
|
||||||
|
import { MarketplaceAfterOrderStatusEvent } from './messages/incoming/catalog/marketplace/MarketplaceAfterOrderStatusEvent';
|
||||||
|
|
||||||
export class NitroMessages implements IMessageConfiguration
|
export class NitroMessages implements IMessageConfiguration
|
||||||
{
|
{
|
||||||
@ -589,6 +610,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.ROOM_MODEL_NAME, RoomModelNameEvent);
|
this._events.set(IncomingHeader.ROOM_MODEL_NAME, RoomModelNameEvent);
|
||||||
this._events.set(IncomingHeader.ROOM_PAINT, RoomPaintEvent);
|
this._events.set(IncomingHeader.ROOM_PAINT, RoomPaintEvent);
|
||||||
this._events.set(IncomingHeader.ROOM_THICKNESS, RoomThicknessEvent);
|
this._events.set(IncomingHeader.ROOM_THICKNESS, RoomThicknessEvent);
|
||||||
|
this._events.set(IncomingHeader.ROOM_MODEL_BLOCKED_TILES, RoomBlockedTilesEvent);
|
||||||
|
|
||||||
// PET
|
// PET
|
||||||
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
this._events.set(IncomingHeader.PET_FIGURE_UPDATE, PetFigureUpdateEvent);
|
||||||
@ -688,6 +710,16 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.MODERATION_TOPICS, ModtoolCallForHelpTopicsEvent);
|
this._events.set(IncomingHeader.MODERATION_TOPICS, ModtoolCallForHelpTopicsEvent);
|
||||||
this._events.set(IncomingHeader.MODERATION_TOOL, ModtoolMainEvent);
|
this._events.set(IncomingHeader.MODERATION_TOOL, ModtoolMainEvent);
|
||||||
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent);
|
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent);
|
||||||
|
|
||||||
|
// 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, MarketplaceAfterOrderStatusEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private registerComposers(): void
|
private registerComposers(): void
|
||||||
@ -767,6 +799,11 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// INVENTORY
|
// INVENTORY
|
||||||
|
|
||||||
|
// MARKETPLACE
|
||||||
|
this._composers.set(OutgoingHeader.REQUEST_SELL_ITEM, RequestSellItemComposer);
|
||||||
|
this._composers.set(OutgoingHeader.REQUEST_MARKETPLACE_ITEM_STATS, MarketplaceRequesstItemStatsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_REDEEM_CREDITS, MarketplaceRedeemCreditsComposer);
|
||||||
|
|
||||||
// FURNI
|
// FURNI
|
||||||
this._composers.set(OutgoingHeader.USER_FURNITURE, FurnitureListComposer);
|
this._composers.set(OutgoingHeader.USER_FURNITURE, FurnitureListComposer);
|
||||||
this._composers.set(OutgoingHeader.USER_FURNITURE2, FurnitureList2Composer);
|
this._composers.set(OutgoingHeader.USER_FURNITURE2, FurnitureList2Composer);
|
||||||
@ -866,6 +903,9 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// MAPPING
|
// MAPPING
|
||||||
this._composers.set(OutgoingHeader.ROOM_MODEL, RoomModelComposer);
|
this._composers.set(OutgoingHeader.ROOM_MODEL, RoomModelComposer);
|
||||||
|
this._composers.set(OutgoingHeader.ROOM_MODEL_BLOCKED_TILES, RoomBlockedTilesComposer);
|
||||||
|
this._composers.set(OutgoingHeader.ROOM_MODEL_DOOR, RoomDoorSettingsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.ROOM_MODEL_SAVE, RoomModelSaveComposer);
|
||||||
|
|
||||||
// UNIT
|
// UNIT
|
||||||
this._composers.set(OutgoingHeader.UNIT_ACTION, RoomUnitActionComposer);
|
this._composers.set(OutgoingHeader.UNIT_ACTION, RoomUnitActionComposer);
|
||||||
@ -917,6 +957,14 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
|
|
||||||
// INVENTORY
|
// INVENTORY
|
||||||
|
|
||||||
|
// MARKETPLACE
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_CONFIG, MarketplaceRequestComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_SELL_ITEM, MarketplaceSellItemComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_REQUEST_OWN_ITEMS, MarketplaceRequestOwnItemsComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_TAKE_BACK_ITEM, MarketplaceTakeItemBackComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_REQUEST_OFFERS, MarketplaceRequestOffersComposer);
|
||||||
|
this._composers.set(OutgoingHeader.MARKETPLACE_BUY_OFFER, MarketplaceBuyOfferComposer);
|
||||||
|
|
||||||
// BOTS
|
// BOTS
|
||||||
this._composers.set(OutgoingHeader.USER_BOTS, GetBotInventoryComposer);
|
this._composers.set(OutgoingHeader.USER_BOTS, GetBotInventoryComposer);
|
||||||
|
|
||||||
|
@ -238,4 +238,11 @@ export class IncomingHeader
|
|||||||
public static HAND_ITEM_RECEIVED = 354;
|
public static HAND_ITEM_RECEIVED = 354;
|
||||||
public static PET_PLACING_ERROR = 2913;
|
public static PET_PLACING_ERROR = 2913;
|
||||||
public static BOT_ERROR = 639;
|
public static BOT_ERROR = 639;
|
||||||
|
public static MARKETPLACE_SELL_ITEM = 54;
|
||||||
|
public static MARKETPLACE_ITEM_STATS = 725;
|
||||||
|
public static MARKETPLACE_OWN_ITEMS = 3884;
|
||||||
|
public static MARKETPLACE_CANCEL_SALE = 3264;
|
||||||
|
public static MARKETPLACE_ITEM_POSTED = 1359;
|
||||||
|
public static MARKETPLACE_ITEMS_SEARCHED = 680;
|
||||||
|
public static MARKETPLACE_AFTER_ORDER_STATUS = 2032;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceConfigParser } from '../../parser/catalog/MarketplaceConfigParser';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceConfigEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceConfigParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceConfigParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceConfigParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceItemStatsParser } from '../../parser/catalog/MarketplaceItemStatsParser';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceItemStatsEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceItemStatsParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceItemStatsParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceItemStatsParser;
|
||||||
|
}
|
||||||
|
}
|
@ -14,3 +14,6 @@ export * from './CatalogRedeemVoucherOkEvent';
|
|||||||
export * from './CatalogSearchEvent';
|
export * from './CatalogSearchEvent';
|
||||||
export * from './CatalogSoldOutEvent';
|
export * from './CatalogSoldOutEvent';
|
||||||
export * from './CatalogUpdatedEvent';
|
export * from './CatalogUpdatedEvent';
|
||||||
|
export * from './marketplace';
|
||||||
|
export * from './MarketplaceConfigEvent';
|
||||||
|
export * from './MarketplaceItemStatsEvent';
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
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 { 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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export * from './MarketplaceAfterOrderStatusEvent';
|
||||||
|
export * from './MarketplaceCancelItemEvent';
|
||||||
|
export * from './MarketplaceOffersReceivedEvent';
|
||||||
|
export * from './MarketplaceOwnItemsEvent';
|
@ -21,9 +21,11 @@ export class HabboSearchResultData
|
|||||||
this._avatarMotto = wrapper.readString();
|
this._avatarMotto = wrapper.readString();
|
||||||
this._isAvatarOnline = wrapper.readBoolean();
|
this._isAvatarOnline = wrapper.readBoolean();
|
||||||
this._canFollow = wrapper.readBoolean();
|
this._canFollow = wrapper.readBoolean();
|
||||||
|
|
||||||
|
this._lastOnlineData = wrapper.readString(); // this was not assigned to anything on original packet
|
||||||
|
|
||||||
this._avatarGender = wrapper.readInt();
|
this._avatarGender = wrapper.readInt();
|
||||||
this._avatarFigure = wrapper.readString();
|
this._avatarFigure = wrapper.readString();
|
||||||
this._lastOnlineData = wrapper.readString();
|
|
||||||
this._realName = wrapper.readString();
|
this._realName = wrapper.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,4 +73,4 @@ export class HabboSearchResultData
|
|||||||
{
|
{
|
||||||
return this._realName;
|
return this._realName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,6 @@ 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';
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { MarketplaceSellItemParser } from '../../../parser/inventory/marketplace/MarketplaceSellItemParser';
|
||||||
|
|
||||||
|
export class MarketplaceSellItemEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, MarketplaceSellItemParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): MarketplaceSellItemParser
|
||||||
|
{
|
||||||
|
return this.parser as MarketplaceSellItemParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './MarketplaceItemPostedEvent';
|
||||||
|
export * from './MarketplaceSellItemEvent';
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { RoomBlockedTilesParser } from '../../../parser/room/mapping/RoomBlockedTilesParser';
|
||||||
|
|
||||||
|
export class RoomBlockedTilesEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, RoomBlockedTilesParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): RoomBlockedTilesParser
|
||||||
|
{
|
||||||
|
return this.parser as RoomBlockedTilesParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './RoomBlockedTilesEvent';
|
||||||
export * from './RoomDoorEvent';
|
export * from './RoomDoorEvent';
|
||||||
export * from './RoomHeightMapEvent';
|
export * from './RoomHeightMapEvent';
|
||||||
export * from './RoomHeightMapUpdateEvent';
|
export * from './RoomHeightMapUpdateEvent';
|
||||||
|
@ -222,4 +222,12 @@ export class OutgoingHeader
|
|||||||
public static MODTOOL_REQUEST_USER_ROOMS = 3526;
|
public static MODTOOL_REQUEST_USER_ROOMS = 3526;
|
||||||
public static MODTOOL_ROOM_ALERT = 3842;
|
public static MODTOOL_ROOM_ALERT = 3842;
|
||||||
public static CONVERT_GLOBAL_ROOM_ID = 314;
|
public static CONVERT_GLOBAL_ROOM_ID = 314;
|
||||||
|
public static REQUEST_SELL_ITEM = 848;
|
||||||
|
public static REQUEST_MARKETPLACE_ITEM_STATS = 3288;
|
||||||
|
public static MARKETPLACE_SELL_ITEM = 3447;
|
||||||
|
public static MARKETPLACE_REQUEST_OWN_ITEMS = 2105;
|
||||||
|
public static MARKETPLACE_TAKE_BACK_ITEM = 434;
|
||||||
|
public static MARKETPLACE_REDEEM_CREDITS = 2650;
|
||||||
|
public static MARKETPLACE_REQUEST_OFFERS = 2407;
|
||||||
|
public static MARKETPLACE_BUY_OFFER = 1603;
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,6 @@ export * from './CatalogRequestVipGiftsComposer';
|
|||||||
export * from './CatalogRequestVipOffersComposer';
|
export * from './CatalogRequestVipOffersComposer';
|
||||||
export * from './CatalogSearchComposer';
|
export * from './CatalogSearchComposer';
|
||||||
export * from './CatalogSelectClubGiftComposer';
|
export * from './CatalogSelectClubGiftComposer';
|
||||||
|
export * from './marketplace';
|
||||||
export * from './RedeemItemClothingComposer';
|
export * from './RedeemItemClothingComposer';
|
||||||
export * from './RedeemVoucherComposer';
|
export * from './RedeemVoucherComposer';
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceBuyOfferComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceBuyOfferComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceBuyOfferComposer>;
|
||||||
|
|
||||||
|
constructor(offerId: number)
|
||||||
|
{
|
||||||
|
this._data = [ offerId ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceRedeemCreditsComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceRedeemCreditsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceRedeemCreditsComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [ ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceRequesstItemStatsComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceRequesstItemStatsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceRequesstItemStatsComposer>;
|
||||||
|
|
||||||
|
constructor(unknown: number, itemId: number)
|
||||||
|
{
|
||||||
|
this._data = [ unknown, itemId ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceRequestComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceRequestComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceRequestComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [ ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceRequestOffersComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceRequestOffersComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceRequestOffersComposer>;
|
||||||
|
|
||||||
|
constructor(min: number, max: number, query: string, type: number)
|
||||||
|
{
|
||||||
|
this._data = [ min, max, query, type ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceRequestOwnItemsComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceRequestOwnItemsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceRequestOwnItemsComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [ ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceTakeItemBackComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceTakeItemBackComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceTakeItemBackComposer>;
|
||||||
|
|
||||||
|
constructor(offerId: number)
|
||||||
|
{
|
||||||
|
this._data = [ offerId ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
export * from './MarketplaceBuyOfferComposer';
|
||||||
|
export * from './MarketplaceRedeemCreditsComposer';
|
||||||
|
export * from './MarketplaceRequesstItemStatsComposer';
|
||||||
|
export * from './MarketplaceRequestComposer';
|
||||||
|
export * from './MarketplaceRequestOffersComposer';
|
||||||
|
export * from './MarketplaceRequestOwnItemsComposer';
|
||||||
|
export * from './MarketplaceTakeItemBackComposer';
|
@ -1,5 +1,6 @@
|
|||||||
export * from './badges';
|
export * from './badges';
|
||||||
export * from './bots';
|
export * from './bots';
|
||||||
export * from './furni';
|
export * from './furni';
|
||||||
|
export * from './marketplace';
|
||||||
export * from './pets';
|
export * from './pets';
|
||||||
export * from './trading';
|
export * from './trading';
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class MarketplaceSellItemComposer implements IMessageComposer<ConstructorParameters<typeof MarketplaceSellItemComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof MarketplaceSellItemComposer>;
|
||||||
|
|
||||||
|
constructor(credits: number, arg2: number, itemId: number)
|
||||||
|
{
|
||||||
|
this._data = [credits, arg2, itemId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class RequestSellItemComposer implements IMessageComposer<ConstructorParameters<typeof RequestSellItemComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof RequestSellItemComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './MarketplaceSellItemComposer';
|
||||||
|
export * from './RequestSellItemComposer';
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class RoomBlockedTilesComposer implements IMessageComposer<ConstructorParameters<typeof RoomBlockedTilesComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof RoomBlockedTilesComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class RoomDoorSettingsComposer implements IMessageComposer<ConstructorParameters<typeof RoomDoorSettingsComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof RoomDoorSettingsComposer>;
|
||||||
|
|
||||||
|
constructor()
|
||||||
|
{
|
||||||
|
this._data = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../core/communication/messages/IMessageComposer';
|
||||||
|
|
||||||
|
export class RoomModelSaveComposer implements IMessageComposer<ConstructorParameters<typeof RoomModelSaveComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof RoomModelSaveComposer>;
|
||||||
|
|
||||||
|
constructor(model: string, doorX: number, doorY: number, doorDirection: number, thicknessWall: number, thicknessFloor: number, wallHeight: number)
|
||||||
|
{
|
||||||
|
this._data = [model, doorX, doorY, doorDirection, thicknessWall, thicknessFloor, wallHeight];
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose(): void
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,4 @@
|
|||||||
|
export * from './RoomBlockedTilesComposer';
|
||||||
|
export * from './RoomDoorSettingsComposer';
|
||||||
export * from './RoomModelComposer';
|
export * from './RoomModelComposer';
|
||||||
|
export * from './RoomModelSaveComposer';
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceConfigParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _enabled:boolean;
|
||||||
|
private _commission:number;
|
||||||
|
private _credits:number;
|
||||||
|
private _advertisements:number;
|
||||||
|
private _maximumPrice:number;
|
||||||
|
private _minimumPrice:number;
|
||||||
|
private _offerTime: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
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._enabled = wrapper.readBoolean();
|
||||||
|
this._commission = wrapper.readInt();
|
||||||
|
this._credits = wrapper.readInt();
|
||||||
|
this._advertisements = wrapper.readInt();
|
||||||
|
this._minimumPrice = wrapper.readInt();
|
||||||
|
this._maximumPrice = wrapper.readInt();
|
||||||
|
this._offerTime = wrapper.readInt();
|
||||||
|
this._displayTime = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceItemStatsParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _Str_5049:number;
|
||||||
|
private _Str_10039:number;
|
||||||
|
private _Str_10803:number;
|
||||||
|
private _Str_8270:number[];
|
||||||
|
private _Str_9670:number[];
|
||||||
|
private _Str_8961:number[];
|
||||||
|
private _Str_10894:number;
|
||||||
|
private _Str_10644:number;
|
||||||
|
|
||||||
|
public get _Str_3925():number
|
||||||
|
{
|
||||||
|
return this._Str_5049;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_4121():number
|
||||||
|
{
|
||||||
|
return this._Str_10039;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_10461():number
|
||||||
|
{
|
||||||
|
return this._Str_10803;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_9174():any[]
|
||||||
|
{
|
||||||
|
return this._Str_8270;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_11365():any[]
|
||||||
|
{
|
||||||
|
return this._Str_9670;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_11956():any[]
|
||||||
|
{
|
||||||
|
return this._Str_8961;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_8798():number
|
||||||
|
{
|
||||||
|
return this._Str_10894;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_9431():number
|
||||||
|
{
|
||||||
|
return this._Str_10644;
|
||||||
|
}
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._Str_5049 = wrapper.readInt();
|
||||||
|
this._Str_10039 = wrapper.readInt();
|
||||||
|
this._Str_10803 = wrapper.readInt();
|
||||||
|
const _local_2:number = wrapper.readInt();
|
||||||
|
this._Str_8270 = [];
|
||||||
|
this._Str_9670 = [];
|
||||||
|
this._Str_8961 = [];
|
||||||
|
let _local_3 = 0;
|
||||||
|
while(_local_3 < _local_2)
|
||||||
|
{
|
||||||
|
this._Str_8270.push(wrapper.readInt());
|
||||||
|
this._Str_9670.push(wrapper.readInt());
|
||||||
|
this._Str_8961.push(wrapper.readInt());
|
||||||
|
_local_3++;
|
||||||
|
}
|
||||||
|
this._Str_10644 = wrapper.readInt();
|
||||||
|
this._Str_10894 = wrapper.readInt();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -14,4 +14,7 @@ export * from './CatalogRedeemVoucherOkParser';
|
|||||||
export * from './CatalogSearchParser';
|
export * from './CatalogSearchParser';
|
||||||
export * from './CatalogSoldOutParser';
|
export * from './CatalogSoldOutParser';
|
||||||
export * from './CatalogUpdatedParser';
|
export * from './CatalogUpdatedParser';
|
||||||
|
export * from './marketplace';
|
||||||
|
export * from './MarketplaceConfigParser';
|
||||||
|
export * from './MarketplaceItemStatsParser';
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceAfterOrderParser implements IMessageParser
|
||||||
|
{
|
||||||
|
|
||||||
|
private _result: number;
|
||||||
|
private _offerId: number = -1;
|
||||||
|
private _Str_20780: number = -1;
|
||||||
|
private _Str_8508: number = -1;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._result = wrapper.readInt();
|
||||||
|
this._offerId = wrapper.readInt();
|
||||||
|
this._Str_20780 = wrapper.readInt();
|
||||||
|
this._Str_8508 = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get result():number
|
||||||
|
{
|
||||||
|
return this._result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerId():number
|
||||||
|
{
|
||||||
|
return this._offerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_24839():number
|
||||||
|
{
|
||||||
|
return this._Str_20780;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_7501():number
|
||||||
|
{
|
||||||
|
return this._Str_8508;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceCancelItemParser implements IMessageParser
|
||||||
|
{
|
||||||
|
|
||||||
|
private _offerId: number;
|
||||||
|
private _success: boolean;
|
||||||
|
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._offerId = wrapper.readInt();
|
||||||
|
this._success = wrapper.readBoolean();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offerId(): number
|
||||||
|
{
|
||||||
|
return this._offerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get success(): boolean
|
||||||
|
{
|
||||||
|
return this._success;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
|
||||||
|
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
||||||
|
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
|
||||||
|
import { MarketplaceOwnItem } from '../utils/MarketplaceOwnItem';
|
||||||
|
import { MarketplaceOfferItem } from '../utils/MarketplaceOfferItem';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceOffersReceivedParser implements IMessageParser
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly _Str_8964 = 1;
|
||||||
|
private readonly _Str_13000 = 2;
|
||||||
|
private readonly _Str_14245 = 3;
|
||||||
|
|
||||||
|
private readonly _Str_18070 = 500;
|
||||||
|
|
||||||
|
private _offers: MarketplaceOfferItem[];
|
||||||
|
private _Str_11687: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._offers = [];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._offers = [];
|
||||||
|
|
||||||
|
const offerCount = wrapper.readInt();
|
||||||
|
let i = 0;
|
||||||
|
|
||||||
|
while(i < offerCount)
|
||||||
|
{
|
||||||
|
const offerId = wrapper.readInt();
|
||||||
|
const local3 = wrapper.readInt();
|
||||||
|
let itemId = wrapper.readInt();
|
||||||
|
|
||||||
|
let local5: number;
|
||||||
|
let local6: string;
|
||||||
|
let local7: IObjectData;
|
||||||
|
if(itemId === this._Str_8964)
|
||||||
|
{
|
||||||
|
local5 = wrapper.readInt();
|
||||||
|
local7 = this.getStuffData(wrapper);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(itemId == this._Str_13000)
|
||||||
|
{
|
||||||
|
local5 = wrapper.readInt();
|
||||||
|
local6 = wrapper.readString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(itemId == this._Str_14245)
|
||||||
|
{
|
||||||
|
local5 = wrapper.readInt();
|
||||||
|
local7 = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY);
|
||||||
|
local7.uniqueNumber = wrapper.readInt();
|
||||||
|
local7.uniqueSeries = wrapper.readInt();
|
||||||
|
itemId = this._Str_8964;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const local8 = wrapper.readInt();
|
||||||
|
const local9 = wrapper.readInt();
|
||||||
|
const local10 = wrapper.readInt();
|
||||||
|
const local11 = wrapper.readInt();
|
||||||
|
|
||||||
|
const offerItem = new MarketplaceOfferItem(offerId, local5, itemId, local6, local7, local8, local3, local9, local10, local11);
|
||||||
|
if(i < this._Str_18070)
|
||||||
|
{
|
||||||
|
this._offers.push(offerItem);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._Str_11687 = wrapper.readInt();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offers():MarketplaceOfferItem[]
|
||||||
|
{
|
||||||
|
return this._offers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get totalItemsFound():number
|
||||||
|
{
|
||||||
|
return this._Str_11687;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getStuffData(wrapper: IMessageDataWrapper): IObjectData
|
||||||
|
{
|
||||||
|
const local2 = wrapper.readInt();
|
||||||
|
const local3 = ObjectDataFactory.getData(local2);
|
||||||
|
local3.parseWrapper(wrapper);
|
||||||
|
return local3;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
import { ObjectDataFactory } from '../../../../../room/object/data/ObjectDataFactory';
|
||||||
|
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
||||||
|
import { LegacyDataType } from '../../../../../room/object/data/type/LegacyDataType';
|
||||||
|
import { MarketplaceOwnItem } from '../utils/MarketplaceOwnItem';
|
||||||
|
|
||||||
|
|
||||||
|
export class MarketplaceOwnItemsParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private static _Str_18070 = 500;
|
||||||
|
private _offers: MarketplaceOwnItem[];
|
||||||
|
private _Str_11581: number;
|
||||||
|
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._offers = [];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._offers = [];
|
||||||
|
this._Str_11581 = wrapper.readInt(); // SoldPriceTotal
|
||||||
|
|
||||||
|
const offerCount = wrapper.readInt();
|
||||||
|
let i = 0;
|
||||||
|
while(i < offerCount)
|
||||||
|
{
|
||||||
|
const offerId = wrapper.readInt();
|
||||||
|
const status = wrapper.readInt();
|
||||||
|
let furniType = wrapper.readInt();
|
||||||
|
|
||||||
|
let furniId;
|
||||||
|
let extraData;
|
||||||
|
let stuffData:IObjectData;
|
||||||
|
if(furniType == 1)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
stuffData = this.getStuffData(wrapper);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(furniType == 2)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
extraData = wrapper.readString();
|
||||||
|
}
|
||||||
|
else if(furniType == 3)
|
||||||
|
{
|
||||||
|
furniId = wrapper.readInt();
|
||||||
|
stuffData = ObjectDataFactory.getData(LegacyDataType.FORMAT_KEY);
|
||||||
|
stuffData.uniqueNumber = wrapper.readInt();
|
||||||
|
stuffData.uniqueSeries = wrapper.readInt();
|
||||||
|
furniType = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const price = wrapper.readInt();
|
||||||
|
const local9 = wrapper.readInt();
|
||||||
|
const local10 = wrapper.readInt();
|
||||||
|
const local13 = new MarketplaceOwnItem(offerId, furniId, furniType, extraData, stuffData, price, status, local9, local10);
|
||||||
|
|
||||||
|
if(i < MarketplaceOwnItemsParser._Str_18070)
|
||||||
|
{
|
||||||
|
this._offers.push(local13);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get offers():MarketplaceOwnItem[]
|
||||||
|
{
|
||||||
|
return this._offers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get creditsWaiting():number
|
||||||
|
{
|
||||||
|
return this._Str_11581;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getStuffData(wrapper: IMessageDataWrapper): IObjectData
|
||||||
|
{
|
||||||
|
const local2 = wrapper.readInt();
|
||||||
|
const local3 = ObjectDataFactory.getData(local2);
|
||||||
|
local3.parseWrapper(wrapper);
|
||||||
|
return local3;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
export * from './MarketplaceAfterOrderParser';
|
||||||
|
export * from './MarketplaceCancelItemParser';
|
||||||
|
export * from './MarketplaceOffersReceivedParser';
|
||||||
|
export * from './MarketplaceOwnItemsParser';
|
@ -0,0 +1,134 @@
|
|||||||
|
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 _Str_3925():number
|
||||||
|
{
|
||||||
|
return this._averagePrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get image():string
|
||||||
|
{
|
||||||
|
return this._image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set image(k:string)
|
||||||
|
{
|
||||||
|
|
||||||
|
this._image = k;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set _Str_4774(k:number)
|
||||||
|
{
|
||||||
|
this._imageCallback = k;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_4774():number
|
||||||
|
{
|
||||||
|
return this._imageCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get status():number
|
||||||
|
{
|
||||||
|
return this._status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_5853():number
|
||||||
|
{
|
||||||
|
return this._timeLeftMinutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set _Str_5853(k:number)
|
||||||
|
{
|
||||||
|
this._timeLeftMinutes = k;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public get _Str_4121():number
|
||||||
|
{
|
||||||
|
return this._offerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set _Str_4121(k:number)
|
||||||
|
{
|
||||||
|
this._offerCount = k;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isUniqueLimitedItem():boolean
|
||||||
|
{
|
||||||
|
return (!(this.stuffData == null)) && (this.stuffData.uniqueSeries > 0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
import { IObjectData } from '../../../../../room/object/data/IObjectData';
|
||||||
|
|
||||||
|
export class MarketplaceOfferItem
|
||||||
|
{
|
||||||
|
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, _arg_3:number, extraData:string, stuffData:IObjectData, price:number, status:number, _arg_8:number, _arg_9:number, _arg_10:number=-1)
|
||||||
|
{
|
||||||
|
this._offerId = offerId;
|
||||||
|
this._furniId = furniId;
|
||||||
|
this._furniType = _arg_3;
|
||||||
|
this._extraData = extraData;
|
||||||
|
this._stuffData = stuffData;
|
||||||
|
this._price = price;
|
||||||
|
this._status = status;
|
||||||
|
this._Str_12399 = _arg_8;
|
||||||
|
this._Str_5049 = _arg_9;
|
||||||
|
this._Str_4620 = _arg_10;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isUniqueLimitedItem():boolean
|
||||||
|
{
|
||||||
|
return (!(this.stuffData == null)) && (this.stuffData.uniqueSeries > 0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -10,4 +10,7 @@ export * from './CatalogSearchData';
|
|||||||
export * from './ICatalogLocalizationData';
|
export * from './ICatalogLocalizationData';
|
||||||
export * from './ICatalogPageData';
|
export * from './ICatalogPageData';
|
||||||
export * from './ICatalogPageParser';
|
export * from './ICatalogPageParser';
|
||||||
|
export * from './MarketplaceOfferData';
|
||||||
|
export * from './MarketplaceOfferItem';
|
||||||
|
export * from './MarketplaceOwnItem';
|
||||||
export * from './_Str_5178';
|
export * from './_Str_5178';
|
||||||
|
@ -4,6 +4,7 @@ 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';
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceItemPostedParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _result: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._result = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._result = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get result(): number
|
||||||
|
{
|
||||||
|
return this._result;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class MarketplaceSellItemParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _Str_19825: number = null;
|
||||||
|
private _result: number = null;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._Str_19825 = null;
|
||||||
|
this._result = null;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._result = wrapper.readInt();
|
||||||
|
this._Str_19825 = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_24601(): number
|
||||||
|
{
|
||||||
|
return this._Str_19825;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get _Str_3278(): number
|
||||||
|
{
|
||||||
|
return this._result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './MarketplaceItemPostedParser';
|
||||||
|
export * from './MarketplaceSellItemParser';
|
@ -0,0 +1,40 @@
|
|||||||
|
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||||
|
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||||
|
|
||||||
|
export class RoomBlockedTilesParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _blockedTilesMap: boolean[][];
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._blockedTilesMap = [];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
let tilesCount = wrapper.readInt();
|
||||||
|
|
||||||
|
while(tilesCount > 0)
|
||||||
|
{
|
||||||
|
const x = wrapper.readInt();
|
||||||
|
const y = wrapper.readInt();
|
||||||
|
|
||||||
|
if(!this._blockedTilesMap[y]) this._blockedTilesMap[y] = [];
|
||||||
|
|
||||||
|
this._blockedTilesMap[y][x] = true;
|
||||||
|
|
||||||
|
tilesCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get blockedTilesMap(): boolean[][]
|
||||||
|
{
|
||||||
|
return this._blockedTilesMap;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './RoomBlockedTilesParser';
|
||||||
export * from './RoomDoorParser';
|
export * from './RoomDoorParser';
|
||||||
export * from './RoomHeightMapParser';
|
export * from './RoomHeightMapParser';
|
||||||
export * from './RoomHeightMapUpdateParser';
|
export * from './RoomHeightMapUpdateParser';
|
||||||
|
@ -16,7 +16,6 @@ export class FurnitureDataLoader extends EventDispatcher
|
|||||||
private _localization: INitroLocalizationManager;
|
private _localization: INitroLocalizationManager;
|
||||||
private _nitroLogger: NitroLogger;
|
private _nitroLogger: NitroLogger;
|
||||||
|
|
||||||
|
|
||||||
constructor(floorItems: Map<number, IFurnitureData>, wallItems: Map<number, IFurnitureData>, localization: INitroLocalizationManager)
|
constructor(floorItems: Map<number, IFurnitureData>, wallItems: Map<number, IFurnitureData>, localization: INitroLocalizationManager)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
Loading…
Reference in New Issue
Block a user