2497
|
1 #pragma once
|
|
2 #include <array>
|
|
3 #include <map>
|
2499
|
4 #include "../NZIArray.h"
|
2497
|
5
|
2567
|
6 enum DAMAGE_TYPE: unsigned int
|
|
7 {
|
|
8 DMGT_FIRE = 0,
|
2497
|
9 DMGT_ELECTR = 1,
|
2567
|
10 DMGT_COLD = 2,
|
|
11 DMGT_EARTH = 3,
|
|
12 DMGT_PHISYCAL = 4,
|
2497
|
13 DMGT_MAGICAL = 5,
|
|
14 DMGT_SPIRIT = 6,
|
2567
|
15 DMGT_MIND = 7,
|
|
16 DMGT_BODY = 8,
|
|
17 DMGT_LIGHT = 9,
|
|
18 DMGT_DARK = 10
|
|
19 };
|
2497
|
20
|
|
21
|
|
22
|
|
23 /* 338 */
|
|
24 enum ITEM_FLAGS :unsigned int
|
|
25 {
|
|
26 ITEM_IDENTIFIED = 0x1,
|
|
27 ITEM_BROKEN = 0x2,
|
|
28 ITEM_TEMP_BONUS = 0x8,
|
|
29 ITEM_AURA_EFFECT_RED = 0x10,
|
|
30 ITEM_AURA_EFFECT_BLUE = 0x20,
|
|
31 ITEM_AURA_EFFECT_GREEN = 0x40,
|
|
32 ITEM_AURA_EFFECT_PURPLE = 0x80,
|
|
33 ITEM_ENCHANT_ANIMATION = 0xF0,
|
|
34 ITEM_STOLEN = 0x100,
|
|
35 ITEM_HARDENED = 0x200,
|
|
36 };
|
|
37
|
2567
|
38 enum ITEM_ENCHANTMENT : unsigned int
|
|
39 {
|
|
40 ITEM_ENCHANTMENT_NULL = 0,
|
|
41
|
|
42 ITEM_ENCHANTMENT_OF_COLD = 4, // Adds 3-4 points of cold damage
|
|
43 ITEM_ENCHANTMENT_OF_FROST = 5, // Adds 6-8 points of cold damage
|
|
44 ITEM_ENCHANTMENT_OF_ICE = 6, // Adds 9-12 points of cold damage
|
|
45 ITEM_ENCHANTMENT_OF_SPARKS = 7, // Adds 2-5 points of electrical damage
|
|
46 ITEM_ENCHANTMENT_OF_LIGHTNING = 8, // Adds 4-10 points of electrical damage
|
|
47 ITEM_ENCHANTMENT_OF_THUNDERBOLTS = 9, // Adds 6-15 points of electrical damage
|
|
48 ITEM_ENCHANTMENT_OF_FIRE = 10, // Adds 1-6 points of fire damage
|
|
49 ITEM_ENCHANTMENT_OF_FLAME = 11, // Adds 2-12 points of fire damage
|
|
50 ITEM_ENCHANTMENT_OF_INFERNOS = 12, // Adds 3-18 points of fire damage
|
|
51 ITEM_ENCHANTMENT_OF_POISON = 13, // Adds 5 points of body damage
|
|
52 ITEM_ENCHANTMENT_OF_VENOM = 14, // Adds 8 points of body damage
|
|
53 ITEM_ENCHANTMENT_OF_ACID = 15, // Adds 12 points of body damage
|
|
54 ITEM_ENCHANTMENT_VAMPIRIC = 16, // 20% of damage dealt given to wielder
|
|
55 ITEM_ENCHANTMENT_OF_RECOVERY = 17, // Increases rate of Recovery
|
|
56
|
|
57 ITEM_ENCHANTMENT_OF_FORCE = 24, // Increases Knockback
|
|
58
|
|
59 ITEM_ENCHANTMENT_40 = 40,
|
|
60 ITEM_ENCHANTMENT_OF_DARKNESS = 41, // Vampiric and Swift
|
|
61
|
|
62 ITEM_ENCHANTMENT_OF_DRAGON = 46, // Adds 10-20 points of fire damage and +25 Might
|
|
63 };
|
|
64
|
2497
|
65
|
|
66 enum ITEM_MATERIAL
|
|
67 {
|
|
68 MATERIAL_COMMON =0,
|
|
69 MATERIAL_ARTEFACT = 1,
|
|
70 MATERIAL_RELIC = 2,
|
|
71 MATERIAL_SPECIAL = 3
|
|
72 };
|
|
73
|
|
74 /* 330 */
|
|
75 enum ITEM_TYPE
|
|
76 {
|
2567
|
77 ITEM_NULL = 0,
|
2497
|
78 ITEM_LONGSWORD_1 = 0x1,
|
2567
|
79 ITEM_DAGGER_1 = 15,
|
|
80 ITEM_AXE_1 = 23,
|
|
81 ITEM_SPEAR_1 = 31,
|
|
82 ITEM_CROSSBOW_1 = 47,
|
|
83 ITEM_MACE_1 = 50,
|
|
84 ITEM_STAFF_1 = 61,
|
2497
|
85 ITEM_BLASTER = 64,
|
|
86 ITEM_LASER_RIFLE = 65,
|
2567
|
87 ITEM_LEATHER_1 = 66,
|
|
88 ITEM_CHAINMAIL_1 = 71,
|
|
89 ITEM_PLATE_1 = 76,
|
|
90 ITEM_BUCKLER_1 = 84,
|
2574
|
91 ITEM_92 = 92,
|
2567
|
92 ITEM_GAUNTLETS_1 = 110,
|
|
93 ITEM_BOOTS_1 = 115,
|
2497
|
94 ITEM_WAND_FIRE = 135,
|
|
95 ITEM_WAND_STUN = 138,
|
2567
|
96 ITEM_WAND_INCENERATION = 159,
|
|
97 ITEM_160 = 160,
|
|
98 ITEM_161 = 161,
|
|
99 ITEM_162 = 162,
|
|
100 ITEM_GOLD_SMALL = 197,
|
|
101 ITEM_GOLD_MEDIUM = 198,
|
|
102 ITEM_GOLD_LARGE = 199,
|
2497
|
103 ITEM_REAGENT_WIDOWSWEEP_BERRIES = 200,
|
2567
|
104 ITEM_REAGENT_CRUSHED_ROSE_PETALS = 201,
|
|
105 ITEM_TROLL_BLOOD = 202,
|
|
106 ITEM_TROLL_RUBY = 203,
|
|
107 ITEM_DRAGON_EYE = 204,
|
|
108 ITEM_PHIMA_ROOT = 205,
|
|
109 ITEM_METEORITE_FRAGMENT = 206,
|
|
110 ITEM_HARPY_FEATHER = 207,
|
|
111 ITEM_MOONSTONE = 208,
|
|
112 ITEM_ELVISH_TOADSTOOL = 209,
|
|
113 ITEM_POPPYSNAPS = 210,
|
|
114 ITEM_FAE_DUST = 211,
|
|
115 ITEM_SULFUR = 212,
|
|
116 ITEM_GARNET = 213,
|
|
117 ITEM_DEVIL_ICHOR = 214,
|
|
118 ITEM_MUSHROOM = 215,
|
|
119 ITEM_OBSIDIAN = 216,
|
|
120 ITEM_OOZE_ENDOPLASM_VIAL = 217,
|
|
121 ITEM_MERCURY = 218,
|
2497
|
122 ITEM_REAGENT_PHILOSOPHERS_STONE = 219,
|
|
123 ITEM_POTION_BOTTLE = 220,
|
|
124 ITEM_POTION_CATALYST = 221,
|
|
125 ITEM_POTION_CURE_WOUNDS = 222,
|
2567
|
126 ITEM_POTION_MAGIC_POTION = 223,
|
|
127 ITEM_POTION_CURE_WEAKNESS = 224,
|
2497
|
128 ITEM_POTION_CURE_DISEASE = 225,
|
|
129 ITEM_POTION_AWAKEN = 227,
|
|
130 ITEM_POTION_HASTE = 228,
|
|
131 ITEM_POTION_RECHARGE_ITEM = 233,
|
|
132 ITEM_POTION_HARDEN_ITEM = 236,
|
|
133 ITEM_POTION_CURE_INSANITY = 239,
|
|
134 ITEM_POTION_MIGHT_BOOST = 240,
|
|
135 ITEM_POTION_ACCURACY_BOOST = 245,
|
|
136 ITEM_POTION_FLAMING_POTION = 246,
|
|
137 ITEM_POTION_SWIFT_POTION = 250,
|
|
138 ITEM_POTION_BODY_RESISTANE = 261,
|
|
139 ITEM_POTION_STONE_TO_FLESH = 262,
|
|
140 ITEM_POTION_SLAYING_POTION = 263,
|
|
141 ITEM_POTION_REJUVENATION = 271,
|
2567
|
142 ITEM_SPELLBOOK_TORCHLIGHT = 400,
|
|
143 ITEM_SPELLBOOK_FIRE_STRIKE = 401,
|
|
144 ITEM_SPELLBOOK_AIR_FEATHER_FALL = 412,
|
|
145 ITEM_SPELLBOOK_WATER_POISON_SPRAY = 423,
|
|
146 ITEM_SPELLBOOK_EARTH_SLOW = 434,
|
|
147 ITEM_SPELLBOOK_SPIRIT_BLESS = 445,
|
|
148 ITEM_SPELLBOOK_MIND_REMOVE_FEAR = 455,
|
|
149 ITEM_SPELLBOOK_MIND_MIND_BLAST = 456,
|
|
150 ITEM_SPELLBOOK_BODY_FIRST_AID = 467,
|
|
151 ITEM_SPELLBOOK_BODY_HEAL = 470,
|
|
152 ITEM_SPELLBOOK_BODY_BREAK_POISON = 471,
|
|
153 ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 477,
|
|
154 ITEM_SPELLBOOK_LIGHT_SUN_BURST = 486,
|
|
155 ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 487,
|
2497
|
156 ITEM_ARTIFACT_PUCK = 500,//0x1F4,
|
|
157 ITEM_ARTIFACT_IRON_FEATHER = 501,
|
|
158 ITEM_ARTIFACT_WALLACE = 502,
|
|
159 ITEM_ARTIFACT_CORSAIR = 503,
|
|
160 ITEM_ARTIFACT_GOVERNORS_ARMOR = 504,//1F8
|
|
161 ITEM_ARTIFACT_YORUBA = 505,//1F9
|
|
162 ITEM_ARTIFACT_SPLITTER = 506,//1FA
|
|
163 ITEM_ARTIFACT_GHOULSBANE = 507,//1FA
|
|
164 ITEM_ARTIFACT_GIBBET = 508,//1FA
|
|
165 ITEM_ARTIFACT_CHARELE = 509,//1FA
|
2567
|
166 ITEM_ARTEFACT_ULLYSES = 510,
|
2497
|
167 ITEM_ARTEFACT_HANDS_OF_THE_MASTER =511,
|
|
168 ITEM_ARTIFACT_LEAGUE_BOOTS = 512,//200
|
|
169 ITEM_ARTIFACT_RULERS_RING = 513,
|
|
170 ITEM_RELIC_MASH = 514,
|
|
171 ITEM_RELIC_ETHRICS_STAFF = 515,//204
|
|
172 ITEM_RELIC_HARECS_LEATHER = 516,//204
|
|
173 ITEM_RELIC_OLD_NICK = 517,
|
|
174 ITEM_RELIC_AMUCK = 518,
|
|
175 ITEM_RELIC_GLORY_SHIELD = 519,
|
|
176 ITEM_RELIC_KELEBRIM = 520,//208
|
|
177 ITEM_RELIC_TALEDONS_HELM = 521,//209
|
|
178 ITEM_RELIC_SCHOLARS_CAP = 522,//20A
|
|
179 ITEM_RELIC_PHYNAXIAN_CROWN = 523,//20B
|
|
180 ITEM_RILIC_TITANS_BELT = 524,//20C
|
|
181 ITEM_RELIC_TWILIGHT = 525,//20D
|
|
182 ITEM_RELIC_ANIA_SELVING = 526,
|
|
183 ITEM_RELIC_JUSTICE = 527,
|
|
184 ITEM_RELIC_MEKORIGS_HAMMER = 528,
|
|
185 ITEM_ARTIFACT_HERMES_SANDALS = 529,
|
|
186 ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP = 530,//212
|
|
187 ITEM_ARTIFACT_ELFBANE = 531,//212
|
|
188 ITEM_ARTIFACT_MINDS_EYE = 532,//214
|
|
189 ITEM_ELVEN_CHAINMAIL = 533,//215
|
|
190 ITEM_FORGE_GAUNTLETS = 534,
|
|
191 ITEM_ARTIFACT_HEROS_BELT = 535,//217
|
|
192 ITEM_ARTIFACT_LADYS_ESCORT = 536,
|
|
193 ITEM_RARE_CLANKERS_AMULET = 537,
|
|
194 ITEM_RARE_LIETENANTS_CUTLASS = 538,
|
|
195 ITEM_RARE_MEDUSAS_MIRROR = 539,
|
|
196 ITEM_RARE_LADY_CARMINES_DAGGER = 540,
|
|
197 ITEM_RARE_VILLAINS_BLADE = 541,
|
|
198 ITEM_RARE_PERFECT_BOW = 542,
|
|
199 ITEM_RARE_PERFECT_BOW_FIXED = 543,
|
|
200 ITEM_RARE_SHADOWS_MASK = 544,//220
|
|
201 ITEM_RARE_GHOST_RING = 545,//220
|
|
202 ITEM_RARE_FAERIE_RING = 546,//220
|
|
203 ITEM_RARE_SUN_CLOAK = 547,//223
|
|
204 ITEM_RARE_MOON_CLOAK = 548,//224
|
|
205 ITEM_RARE_ZOKKARS_AXE = 549,//224
|
|
206 ITEM_RARE_VAMPIRES_CAPE = 550,//226
|
|
207 ITEM_RARE_MINOTAURS_AXE = 551,//226
|
|
208 ITEM_RARE_GROGNARDS_CUTLASS = 552,//226
|
|
209 ITEM_LICH_JAR_FULL = 601,
|
|
210 ITEM_WETSUIT = 604,
|
|
211 ITEM_LICH_JAR_EMPTY = 615,
|
2567
|
212 ITEM_GENIE_LAMP = 616,
|
|
213
|
|
214 ITEM_RED_APPLE = 630,
|
|
215
|
|
216 ITEM_LUTE = 632,
|
|
217 ITEM_FAERIE_PIPES = 633,
|
|
218 ITEM_GRYPHONHEARTS_TRUMPET = 634,
|
|
219
|
|
220 ITEM_HORSESHOE = 646,
|
|
221
|
|
222 ITEM_TEMPLE_IN_A_BOTTLE = 650,
|
|
223
|
2497
|
224 ITEM_RECIPE_REJUVENATION = 740,
|
|
225 ITEM_RECIPE_BODY_RESISTANCE = 771,
|
|
226 };
|
|
227
|
|
228 /* 331 */
|
|
229 enum ITEM_EQUIP_TYPE: unsigned __int8
|
|
230 {
|
|
231 EQUIP_SINGLE_HANDED = 0,
|
|
232 EQUIP_TWO_HANDED = 1,
|
|
233 EQUIP_BOW = 2,
|
|
234 EQUIP_ARMOUR = 3,
|
|
235 EQUIP_SHIELD = 4,
|
|
236 EQUIP_HELMET = 5,
|
|
237 EQUIP_BELT = 6,
|
|
238 EQUIP_CLOAK = 7,
|
|
239 EQUIP_GAUNTLETS = 8,
|
|
240 EQUIP_BOOTS = 9,
|
|
241 EQUIP_RING = 10,
|
|
242 EQUIP_AMULET = 11,
|
|
243 EQUIP_WAND = 12,
|
|
244 EQUIP_REAGENT = 13,
|
|
245 EQUIP_POTION = 14,
|
|
246 EQUIP_SPELL_SCROLL = 15,
|
|
247 EQUIP_BOOK = 16,
|
|
248 EQIUP_ANY = 16,
|
|
249 EQUIP_MESSAGE_SCROLL = 17,
|
|
250 EQUIP_GOLD = 18,
|
|
251 EQUIP_GEM = 19,
|
|
252 EQUIP_NONE = 20
|
|
253 };
|
|
254
|
|
255 enum CHARACTER_ATTRIBUTE_TYPE;
|
|
256 struct Player;
|
|
257
|
|
258 typedef struct CEnchantment
|
|
259 {
|
|
260 unsigned __int16 Player::* statPtr;
|
|
261 int statBonus;
|
|
262 CEnchantment(int bonus, unsigned __int16 Player::* skillPtr = nullptr):
|
|
263 statBonus(bonus),
|
|
264 statPtr(skillPtr)
|
|
265 {
|
|
266 }
|
|
267 } CEnchantment;
|
|
268
|
|
269 /* 64 */
|
|
270 #pragma pack(push, 1)
|
|
271 struct ItemGen //0x24
|
|
272 {
|
|
273 //----- (0042EB25) --------------------------------------------------------
|
|
274 // inline ItemGen()
|
|
275 // {
|
|
276 // Reset();
|
|
277 // }
|
|
278 static void AddToMap(std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > &maptoadd,
|
|
279 int enchId,
|
|
280 CHARACTER_ATTRIBUTE_TYPE attrId,
|
|
281 int bonusValue = 0,
|
|
282 unsigned __int16 Player::* skillPtr = nullptr);
|
|
283
|
|
284 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > regularBonusMap;
|
|
285 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > specialBonusMap;
|
|
286 static std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > artifactBonusMap;
|
|
287
|
|
288 static void PopulateSpecialBonusMap();
|
|
289 static void PopulateRegularBonusMap();
|
|
290 static void PopulateArtifactBonusMap();
|
|
291 static void ClearItemBonusMaps();
|
|
292
|
|
293 inline void ResetEnchantAnimation(){uAttributes &= 0xFFFFFF0F;}
|
|
294 inline bool ItemEnchanted()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) != 0;}
|
|
295 inline bool AuraEffectRed()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_RED;}
|
|
296 inline bool AuraEffectBlue()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_BLUE;}
|
|
297 inline bool AuraEffectGreen()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_GREEN;}
|
|
298 inline bool AuraEffectPurple()const {return(uAttributes & ITEM_ENCHANT_ANIMATION) == ITEM_AURA_EFFECT_PURPLE;}
|
|
299
|
|
300 void GetItemBonusSpecialEnchantment(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* additiveBonus, int* halfSkillBonus);
|
|
301 void GetItemBonusArtifact(Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* bonusSum);
|
|
302 bool IsRegularEnchanmentForAttribute(CHARACTER_ATTRIBUTE_TYPE attrToGet);
|
|
303
|
|
304 inline bool IsBroken() {return (uAttributes & ITEM_BROKEN) != 0;}
|
|
305 inline void SetBroken() {uAttributes |= ITEM_BROKEN;}
|
|
306 inline bool IsIdentified() {return (uAttributes & ITEM_IDENTIFIED) != 0;}
|
|
307 inline void SetIdentified() {uAttributes |= ITEM_IDENTIFIED;}
|
|
308 inline bool IsStolen() {return (uAttributes & ITEM_STOLEN) != 0;}
|
|
309 inline void SetStolen() {uAttributes |= ITEM_STOLEN;}
|
|
310
|
|
311 bool GenerateArtifact();
|
|
312 unsigned int GetValue();
|
|
313 const char *GetDisplayName();
|
|
314 const char *GetIdentifiedName();
|
|
315 void UpdateTempBonus(__int64 uTimePlayed);
|
|
316 void Reset();
|
2567
|
317 int _439DF3_get_additional_damage(DAMAGE_TYPE *a2, bool *vampiyr);
|
2497
|
318
|
|
319 ITEM_EQUIP_TYPE GetItemEquipType();
|
|
320 unsigned char GetPlayerSkillType();
|
|
321 char* GetIconName();
|
|
322 unsigned __int8 GetDamageDice();
|
|
323 unsigned __int8 GetDamageRoll();
|
|
324 unsigned __int8 GetDamageMod();
|
|
325 bool MerchandiseTest(int _2da_idx);
|
|
326 int uItemID; //0
|
|
327 int uEnchantmentType; //4
|
|
328 int m_enchantmentStrength; //8
|
2567
|
329 ITEM_ENCHANTMENT special_enchantment; // 25 +5 levels //0c
|
2497
|
330 // 16 Drain Hit Points from target.
|
|
331 // 35 Increases chance of disarming.
|
|
332 // 39 Double damage vs Demons.
|
|
333 // 40 Double damage vs Dragons
|
|
334 // 45 +5 Speed and Accuracy
|
|
335 // 56 +5 Might and Endurance.
|
|
336 // 57 +5 Intellect and Personality.
|
|
337 // 58 Increased Value.
|
|
338 // 60 +3 Unarmed and Dodging skills
|
|
339 // 61 +3 Stealing and Disarm skills.
|
|
340 // 59 Increased Weapon speed.
|
|
341 // 63 Double Damage vs. Elves.
|
|
342 // 64 Double Damage vs. Undead.
|
|
343 // 67 Adds 5 points of Body damage and +2 Disarm skill.
|
|
344 // 68 Adds 6-8 points of Cold damage and +5 Armor Class.
|
|
345 // 71 Prevents drowning damage.
|
|
346 // 72 Prevents falling damage.
|
|
347 int uNumCharges; //10
|
|
348 unsigned int uAttributes; //14
|
|
349 unsigned __int8 uBodyAnchor; //18
|
|
350 char uMaxCharges; //19
|
|
351 char uHolderPlayer; //1A
|
|
352 char field_1B; //1B
|
|
353 unsigned __int64 uExpireTime; //1C
|
|
354 };
|
|
355 #pragma pack(pop)
|
|
356
|
|
357
|
|
358
|
|
359 /* 175 */
|
|
360 #pragma pack(push, 1)
|
|
361 struct ItemDesc //30h
|
|
362 { //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material|
|
|
363 ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes
|
|
364 char *pIconName; //0 4
|
|
365 char *pName; //4 8
|
|
366 char *pUnidentifiedName; //8 c
|
|
367 char *pDescription; //0c 10
|
|
368 unsigned int uValue; //10 14
|
|
369 unsigned __int16 uSpriteID; //14 18
|
|
370 __int16 field_1A; //16
|
|
371 signed __int16 uEquipX; //18 1c
|
|
372 signed __int16 uEquipY; //1a 1e
|
|
373 ITEM_EQUIP_TYPE uEquipType; //1c 20
|
|
374 unsigned __int8 uSkillType; //1d 21
|
|
375 unsigned __int8 uDamageDice; //1e 22
|
|
376 unsigned __int8 uDamageRoll; //1f 23
|
|
377 unsigned __int8 uDamageMod; //20 24
|
|
378 unsigned __int8 uMaterial; //21 25
|
|
379 char _additional_value; //22 26
|
|
380 char _bonus_type; //23 27
|
|
381 char _bonus_strength; //24 28
|
|
382 char field_25; // 25 29
|
|
383 char field_26; //26 2A
|
|
384 char field_27; // 27 2b
|
|
385 union
|
|
386 {
|
|
387 unsigned __int8 uChanceByTreasureLvl[6];
|
|
388 struct {
|
|
389 unsigned __int8 uChanceByTreasureLvl1; // 28 2c
|
|
390 unsigned __int8 uChanceByTreasureLvl2; // 29 2d
|
|
391 unsigned __int8 uChanceByTreasureLvl3; // 2A 2e
|
|
392 unsigned __int8 uChanceByTreasureLvl4; // 2B 2f
|
|
393 unsigned __int8 uChanceByTreasureLvl5; // 2C 30
|
|
394 unsigned __int8 uChanceByTreasureLvl6; // 2D 32
|
|
395 };
|
|
396 };
|
|
397 unsigned char uItemID_Rep_St; //2e 32
|
|
398 char field_2f;
|
|
399 };
|
|
400 #pragma pack(pop)
|
|
401
|
|
402
|
|
403
|
|
404 /* 177 */
|
|
405 #pragma pack(push, 1)
|
|
406 struct ItemEnchantment
|
|
407 { //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul
|
|
408 char *pBonusStat;
|
|
409 char *pOfName;
|
|
410 /* union{
|
|
411 struct {
|
|
412 unsigned char to_arm;
|
|
413 unsigned char to_shld;
|
|
414 unsigned char to_helm;
|
|
415 unsigned char to_belt;
|
|
416 unsigned char to_cape;
|
|
417 unsigned char to_gaunt;
|
|
418 unsigned char to_boot;
|
|
419 unsigned char to_ring;
|
|
420 unsigned char to_amul;
|
|
421 }; */
|
|
422 unsigned char to_item[12];
|
|
423 // };
|
|
424 };
|
|
425 #pragma pack(pop)
|
|
426
|
|
427 /* 178 */
|
|
428 #pragma pack(push, 1)
|
|
429 struct ItemSpecialEnchantment //1Ch
|
|
430 { //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values
|
|
431
|
|
432 char *pBonusStatement; //0
|
|
433 char *pNameAdd; //4
|
|
434 char to_item_apply[12]; //8
|
|
435 int iValue; //14
|
|
436 int iTreasureLevel; //18
|
|
437 };
|
|
438 #pragma pack(pop)
|
|
439
|
|
440 #pragma pack(push, 1)
|
|
441 struct BonusRange
|
|
442 {
|
|
443 unsigned int minR;
|
|
444 unsigned int maxR;
|
|
445 };
|
|
446 #pragma pack(pop)
|
|
447
|
|
448 /* 176 */
|
|
449 #pragma pack(push, 1)
|
|
450 struct ItemsTable
|
|
451 {
|
|
452 void Initialize();
|
|
453 void LoadPotions();
|
|
454 void LoadPotionNotes();
|
|
455 void GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *pItem);
|
|
456 void SetSpecialBonus(ItemGen *pItem);
|
|
457 bool IsMaterialSpecial(ItemGen *pItem);
|
|
458 bool IsMaterialNonCommon(ItemGen *pItem);
|
|
459 void Release();
|
|
460
|
|
461 int uAllItemsCount;
|
|
462 NZIArray<ItemDesc, 800> pItems; //4-9604h
|
|
463 ItemEnchantment pEnchantments[24]; //9604h
|
|
464 ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h -9FC4h
|
|
465 char field_9FC4[5000];
|
|
466 char field_B348[5000];
|
|
467 char field_C6D0[5000];
|
|
468 char field_DA58[5000];
|
|
469 char field_EDE0[384];
|
|
470 unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h -102ECh
|
|
471 unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h
|
|
472 char *pItemsTXT_Raw; //11674h
|
|
473 char *pRndItemsTXT_Raw;
|
|
474 char *pStdItemsTXT_Raw; //1167Ch
|
|
475 char *pSpcItemsTXT_Raw; //11680h
|
|
476 unsigned int uChanceByTreasureLvlSumm[6]; //11684
|
|
477 unsigned int uBonusChanceStandart[6]; //1169c
|
|
478 unsigned int uBonusChanceSpecial[6]; //116B4
|
|
479 unsigned int uBonusChanceWpSpecial[6]; //116cc -116e4
|
|
480 unsigned int pEnchantmentsSumm[9]; //116E4h -11708h
|
|
481 BonusRange bonus_ranges[6]; //45C2h*4 =11708h
|
|
482 unsigned int pSpecialEnchantmentsSumm[24]; //11738h
|
|
483 unsigned int pSpecialEnchantments_count; //11798h
|
|
484 char field_1179C;
|
|
485 char field_1179D;
|
|
486 char field_1179E;
|
|
487 char field_1179F;
|
|
488 };
|
|
489 #pragma pack(pop)
|
|
490
|
|
491 void GenerateStandartShopItems();
|
|
492 void GenerateSpecialShopItems();
|
|
493 void GenerateItemsInChest();
|
|
494
|
|
495 extern std::array<const char, 5> uItemsAmountPerShopType; // weak
|
|
496 extern ItemGen *ptr_50C9A4_ItemToEnchant;
|
|
497
|
|
498 extern struct ItemsTable *pItemsTable;
|
|
499
|
|
500 /*
|
|
501 +10 to all Resistances. 1
|
|
502 +10 to all Seven Statistics. 2
|
|
503 Explosive Impact! 3
|
|
504 Adds 3-4 points of Cold damage. 4
|
|
505 Adds 6-8 points of Cold damage. 5
|
|
506 Adds 9-12 points of Cold damage. 6
|
|
507 Adds 2-5 points of Electrical damage. 7
|
|
508 Adds 4-10 points of Electrical damage. 8
|
|
509 Adds 6-15 points of Electrical damage. 9
|
|
510 Adds 1-6 points of Fire damage. 10
|
|
511 Adds 2-12 points of Fire damage. 11
|
|
512 Adds 3-18 points of Fire damage. 12
|
|
513 Adds 5 points of Body damage. 13
|
|
514 Adds 8 points of Body damage. 14
|
|
515 Adds 12 points of Body damage. 15
|
|
516 Drain Hit Points from target. 16
|
|
517 Increases rate of Recovery. 17
|
|
518 Wearer resistant to Diseases. 18
|
|
519 Wearer resistant to Insanity. 19
|
|
520 Wearer resistant to Paralysis. 20
|
|
521 Wearer resistant to Poison. 21
|
|
522 Wearer resistant to Sleep. 22
|
|
523 Wearer resistant to Stone. 23
|
|
524 Increased Knockback. 24
|
|
525 +5 Level. 25
|
|
526 Increases effect of all Air spells. 26
|
|
527 Increases effect of all Body spells. 27
|
|
528 Increases effect of all Dark spells. 28
|
|
529 Increases effect of all Earth spells. 29
|
|
530 Increases effect of all Fire spells. 30
|
|
531 Increases effect of all Light spells. 31
|
|
532 Increases effect of all Mind spells. 32
|
|
533 Increases effect of all Spirit spells. 33
|
|
534 Increases effect of all Water spells. 34
|
|
535 Increases chance of Disarming. 35
|
|
536 Half damage from all missile attacks. 36
|
|
537 Regenerate Hit points over time. 37
|
|
538 Regenerate Spell points over time. 38
|
|
539 Double damage vs Demons. 39
|
|
540 Double damage vs Dragons 40
|
|
541 Drain Hit Points from target and Increased Weapon speed. 41
|
|
542 +1 to Seven Stats, HP, SP, Armor, Resistances. 42
|
|
543 +10 to Endurance, Armor, Hit points. 43
|
|
544 +10 Hit points and Regenerate Hit points over time. 44
|
|
545 +5 Speed and Accuracy. 45
|
|
546 Adds 10-20 points of Fire damage and +25 Might. 46
|
|
547 +10 Spell points and Regenerate Spell points over time. 47
|
|
548 +15 Endurance and +5 Armor. 48
|
|
549 +10 Intellect and Luck. 49
|
|
550 +30 Fire Resistance and Regenerate Hit points over time. 50
|
|
551 +10 Spell points, Speed, Intellect. 51
|
|
552 +10 Endurance and Accuracy. 52
|
|
553 +10 Might and Personality. 53
|
|
554 +15 Endurance and Regenerate Hit points over time. 54
|
|
555 +15 Luck and Regenerate Spell points over time. 55
|
|
556 +5 Might and Endurance. 56
|
|
557 +5 Intellect and Personality. 57
|
|
558 Increased Value. 58
|
|
559 Increased Weapon speed. 59
|
|
560 +3 Unarmed and Dodging skills. 60
|
|
561 +3 Stealing and Disarm skills. 61
|
|
562 +3 ID Item and ID Monster skills. 62
|
|
563 Double Damage vs. Elves. 63
|
|
564 Double Damage vs. Undead. 64
|
|
565 Double Damage vs. Titans. 65
|
|
566 Regenerate Spell points and Hit points over time. 66
|
|
567 Adds 5 points of Body damage and +2 Disarm skill. 67
|
|
568 Adds 6-8 points of Cold damage and +5 Armor Class. 68
|
|
569 +20 Air Resistance and Shielding. 69
|
|
570 +10 Water Resistance and +2 Alchemy skill. 70
|
|
571 Prevents damage from drowning. 71
|
|
572 Prevents damage from falling. 72
|
|
573 */
|
|
574
|
|
575
|
|
576 /* 391 */
|
|
577 #pragma pack(push, 1)
|
|
578 struct stru351_summoned_item
|
|
579 {
|
|
580 int field_0_expire_second;
|
|
581 int field_4_expire_minute;
|
|
582 int field_8_expire_hour;
|
|
583 int field_C_expire_day;
|
|
584 int field_10_expire_week;
|
|
585 int field_14_exprie_month;
|
|
586 int field_18_expire_year;
|
|
587 };
|
|
588 #pragma pack(pop)
|
|
589
|
|
590
|
|
591 int GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder);
|
|
592 void FillAviableSkillsToTeach(int _this);
|
|
593 void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration);
|