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