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