PageRenderTime 108ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/src/server/game/DataStores/DB2Structure.h

http://github.com/SingularityCore/Singularity
C Header | 136 lines | 106 code | 8 blank | 22 comment | 0 complexity | 4162ec8fa6192e9859e81d3729055e3e MD5 | raw file
Possible License(s): GPL-2.0, CC-BY-SA-3.0, BSD-3-Clause
  1. /*
  2. * Copyright (C) 2011 SingularityCore <http://www.singularitycore.org/>
  3. * Copyright (C) 2010-2011 Project SkyFire <http://www.projectskyfire.org/>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef TRINITY_DB2STRUCTURE_H
  19. #define TRINITY_DB2STRUCTURE_H
  20. #include "Common.h"
  21. #include "DBCEnums.h"
  22. #include "Define.h"
  23. #include "Path.h"
  24. #include "Util.h"
  25. #include "Vehicle.h"
  26. #include "SharedDefines.h"
  27. #include <map>
  28. #include <set>
  29. #include <vector>
  30. // Structures using to access raw DB2 data and required packing to portability
  31. struct ItemEntry
  32. {
  33. uint32 ID; // 0
  34. uint32 Class; // 1
  35. uint32 SubClass; // 2 some items have strange subclasses
  36. int32 Unk0; // 3
  37. int32 Material; // 4
  38. uint32 DisplayId; // 5
  39. uint32 InventoryType; // 6
  40. uint32 Sheath; // 7
  41. };
  42. struct ItemSparseEntry
  43. {
  44. uint32 ID; // 0
  45. uint32 Quality; // 1
  46. uint32 Flags; // 2
  47. uint32 Flags2; // 3
  48. uint32 BuyPrice; // 4
  49. uint32 SellPrice; // 5
  50. uint32 InventoryType; // 6
  51. int32 AllowableClass; // 7
  52. int32 AllowableRace; // 8
  53. uint32 ItemLevel; // 9
  54. int32 RequiredLevel; // 10
  55. uint32 RequiredSkill; // 11
  56. uint32 RequiredSkillRank; // 12
  57. uint32 RequiredSpell; // 13
  58. uint32 RequiredHonorRank; // 14
  59. uint32 RequiredCityRank; // 15
  60. uint32 RequiredReputationFaction; // 16
  61. uint32 RequiredReputationRank; // 17
  62. uint32 MaxCount; // 18
  63. uint32 Stackable; // 19
  64. uint32 ContainerSlots; // 20
  65. int32 ItemStatType[MAX_ITEM_PROTO_STATS]; // 21 - 30
  66. uint32 ItemStatValue[MAX_ITEM_PROTO_STATS]; // 31 - 40
  67. int32 ItemStatUnk1[MAX_ITEM_PROTO_STATS]; // 41 - 50
  68. int32 ItemStatUnk2[MAX_ITEM_PROTO_STATS]; // 51 - 60
  69. uint32 ScalingStatDistribution; // 61
  70. uint32 DamageType; // 62
  71. uint32 Delay; // 63
  72. float RangedModRange; // 64
  73. int32 SpellId[MAX_ITEM_PROTO_SPELLS]; // 65 - 69
  74. int32 SpellTrigger[MAX_ITEM_PROTO_SPELLS]; // 70 - 74
  75. int32 SpellCharges[MAX_ITEM_PROTO_SPELLS]; // 75 - 79
  76. int32 SpellCooldown[MAX_ITEM_PROTO_SPELLS]; // 80 - 84
  77. int32 SpellCategory[MAX_ITEM_PROTO_SPELLS]; // 85 - 89
  78. int32 SpellCategoryCooldown[MAX_ITEM_PROTO_SPELLS]; // 90 - 94
  79. uint32 Bonding; // 95
  80. DB2String Name; // 96
  81. DB2String Name2; // 97
  82. DB2String Name3; // 98
  83. DB2String Name4; // 99
  84. DB2String Description; // 100
  85. uint32 PageText; // 101
  86. uint32 LanguageID; // 102
  87. uint32 PageMaterial; // 103
  88. uint32 StartQuest; // 104
  89. uint32 LockID; // 105
  90. int32 Material; // 106
  91. uint32 Sheath; // 107
  92. uint32 RandomProperty; // 108
  93. uint32 RandomSuffix; // 109
  94. uint32 ItemSet; // 110
  95. uint32 MaxDurability; // 111
  96. uint32 Area; // 112
  97. uint32 Map; // 113
  98. uint32 BagFamily; // 114
  99. uint32 TotemCategory; // 115
  100. uint32 Color[MAX_ITEM_PROTO_SOCKETS]; // 116 - 118
  101. uint32 Content[MAX_ITEM_PROTO_SOCKETS]; // 119 - 121
  102. int32 SocketBonus; // 122
  103. uint32 GemProperties; // 123
  104. float ArmorDamageModifier; // 124
  105. uint32 Duration; // 125
  106. uint32 ItemLimitCategory; // 126
  107. uint32 HolidayId; // 127
  108. float StatScalingFactor; // 128
  109. int32 Field130; // 129
  110. int32 Field131; // 130
  111. };
  112. #define MAX_ITEM_EXT_COST_ITEMS 5
  113. #define MAX_ITEM_EXT_COST_CURRENCIES 5
  114. struct ItemExtendedCostEntry
  115. {
  116. uint32 ID; // 0 extended-cost entry id
  117. //uint32 reqhonorpoints; // 1 required honor points
  118. //uint32 reqarenapoints; // 2 required arena points
  119. uint32 RequiredArenaSlot; // 3 arena slot restrictions (min slot value)
  120. uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // 4-8 required item id
  121. uint32 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // 9-13 required count of 1st item
  122. uint32 RequiredPersonalArenaRating; // 14 required personal arena rating
  123. //uint32 ItemPurchaseGroup; // 15
  124. uint32 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES];// 16-20 required curency id
  125. uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES];// 21-25 required curency count
  126. //uint32 something[5]; // 26-30
  127. };
  128. #endif