AccountServer handles all inventory-related queries and reads processed payment information. PlaySpan is the original payment backend used before NCSoft shut down City of Heroes.
Database Schema
An SQL dump will be bundled with future releases of code. Until then, here you go.
Table Structures
Columns are nullable unless denoted by Primary Key or Non Nullable.
account
Column Name
|
Data Type
|
Attributes
|
auth_id
|
int
|
Primary Key
|
name
|
varchar(14)
|
loyalty_bits
|
binary(16)
|
last_loyalty_point_count
|
smallint
|
loyalty_points_spent
|
smallint
|
last_email_date
|
smalldatetime
|
last_num_emails_sent
|
smallint
|
free_xfer_date
|
smalldatetime
|
|
game_log
Column Name
|
Data Type
|
Attributes
|
order_id
|
uniqueidentifier
|
Primary Key, Foreign Key to game_transactions.order_id
|
auth_id
|
int
|
Foreign Key to account.auth_id, Not Nullable
|
sku_id
|
char(8)
|
Foreign Key to product.sku_id, Not Nullable
|
transaction_date
|
datetime
|
shard_id
|
tinyint
|
ent_id
|
int
|
granted
|
int
|
claimed
|
int
|
csr_did_it
|
bit
|
parent_order_id
|
uniqueidentifier
|
Foreign Key to game_transactions.order_id, Not Nullable
|
saved
|
int
|
|
game_transactions
Column Name
|
Data Type
|
Attributes
|
order_id
|
uniqueidentifier
|
Primary Key
|
auth_id
|
int
|
Foreign Key to account.auth_id, Not Nullable
|
sku_id
|
char(8)
|
Foreign Key to product.sku_id, Not Nullable
|
transaction_date
|
datetime
|
shard_id
|
tinyint
|
ent_id
|
int
|
granted
|
int
|
claimed
|
int
|
csr_did_it
|
bit
|
parent_order_id
|
uniqueidentifier
|
Foreign Key to game_transactions.order_id, Not Nullable
|
|
inventory
Column Name
|
Data Type
|
Attributes
|
auth_id
|
int
|
Foreign Key to account.auth_id, Not Nullable
|
sku_id
|
char(8)
|
Foreign Key to product.sku_id, Not Nullable
|
granted_total
|
int
|
claimed_total
|
int
|
saved_total
|
int
|
expires
|
smalldatetime
|
|
mtx_log
Column Name
|
Data Type
|
Attributes
|
order_id
|
int
|
Primary Key, Foreign Key to game_transactions.order_id
|
auth_id
|
int
|
Foreign Key to account.auth_id, Not Nullable
|
sku_id
|
char(8)
|
Foreign Key to product.sku_id, Not Nullable
|
transaction_date
|
datetime
|
quantity
|
int
|
points
|
int
|
|
product
Column Name
|
Data Type
|
Attributes
|
sku_id
|
varchar(8)
|
Primary Key
|
name
|
varchar(128)
|
product_type_id
|
int
|
Foreign Key to product_type.product_type_id, Not Nullable
|
grant_limit
|
int
|
expiration_seconds
|
int
|
|
product_type
Column Name
|
Data Type
|
Attributes
|
product_type_id
|
int
|
Primary Key
|
name
|
varchar(128)
|
Not Nullable
|
|
Stored Procedures
SP_add_game_transaction
SP_add_micro_transaction
SP_add_multi_game_transaction
SP_find_or_create_account
SP_read_unsaved_game_transactions
SP_revert_game_transaction
SP_save_game_transaction
SP_update_account
Table-Valued Parameters
TVP_game_transaction
Development Notes
[2:14 PM] Searge: nice, you can also get all sku by just changing some code, int AccountGetStoreProductCount2(AccountInventorySet* invSet, const AccountProduct* pProd, bool bActive) in AccountData.c could always return 1
[2:39 PM] Searge: @Pazaz the loyalty bits set by the client when you take all of them are set to 0xFFFFFFFF7FE00F000000000000000000 in the database