Dbserver-protocols
Services
dbserver listens on several ports, each one providing a different service. Most services correspond to another server which will connect. All of these services use the common Network protocol, in TCP-only mode.
account
arena
auction
AuctionServer connects to this service. It can receive the following commands:
AUCTION_SVR_CONNECT (2)
The message has no parameters. dbserver will accept only a single connection, and while it has one, it will respond to all further AUCTION_SVR_CONNECT messages by closing the connection.
dbserver responds with AUCTION_CLIENT_CONNECT (2):
packint(1) protocol_version string shard_name bits(1) have_inactive_players something....
AUCTION_SVR_SEND_INV (3)
autobits entity_id string inventory
dbserver finds the mapserver for entity_id, and proxies the message there as DBSERVER_AUCTION_SEND_INV
inventory is eventually decoded by AuctionInventory_FromStr in the mapserver, but dbserver proxies it without inspecting its value.
AUCTION_SVR_SEND_HISTORYINFO (4)
autobits entity_id string identifier autobits buying_count autobits selling_count autobits history_count repeated history_count times: autobits date autobits price
dbserver finds the mapserver for entity_id, and proxies the message there as DBSERVER_AUCTION_SEND_HIST.
AUCTION_SVR_BATCH_SEND_ITEMINFO (5)
autobits entity_id zipped data
dbserver finds the mapserver for entity_id, and proxies the message there as DBSERVER_AUCTION_BATCH_INFO. The zipped data is not inspected by dbserver.
After this output packet has been queued, dbserver sends AUCTION_CLIENT_DATAOK to the AuctioServer, with no both. This is a primitive form of flow control. It does not wait for the message to be sent to the mapserver before doing this.
AUCTION_SVR_XACT_CMD (7)
autobits entity_id autobits type XactCmd cmd
dbserver finds the mapserver for entity_id. If there is one, it proxies the message there as DBSERVER_AUCTION_XACT_CMD. If there is no mapserver, then dbserver responds to AuctionServer with AUCTION_CLIENT_XACT_UPDATE, sending:
autobits xid autobits subid autobits result
Where *xid* and *subid* are taken from *cmd*, and the result is set to *kXactCmdRes_No*.
AUCTION_SVR_RELAY_CMD_BYENT (9)
packint(1) entity_id packint(1) force string msg
dbserver finds the mapserver for entity_id. If there is one, it sends DBSERVER_RELAY_CMD there with *msg* as the body. If there is no mapserver, and force is set to 1, then the message is queued for relaying when the entity is available, and dbserver begins attempting to load the entity into a mapserver.
AUCTION_SVR_THROTTLE_ON (10)
This message has no parameters, and dbserver sends no response. It enables throttling, which prevents some (???) messages from being sent to the AuctionServer.
AUCTION_SVR_THROTTLE_OFF (11)
This message has no parameters, and dbserver sends no response. It disables throttling.
AUCTION_SVR_ACCOUNT_SHARDXFER (12)
OrderId order_id autobits dbid
dbid is interpreted as an entity_id. dbserver will offline (???) and delete (???) the player, and then send AccountServer an ACCOUNT_CLIENT_SHARDXFER with:
OrderId order_id autobits SHARDXFER_FULFILL_COMMIT_SRC
beacon
client
This service is used for the game client to communicate with dbserver.
db
Despite the name, this service is used to communicate with MapServer.
Every NetLink for the db server has a unique lock_id, starting from 0. They are used to identify current connections to MapServer in order to send messages.
DBCLIENT_INITIAL_CONNECT
optional packint(1) map_protocol
If map_protocol is not present (the body is empty), it is 0. If map_protocol is not equal to DBSERVER_PROTOCOL_VERSION (currently 20110503) then dbserver will respond with DBSERVER_CLIENT_CMD_FAILED and close the NetLink.
Otherwise, dbserver sends these commands back to the MapServer:
DBSERVER_TIMEOFFSET:
bits(32) seconds_since_2000 float32 time_zone_delta
These values are set based on the system clock. time_zone_delta is the difference between UTC and local time, in hours.
DBSERVER_OVERRIDDEN_AUTHBITS
bits(128) overridden_auth_bits
The value of overridden_auth_bits is set based on OverrideAuthBit lines in servers.cfg.
If any DisabledZoneEvents entries are present in servers.cfg, dbserver sends a DBSERVER_DISABLED_ZONE_EVENTS command:
repeated string event
One entry for each DisabledZoneEvents line in servers.cfg
If user reactivation is active, dbserver sends a DBSERVER_NOTIFY_REACTIVATION message, with no body.
DBSERVER_UPDATE_LOG_LEVELS:
repeated LOG_LEVELS times: packint(1) log_level
These are the log levels, as managed by log.h, for all logging types in order from 0 to LOG_LEVELS. They are set in servers.cfg with SetLogLevel lines.
DBSERVER_ACCOUNTSERVER_CATALOG:
autobits catalog_timestamp autobits auth_timeout string mtx_environment string play_span_domain string play_spam_url_home string play_spam_url_categoryview string play_spam_url_itemview string play_spam_url_showcart string play_spam_url_addtocart string play_spam_url_manageaccount string play_spam_url_supportpage string play_spam_url_supportpage_de string play_spam_url_supportpage_fr string play_spam_url_updatetovip string coh_url_newfeatures string coh_url_newfeaturesupdate autobits play_span_store_flags
These appear to be values set in account_server.cfg. Most of them are URLs.