Mercurial > mm7
annotate Items.h @ 984:d982fffb8b96
CharacterUI_InventoryTab_Draw cleaned.
author | Nomad |
---|---|
date | Sat, 11 May 2013 17:56:12 +0200 |
parents | 9be9afdbeac3 |
children | 9e823ad5eaa6 |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 | |
5 | |
6 | |
7 /* 338 */ | |
463 | 8 enum ITEM_FLAGS :unsigned int |
0 | 9 { |
10 ITEM_IDENTIFIED = 0x1, | |
11 ITEM_BROKEN = 0x2, | |
12 ITEM_TEMP_BONUS = 0x8, | |
984 | 13 ITEM_AURA_EFFECT_RED = 0x10, |
14 ITEM_AURA_EFFECT_BLUE = 0x20, | |
15 ITEM_AURA_EFFECT_GREEN = 0x40, | |
16 ITEM_AURA_EFFECT_PURPLE = 0x80, | |
0 | 17 ITEM_STOLEN = 0x100, |
18 ITEM_ENCHANTED = 0x200, | |
19 }; | |
20 | |
21 | |
377 | 22 enum ITEM_MATERIAL |
437 | 23 { |
377 | 24 MATERIAL_COMMON =0, |
25 MATERIAL_ARTEFACT = 1, | |
26 MATERIAL_RELIC = 2, | |
27 MATERIAL_SPECIAL = 3 | |
437 | 28 }; |
377 | 29 |
0 | 30 /* 330 */ |
31 enum ITEM_TYPE | |
32 { | |
33 ITEM_LONGSWORD_1 = 0x1, | |
34 ITEM_DAGGER_1 = 0xF, | |
35 ITEM_AXE_1 = 0x17, | |
36 ITEM_SPEAR_1 = 0x1F, | |
37 ITEM_CROSSBOW_1 = 0x2F, | |
38 ITEM_MACE_1 = 0x32, | |
39 ITEM_STAFF_1 = 0x3D, | |
816 | 40 ITEM_BLASTER = 64, |
41 ITEM_LASER_RIFLE = 65, | |
0 | 42 ITEM_LEATHER_1 = 0x42, |
43 ITEM_CHAINMAIL_1 = 0x47, | |
44 ITEM_PLATE_1 = 0x4C, | |
45 ITEM_BUCKLER_1 = 0x54, | |
46 ITEM_GAUNTLETS_1 = 0x6E, | |
47 ITEM_BOOTS_1 = 0x73, | |
490 | 48 ITEM_WAND_FIRE = 135, |
49 ITEM_WAND_STUN = 138, | |
0 | 50 ITEM_WAND_INCENERATION = 0x9F, |
51 ITEM_TROLL_BLOOD = 0xCA, | |
52 ITEM_DRAGON_EYE = 0xCC, | |
53 ITEM_HARPY_FEATHER = 0xCF, | |
54 ITEM_DEVIL_ICHOR = 0xD6, | |
55 ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9, | |
56 ITEM_POTION_BOTTLE = 0xDC, | |
57 ITEM_SPELLBOOK_FIRE_STRIKE = 0x191, | |
58 ITEM_SPELLBOOK_AIR_FEATHER_FALL = 0x19C, | |
59 ITEM_SPELLBOOK_WATER_POISON_SPRAY = 0x1A7, | |
60 ITEM_SPELLBOOK_EARTH_SLOW = 0x1B2, | |
61 ITEM_SPELLBOOK_SPIRIT_BLESS = 0x1BD, | |
62 ITEM_SPELLBOOK_MIND_MIND_BLAST = 0x1C8, | |
63 ITEM_SPELLBOOK_BODY_FIRST_AID = 0x1D3, | |
64 ITEM_SPELLBOOK_BODY_HEAL = 0x1D6, | |
65 ITEM_SPELLBOOK_BODY_BREAK_POISON = 0x1D7, | |
66 ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 0x1DD, | |
67 ITEM_SPELLBOOK_LIGHT_SUN_BURST = 0x1E6, | |
68 ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 0x1E7, | |
69 ITEM_ARTIFACT_PUCK = 0x1F4, | |
513 | 70 ITEM_ARTICACT_GOVERNONS_ARMOR = 504,//1F8 |
71 ITEM_ARTIFACT_YORUBA = 505,//1F9 | |
305 | 72 ITEM_ARTIFACT_SPLITTER = 506,//1FA |
513 | 73 ITEM_ARTIFACT_LEAGUE_BOOTS = 512,//200 |
74 ITEM_RELIC_HARECS_LEATHER = 516,//204 | |
75 ITEM_RELIC_TALEDONS_HELM = 521,//209 | |
76 ITEM_RELIC_SCHOLARS_CAP = 522,//20A | |
77 ITEM_RELIC_PHYNAXIAN_CROWN = 523,//20B | |
78 ITEM_RILIC_TITANS_BELT = 524,//20C | |
79 ITEM_RELIC_TWILIGHT = 525,//20D | |
0 | 80 ITEM_RELIC_MEKORIGS_HAMMER = 0x210, |
831 | 81 ITEM_ARTIFACT_HERMES_SANDALS = 529, |
513 | 82 ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP = 530,//212 |
83 ITEM_ARTIFACT_MINDS_EYE = 532,//214 | |
84 ITEM_ELVEN_CHAINMAIL = 533,//215 | |
831 | 85 ITEM_ARTIFACT_HEROS_BELT = 535,//217 |
86 ITEM_ARTIFACT_LADYS_ESCORT = 536, | |
513 | 87 ITEM_RARE_SHADOWS_MASK = 544,//220 |
88 ITEM_RARE_SUN_CLOAK = 547,//223 | |
89 ITEM_RARE_MOON_CLOAK = 548,//224 | |
90 ITEM_RARE_VAMPIRES_CAPE = 550,//226 | |
377 | 91 ITEM_LICH_JAR = 601 |
0 | 92 }; |
93 | |
94 /* 331 */ | |
816 | 95 enum ITEM_EQUIP_TYPE: unsigned __int8 |
0 | 96 { |
816 | 97 EQUIP_OFF_HAND = 0, |
98 EQUIP_MAIN_HAND = 1, | |
99 EQUIP_BOW = 2, | |
100 EQUIP_ARMOUR = 3, | |
101 EQUIP_SHIELD = 4, | |
102 EQUIP_HELMET = 5, | |
103 EQUIP_BELT = 6, | |
104 EQUIP_CLOAK = 7, | |
105 EQUIP_GAUNTLETS = 8, | |
106 EQUIP_BOOTS = 9, | |
107 EQUIP_RING = 10, | |
108 EQUIP_AMULET = 11, | |
109 EQUIP_WAND = 12, | |
110 EQUIP_REAGENT = 13, | |
111 EQUIP_POTION = 14, | |
112 EQUIP_SPELL_SCROLL = 15, | |
113 EQUIP_BOOK = 16, | |
114 EQUIP_MESSAGE_SCROLL = 17, | |
115 EQUIP_GOLD = 18, | |
116 EQUIP_GEM = 19, | |
117 EQUIP_NONE = 20 | |
0 | 118 }; |
119 | |
120 | |
121 | |
122 /* 64 */ | |
123 #pragma pack(push, 1) | |
526 | 124 struct ItemGen //0x24 |
0 | 125 { |
126 //----- (0042EB25) -------------------------------------------------------- | |
127 inline ItemGen() | |
128 { | |
129 Reset(); | |
130 } | |
131 | |
315 | 132 inline bool Broken() {return uAttributes & ITEM_BROKEN;} |
133 inline bool Identified() {return uAttributes & ITEM_IDENTIFIED;} | |
134 inline void SetIdentified() {uAttributes |= ITEM_IDENTIFIED;} | |
135 inline bool Stolen() {return uAttributes & ITEM_STOLEN;} | |
749 | 136 inline void SetStolen() {uAttributes |= ITEM_STOLEN;} |
271 | 137 |
0 | 138 bool GenerateArtifact(); |
139 unsigned int GetValue(); | |
140 const char *GetDisplayName(); | |
141 const char *GetIdentifiedName(); | |
142 void UpdateTempBonus(__int64 uTimePlayed); | |
143 void Reset(); | |
385 | 144 int _439DF3_get_additional_damage(int *a2, bool *vampiyr); |
0 | 145 |
146 | |
147 | |
526 | 148 int uItemID; |
570 | 149 int uEnchantmentType; |
0 | 150 int _bonus_strength; |
816 | 151 int uSpecEnchantmentType; // 25 +5 levels |
152 // 16 Drain Hit Points from target. | |
153 // 39 Double damage vs Demons. | |
154 // 40 Double damage vs Dragons | |
155 // 45 +5 Speed and Accuracy | |
156 // 56 +5 Might and Endurance. | |
157 // 57 +5 Intellect and Personality. | |
158 // 58 Increased Value. | |
159 // 60 +3 Unarmed and Dodging skills | |
160 // 61 +3 Stealing and Disarm skills. | |
161 // 59 Increased Weapon speed. | |
162 // 63 Double Damage vs. Elves. | |
163 // 64 Double Damage vs. Undead. | |
164 // 67 Adds 5 points of Body damage and +2 Disarm skill. | |
165 // 68 Adds 6-8 points of Cold damage and +5 Armor Class. | |
831 | 166 // 71 Prevents drowning damage. |
167 // 72 Prevents falling damage. | |
0 | 168 int uNumCharges; |
169 unsigned int uAttributes; | |
170 unsigned __int8 uBodyAnchor; | |
171 char uMaxCharges; | |
377 | 172 char uHolderPlayer; |
0 | 173 char field_1B; |
174 unsigned __int64 uExpireTime; | |
175 }; | |
176 #pragma pack(pop) | |
177 | |
178 | |
179 | |
180 /* 175 */ | |
181 #pragma pack(push, 1) | |
559 | 182 struct ItemDesc //30h |
229 | 183 { //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material| |
184 ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes | |
185 char *pIconName; //0 4 | |
186 char *pName; //4 8 | |
187 char *pUnidentifiedName; //8 c | |
188 char *pDescription; //0c 10 | |
189 unsigned int uValue; //10 14 | |
190 unsigned __int16 uSpriteID; //14 18 | |
191 __int16 field_1A; //16 | |
365 | 192 signed __int16 uEquipX; //18 1c |
193 signed __int16 uEquipY; //1a 1e | |
816 | 194 ITEM_EQUIP_TYPE uEquipType; //1c 20 |
229 | 195 unsigned __int8 uSkillType; //1d 21 |
196 unsigned __int8 uDamageDice; //1e 22 | |
197 unsigned __int8 uDamageRoll; //1f 23 | |
198 unsigned __int8 uDamageMod; //20 24 | |
199 unsigned __int8 uMaterial; //21 25 | |
200 char _additional_value; //22 26 | |
201 char _bonus_type; //23 27 | |
202 char _bonus_strength; //24 28 | |
203 char field_25; // 25 29 | |
204 char field_26; //26 2A | |
205 char field_27; // 27 2b | |
206 union | |
315 | 207 { |
229 | 208 unsigned __int8 uChanceByTreasureLvl[6]; |
209 struct { | |
210 unsigned __int8 uChanceByTreasureLvl1; // 28 2c | |
211 unsigned __int8 uChanceByTreasureLvl2; // 29 2d | |
212 unsigned __int8 uChanceByTreasureLvl3; // 2A 2e | |
213 unsigned __int8 uChanceByTreasureLvl4; // 2B 2f | |
214 unsigned __int8 uChanceByTreasureLvl5; // 2C 30 | |
215 unsigned __int8 uChanceByTreasureLvl6; // 2D 32 | |
216 }; | |
315 | 217 }; |
218 unsigned char uItemID_Rep_St; //2e 32 | |
219 char field_2f; | |
220 }; | |
0 | 221 #pragma pack(pop) |
222 | |
223 | |
224 | |
225 /* 177 */ | |
226 #pragma pack(push, 1) | |
227 struct ItemEnchantment | |
222 | 228 { //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul |
229 char *pBonusStat; | |
230 char *pOfName; | |
231 /* union{ | |
232 struct { | |
233 unsigned char to_arm; | |
234 unsigned char to_shld; | |
235 unsigned char to_helm; | |
236 unsigned char to_belt; | |
237 unsigned char to_cape; | |
238 unsigned char to_gaunt; | |
239 unsigned char to_boot; | |
240 unsigned char to_ring; | |
241 unsigned char to_amul; | |
242 }; */ | |
243 unsigned char to_item[12]; | |
244 // }; | |
245 }; | |
0 | 246 #pragma pack(pop) |
247 | |
248 /* 178 */ | |
249 #pragma pack(push, 1) | |
559 | 250 struct ItemSpecialEnchantment //1Ch |
222 | 251 { //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values |
252 | |
559 | 253 char *pBonusStatement; //0 |
254 char *pNameAdd; //4 | |
255 char to_item_apply[12]; //8 | |
256 int iValue; //14 | |
257 int iTreasureLevel; //18 | |
0 | 258 }; |
259 #pragma pack(pop) | |
260 | |
222 | 261 #pragma pack(push, 1) |
262 struct BonusRange | |
263 { | |
264 unsigned int minR; | |
265 unsigned int maxR; | |
266 }; | |
267 #pragma pack(pop) | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
0
diff
changeset
|
268 |
0 | 269 /* 176 */ |
270 #pragma pack(push, 1) | |
271 struct ItemsTable | |
272 { | |
273 void Initialize(); | |
274 void LoadPotions(); | |
275 void LoadPotionNotes(); | |
385 | 276 void GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *pItem); |
0 | 277 void SetSpecialBonus(ItemGen *pItem); |
377 | 278 bool IsMaterialSpecial(ItemGen *pItem); |
279 bool IsMaterialNonCommon(ItemGen *pItem); | |
374 | 280 void Release(); |
0 | 281 |
222 | 282 int uAllItemsCount; |
283 ItemDesc pItems[800]; //4-9604h | |
284 ItemEnchantment pEnchantments[24]; //9604h | |
229 | 285 ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h -9FC4h |
224 | 286 char field_9FC4[5000]; |
0 | 287 char field_B348[5000]; |
288 char field_C6D0[5000]; | |
289 char field_DA58[5000]; | |
229 | 290 char field_EDE0[384]; |
222 | 291 unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h -102ECh |
292 unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h | |
293 char *pItemsTXT_Raw; //11674h | |
0 | 294 char *pRndItemsTXT_Raw; |
222 | 295 char *pStdItemsTXT_Raw; //1167Ch |
296 char *pSpcItemsTXT_Raw; //11680h | |
224 | 297 unsigned int uChanceByTreasureLvlSumm[6]; //11684 |
298 unsigned int uBonusChanceStandart[6]; //1169c | |
299 unsigned int uBonusChanceSpecial[6]; //116B4 | |
300 unsigned int uBonusChanceWpSpecial[6]; //116cc -116e4 | |
222 | 301 unsigned int pEnchantmentsSumm[9]; //116E4h -11708h |
302 BonusRange bonus_ranges[6]; //45C2h*4 =11708h | |
224 | 303 unsigned int pSpecialEnchantmentsSumm[24]; //11738h |
304 unsigned int pSpecialEnchantments_count; //11798h | |
0 | 305 char field_1179C; |
315 | 306 char field_1179D; |
307 char field_1179E; | |
308 char field_1179F; | |
0 | 309 }; |
310 #pragma pack(pop) | |
311 | |
463 | 312 void GenerateStandartShopItems(); |
313 void GenerateSpecialShopItems(); | |
598 | 314 void GenerateItemsInChest(); |
0 | 315 |
526 | 316 extern const char uItemsAmountPerShopType[]; // weak |
0 | 317 extern ItemGen *ptr_50C9A4; |
318 | |
377 | 319 extern struct ItemsTable *pItemsTable; |
320 | |
321 /* | |
322 +10 to all Resistances. 1 | |
323 +10 to all Seven Statistics. 2 | |
324 Explosive Impact! 3 | |
325 Adds 3-4 points of Cold damage. 4 | |
326 Adds 6-8 points of Cold damage. 5 | |
327 Adds 9-12 points of Cold damage. 6 | |
328 Adds 2-5 points of Electrical damage. 7 | |
329 Adds 4-10 points of Electrical damage. 8 | |
330 Adds 6-15 points of Electrical damage. 9 | |
331 Adds 1-6 points of Fire damage. 10 | |
332 Adds 2-12 points of Fire damage. 11 | |
333 Adds 3-18 points of Fire damage. 12 | |
334 Adds 5 points of Body damage. 13 | |
335 Adds 8 points of Body damage. 14 | |
336 Adds 12 points of Body damage. 15 | |
337 Drain Hit Points from target. 16 | |
338 Increases rate of Recovery. 17 | |
339 Wearer resistant to Diseases. 18 | |
340 Wearer resistant to Insanity. 19 | |
341 Wearer resistant to Paralysis. 20 | |
342 Wearer resistant to Poison. 21 | |
343 Wearer resistant to Sleep. 22 | |
344 Wearer resistant to Stone. 23 | |
345 Increased Knockback. 24 | |
346 +5 Level. 25 | |
347 Increases effect of all Air spells. 26 | |
348 Increases effect of all Body spells. 27 | |
349 Increases effect of all Dark spells. 28 | |
350 Increases effect of all Earth spells. 29 | |
351 Increases effect of all Fire spells. 30 | |
352 Increases effect of all Light spells. 31 | |
353 Increases effect of all Mind spells. 32 | |
354 Increases effect of all Spirit spells. 33 | |
355 Increases effect of all Water spells. 34 | |
356 Increases chance of Disarming. 35 | |
357 Half damage from all missile attacks. 36 | |
358 Regenerate Hit points over time. 37 | |
359 Regenerate Spell points over time. 38 | |
360 Double damage vs Demons. 39 | |
361 Double damage vs Dragons 40 | |
362 Drain Hit Points from target and Increased Weapon speed. 41 | |
363 +1 to Seven Stats, HP, SP, Armor, Resistances. 42 | |
364 +10 to Endurance, Armor, Hit points. 43 | |
365 +10 Hit points and Regenerate Hit points over time. 44 | |
366 +5 Speed and Accuracy. 45 | |
367 Adds 10-20 points of Fire damage and +25 Might. 46 | |
368 +10 Spell points and Regenerate Spell points over time. 47 | |
369 +15 Endurance and +5 Armor. 48 | |
370 +10 Intellect and Luck. 49 | |
371 +30 Fire Resistance and Regenerate Hit points over time. 50 | |
372 +10 Spell points, Speed, Intellect. 51 | |
373 +10 Endurance and Accuracy. 52 | |
374 +10 Might and Personality. 53 | |
375 +15 Endurance and Regenerate Hit points over time. 54 | |
376 +15 Luck and Regenerate Spell points over time. 55 | |
377 +5 Might and Endurance. 56 | |
378 +5 Intellect and Personality. 57 | |
379 Increased Value. 58 | |
380 Increased Weapon speed. 59 | |
381 +3 Unarmed and Dodging skills. 60 | |
382 +3 Stealing and Disarm skills. 61 | |
383 +3 ID Item and ID Monster skills. 62 | |
384 Double Damage vs. Elves. 63 | |
385 Double Damage vs. Undead. 64 | |
386 Double Damage vs. Titans. 65 | |
387 Regenerate Spell points and Hit points over time. 66 | |
388 Adds 5 points of Body damage and +2 Disarm skill. 67 | |
389 Adds 6-8 points of Cold damage and +5 Armor Class. 68 | |
390 +20 Air Resistance and Shielding. 69 | |
391 +10 Water Resistance and +2 Alchemy skill. 70 | |
392 Prevents damage from drowning. 71 | |
393 Prevents damage from falling. 72 | |
939 | 394 */ |
395 | |
396 | |
397 /* 391 */ | |
398 #pragma pack(push, 1) | |
399 struct stru351_summoned_item | |
400 { | |
401 int field_0_expire_second; | |
402 int field_4_expire_minute; | |
403 int field_8_expire_hour; | |
404 int field_C_expire_day; | |
405 int field_10_expire_week; | |
406 int field_14_exprie_month; | |
407 int field_18_expire_year; | |
408 }; | |
409 #pragma pack(pop) |