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