Mercurial > mm7
annotate Items.h @ 2141:1283eedcc028
Слияние
author | Ritor1 |
---|---|
date | Thu, 02 Jan 2014 17:57:09 +0600 |
parents | 52abdea20b9e |
children | 3cc3a29f073b |
rev | line source |
---|---|
0 | 1 #pragma once |
1202 | 2 #include <array> |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
3 #include <map> |
1708
f8414042db1f
Moving NZIArray to a separate class, fixing a few inventory bugs
Grumpy7
parents:
1682
diff
changeset
|
4 #include "NZIArray.h" |
0 | 5 |
1036 | 6 enum DAMAGE_TYPE:unsigned int |
7 { | |
8 DMGT_FIRE = 0, | |
9 DMGT_ELECTR = 1, | |
10 DMGT_COLD = 2, | |
1559
1f3f01d39300
Player::CanTrainToNextLevel simplified, Player::GetExperienceDisplayColor shortened a bit Player::CalculateIncommingDamage + fixed resistances not working if no resistance bonus (ignored luck bonus)
Grumpy7
parents:
1553
diff
changeset
|
11 DMGT_EARTH = 3, |
1036 | 12 DMGT_PHISYCAL= 4, |
1966
7840fe323f67
stru319::LootActor(struct Actor *pActor) to Actor::LootActor
Grumpy7
parents:
1783
diff
changeset
|
13 DMGT_MAGICAL = 5, |
1036 | 14 DMGT_SPIRIT = 6, |
15 DMGT_MIND = 7, | |
16 DMGT_BODY = 8, | |
1966
7840fe323f67
stru319::LootActor(struct Actor *pActor) to Actor::LootActor
Grumpy7
parents:
1783
diff
changeset
|
17 DMGT_LIGHT = 9, |
1036 | 18 DMGT_DARK =10 |
19 }; | |
0 | 20 |
21 | |
22 | |
23 /* 338 */ | |
463 | 24 enum ITEM_FLAGS :unsigned int |
0 | 25 { |
26 ITEM_IDENTIFIED = 0x1, | |
27 ITEM_BROKEN = 0x2, | |
28 ITEM_TEMP_BONUS = 0x8, | |
1455 | 29 ITEM_AURA_EFFECT_RED = 0x10,//16 |
30 ITEM_AURA_EFFECT_BLUE = 0x20,//32 | |
31 ITEM_AURA_EFFECT_GREEN = 0x40,//64 | |
32 ITEM_AURA_EFFECT_PURPLE = 0x80,//128 | |
2085 | 33 ITEM_ENCHANT_ANIMATION = 0xF0,//240 |
0 | 34 ITEM_STOLEN = 0x100, |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
35 ITEM_HARDENED = 0x200, |
0 | 36 }; |
37 | |
38 | |
377 | 39 enum ITEM_MATERIAL |
437 | 40 { |
377 | 41 MATERIAL_COMMON =0, |
42 MATERIAL_ARTEFACT = 1, | |
43 MATERIAL_RELIC = 2, | |
44 MATERIAL_SPECIAL = 3 | |
437 | 45 }; |
377 | 46 |
0 | 47 /* 330 */ |
48 enum ITEM_TYPE | |
49 { | |
50 ITEM_LONGSWORD_1 = 0x1, | |
51 ITEM_DAGGER_1 = 0xF, | |
52 ITEM_AXE_1 = 0x17, | |
53 ITEM_SPEAR_1 = 0x1F, | |
54 ITEM_CROSSBOW_1 = 0x2F, | |
55 ITEM_MACE_1 = 0x32, | |
56 ITEM_STAFF_1 = 0x3D, | |
816 | 57 ITEM_BLASTER = 64, |
58 ITEM_LASER_RIFLE = 65, | |
0 | 59 ITEM_LEATHER_1 = 0x42, |
60 ITEM_CHAINMAIL_1 = 0x47, | |
61 ITEM_PLATE_1 = 0x4C, | |
62 ITEM_BUCKLER_1 = 0x54, | |
63 ITEM_GAUNTLETS_1 = 0x6E, | |
64 ITEM_BOOTS_1 = 0x73, | |
490 | 65 ITEM_WAND_FIRE = 135, |
66 ITEM_WAND_STUN = 138, | |
0 | 67 ITEM_WAND_INCENERATION = 0x9F, |
1575 | 68 ITEM_REAGENT_WIDOWSWEEP_BERRIES = 200, |
0 | 69 ITEM_TROLL_BLOOD = 0xCA, |
70 ITEM_DRAGON_EYE = 0xCC, | |
71 ITEM_HARPY_FEATHER = 0xCF, | |
72 ITEM_DEVIL_ICHOR = 0xD6, | |
73 ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9, | |
1575 | 74 ITEM_REAGENT_PHILOSOPHERS_STONE = 219, |
75 ITEM_POTION_BOTTLE = 220, | |
76 ITEM_POTION_CATALYST = 221, | |
1576 | 77 ITEM_POTION_CURE_WOUNDS = 222, |
78 ITEM_POTION_CURE_DISEASE = 225, | |
79 ITEM_POTION_AWAKEN = 227, | |
80 ITEM_POTION_HASTE = 228, | |
1575 | 81 ITEM_POTION_RECHARGE_ITEM = 233, |
82 ITEM_POTION_HARDEN_ITEM = 236, | |
1576 | 83 ITEM_POTION_CURE_INSANITY = 239, |
84 ITEM_POTION_MIGHT_BOOST = 240, | |
1575 | 85 ITEM_POTION_ACCURACY_BOOST = 245, |
86 ITEM_POTION_FLAMING_POTION = 246, | |
87 ITEM_POTION_SWIFT_POTION = 250, | |
1576 | 88 ITEM_POTION_BODY_RESISTANE = 261, |
89 ITEM_POTION_STONE_TO_FLESH = 262, | |
1575 | 90 ITEM_POTION_SLAYING_POTION = 263, |
91 ITEM_POTION_REJUVENATION = 271, | |
1455 | 92 ITEM_SPELLBOOK_TORCHLIGHT = 400,//0x190 |
93 ITEM_SPELLBOOK_FIRE_STRIKE = 401,//0x191, | |
0 | 94 ITEM_SPELLBOOK_AIR_FEATHER_FALL = 0x19C, |
95 ITEM_SPELLBOOK_WATER_POISON_SPRAY = 0x1A7, | |
96 ITEM_SPELLBOOK_EARTH_SLOW = 0x1B2, | |
97 ITEM_SPELLBOOK_SPIRIT_BLESS = 0x1BD, | |
98 ITEM_SPELLBOOK_MIND_MIND_BLAST = 0x1C8, | |
99 ITEM_SPELLBOOK_BODY_FIRST_AID = 0x1D3, | |
100 ITEM_SPELLBOOK_BODY_HEAL = 0x1D6, | |
101 ITEM_SPELLBOOK_BODY_BREAK_POISON = 0x1D7, | |
102 ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 0x1DD, | |
103 ITEM_SPELLBOOK_LIGHT_SUN_BURST = 0x1E6, | |
104 ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 0x1E7, | |
1455 | 105 ITEM_ARTIFACT_PUCK = 500,//0x1F4, |
1548 | 106 ITEM_ARTIFACT_IRON_FEATHER = 501, |
107 ITEM_ARTIFACT_WALLACE = 502, | |
108 ITEM_ARTIFACT_CORSAIR = 503, | |
1648 | 109 ITEM_ARTIFACT_GOVERNORS_ARMOR = 504,//1F8 |
513 | 110 ITEM_ARTIFACT_YORUBA = 505,//1F9 |
305 | 111 ITEM_ARTIFACT_SPLITTER = 506,//1FA |
1080 | 112 ITEM_ARTIFACT_GHOULSBANE = 507,//1FA |
1548 | 113 ITEM_ARTIFACT_GIBBET = 508,//1FA |
114 ITEM_ARTIFACT_CHARELE = 509,//1FA | |
1080 | 115 ITEM_ARTEFACT_ULLYSES =510, |
1548 | 116 ITEM_ARTEFACT_HANDS_OF_THE_MASTER =511, |
513 | 117 ITEM_ARTIFACT_LEAGUE_BOOTS = 512,//200 |
1548 | 118 ITEM_ARTIFACT_RULERS_RING = 513, |
119 ITEM_RELIC_MASH = 514, | |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
120 ITEM_RELIC_ETHRICS_STAFF = 515,//204 |
513 | 121 ITEM_RELIC_HARECS_LEATHER = 516,//204 |
1548 | 122 ITEM_RELIC_OLD_NICK = 517, |
123 ITEM_RELIC_AMUCK = 518, | |
124 ITEM_RELIC_GLORY_SHIELD = 519, | |
1080 | 125 ITEM_RELIC_KELEBRIM = 520,//208 |
513 | 126 ITEM_RELIC_TALEDONS_HELM = 521,//209 |
127 ITEM_RELIC_SCHOLARS_CAP = 522,//20A | |
128 ITEM_RELIC_PHYNAXIAN_CROWN = 523,//20B | |
129 ITEM_RILIC_TITANS_BELT = 524,//20C | |
130 ITEM_RELIC_TWILIGHT = 525,//20D | |
1548 | 131 ITEM_RELIC_ANIA_SELVING = 526, |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
132 ITEM_RELIC_JUSTICE = 527, |
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
133 ITEM_RELIC_MEKORIGS_HAMMER = 528, |
831 | 134 ITEM_ARTIFACT_HERMES_SANDALS = 529, |
513 | 135 ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP = 530,//212 |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
136 ITEM_ARTIFACT_ELFBANE = 531,//212 |
513 | 137 ITEM_ARTIFACT_MINDS_EYE = 532,//214 |
138 ITEM_ELVEN_CHAINMAIL = 533,//215 | |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
139 ITEM_FORGE_GAUNTLETS = 534, |
831 | 140 ITEM_ARTIFACT_HEROS_BELT = 535,//217 |
141 ITEM_ARTIFACT_LADYS_ESCORT = 536, | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
142 ITEM_RARE_CLANKERS_AMULET = 537, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
143 ITEM_RARE_LIETENANTS_CUTLASS = 538, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
144 ITEM_RARE_MEDUSAS_MIRROR = 539, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
145 ITEM_RARE_LADY_CARMINES_DAGGER = 540, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
146 ITEM_RARE_VILLAINS_BLADE = 541, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
147 ITEM_RARE_PERFECT_BOW = 542, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
148 ITEM_RARE_PERFECT_BOW_FIXED = 543, |
513 | 149 ITEM_RARE_SHADOWS_MASK = 544,//220 |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
150 ITEM_RARE_GHOST_RING = 545,//220 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
151 ITEM_RARE_FAERIE_RING = 546,//220 |
513 | 152 ITEM_RARE_SUN_CLOAK = 547,//223 |
153 ITEM_RARE_MOON_CLOAK = 548,//224 | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
154 ITEM_RARE_ZOKKARS_AXE = 549,//224 |
513 | 155 ITEM_RARE_VAMPIRES_CAPE = 550,//226 |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
156 ITEM_RARE_MINOTAURS_AXE = 551,//226 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
157 ITEM_RARE_GROGNARDS_CUTLASS = 552,//226 |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
158 ITEM_LICH_JAR_FULL = 601, |
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
159 ITEM_WETSUIT = 604, |
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1202
diff
changeset
|
160 ITEM_LICH_JAR_EMPTY = 615, |
1387
297b6f192232
Player::SelectPhrasesTransaction finished, some constants changed to enum values, removed unused vars
Grumpy7
parents:
1358
diff
changeset
|
161 ITEM_RECIPE_REJUVENATION = 740, |
297b6f192232
Player::SelectPhrasesTransaction finished, some constants changed to enum values, removed unused vars
Grumpy7
parents:
1358
diff
changeset
|
162 ITEM_RECIPE_BODY_RESISTANCE = 771, |
0 | 163 }; |
164 | |
165 /* 331 */ | |
816 | 166 enum ITEM_EQUIP_TYPE: unsigned __int8 |
0 | 167 { |
1989 | 168 EQUIP_SINGLE_HANDED = 0, |
169 EQUIP_TWO_HANDED = 1, | |
816 | 170 EQUIP_BOW = 2, |
171 EQUIP_ARMOUR = 3, | |
172 EQUIP_SHIELD = 4, | |
173 EQUIP_HELMET = 5, | |
174 EQUIP_BELT = 6, | |
175 EQUIP_CLOAK = 7, | |
1082 | 176 EQUIP_GAUNTLETS = 8, |
177 EQUIP_BOOTS = 9, | |
816 | 178 EQUIP_RING = 10, |
179 EQUIP_AMULET = 11, | |
180 EQUIP_WAND = 12, | |
181 EQUIP_REAGENT = 13, | |
182 EQUIP_POTION = 14, | |
183 EQUIP_SPELL_SCROLL = 15, | |
184 EQUIP_BOOK = 16, | |
1080 | 185 EQIUP_ANY = 16, |
816 | 186 EQUIP_MESSAGE_SCROLL = 17, |
187 EQUIP_GOLD = 18, | |
188 EQUIP_GEM = 19, | |
189 EQUIP_NONE = 20 | |
0 | 190 }; |
191 | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
192 enum CHARACTER_ATTRIBUTE_TYPE; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
193 struct Player; |
0 | 194 |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
195 typedef struct CEnchantment |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
196 { |
1783 | 197 unsigned __int16 Player::* statPtr; |
198 int statBonus; | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
199 CEnchantment(int bonus, unsigned __int16 Player::* skillPtr = NULL): |
1783 | 200 statBonus(bonus), |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
201 statPtr(skillPtr) |
1783 | 202 { |
203 } | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
204 } CEnchantment; |
0 | 205 |
206 /* 64 */ | |
207 #pragma pack(push, 1) | |
526 | 208 struct ItemGen //0x24 |
0 | 209 { |
210 //----- (0042EB25) -------------------------------------------------------- | |
1012 | 211 // inline ItemGen() |
212 // { | |
213 // Reset(); | |
214 // } | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
215 static void AddToMap(std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > &maptoadd, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
216 int enchId, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
217 CHARACTER_ATTRIBUTE_TYPE attrId, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
218 int bonusValue = 0, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
219 unsigned __int16 Player::* skillPtr = NULL); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
220 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
221 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > regularBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
222 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > specialBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
223 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > artifactBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
224 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
225 static void PopulateSpecialBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
226 static void PopulateRegularBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
227 static void PopulateArtifactBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
228 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
229 void GetItemBonusSpecialEnchantment(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* additiveBonus, int* halfSkillBonus); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
230 void GetItemBonusArtifact(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* bonusSum); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
231 bool IsRegularEnchanmentForAttribute(CHARACTER_ATTRIBUTE_TYPE attrToGet); |
0 | 232 |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1559
diff
changeset
|
233 inline bool IsBroken() {return (uAttributes & ITEM_BROKEN) != 0;} |
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1559
diff
changeset
|
234 inline void SetBroken() {uAttributes |= ITEM_BROKEN;} |
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1559
diff
changeset
|
235 inline bool IsIdentified() {return (uAttributes & ITEM_IDENTIFIED) != 0;} |
315 | 236 inline void SetIdentified() {uAttributes |= ITEM_IDENTIFIED;} |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1559
diff
changeset
|
237 inline bool IsStolen() {return (uAttributes & ITEM_STOLEN) != 0;} |
749 | 238 inline void SetStolen() {uAttributes |= ITEM_STOLEN;} |
271 | 239 |
0 | 240 bool GenerateArtifact(); |
241 unsigned int GetValue(); | |
242 const char *GetDisplayName(); | |
243 const char *GetIdentifiedName(); | |
244 void UpdateTempBonus(__int64 uTimePlayed); | |
245 void Reset(); | |
385 | 246 int _439DF3_get_additional_damage(int *a2, bool *vampiyr); |
0 | 247 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
248 ITEM_EQUIP_TYPE GetItemEquipType(); |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
249 unsigned char GetPlayerSkillType(); |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
250 char* GetIconName(); |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
251 unsigned __int8 GetDamageDice(); |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
252 unsigned __int8 GetDamageRoll(); |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1708
diff
changeset
|
253 unsigned __int8 GetDamageMod(); |
0 | 254 |
1019 | 255 int uItemID; //0 |
256 int uEnchantmentType; //4 | |
1599 | 257 int m_enchantmentStrength; //8 |
1019 | 258 int uSpecEnchantmentType; // 25 +5 levels //0c |
816 | 259 // 16 Drain Hit Points from target. |
1553
b98812ead5d9
Get(skillname) functions cleaned up, using GetMultiplierForSkillLevel instead of nested conditions
Grumpy7
parents:
1548
diff
changeset
|
260 // 35 Increases chance of disarming. |
816 | 261 // 39 Double damage vs Demons. |
262 // 40 Double damage vs Dragons | |
263 // 45 +5 Speed and Accuracy | |
264 // 56 +5 Might and Endurance. | |
265 // 57 +5 Intellect and Personality. | |
266 // 58 Increased Value. | |
267 // 60 +3 Unarmed and Dodging skills | |
268 // 61 +3 Stealing and Disarm skills. | |
269 // 59 Increased Weapon speed. | |
270 // 63 Double Damage vs. Elves. | |
271 // 64 Double Damage vs. Undead. | |
272 // 67 Adds 5 points of Body damage and +2 Disarm skill. | |
273 // 68 Adds 6-8 points of Cold damage and +5 Armor Class. | |
831 | 274 // 71 Prevents drowning damage. |
275 // 72 Prevents falling damage. | |
1019 | 276 int uNumCharges; //10 |
277 unsigned int uAttributes; //14 | |
1759 | 278 unsigned __int8 uBodyAnchor; //18 |
279 char uMaxCharges; //19 | |
280 char uHolderPlayer; //1A | |
281 char field_1B; //1B | |
282 unsigned __int64 uExpireTime; //1C | |
0 | 283 }; |
284 #pragma pack(pop) | |
285 | |
286 | |
287 | |
288 /* 175 */ | |
289 #pragma pack(push, 1) | |
559 | 290 struct ItemDesc //30h |
229 | 291 { //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material| |
292 ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes | |
293 char *pIconName; //0 4 | |
294 char *pName; //4 8 | |
295 char *pUnidentifiedName; //8 c | |
296 char *pDescription; //0c 10 | |
297 unsigned int uValue; //10 14 | |
298 unsigned __int16 uSpriteID; //14 18 | |
299 __int16 field_1A; //16 | |
365 | 300 signed __int16 uEquipX; //18 1c |
301 signed __int16 uEquipY; //1a 1e | |
816 | 302 ITEM_EQUIP_TYPE uEquipType; //1c 20 |
229 | 303 unsigned __int8 uSkillType; //1d 21 |
304 unsigned __int8 uDamageDice; //1e 22 | |
305 unsigned __int8 uDamageRoll; //1f 23 | |
306 unsigned __int8 uDamageMod; //20 24 | |
307 unsigned __int8 uMaterial; //21 25 | |
308 char _additional_value; //22 26 | |
309 char _bonus_type; //23 27 | |
310 char _bonus_strength; //24 28 | |
311 char field_25; // 25 29 | |
312 char field_26; //26 2A | |
313 char field_27; // 27 2b | |
314 union | |
315 | 315 { |
229 | 316 unsigned __int8 uChanceByTreasureLvl[6]; |
317 struct { | |
318 unsigned __int8 uChanceByTreasureLvl1; // 28 2c | |
319 unsigned __int8 uChanceByTreasureLvl2; // 29 2d | |
320 unsigned __int8 uChanceByTreasureLvl3; // 2A 2e | |
321 unsigned __int8 uChanceByTreasureLvl4; // 2B 2f | |
322 unsigned __int8 uChanceByTreasureLvl5; // 2C 30 | |
323 unsigned __int8 uChanceByTreasureLvl6; // 2D 32 | |
324 }; | |
315 | 325 }; |
326 unsigned char uItemID_Rep_St; //2e 32 | |
327 char field_2f; | |
328 }; | |
0 | 329 #pragma pack(pop) |
330 | |
331 | |
332 | |
333 /* 177 */ | |
334 #pragma pack(push, 1) | |
335 struct ItemEnchantment | |
222 | 336 { //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul |
337 char *pBonusStat; | |
338 char *pOfName; | |
339 /* union{ | |
340 struct { | |
341 unsigned char to_arm; | |
342 unsigned char to_shld; | |
343 unsigned char to_helm; | |
344 unsigned char to_belt; | |
345 unsigned char to_cape; | |
346 unsigned char to_gaunt; | |
347 unsigned char to_boot; | |
348 unsigned char to_ring; | |
349 unsigned char to_amul; | |
350 }; */ | |
351 unsigned char to_item[12]; | |
352 // }; | |
353 }; | |
0 | 354 #pragma pack(pop) |
355 | |
356 /* 178 */ | |
357 #pragma pack(push, 1) | |
559 | 358 struct ItemSpecialEnchantment //1Ch |
222 | 359 { //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values |
360 | |
559 | 361 char *pBonusStatement; //0 |
362 char *pNameAdd; //4 | |
363 char to_item_apply[12]; //8 | |
364 int iValue; //14 | |
365 int iTreasureLevel; //18 | |
0 | 366 }; |
367 #pragma pack(pop) | |
368 | |
222 | 369 #pragma pack(push, 1) |
370 struct BonusRange | |
371 { | |
372 unsigned int minR; | |
373 unsigned int maxR; | |
374 }; | |
375 #pragma pack(pop) | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
0
diff
changeset
|
376 |
0 | 377 /* 176 */ |
378 #pragma pack(push, 1) | |
379 struct ItemsTable | |
380 { | |
381 void Initialize(); | |
382 void LoadPotions(); | |
383 void LoadPotionNotes(); | |
385 | 384 void GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *pItem); |
0 | 385 void SetSpecialBonus(ItemGen *pItem); |
377 | 386 bool IsMaterialSpecial(ItemGen *pItem); |
387 bool IsMaterialNonCommon(ItemGen *pItem); | |
374 | 388 void Release(); |
0 | 389 |
222 | 390 int uAllItemsCount; |
1708
f8414042db1f
Moving NZIArray to a separate class, fixing a few inventory bugs
Grumpy7
parents:
1682
diff
changeset
|
391 NZIArray<ItemDesc, 800> pItems; //4-9604h |
222 | 392 ItemEnchantment pEnchantments[24]; //9604h |
229 | 393 ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h -9FC4h |
224 | 394 char field_9FC4[5000]; |
0 | 395 char field_B348[5000]; |
396 char field_C6D0[5000]; | |
397 char field_DA58[5000]; | |
229 | 398 char field_EDE0[384]; |
222 | 399 unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h -102ECh |
400 unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h | |
401 char *pItemsTXT_Raw; //11674h | |
0 | 402 char *pRndItemsTXT_Raw; |
222 | 403 char *pStdItemsTXT_Raw; //1167Ch |
404 char *pSpcItemsTXT_Raw; //11680h | |
224 | 405 unsigned int uChanceByTreasureLvlSumm[6]; //11684 |
406 unsigned int uBonusChanceStandart[6]; //1169c | |
407 unsigned int uBonusChanceSpecial[6]; //116B4 | |
408 unsigned int uBonusChanceWpSpecial[6]; //116cc -116e4 | |
222 | 409 unsigned int pEnchantmentsSumm[9]; //116E4h -11708h |
410 BonusRange bonus_ranges[6]; //45C2h*4 =11708h | |
224 | 411 unsigned int pSpecialEnchantmentsSumm[24]; //11738h |
412 unsigned int pSpecialEnchantments_count; //11798h | |
0 | 413 char field_1179C; |
315 | 414 char field_1179D; |
415 char field_1179E; | |
416 char field_1179F; | |
0 | 417 }; |
418 #pragma pack(pop) | |
419 | |
463 | 420 void GenerateStandartShopItems(); |
421 void GenerateSpecialShopItems(); | |
598 | 422 void GenerateItemsInChest(); |
0 | 423 |
1202 | 424 extern std::array<const char, 5> uItemsAmountPerShopType; // weak |
1682 | 425 extern ItemGen *ptr_50C9A4_ItemToEnchant; |
0 | 426 |
377 | 427 extern struct ItemsTable *pItemsTable; |
428 | |
429 /* | |
430 +10 to all Resistances. 1 | |
431 +10 to all Seven Statistics. 2 | |
432 Explosive Impact! 3 | |
433 Adds 3-4 points of Cold damage. 4 | |
434 Adds 6-8 points of Cold damage. 5 | |
435 Adds 9-12 points of Cold damage. 6 | |
436 Adds 2-5 points of Electrical damage. 7 | |
437 Adds 4-10 points of Electrical damage. 8 | |
438 Adds 6-15 points of Electrical damage. 9 | |
439 Adds 1-6 points of Fire damage. 10 | |
440 Adds 2-12 points of Fire damage. 11 | |
441 Adds 3-18 points of Fire damage. 12 | |
442 Adds 5 points of Body damage. 13 | |
443 Adds 8 points of Body damage. 14 | |
444 Adds 12 points of Body damage. 15 | |
445 Drain Hit Points from target. 16 | |
446 Increases rate of Recovery. 17 | |
447 Wearer resistant to Diseases. 18 | |
448 Wearer resistant to Insanity. 19 | |
449 Wearer resistant to Paralysis. 20 | |
450 Wearer resistant to Poison. 21 | |
451 Wearer resistant to Sleep. 22 | |
452 Wearer resistant to Stone. 23 | |
453 Increased Knockback. 24 | |
454 +5 Level. 25 | |
455 Increases effect of all Air spells. 26 | |
456 Increases effect of all Body spells. 27 | |
457 Increases effect of all Dark spells. 28 | |
458 Increases effect of all Earth spells. 29 | |
459 Increases effect of all Fire spells. 30 | |
460 Increases effect of all Light spells. 31 | |
461 Increases effect of all Mind spells. 32 | |
462 Increases effect of all Spirit spells. 33 | |
463 Increases effect of all Water spells. 34 | |
464 Increases chance of Disarming. 35 | |
465 Half damage from all missile attacks. 36 | |
466 Regenerate Hit points over time. 37 | |
467 Regenerate Spell points over time. 38 | |
468 Double damage vs Demons. 39 | |
469 Double damage vs Dragons 40 | |
470 Drain Hit Points from target and Increased Weapon speed. 41 | |
471 +1 to Seven Stats, HP, SP, Armor, Resistances. 42 | |
472 +10 to Endurance, Armor, Hit points. 43 | |
473 +10 Hit points and Regenerate Hit points over time. 44 | |
474 +5 Speed and Accuracy. 45 | |
475 Adds 10-20 points of Fire damage and +25 Might. 46 | |
476 +10 Spell points and Regenerate Spell points over time. 47 | |
477 +15 Endurance and +5 Armor. 48 | |
478 +10 Intellect and Luck. 49 | |
479 +30 Fire Resistance and Regenerate Hit points over time. 50 | |
480 +10 Spell points, Speed, Intellect. 51 | |
481 +10 Endurance and Accuracy. 52 | |
482 +10 Might and Personality. 53 | |
483 +15 Endurance and Regenerate Hit points over time. 54 | |
484 +15 Luck and Regenerate Spell points over time. 55 | |
485 +5 Might and Endurance. 56 | |
486 +5 Intellect and Personality. 57 | |
487 Increased Value. 58 | |
488 Increased Weapon speed. 59 | |
489 +3 Unarmed and Dodging skills. 60 | |
490 +3 Stealing and Disarm skills. 61 | |
491 +3 ID Item and ID Monster skills. 62 | |
492 Double Damage vs. Elves. 63 | |
493 Double Damage vs. Undead. 64 | |
494 Double Damage vs. Titans. 65 | |
495 Regenerate Spell points and Hit points over time. 66 | |
496 Adds 5 points of Body damage and +2 Disarm skill. 67 | |
497 Adds 6-8 points of Cold damage and +5 Armor Class. 68 | |
498 +20 Air Resistance and Shielding. 69 | |
499 +10 Water Resistance and +2 Alchemy skill. 70 | |
500 Prevents damage from drowning. 71 | |
501 Prevents damage from falling. 72 | |
939 | 502 */ |
503 | |
504 | |
505 /* 391 */ | |
506 #pragma pack(push, 1) | |
507 struct stru351_summoned_item | |
508 { | |
509 int field_0_expire_second; | |
510 int field_4_expire_minute; | |
511 int field_8_expire_hour; | |
512 int field_C_expire_day; | |
513 int field_10_expire_week; | |
514 int field_14_exprie_month; | |
515 int field_18_expire_year; | |
516 }; | |
517 #pragma pack(pop) |