Dens
packets34 packets
Dens: joining one, their privacy, the player's den rooms and who is visiting. Layouts are read from den/DenXtCommManager.as in the decompiled client (deploy 1829). A den is a room named den followed by its owner's username; the server answers a join with room.join-result.
The den's items (ds, di) are described in two steps: how many fields an item has depends on its def (a mannequin carries its outfit), which only the client's def packs say. So each packet keeps its items unread in details, and readDenState and readDenItems read them once the caller says which defs are mannequins, as DenItemDef.specialType == 4 does in the client.
Hearing and sending packets
What the game sends is heard on phantom.packets.client, and what the server sends on phantom.packets.server. watch hears a packet after it has gone through; on hears it first and may change or drop it; send sends one to that end. See Packets.
Overview
| Packet | Command | Way | What it is |
|---|---|---|---|
DenJoinRequest | dj | game → server | The player asks to join a den. |
DenPrivacyRequest | dp | game → server | The player sets their den’s privacy, or asks for someone else’s. |
DenPrivacyResult | dp | server → game | The server says who may come into someone’s den. |
DenKicked | dpk | server → game | The player was sent out of a den its owner locked. |
DenVisitorCount | drc | server → game | Someone came into or left the player's den, by username, and how many are in it. |
DenRoomListRequest | dl | game → server | The player asks for their den rooms. |
DenRoomList | dl | server → game | The server lists the player’s den rooms. |
DenChangeRequest | dc | game → server | The player switches to another of their den rooms. |
DenChangeResult | dc | server → game | The server says which den room the player switched to. |
DenMasterpieceItemsRequest | dmi | game → server | The player asks for every masterpiece placed in someone’s den. |
DenMasterpieceItems | dmi | server → game | The server lists every masterpiece placed in a den. |
DenMasterpieceCreatorRequest | dmc | game → server | The player asks who drew a masterpiece. |
DenMasterpieceCreator | dmc | server → game | The server names who drew a masterpiece. |
DenItemsRequest | di | game → server | The player asks for every den item they own. |
DenItems | di | server → game | The server lists every den item the player owns. |
DenState | ds | server → game | The server says what is placed in the den on screen. |
DenStateSave | ds | game → server | The player saves changes to their den. |
DenStateSaved | dss | server → game | The server says which den items it saved. |
DenBuyRequest | db | game → server | The player buys a den item or a den room. |
DenBuyResult | db | server → game | The server says whether a den item or den room was bought. |
DenRecycleRequest | dr | game → server | The player sells den items or den rooms back to the game. |
DenRecycleResult | dr | server → game | The server says which den items or rooms were sold. |
DenEmptyRequest | de | game → server | The player clears everything out of their den. |
DenEmptied | de | server → game | The server says the den was cleared. |
DenEpicDensRequest | dh | game → server | The player asks for the epic dens the world map lists. |
DenEpicDens | dh | server → game | The server lists the epic dens, by owner. |
DenPhantomRequest | dph | game → server | The player turns into a phantom, or back. |
DenPhantom | dph | server → game | Someone in the den turned into a phantom, or back. |
DenEcoStateRequest | dEf | game → server | The player asks for the den’s eco system. |
DenEcoState | dEf | server → game | The server describes the den’s eco system. |
DenEcoRedeemRequest | dEr | game → server | The player redeems the den’s eco credits. |
DenEcoRedeemResult | dEr | server → game | The server says whether the den’s eco credits were redeemed. |
DenEcoConsumerRequest | dEc | game → server | The player turns one of the den’s eco items on or off. |
DenEcoConsumerResult | dEc | server → game | The server says which of the den’s eco items are on. |
DenJoinRequest
Asks to join a den (DenXtCommManager.requestDenJoinFull). doorItem is the inventory index of the den door the player walked through (DenItemHolder), or -1 for a join from the interface.
Fields
| Field | Type | |
|---|---|---|
denName | string | den followed by the owner's username, such as denSxip. |
confirmLanguageChange | boolean | The player has agreed to join a den in another language, as in room.join-request. |
doorItem | number | The inventory index of the den door walked through (DenItemHolder), or -1 for a join from the interface. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenJoinRequest, (packet) => {
console.log(packet.denName, packet.confirmLanguageChange, packet.doorItem);
});DenPrivacyRequest
Sets the player's den privacy (DenXtCommManager.requestSetDenPrivacy, first argument 0) or asks for someone else's (requestUserDenPrivacy, first argument 1). One command carries both.
Fields
| Field | Type | |
|---|---|---|
query | DenPrivacyQuery | What is asked: to set the player's den privacy, or to look up someone's. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenPrivacyRequest, (packet) => {
console.log(packet.query);
});DenPrivacyResult
Someone's den privacy (DenXtCommManager.denPrivacyResponse, to BuddyManager.onDenPrivacyResponse).
Fields
| Field | Type | |
|---|---|---|
userName | string | The den's owner, by username. |
privacy | number | A DenPrivacy value. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenPrivacyResult, (packet) => {
console.log(packet.userName, packet.privacy);
});DenKicked
The den's owner locked it while the player was in it (DenXtCommManager.denPrivacyKickResponse): the client shows the message when the player lands in the next room.
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenKicked, (packet) => {
console.log('den.kicked');
});DenVisitorCount
Someone came into or went out of the player's own den (DenXtCommManager.denRoomCount, to GuiManager.updateDenRoomCount(count, entering, userNameEnteringLeaving)), with how many are in it now. The server sends it to the den's owner wherever they are, so it is heard away from home too; the HUD's den button shows the count.
Fields
| Field | Type | |
|---|---|---|
count | number | How many are in the den now. |
entering | boolean | They came in; false when they went out. |
userName | string | Who came in or went out, by username. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenVisitorCount, (packet) => {
console.log(packet.count, packet.entering, packet.userName);
});DenRoomListRequest
Asks for the player's den rooms (DenXtCommManager.requestDenRoomList).
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenRoomListRequest, (packet) => {
console.log('den.room-list-request');
});DenRoomList
The player's den rooms (DenXtCommManager.denListResponse, which builds the list DenSwitch holds). The client keeps only rooms whose def it has.
Fields
| Field | Type | |
|---|---|---|
rooms | DenRoom[] | The player's den rooms, after their count. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenRoomList, (packet) => {
console.log(packet.rooms);
});DenChangeRequest
Makes another of the player's den rooms their den (DenXtCommManager.requestDenChange).
Fields
| Field | Type | |
|---|---|---|
invIdx | number | The den room to switch to: its inventory index, as den.room-list gives it. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenChangeRequest, (packet) => {
console.log(packet.invIdx);
});DenChangeResult
The den room switched to (DenXtCommManager.denChangeResponse), which the client then loads. The avatar and pet follow only when the server sends them.
Fields
| Field | Type | |
|---|---|---|
denRoomDefId | number | The def id of the den room switched to, which the client loads. |
perUserAvId | number | null | Which of the player's avatars is out, or null when the server did not send it. |
activePetInvId | number | null | The inventory id of the player's active pet, or null when the server did not send it. |
extra | string[] | Whatever follows, as it came. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenChangeResult, (packet) => {
console.log(packet.denRoomDefId, packet.perUserAvId, packet.activePetInvId);
});DenMasterpieceItemsRequest
Asks for every masterpiece in a player's den (DenXtCommManager.requestDenMasterpieceItems):
%xt%o%dmi%<room>%<userName>%
Fields
| Field | Type | |
|---|---|---|
userName | string | Whose den to list the masterpieces of. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenMasterpieceItemsRequest, (packet) => {
console.log(packet.userName);
});DenMasterpieceItems
Every masterpiece in the den asked for (DenXtCommManager.denMasterpieceInventoryResponse):
%xt%o%dmi%<room>%<count>%<defId,invIdx,version,approved,uniqueImageId,uniqueImageCreatorDbId,uniqueImageCreatorUUID>...%
Fields
| Field | Type | |
|---|---|---|
items | DenMasterpieceItem[] | Every masterpiece placed in the den asked for, after their count. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenMasterpieceItems, (packet) => {
console.log(packet.items);
});DenMasterpieceCreatorRequest
Asks who drew a masterpiece (DenXtCommManager.requestDenMasterpieceCreatorName, called from gui/MasterpiecePreview.as with the den it is being shown in, then the drawing's own id):
%xt%o%dmc%<room>%<denUserName>%<uniqueImageId>%
Fields
| Field | Type | |
|---|---|---|
denUserName | string | Whose den the masterpiece is being previewed in. |
uniqueImageId | string | The drawing's own id (Masterpiece.uniqueImageId). |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenMasterpieceCreatorRequest, (packet) => {
console.log(packet.denUserName, packet.uniqueImageId);
});DenMasterpieceCreator
Who drew it (DenXtCommManager.denMasterpieceCreatorResponse):
%xt%o%dmc%<room>%<creatorName>%
Fields
| Field | Type | |
|---|---|---|
creatorName | string | The drawing's creator, by their account name. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenMasterpieceCreator, (packet) => {
console.log(packet.creatorName);
});DenItemsRequest
Asks for the player's den items (DenXtCommManager.requestDenItems), with nothing else.
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenItemsRequest, (packet) => {
console.log('den.items-request');
});DenItems
Every den item the player owns (DenXtCommManager.denItemsResponse), placed or not:
%xt%di%<room>%<activeDenIdx>%<itemCount>%<petCount>%<item>...%<petInvIdx>...%
Each item is invIdx, defId, categoryId, version, approved, uniqueImageId, uniqueImageCreatorDbId, uniqueImageCreatorUUID, then a mannequin's body and outfit by inventory index when its def is a mannequin, then denStoreInvId. After the items come the inventory indices of the pets placed in the den. Everything after the counts is kept in details, which readDenItems reads.
Fields
| Field | Type | |
|---|---|---|
activeDenIdx | number | Which of the player's den rooms is their den (DenSwitch.activeDenIdx), by its invIdx. |
itemCount | number | How many den items details holds. |
petCount | number | How many placed pets follow the items in details. |
details | string[] | The items and the placed pets, unread, whose layout depends on each item's def. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenItems, (packet) => {
console.log(packet.activeDenIdx, packet.itemCount, packet.petCount);
});DenState
The den on screen, as the server describes it (DenXtCommManager.denStateResponse): sent as a den is entered, and again when its owner saves it with visitors inside.
%xt%ds%<room>%<itemCount>%<petCount>%<forceReload>%<item>...%<pet>...%
Each item is invIdx, defId, placed, x, y, version, flipped, userNameLink, uniqueImageId, uniqueImageCreatorDbId, uniqueImageCreatorUUID, then a mannequin's body and outfit when its def is a mannequin, then ecoConsumerStateId. Each pet is thirteen fields: see DenStatePet. Everything after the three leading fields is kept in details, which readDenState reads.
Fields
| Field | Type | |
|---|---|---|
itemCount | number | How many den items details holds. |
petCount | number | How many pets follow them. |
forceReload | boolean | Redraw the den now, even while a den change is pending (the field is 1); the client also takes its loading screen down. |
details | string[] | The items and pets, unread, whose layout depends on each item's def. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenState, (packet) => {
console.log(packet.itemCount, packet.petCount, packet.forceReload);
});DenStateSave
Saves changes to the player's den (DenXtCommManager.requestDenStateChange, from the den editor's save): a count, then seventeen fields for each change, a mannequin's written as zeros for anything that is not one.
%xt%o%ds%<room>%<count>%<r>%<i>%<d>%<x>%<y>%<f>%<userNameLink>%<mannequin>...%
Fields
| Field | Type | |
|---|---|---|
changes | DenStateChange[] | The items moved, placed or taken out, after their count. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenStateSave, (packet) => {
console.log(packet.changes);
});DenStateSaved
The server took a den save (DenXtCommManager.denStateSetResponse, to the den editor's onDenSaveSet): the inventory indices of the items it saved, which the editor then marks placed or back in the drawer.
Fields
| Field | Type | |
|---|---|---|
invIdxs | number[] | The items saved, by invIdx: every field of the message. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenStateSaved, (packet) => {
console.log(packet.invIdxs);
});DenBuyRequest
Buys a den item or a den room (DenXtCommManager.requestBuy):
%xt%o%db%<room>%0%<shopId>%<defId>%<version>%<diamond>%<masterpiece>%<usingTokens>%<uuid>% %xt%o%db%<room>%-1%<shopId>%<defId>%<denSlot>%<diamond>%
Fields
| Field | Type | |
|---|---|---|
order | DenBuyOrder | What is bought, and how it is paid for. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenBuyRequest, (packet) => {
console.log(packet.order);
});DenBuyResult
What a den purchase came to (DenXtCommManager.denBuyResponse):
%xt%db%<room>%<status>%<balance>%<unused>%<currencyType>%<invIdx>%
balance is the currency left afterwards, which the client sets when status is 1; empty when the server leaves it as it was. A den room bought is followed by a fresh den.room-list.
Fields
| Field | Type | |
|---|---|---|
status | number | 1 when it was bought. |
balance | string | The balance afterwards, as written: a number, or several currencies at once (4x10,6x5); empty when unchanged. |
unused | string | A field denBuyResponse reads into a local and never uses. |
currencyType | number | Which currency balance is (CURRENCY). |
invIdx | number | Which of the player's copies the item became. |
extra | string[] | Whatever follows, as it came. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenBuyResult, (packet) => {
console.log(packet.status, packet.balance, packet.unused);
});DenRecycleRequest
Sells den items or den rooms back (DenXtCommManager.requestRecycle): whether they are den items (0) or rooms (-1), then their inventory indices in one field, joined with commas, as the client's array reads as text.
Fields
| Field | Type | |
|---|---|---|
rooms | boolean | Den rooms are sold (-1); otherwise den items (0). |
invIdxs | number[] | What is sold, by inventory index. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenRecycleRequest, (packet) => {
console.log(packet.rooms, packet.invIdxs);
});DenRecycleResult
What was sold (DenXtCommManager.denRecycleResponse):
%xt%dr%<room>%<count>%<gems>%<invIdx>...%
gems is the gem balance afterwards, -1 when unchanged. No items means nothing was sold.
Fields
| Field | Type | |
|---|---|---|
gems | number | The gem balance afterwards, or -1 when unchanged. |
invIdxs | number[] | What was sold, by inventory index. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenRecycleResult, (packet) => {
console.log(packet.gems, packet.invIdxs);
});DenEmptyRequest
Clears everything out of the player's den (DenXtCommManager.requestEmptyDen).
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenEmptyRequest, (packet) => {
console.log('den.empty-request');
});DenEmptied
The den was cleared (DenXtCommManager.denEmptyResponse): the client takes every item off the screen and out of the den editor. It reads no fields.
Fields
| Field | Type | |
|---|---|---|
extra | string[] | Whatever the server sent, which the client does not read. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenEmptied, (packet) => {
console.log(packet.extra);
});DenEpicDensRequest
Asks for the epic dens the world map lists (DenXtCommManager.requestDenHighest, from VolumeSelector.checkAndLoadEpicDenWindows).
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenEpicDensRequest, (packet) => {
console.log('den.epic-dens-request');
});DenEpicDens
The epic dens (DenXtCommManager.denHighestResponse, to VolumeSelector.createDenWindows): a count, then each den's owner, whose name the map's window shows and joins (den + name).
Fields
| Field | Type | |
|---|---|---|
userNames | string[] | Each epic den's owner, by username, after their count. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenEpicDens, (packet) => {
console.log(packet.userNames);
});DenPhantomRequest
Turns the player into a phantom or back (DenXtCommManager.requestDenPhantom), as walking into a den's phantom portal does (DenItemHolder, an item of specialType 3).
Fields
| Field | Type | |
|---|---|---|
phantom | boolean | Become a phantom (1); 0 turns back. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenPhantomRequest, (packet) => {
console.log(packet.phantom);
});DenPhantom
Someone in the room turned into a phantom or back (DenXtCommManager.denPhantomResponse, to AvatarWorldView.setAvatarAsPhantom):
%xt%dph%<room>%1%<userId>%<phantom>%
The avatar and the change follow only when the first field is 1.
Fields
| Field | Type | |
|---|---|---|
success | boolean | It went through (the field is 1). |
userId | number | null | Whose avatar, by SmartFox user id; null when it did not go through. |
phantom | boolean | Now a phantom (1); false when back to normal, or when it did not go through. |
extra | string[] | Whatever follows, as it came. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenPhantom, (packet) => {
console.log(packet.success, packet.userId, packet.phantom);
});DenEcoStateRequest
Asks for the den's eco system (DenXtCommManager.requestDenEcoCreditRefresh).
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenEcoStateRequest, (packet) => {
console.log('den.eco-state-request');
});DenEcoState
The den's eco system (DenXtCommManager.denEcoRefreshResponse), in the order den.EcoStateResponse reads it.
Fields
| Field | Type | |
|---|---|---|
numActiveWindTurbines | number | How many wind turbines in the den are working. |
numActiveSolarPanels | number | How many solar panels in the den are working. |
numConsumerItems | number | How many eco items draw power, on or not. |
ecoPowerGeneration | number | The eco power the wind turbines and solar panels make. |
ecoPowerConsumption | number | The eco power the items turned on draw. |
ecoScoreRequired | number | The eco score the next reward needs. |
nextRewardBitIndex | number | Which reward is next, as a bit index into the den's reward list. |
unredeemedEcoCredits | number | Eco credits earned and not yet redeemed. |
secondsUntilNextEcoCredit | number | Seconds until the next eco credit. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenEcoState, (packet) => {
console.log(packet.numActiveWindTurbines, packet.numActiveSolarPanels, packet.numConsumerItems);
});DenEcoRedeemRequest
Redeems the den's eco credits (DenXtCommManager.requestDenEcoCreditRedeem).
Fields
| Field | Type | |
|---|---|---|
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenEcoRedeemRequest, (packet) => {
console.log('den.eco-redeem-request');
});DenEcoRedeemResult
Whether the eco credits were redeemed (DenXtCommManager.denEcoCreditRefreshResponse), with the seconds until the next one. The new balance arrives as a currency change.
Fields
| Field | Type | |
|---|---|---|
redeemed | boolean | They were redeemed (the field is 1). |
secondsUntilNextEcoCredit | number | null | Seconds until the next eco credit; null when the server sent none. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenEcoRedeemResult, (packet) => {
console.log(packet.redeemed, packet.secondsUntilNextEcoCredit);
});DenEcoConsumerRequest
Turns one of the den's eco items on or off (DenXtCommManager.requestDenEcoConsumer, from the eco points popup's toggle).
Fields
| Field | Type | |
|---|---|---|
invIdx | number | The eco item, by its place in the den. |
online | boolean | Turn it on (1); 0 turns it off. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the game sends it to the server, after it has gone through.
const stop = phantom.packets.client.watch(packets.DenEcoConsumerRequest, (packet) => {
console.log(packet.invIdx, packet.online);
});DenEcoConsumerResult
The den's eco items after a toggle (DenXtCommManager.denEcoConsumerResponse, to the popup's ecoConsumerCallback and DenItemHolder.updateConsumers):
%xt%dEc%<room>%<ecoPointsConsumed>%<ecoScore>%<count>%<invIdx>%<stateId>...%
Fields
| Field | Type | |
|---|---|---|
ecoPointsConsumed | number | The eco points the den draws now. |
ecoScore | number | The den's eco score now. |
consumers | DenEcoConsumer[] | Each eco item whose state the server sent, after their count. |
room | number | The room the message was sent in, as the SmartFox room id; -1 when it names none. |
Example
// Each time the server sends it to the game, after it has gone through.
const stop = phantom.packets.server.watch(packets.DenEcoConsumerResult, (packet) => {
console.log(packet.ecoPointsConsumed, packet.ecoScore, packet.consumers);
});