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