annotate Items.h @ 208:af624eaf2fc5 tip

14.01.13
author Ritor1
date Mon, 14 Jan 2013 10:39:01 +0600
parents 509744251c8e
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 /* 338 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 enum ITEM_FLAGS
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 ITEM_IDENTIFIED = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 ITEM_BROKEN = 0x2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 ITEM_TEMP_BONUS = 0x8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 ITEM_STOLEN = 0x100,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 ITEM_ENCHANTED = 0x200,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 /* 330 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 enum ITEM_TYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 ITEM_LONGSWORD_1 = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 ITEM_DAGGER_1 = 0xF,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 ITEM_AXE_1 = 0x17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 ITEM_SPEAR_1 = 0x1F,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 ITEM_CROSSBOW_1 = 0x2F,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 ITEM_MACE_1 = 0x32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 ITEM_STAFF_1 = 0x3D,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 ITEM_LEATHER_1 = 0x42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 ITEM_CHAINMAIL_1 = 0x47,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 ITEM_PLATE_1 = 0x4C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 ITEM_BUCKLER_1 = 0x54,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 ITEM_GAUNTLETS_1 = 0x6E,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 ITEM_BOOTS_1 = 0x73,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 ITEM_WAND_FIRE = 0x87,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 ITEM_WAND_STUN = 0x8A,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 ITEM_WAND_INCENERATION = 0x9F,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 ITEM_TROLL_BLOOD = 0xCA,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 ITEM_DRAGON_EYE = 0xCC,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 ITEM_HARPY_FEATHER = 0xCF,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 ITEM_DEVIL_ICHOR = 0xD6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 ITEM_OOZE_ECTOPLASM_BOTTLE = 0xD9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 ITEM_POTION_BOTTLE = 0xDC,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 ITEM_SPELLBOOK_FIRE_STRIKE = 0x191,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 ITEM_SPELLBOOK_AIR_FEATHER_FALL = 0x19C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 ITEM_SPELLBOOK_WATER_POISON_SPRAY = 0x1A7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 ITEM_SPELLBOOK_EARTH_SLOW = 0x1B2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 ITEM_SPELLBOOK_SPIRIT_BLESS = 0x1BD,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 ITEM_SPELLBOOK_MIND_MIND_BLAST = 0x1C8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 ITEM_SPELLBOOK_BODY_FIRST_AID = 0x1D3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 ITEM_SPELLBOOK_BODY_HEAL = 0x1D6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 ITEM_SPELLBOOK_BODY_BREAK_POISON = 0x1D7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 ITEM_SPELLBOOK_LIGHT_LIGHT_BOLT = 0x1DD,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 ITEM_SPELLBOOK_LIGHT_SUN_BURST = 0x1E6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION = 0x1E7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 ITEM_ARTIFACT_PUCK = 0x1F4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 ITEM_RELIC_MEKORIGS_HAMMER = 0x210,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 /* 331 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 enum ITEM_EQUIP_TYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 EQUIP_ONE_OR_TWO_HANDS = 0x0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 EQUIP_TWO_HANDED = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 EQUIP_BOW = 0x2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 EQUIP_ARMOUR = 0x3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 EQUIP_SHIELD = 0x4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 EQUIP_HELMET = 0x5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 EQUIP_BELT = 0x6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 EQUIP_CLOAK = 0x7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 EQUIP_GAUNTLETS = 0x8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 EQUIP_BOOTS = 0x9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 EQUIP_RING = 0xA,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 EQUIP_AMULET = 0xB,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 EQUIP_C = 0xC,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 EQUIP_REAGENT = 0xD,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 EQUIP_POTION = 0xE,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 EQUIP_F = 0xF,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 EQUIP_BOOK = 0x10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 EQUIP_11 = 0x11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 EQUIP_GOLD = 0x12,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 EQUIP_GEM = 0x13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 /* 64 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 struct ItemGen
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 //----- (0042EB25) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 inline ItemGen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 bool GenerateArtifact();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 unsigned int GetValue();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 const char *GetDisplayName();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 const char *GetIdentifiedName();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 void UpdateTempBonus(__int64 uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 void Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 int _439DF3_get_additional_damage(int *a2, int *a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 unsigned int uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 int _bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 int _bonus_strength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 int uAdditionalValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 int uNumCharges;
23
509744251c8e Player-related members
Nomad
parents: 0
diff changeset
112 unsigned int uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 unsigned __int8 uBodyAnchor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 char uMaxCharges;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 char field_1A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 char field_1B;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 unsigned __int64 uExpireTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 /* 175 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 struct ItemDesc
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 unsigned int uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 char *pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 char *pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 char *pUnidentifiedName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 char *pDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 unsigned int uValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 unsigned __int16 uSpriteID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 __int16 field_1A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 unsigned __int16 uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 unsigned __int16 uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 unsigned __int8 uEquipType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 unsigned __int8 uSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 unsigned __int8 uDamageDice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 unsigned __int8 uDamageRoll;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 unsigned __int8 uDamageMod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 unsigned __int8 uMaterial;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 char _additional_value;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 char _bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 char _bonus_strength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 char field_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 char field_2A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 char field_2B;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 char field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 char field_2D;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 char field_2E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 char field_2F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 /* 177 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 struct ItemEnchantment
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 char *pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 char *pParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 char field_8[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 /* 178 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 struct ItemSpecialEnchantment
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 char *pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 char *pParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 char field_8[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 int field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 int field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 /* 176 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 struct ItemsTable
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 void Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 void LoadPotions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 void LoadPotionNotes();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 void GenerateItem(int a2, int a3, ItemGen *pItem);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 void SetSpecialBonus(ItemGen *pItem);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 bool _456D43_is_material_equals_3(ItemGen *pItem);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 bool _456D5E_is_some_material(ItemGen *pItem);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 char *Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 ItemDesc pItems[800];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 ItemEnchantment pEnchantments[24];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 ItemSpecialEnchantment pSpecialEnchantments[72];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 char field_9FC0[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 char field_B348[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 char field_C6D0[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 char field_DA58[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 char field_EDE0[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 char field_10168[5000];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 char field_114F0[388];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 char *pItemsTXT_Raw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 char *pRndItemsTXT_Raw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 char *pStdItemsTXT_Raw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 char *pSpcItemsTXT_Raw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 int field_11684[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 char field_1169C[60];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 int field_116D8[24];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 int field_11738[24];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 int field_11798;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 char field_1179C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 extern ItemGen *ptr_50C9A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 extern struct ItemsTable *pItemsTable;