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