Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
6.8 KiB

  1. START_SCHEMA( GC, cbase.h )
  2. // --------------------------------------------------------
  3. // WARNING! All new tables need to be added to the end of the file
  4. // if you expect to deploy the GC without deploying new clients.
  5. // --------------------------------------------------------
  6. //-----------------------------------------------------------------------------
  7. // ItemName
  8. //
  9. //-----------------------------------------------------------------------------
  10. START_TABLE( k_ESchemaCatalogMain, ItemName, TABLE_PROP_NORMAL )
  11. MEM_FIELD_BIN( unDefIndex, DefIndex, uint16 ) // Item definition index
  12. MEM_FIELD_VAR_CHAR_LEN( VarCharName, Name, 32 ) // Item Name
  13. PRIMARY_KEY_CLUSTERED( 100, unDefIndex )
  14. UNIQUE_FIELD( ItemNameIndex, VarCharName )
  15. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyPreserveAlways )
  16. ALLOW_WIPE_TABLE_IN_PRODUCTION( true )
  17. END_TABLE
  18. //-----------------------------------------------------------------------------
  19. // Item
  20. //
  21. //-----------------------------------------------------------------------------
  22. START_TABLE( k_ESchemaCatalogMain, Item, TABLE_PROP_NORMAL )
  23. MEM_FIELD_BIN( ulID, ID, uint64 ) // Item ID
  24. MEM_FIELD_BIN( unAccountID, AccountID, uint32 ) // Item Owner
  25. MEM_FIELD_BIN( unDefIndex, DefIndex, uint16 ) // Item definition index
  26. MEM_FIELD_BIN( unLevel, Level, uint8 ) // Item Level
  27. MEM_FIELD_BIN( nQuality, EQuality, uint8 ) // Item quality (rarity)
  28. MEM_FIELD_BIN( unInventory, Inventory, uint32 ) // App managed int representing inventory placement
  29. MEM_FIELD_BIN( unQuantity, Quantity, uint32 ) // Consumable stack count (ammo, money, etc)
  30. MEM_FIELD_VAR_CHAR_LEN( VarCharCustomName, Name, MAX_ITEM_CUSTOM_NAME_LENGTH+1 ) // User-crafted custom name
  31. PRIMARY_KEY_CLUSTERED( 100, ulID )
  32. INDEX_FIELD( UserAppLookup, unAccountID )
  33. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  34. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  35. END_TABLE
  36. //-----------------------------------------------------------------------------
  37. // AttributeName
  38. //
  39. //-----------------------------------------------------------------------------
  40. START_TABLE( k_ESchemaCatalogMain, AttributeName, TABLE_PROP_NORMAL )
  41. MEM_FIELD_BIN( unAttrDefIndex,AttrDefIndex,uint32 ) // Attribute definition index
  42. MEM_FIELD_VAR_CHAR_LEN( VarCharName, Name, 32 ) // Attribute Name
  43. PRIMARY_KEY_CLUSTERED( 100, unAttrDefIndex )
  44. UNIQUE_FIELD( AttributeNameIndex, VarCharName )
  45. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyPreserveAlways )
  46. ALLOW_WIPE_TABLE_IN_PRODUCTION( true )
  47. END_TABLE
  48. //-----------------------------------------------------------------------------
  49. // ItemAttribute
  50. //
  51. //-----------------------------------------------------------------------------
  52. START_TABLE( k_ESchemaCatalogMain, ItemAttribute, TABLE_PROP_NORMAL )
  53. MEM_FIELD_BIN( ulItemID, ItemID, uint64 ) // Item ID
  54. MEM_FIELD_BIN( unAttrDefIndex,AttrDefIndex,uint16 ) // Attribute definition index
  55. MEM_FIELD_BIN( flValue, Value, float ) // Attribute Value
  56. PRIMARY_KEYS_CLUSTERED( 80, ulItemID, unAttrDefIndex )
  57. FOREIGN_KEY_CONSTRAINT( FKItemID, ItemID, Item, ID, GCSDK::k_EForeignKeyActionCascade, GCSDK::k_EForeignKeyActionCascade )
  58. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  59. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  60. END_TABLE
  61. //-----------------------------------------------------------------------------
  62. // ItemAudit
  63. //
  64. //-----------------------------------------------------------------------------
  65. START_TABLE( k_ESchemaCatalogMain, ItemAudit, TABLE_PROP_NORMAL )
  66. MEM_FIELD_BIN( ulItemID, ItemID, uint64 ) // Item ID
  67. MEM_FIELD_BIN( RTime32Stamp,TimeStamp, RTime32 ) // Time
  68. MEM_FIELD_BIN( eAction, Action, uint8 ) // What Happened
  69. MEM_FIELD_BIN( unOwnerID, OwnerID, uint32 ) // Player who owns the item
  70. MEM_FIELD_BIN( unServerIP, ServerIP, uint32 ) // IP of the server this happened on
  71. MEM_FIELD_BIN( usServerPort,ServerPort, uint16 ) // Port of the server this happened on
  72. MEM_FIELD_BIN( unData, Data, uint32 ) // Additional data for the operation
  73. PRIMARY_KEYS_CLUSTERED( 80, ulItemID, RTime32Stamp, eAction )
  74. INDEX_FIELDS( AccountLookupIndex, unOwnerID, eAction )
  75. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  76. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  77. END_TABLE
  78. //-----------------------------------------------------------------------------
  79. // Recipe
  80. //
  81. //-----------------------------------------------------------------------------
  82. START_TABLE( k_ESchemaCatalogMain, Recipe, TABLE_PROP_NORMAL )
  83. MEM_FIELD_BIN( unAccountID, AccountID, uint32 ) // Recipe Owner
  84. MEM_FIELD_BIN( unDefIndex, DefIndex, uint16 ) // Recipe definition index
  85. PRIMARY_KEYS_CLUSTERED( 100, unDefIndex, unAccountID )
  86. INDEX_FIELD( UserAppLookup, unAccountID )
  87. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  88. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  89. END_TABLE
  90. //-----------------------------------------------------------------------------
  91. // WarDeaths
  92. //
  93. //-----------------------------------------------------------------------------
  94. START_TABLE( k_ESchemaCatalogMain, WarDeaths, TABLE_PROP_NORMAL )
  95. MEM_FIELD_BIN( unVictimID, VictimID, uint32 ) // Player who was killed by the opposite side
  96. MEM_FIELD_BIN( RTime32Stamp,TimeStamp, RTime32 ) // Time this player's session ended
  97. PRIMARY_KEYS_CLUSTERED( 80, unVictimID, RTime32Stamp )
  98. MEM_FIELD_BIN( unSessionDuration, SessionDuration, uint32)// Length of this player's session in seconds
  99. MEM_FIELD_BIN( unSoldierDeaths, SoldierDeaths, uint32 ) // Number of times this player died as a solder to a demoman
  100. MEM_FIELD_BIN( unDemomanDeaths, DemomanDeaths, uint32 ) // Number of times this player died as a demoman to a solder
  101. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  102. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  103. END_TABLE
  104. //-----------------------------------------------------------------------------
  105. // GameAccountClient
  106. //
  107. //-----------------------------------------------------------------------------
  108. START_TABLE( k_ESchemaCatalogMain, GameAccountClient, TABLE_PROP_NORMAL )
  109. MEM_FIELD_BIN( unAccountID, AccountID, uint32 ) // Item Owner
  110. PRIMARY_KEY_CLUSTERED( 80, unAccountID )
  111. MEM_FIELD_BIN( unSoldierKills, SoldierKills, uint32 ) // Number of times this player killed soldiers during the War!
  112. MEM_FIELD_BIN( unDemomanKills, DemomanKills, uint32 ) // Number of times this player killed demomen during the War!
  113. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  114. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  115. END_TABLE
  116. //-----------------------------------------------------------------------------
  117. // GameAccount
  118. //
  119. //-----------------------------------------------------------------------------
  120. START_TABLE( k_ESchemaCatalogMain, GameAccount, TABLE_PROP_NORMAL )
  121. MEM_FIELD_BIN( unAccountID, AccountID, uint32 ) // Account ID of the user
  122. MEM_FIELD_BIN( unRewardPoints, RewardPoints, uint32 ) // number of timed reward points (coplayed minutes) for this user
  123. PRIMARY_KEY_CLUSTERED( 100, unAccountID )
  124. WIPE_TABLE_BETWEEN_TESTS( k_EWipePolicyWipeForAllTests )
  125. ALLOW_WIPE_TABLE_IN_PRODUCTION( false )
  126. END_TABLE
  127. // NEED A CARRIAGE RETURN HERE!
  128. //-------------------------