annotate Items.h @ 570:f54481c85df8

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