AccountServer: Difference between revisions
From OuroDev
Initial page containing basic formatting and table columns |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
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. | 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. | ||
AccountServer is also responsible for directing the transfer of player characters (Entities) between shards. | |||
== Configuration == | |||
=== account_server.cfg === | |||
<nowiki> | |||
ShardName | |||
ShardName Paragon | |||
ShardId 1 | |||
Address 127.0.0.1 | |||
NoXferOut | |||
NoXferIn | |||
XferDestinations None | |||
ShardEnd | |||
PlayNCAdminWebPageSecretKey Paragon | |||
MtxEnvironment Paragon | |||
MtxSecretKey Paragon | |||
MtxIOThreads 1 | |||
SqlDbName cohacc | |||
SqlLogin "Driver={SQL Server Native Client 11.0};server=localhost;database=cohacc;trusted_connection=Yes;" | |||
CatalogTimeStampTestOffsetDays 0 | |||
clientAuthTimeout 1800 | |||
ShardXfersDayMemory 14 | |||
ShardXfersAllowedInMemory 0</nowiki> | |||
== Database Schema == | == Database Schema == | ||
An SQL dump can be found under Source\Assets\DbSchemas. | |||
== Table Structures == | == Table Structures == | ||
Line 8: | Line 32: | ||
=== account === | === account === | ||
{| | {| class="wikitable" | ||
! 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 === | === game_log === | ||
{| | {| class="wikitable" | ||
! 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 === | === game_transactions === | ||
{| | {| class="wikitable" | ||
! 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 === | === inventory === | ||
{| | {| class="wikitable" | ||
! 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 === | === mtx_log === | ||
{| | {| class="wikitable" | ||
! 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 | |||
| | |||
|- | |||
| quantity | |||
| int | |||
| | |||
|- | |||
| points | |||
| int | |||
| | |||
|} | |} | ||
=== product === | === product === | ||
{| | {| class="wikitable" | ||
! Column Name | |||
! Data Type | |||
! Attributes | |||
|- | |||
| sku_id | |||
| char(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 === | === product_type === | ||
{| | {| class="wikitable" | ||
! Column Name | |||
! Data Type | |||
! Attributes | |||
|- | |||
| product_type_id | |||
| int | |||
| Primary Key | |||
|- | |||
| name | |||
| varchar(128) | |||
| Not Nullable | |||
|} | |} | ||
Latest revision as of 19:14, 25 May 2019
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.
AccountServer is also responsible for directing the transfer of player characters (Entities) between shards.
Configuration
account_server.cfg
ShardName ShardName Paragon ShardId 1 Address 127.0.0.1 NoXferOut NoXferIn XferDestinations None ShardEnd PlayNCAdminWebPageSecretKey Paragon MtxEnvironment Paragon MtxSecretKey Paragon MtxIOThreads 1 SqlDbName cohacc SqlLogin "Driver={SQL Server Native Client 11.0};server=localhost;database=cohacc;trusted_connection=Yes;" CatalogTimeStampTestOffsetDays 0 clientAuthTimeout 1800 ShardXfersDayMemory 14 ShardXfersAllowedInMemory 0
Database Schema
An SQL dump can be found under Source\Assets\DbSchemas.
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 | 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 | |
quantity | int | |
points | int |
product
Column Name | Data Type | Attributes |
---|---|---|
sku_id | char(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