Mercurial > mm7
annotate Items.cpp @ 2386:41c36ecc9f32
MapsLongTimer.h
author | Ritor1 |
---|---|
date | Mon, 23 Jun 2014 23:45:14 +0600 |
parents | 48dbf99c0f7f |
children | f4af3b203f65 |
rev | line source |
---|---|
2253
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
2250
diff
changeset
|
1 #define _CRT_SECURE_NO_WARNINGS |
0 | 2 #include <stdlib.h> |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
3 #include <string> |
2355 | 4 #include "UI\UIHouses.h" |
2349 | 5 #include "GUIButton.h" |
2336 | 6 #include "mm7_unsorted_subs.h" |
7 #include "ErrorHandling.h" | |
0 | 8 |
9 #include "Items.h" | |
10 #include "MapInfo.h" | |
461 | 11 #include "GUIWindow.h" |
12 #include "Events2D.h" | |
13 #include "Chest.h" | |
0 | 14 #include "LOD.h" |
15 #include "Monsters.h" | |
16 #include "Party.h" | |
17 #include "FactionTable.h" | |
18 #include "StorylineTextTable.h" | |
189 | 19 #include "texts.h" |
0 | 20 #include "mm7_data.h" |
2340 | 21 #include "OurMath.h" |
0 | 22 |
23 | |
463 | 24 struct ITEM_VARIATION |
25 { | |
26 unsigned __int16 treasure_level; | |
27 unsigned __int16 item_class[4]; | |
28 }; | |
29 | |
30 | |
1202 | 31 std::array<const char, 5> uItemsAmountPerShopType={ 0, 6, 8, 12, 12}; |
463 | 32 |
526 | 33 const ITEM_VARIATION shopWeap_variation_ord[15] ={ |
463 | 34 { 0, { 0, 0, 0, 0 }}, |
35 { 1, { 23, 27, 20, 20 }}, | |
36 { 1, { 23, 24, 28, 20 }}, | |
37 { 2, { 23, 24, 25, 20 }}, | |
38 { 2, { 27, 27, 26, 26 }}, | |
39 { 4, { 24, 30, 25, 27 }}, | |
40 { 4, { 24, 30, 25, 27 }}, | |
41 { 3, { 30, 24, 20, 20 }}, | |
42 { 2, { 20, 20, 20, 20 }}, | |
43 { 3, { 27, 27, 26, 26 }}, | |
44 { 3, { 28, 28, 25, 25 }}, | |
45 { 2, { 23, 23, 24, 24 }}, | |
46 { 3, { 23, 23, 26, 26 }}, | |
47 { 2, { 30, 26, 26, 26 }}, | |
48 { 2, { 28, 25, 28, 29 }}}; | |
49 | |
526 | 50 const ITEM_VARIATION shopArmr_variation_ord[28] ={ |
463 | 51 { 1, { 35, 35, 38, 38 }}, |
52 { 1, { 31, 31, 31, 34 }}, | |
53 { 1, { 35, 35, 38, 38 }}, | |
54 { 1, { 31, 31, 32, 34 }}, | |
55 { 2, { 35, 35, 38, 38 }}, | |
56 { 2, { 31, 32, 32, 33 }}, | |
57 { 2, { 35, 35, 38, 38 }}, | |
58 { 2, { 31, 31, 32, 32 }}, | |
59 { 4, { 35, 35, 38, 38 }}, | |
60 { 4, { 31, 32, 33, 34 }}, | |
61 { 4, { 35, 35, 38, 38 }}, | |
62 { 4, { 31, 32, 33, 34 }}, | |
63 { 3, { 35, 35, 38, 38 }}, | |
64 { 3, { 31, 31, 31, 31 }}, | |
65 { 2, { 35, 35, 38, 38 }}, | |
66 { 2, { 31, 32, 34, 34 }}, | |
67 { 3, { 35, 35, 38, 38 }}, | |
68 { 3, { 31, 31, 32, 32 }}, | |
69 { 3, { 35, 35, 38, 38 }}, | |
70 { 3, { 32, 32, 32, 33 }}, | |
71 { 3, { 35, 35, 38, 38 }}, | |
72 { 3, { 31, 31, 31, 32 }}, | |
73 { 3, { 35, 35, 38, 38 }}, | |
74 { 3, { 33, 31, 32, 34 }}, | |
75 { 3, { 35, 35, 38, 38 }}, | |
76 { 3, { 33, 31, 32, 34 }}, | |
77 { 4, { 35, 35, 38, 38 }}, | |
78 { 4, { 33, 31, 32, 34 }}}; | |
79 | |
80 | |
81 | |
526 | 82 const unsigned __int16 shopMagic_treasure_lvl[14]= {0, 1, 1, 2, 2, 4, 4, 3, 2, 2, 2, 2, 2, 2}; |
83 const unsigned __int16 shopAlch_treasure_lvl[13] = {0, 1, 1, 2, 2, 3, 3, 4, 4, 2, 2, 2, 2}; | |
463 | 84 |
526 | 85 const ITEM_VARIATION shopWeap_variation_spc[15]={ |
463 | 86 { 0, { 0, 0, 0, 0 }}, |
470 | 87 { 2, { 25, 30, 20, 20}}, |
88 { 2, { 23, 24, 28, 20}}, | |
89 { 3, { 23, 24, 25, 20}}, | |
90 { 3, { 27, 27, 26, 26}}, | |
91 { 5, { 23, 26, 28, 27}}, | |
92 { 5, { 23, 26, 28, 27}}, | |
93 { 4, { 30, 24, 20, 20}}, | |
94 { 3, { 20, 20, 20, 20}}, | |
95 { 4, { 27, 27, 26, 26}}, | |
96 { 4, { 28, 28, 25, 25}}, | |
97 { 4, { 23, 23, 24, 24}}, | |
98 { 4, { 24, 24, 27, 20}}, | |
99 { 4, { 30, 26, 26, 26}}, | |
100 { 4, { 28, 25, 28, 29}}}; | |
463 | 101 |
526 | 102 const ITEM_VARIATION shopArmr_variation_spc[28]={ |
470 | 103 { 2, { 35, 35, 38, 38 }}, |
104 { 2, { 31, 31, 31, 34 }}, | |
105 { 2, { 35, 35, 38, 38 }}, | |
106 { 2, { 31, 31, 32, 34 }}, | |
107 { 3, { 35, 35, 38, 38 }}, | |
108 { 3, { 31, 32, 32, 33 }}, | |
109 { 3, { 35, 35, 38, 38 }}, | |
110 { 3, { 31, 31, 32, 32 }}, | |
111 { 5, { 35, 35, 38, 38 }}, | |
112 { 5, { 31, 32, 33, 34 }}, | |
113 { 5, { 35, 35, 38, 38 }}, | |
114 { 5, { 31, 32, 33, 34 }}, | |
115 { 4, { 35, 35, 38, 38 }}, | |
116 { 4, { 31, 31, 31, 31 }}, | |
117 { 3, { 35, 35, 38, 38 }}, | |
118 { 3, { 31, 32, 34, 34 }}, | |
119 { 4, { 35, 35, 38, 38 }}, | |
120 { 4, { 31, 31, 32, 33 }}, | |
121 { 4, { 35, 35, 38, 38 }}, | |
122 { 4, { 32, 32, 33, 34 }}, | |
123 { 4, { 35, 35, 38, 38 }}, | |
124 { 4, { 31, 31, 31, 32 }}, | |
125 { 4, { 35, 35, 38, 38 }}, | |
126 { 4, { 32, 32, 32, 32 }}, | |
127 { 4, { 35, 35, 38, 38 }}, | |
128 { 4, { 34, 34, 34, 34 }}, | |
129 { 5, { 35, 35, 38, 38 }}, | |
130 { 5, { 33, 33, 33, 33 }} | |
131 }; | |
463 | 132 |
526 | 133 const unsigned __int16 shopMagicSpc_treasure_lvl[14] = {0, 2, 2, 3, 3, 5, 5, 4, 3, 3, 3, 3, 3, 3}; |
134 const unsigned __int16 shopAlchSpc_treasure_lvl[13] = {0, 2, 2, 3, 3, 4, 4, 5, 5, 3, 2, 2, 2}; | |
135 | |
136 | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
137 std::array< std::array<char, 14>, 7> byte_4E8168={{ //byte_4E8178 |
526 | 138 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, |
139 { 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, | |
140 { 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3}, | |
141 { 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4}, | |
142 { 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5}, | |
143 { 2, 2, 2, 2, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6}, | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
144 { 2, 2, 2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}}}; |
0 | 145 |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
146 int sub_4BE571_AddItemToSet(int valueToAdd, int *outPutSet, int elemsAlreadyPresent, int elemsNeeded); |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
147 int dword_F8B1DC_currentShopOption; // weak |
0 | 148 |
1682 | 149 ItemGen *ptr_50C9A4_ItemToEnchant; |
0 | 150 |
315 | 151 struct ItemsTable *pItemsTable; // 005D29E0 |
0 | 152 |
153 | |
154 | |
155 | |
156 | |
157 //----- (00439DF3) -------------------------------------------------------- | |
385 | 158 int ItemGen::_439DF3_get_additional_damage(int *damage_type, bool *draintargetHP) |
159 { | |
1933
5fcf6023f9c3
DamageMonsterFromParty some additional vars removed, changed the ordering part to something more readable
Grumpy7
parents:
1920
diff
changeset
|
160 *draintargetHP = false; |
385 | 161 *damage_type = 0; |
162 if ( !uItemID ) | |
163 return 0; | |
164 UpdateTempBonus(pParty->uTimePlayed); | |
165 if (uItemID == 501 ) //Iron Feather -sword | |
166 { | |
167 *damage_type = 1; | |
168 return rand() % 10 + 6; | |
169 } | |
170 if (uItemID == 507 ) //Ghoulsbane -axe | |
171 { | |
172 *damage_type = 0; | |
173 return rand() % 16 + 3; | |
174 } | |
175 if ( uItemID == 510 ) //Ullyses -bow | |
176 { | |
177 *damage_type = 2; | |
178 return rand() % 4 + 9; | |
179 } | |
180 if ( uItemID == 517 ) //Old Nick -dagger | |
181 { | |
182 *damage_type = 8; | |
183 return 8; | |
184 } | |
0 | 185 |
385 | 186 switch (uSpecEnchantmentType) |
187 { | |
188 case 4: //Adds 3-4 points of Cold damage. | |
189 *damage_type = 2; | |
190 return rand() % 2 + 3; | |
191 break; | |
192 case 5: //Adds 6-8 points of Cold damage. | |
193 *damage_type = 2; | |
194 return rand() % 3 + 6; | |
195 break; | |
196 case 6: //Adds 9-12 points of Cold damage. | |
197 *damage_type = 2; | |
198 return rand() % 4 + 9; | |
199 break; | |
200 case 7: //Adds 2-5 points of Electrical damage. | |
201 *damage_type = 1; | |
202 return rand() % 4 + 2; | |
203 break; | |
204 case 8: //Adds 4-10 points of Electrical damage. | |
205 *damage_type = 1; | |
206 return rand() % 7 + 4; | |
207 break; | |
208 case 9: //Adds 6-15 points of Electrical damage. | |
209 *damage_type = 1; | |
210 return rand() % 10 + 6; | |
211 break; | |
212 case 10: //Adds 1-6 points of Fire damage. | |
213 *damage_type = 0; | |
214 return GetDiceResult(1, 6); | |
215 break; | |
216 case 11: //Adds 2-12 points of Fire damage. | |
217 *damage_type = 0; | |
218 return GetDiceResult(2, 6); | |
219 break; | |
220 case 12: //Adds 3-18 points of Fire damage. | |
221 *damage_type = 0; | |
222 return GetDiceResult(3, 6); | |
223 break; | |
224 case 13: //Adds 5 points of Body damage. | |
225 *damage_type = 8; | |
226 return 5; | |
227 break; | |
228 case 14: //Adds 8 points of Body damage. | |
229 *damage_type = 8; | |
230 return 8; | |
231 break; | |
232 case 15: //Adds 12 points of Body damage. | |
233 *damage_type = 8; | |
234 return 12; | |
235 break; | |
236 case 16: //Drain Hit Points from target. | |
237 case 41: //Drain Hit Points from target and Increased Weapon speed. | |
238 *damage_type = 10; | |
239 *draintargetHP = true; | |
240 return 0; | |
241 break; | |
242 case 46: //Adds 10-20 points of Fire damage and +25 Might. | |
243 *damage_type = 0; | |
244 return rand() % 11 + 10; | |
245 break; | |
246 default: | |
247 *damage_type = 0; | |
248 return 0; | |
249 | |
250 } | |
251 | |
252 } | |
0 | 253 |
254 | |
255 //----- (00402F07) -------------------------------------------------------- | |
256 void ItemGen::Reset() | |
257 { | |
377 | 258 this->uHolderPlayer = 0; |
0 | 259 this->uAttributes = 0; |
260 this->uNumCharges = 0; | |
377 | 261 this->uSpecEnchantmentType = 0; |
1599 | 262 this->m_enchantmentStrength = 0; |
570 | 263 this->uEnchantmentType = 0; |
0 | 264 this->uItemID = 0; |
265 this->uBodyAnchor = 0; | |
266 this->uExpireTime = 0i64; | |
267 } | |
268 | |
269 //----- (00458260) -------------------------------------------------------- | |
270 void ItemGen::UpdateTempBonus(__int64 uTimePlayed) | |
271 { | |
463 | 272 if ( this->uAttributes & ITEM_TEMP_BONUS ) |
0 | 273 { |
274 if ( uTimePlayed > (signed __int64)this->uExpireTime ) | |
275 { | |
570 | 276 this->uEnchantmentType = 0; |
377 | 277 this->uSpecEnchantmentType = 0; |
463 | 278 this->uAttributes = this->uAttributes&(~ITEM_TEMP_BONUS); |
0 | 279 } |
280 } | |
281 } | |
282 | |
283 //----- (0045814E) -------------------------------------------------------- | |
374 | 284 void ItemsTable::Release() |
0 | 285 { |
2369
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
286 free(pMonstersTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
287 free(pMonsterPlacementTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
288 free(pSkillDescTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
289 free(pSpcItemsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
290 free(pStdItemsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
291 free(pRndItemsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
292 free(pItemsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
293 free(pHostileTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
294 free(pHistoryTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
295 free(pPotionsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
296 free(pPotionNotesTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
297 pMonstersTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
298 pMonsterPlacementTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
299 pSpcItemsTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
300 pSkillDescTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
301 pStdItemsTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
302 pRndItemsTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
303 pItemsTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
304 pHostileTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
305 pHistoryTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
306 pPotionsTXT_Raw = nullptr; |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
307 pPotionNotesTXT_Raw = nullptr; |
0 | 308 } |
309 | |
1082 | 310 |
0 | 311 //----- (00456D84) -------------------------------------------------------- |
312 void ItemsTable::Initialize() | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
313 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
314 std::map<std::string, ITEM_EQUIP_TYPE, ci_less> equipStatMap; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
315 equipStatMap["weapon"] = EQUIP_SINGLE_HANDED; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
316 equipStatMap["weapon2"] = EQUIP_TWO_HANDED; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
317 equipStatMap["weapon1or2"] = EQUIP_SINGLE_HANDED; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
318 equipStatMap["missile"] = EQUIP_BOW; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
319 equipStatMap["bow"] = EQUIP_BOW; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
320 equipStatMap["armor"] = EQUIP_ARMOUR; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
321 equipStatMap["shield"] = EQUIP_SHIELD; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
322 equipStatMap["helm"] = EQUIP_HELMET; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
323 equipStatMap["belt"] = EQUIP_BELT; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
324 equipStatMap["cloak"] = EQUIP_CLOAK; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
325 equipStatMap["gauntlets"] = EQUIP_GAUNTLETS; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
326 equipStatMap["boots"] = EQUIP_BOOTS; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
327 equipStatMap["ring"] = EQUIP_RING; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
328 equipStatMap["amulet"] = EQUIP_AMULET; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
329 equipStatMap["weaponw"] = EQUIP_WAND; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
330 equipStatMap["herb"] = EQUIP_REAGENT; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
331 equipStatMap["reagent"] = EQUIP_REAGENT; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
332 equipStatMap["bottle"] = EQUIP_POTION; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
333 equipStatMap["sscroll"] = EQUIP_SPELL_SCROLL; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
334 equipStatMap["book"] = EQUIP_BOOK; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
335 equipStatMap["mscroll"] = EQUIP_MESSAGE_SCROLL; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
336 equipStatMap["gold"] = EQUIP_GOLD; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
337 equipStatMap["gem"] = EQUIP_GEM; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
338 |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
339 std::map<std::string, PLAYER_SKILL_TYPE, ci_less> equipSkillMap; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
340 equipSkillMap["staff"] = PLAYER_SKILL_STAFF; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
341 equipSkillMap["sword"] = PLAYER_SKILL_SWORD; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
342 equipSkillMap["dagger"] = PLAYER_SKILL_DAGGER; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
343 equipSkillMap["axe"] = PLAYER_SKILL_AXE; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
344 equipSkillMap["spear"] = PLAYER_SKILL_SPEAR; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
345 equipSkillMap["bow"] = PLAYER_SKILL_BOW; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
346 equipSkillMap["mace"] = PLAYER_SKILL_MACE; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
347 equipSkillMap["blaster"] = PLAYER_SKILL_BLASTER; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
348 equipSkillMap["shield"] = PLAYER_SKILL_SHIELD; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
349 equipSkillMap["leather"] = PLAYER_SKILL_LEATHER; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
350 equipSkillMap["chain"] = PLAYER_SKILL_CHAIN; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
351 equipSkillMap["plate"] = PLAYER_SKILL_PLATE; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
352 equipSkillMap["club"] = PLAYER_SKILL_CLUB; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
353 |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
354 std::map<std::string, ITEM_MATERIAL, ci_less> materialMap; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
355 materialMap["artifact"] = MATERIAL_ARTEFACT; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
356 materialMap["relic"] = MATERIAL_RELIC; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
357 materialMap["special"] = MATERIAL_SPECIAL; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
358 |
2262 | 359 char* test_string; |
360 int item_counter; | |
224 | 361 |
362 pMapStats = new MapStats; | |
363 pMapStats->Initialize(); | |
364 | |
365 pMonsterStats = new MonsterStats; | |
366 pMonsterStats->Initialize(); | |
367 pMonsterStats->InitializePlacements(); | |
368 | |
369 pSpellStats = new SpellStats; | |
370 pSpellStats->Initialize(); | |
371 | |
372 LoadPotions(); | |
373 LoadPotionNotes(); | |
374 | |
375 pFactionTable = new FactionTable; | |
376 pFactionTable->Initialize(); | |
377 | |
378 pStorylineText = new StorylineText; | |
379 pStorylineText->Initialize(); | |
0 | 380 |
224 | 381 pStdItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stditems.txt", 0); |
382 strtok(pStdItemsTXT_Raw, "\r"); | |
383 strtok(NULL, "\r"); | |
384 strtok(NULL, "\r"); | |
385 strtok(NULL, "\r"); | |
386 //Standard Bonuses by Group | |
2282 | 387 for (int i=0;i<24;++i) |
224 | 388 { |
389 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
390 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
391 pEnchantments[i].pBonusStat=RemoveQuotes(tokens[0]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
392 pEnchantments[i].pOfName=RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
393 for (int j = 0; j < 9; j++) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
394 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
395 pEnchantments[i].to_item[j]=atoi(tokens[j+2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
396 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
397 } |
0 | 398 |
224 | 399 memset(&pEnchantmentsSumm, 0, 36); |
2282 | 400 for(int i=0;i<9;++i) |
224 | 401 { |
2282 | 402 for (int j=0;j<24;++j) |
224 | 403 pEnchantmentsSumm[i]+=pEnchantments[j].to_item[i]; |
404 } | |
0 | 405 |
224 | 406 //Bonus range for Standard by Level |
407 strtok(NULL, "\r"); | |
408 strtok(NULL, "\r"); | |
409 strtok(NULL, "\r"); | |
410 strtok(NULL, "\r"); | |
411 strtok(NULL, "\r"); | |
2282 | 412 for(int i=0;i<6;++i) //counted from 1 |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
413 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
414 test_string = strtok(NULL, "\r") + 1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
415 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
416 Assert(tokens.size() == 4, "Invalid number of tokens"); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
417 bonus_ranges[i].minR = atoi(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
418 bonus_ranges[i].maxR =atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
419 } |
224 | 420 |
222 | 421 |
224 | 422 pSpcItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spcitems.txt", 0); |
423 strtok(pSpcItemsTXT_Raw, "\r"); | |
424 strtok(NULL, "\r"); | |
425 strtok(NULL, "\r"); | |
426 strtok(NULL, "\r"); | |
2282 | 427 for (int i=0;i<72;++i) |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
428 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
429 test_string = strtok(NULL, "\r") + 1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
430 auto tokens = Tokenize(test_string, '\t'); |
2261 | 431 Assert(tokens.size() >= 17, "Invalid number of tokens"); |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
432 pSpecialEnchantments[i].pBonusStatement=RemoveQuotes(tokens[0]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
433 pSpecialEnchantments[i].pNameAdd= RemoveQuotes(tokens[1]); |
2262 | 434 for (int j = 0; j < 12; j++) |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
435 { |
2262 | 436 pSpecialEnchantments[i].to_item_apply[j]=atoi(tokens[j+2]); |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
437 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
438 int res; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
439 res=atoi(tokens[14]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
440 if(!res) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
441 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
442 ++tokens[14]; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
443 while (*tokens[14]==' ')//fix X 2 case |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
444 ++tokens[14]; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
445 res=atoi(tokens[14]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
446 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
447 pSpecialEnchantments[i].iValue=res; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
448 pSpecialEnchantments[i].iTreasureLevel= tolower(tokens[15][0]) - 97; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
449 } |
224 | 450 |
451 pSpecialEnchantments_count = 71; | |
452 memset(&pSpecialEnchantmentsSumm, 0, 96); | |
2282 | 453 for(int i=0;i<12;++i) |
224 | 454 { |
2262 | 455 for (unsigned int j=0;j<=pSpecialEnchantments_count;++j) |
224 | 456 pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i]; |
457 } | |
222 | 458 |
2355 | 459 InitializeBuildingResidents(); |
222 | 460 |
224 | 461 pItemsTXT_Raw = (char*) pEvents_LOD->LoadRaw("items.txt", 0); |
462 strtok(pItemsTXT_Raw, "\r"); | |
463 strtok(NULL, "\r"); | |
464 uAllItemsCount = 0; | |
465 item_counter = 0; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
466 while (item_counter < 800) |
222 | 467 { |
468 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
469 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
470 item_counter=atoi(tokens[0]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
471 uAllItemsCount=item_counter; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
472 pItems[item_counter].pIconName = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
473 pItems[item_counter].pName = RemoveQuotes(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
474 pItems[item_counter].uValue=atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
475 auto findResult = equipStatMap.find(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
476 pItems[item_counter].uEquipType = findResult == equipStatMap.end() ? EQUIP_NONE : findResult->second; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
477 auto findResult2 = equipSkillMap.find(tokens[5]); |
2263 | 478 pItems[item_counter].uSkillType = findResult2 == equipSkillMap.end() ? PLAYER_SKILL_MISC : findResult2->second; |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
479 auto tokens2 = Tokenize(tokens[6], 'd'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
480 if (tokens2.size() == 2) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
481 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
482 pItems[item_counter].uDamageDice=atoi(tokens2[0]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
483 pItems[item_counter].uDamageRoll=atoi(tokens2[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
484 } |
2261 | 485 else if (tolower(tokens2[0][0]) != 's') |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
486 { |
2261 | 487 pItems[item_counter].uDamageDice=atoi(tokens2[0]); |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
488 pItems[item_counter].uDamageRoll=1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
489 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
490 else |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
491 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
492 pItems[item_counter].uDamageDice=0; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
493 pItems[item_counter].uDamageRoll=0; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
494 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
495 pItems[item_counter].uDamageMod=atoi(tokens[7]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
496 auto findResult3 = materialMap.find(tokens[8]); |
2263 | 497 pItems[item_counter].uMaterial = findResult3 == materialMap.end() ? MATERIAL_COMMON : findResult->second; |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
498 pItems[item_counter].uItemID_Rep_St=atoi(tokens[9]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
499 pItems[item_counter].pUnidentifiedName = RemoveQuotes(tokens[10]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
500 pItems[item_counter].uSpriteID=atoi(tokens[11]); |
224 | 501 |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
502 pItems[item_counter]._additional_value=0; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
503 pItems[item_counter]._bonus_type=0; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
504 if (pItems[item_counter].uMaterial==MATERIAL_SPECIAL) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
505 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
506 for(int ii=0; ii<24; ++ii) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
507 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
508 if (!_stricmp(tokens[12],pEnchantments[ii].pOfName)) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
509 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
510 pItems[item_counter]._bonus_type=ii+1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
511 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
512 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
513 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
514 if (!pItems[item_counter]._bonus_type) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
515 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
516 for(int ii=0; ii<72; ++ii) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
517 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
518 if (!_stricmp(tokens[12],pSpecialEnchantments[ii].pNameAdd)) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
519 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
520 pItems[item_counter]._additional_value=ii+1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
521 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
522 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
523 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
524 } |
224 | 525 |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
526 if ((pItems[item_counter].uMaterial==MATERIAL_SPECIAL)&&(pItems[item_counter]._bonus_type)) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
527 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
528 char b_s=atoi(tokens[13]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
529 if (b_s) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
530 pItems[item_counter]._bonus_strength=b_s; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
531 else |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
532 pItems[item_counter]._bonus_strength=1; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
533 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
534 else |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
535 pItems[item_counter]._bonus_strength=0; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
536 pItems[item_counter].uEquipX=atoi(tokens[14]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
537 pItems[item_counter].uEquipY=atoi(tokens[15]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
538 pItems[item_counter].pDescription = RemoveQuotes(tokens[16]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
539 item_counter++; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
540 } |
222 | 541 |
224 | 542 uAllItemsCount = item_counter; |
543 pRndItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("rnditems.txt", 0); | |
544 strtok(pRndItemsTXT_Raw, "\r"); | |
545 strtok(NULL, "\r"); | |
546 strtok(NULL, "\r"); | |
547 strtok(NULL, "\r"); | |
2269 | 548 for (item_counter = 0; item_counter < 619; item_counter++) |
224 | 549 { |
550 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
551 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
552 Assert(tokens.size() > 7, "Invalid number of tokens"); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
553 item_counter = atoi(tokens[0]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
554 pItems[item_counter].uChanceByTreasureLvl1=atoi(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
555 pItems[item_counter].uChanceByTreasureLvl2=atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
556 pItems[item_counter].uChanceByTreasureLvl3=atoi(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
557 pItems[item_counter].uChanceByTreasureLvl4=atoi(tokens[5]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
558 pItems[item_counter].uChanceByTreasureLvl5=atoi(tokens[6]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
559 pItems[item_counter].uChanceByTreasureLvl6=atoi(tokens[7]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
560 } |
224 | 561 |
1006 | 562 //ChanceByTreasureLvl Summ - to calculate chance |
224 | 563 memset(&uChanceByTreasureLvlSumm, 0, 24); |
2282 | 564 for(int i=0;i<6;++i) |
224 | 565 { |
2282 | 566 for (int j=1;j<item_counter;++j) |
224 | 567 uChanceByTreasureLvlSumm[i]+=pItems[j].uChanceByTreasureLvl[i]; |
568 } | |
222 | 569 |
224 | 570 strtok(NULL, "\r"); |
571 strtok(NULL, "\r"); | |
572 strtok(NULL, "\r"); | |
573 strtok(NULL, "\r"); | |
574 strtok(NULL, "\r"); | |
2282 | 575 for (int i=0;i<3;++i) |
224 | 576 { |
577 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
578 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
579 Assert(tokens.size() > 7, "Invalid number of tokens"); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
580 switch (i) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
581 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
582 case 0: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
583 uBonusChanceStandart[0]=atoi(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
584 uBonusChanceStandart[1]=atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
585 uBonusChanceStandart[2]=atoi(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
586 uBonusChanceStandart[3]=atoi(tokens[5]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
587 uBonusChanceStandart[4]=atoi(tokens[6]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
588 uBonusChanceStandart[5]=atoi(tokens[7]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
589 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
590 case 1: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
591 uBonusChanceSpecial[0]=atoi(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
592 uBonusChanceSpecial[1]=atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
593 uBonusChanceSpecial[2]=atoi(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
594 uBonusChanceSpecial[3]=atoi(tokens[5]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
595 uBonusChanceSpecial[4]=atoi(tokens[6]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
596 uBonusChanceSpecial[5]=atoi(tokens[7]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
597 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
598 case 2: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
599 uBonusChanceWpSpecial[0]=atoi(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
600 uBonusChanceWpSpecial[1]=atoi(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
601 uBonusChanceWpSpecial[2]=atoi(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
602 uBonusChanceWpSpecial[3]=atoi(tokens[5]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
603 uBonusChanceWpSpecial[4]=atoi(tokens[6]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
604 uBonusChanceWpSpecial[5]=atoi(tokens[7]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
605 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
606 } |
224 | 607 } |
2369
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
608 free(pRndItemsTXT_Raw); |
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
609 pRndItemsTXT_Raw = nullptr; |
222 | 610 |
224 | 611 pSkillDescTXT_Raw = (char *)pEvents_LOD->LoadRaw("skilldes.txt", 0); |
612 strtok(pSkillDescTXT_Raw, "\r"); | |
2282 | 613 for (int i=0; i<37; ++i) |
224 | 614 { |
615 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
616 auto tokens = Tokenize(test_string, '\t'); |
2261 | 617 Assert(tokens.size() >= 6, "Invalid number of tokens"); |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
618 pSkillDesc[i] = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
619 pNormalSkillDesc[i] = RemoveQuotes(tokens[2]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
620 pExpertSkillDesc[i] = RemoveQuotes(tokens[3]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
621 pMasterSkillDesc[i] = RemoveQuotes(tokens[4]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
622 pGrandSkillDesc[i] = RemoveQuotes(tokens[5]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
623 } |
224 | 624 |
625 pStatsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stats.txt", 0); | |
626 strtok(pStatsTXT_Raw, "\r"); | |
2282 | 627 for (int i=0; i<26; ++i) |
224 | 628 { |
629 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
630 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
631 Assert(tokens.size() == 2, "Invalid number of tokens"); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
632 switch (i) |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
633 { |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
634 case 0: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
635 case 1: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
636 case 2: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
637 case 3: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
638 case 4: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
639 case 5: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
640 case 6: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
641 pAttributeDescriptions[i] = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
642 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
643 case 7: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
644 pHealthPointsAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
645 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
646 case 8: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
647 pArmourClassAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
648 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
649 case 9: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
650 pSpellPointsAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
651 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
652 case 10: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
653 pPlayerConditionAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
654 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
655 case 11: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
656 pFastSpellAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
657 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
658 case 12: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
659 pPlayerAgeAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
660 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
661 case 13: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
662 pPlayerLevelAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
663 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
664 case 14: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
665 pPlayerExperienceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
666 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
667 case 15: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
668 pAttackBonusAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
669 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
670 case 16: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
671 pAttackDamageAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
672 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
673 case 17: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
674 pMissleBonusAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
675 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
676 case 18: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
677 pMissleDamageAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
678 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
679 case 19: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
680 pFireResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
681 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
682 case 20: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
683 pAirResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
684 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
685 case 21: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
686 pWaterResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
687 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
688 case 22: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
689 pEarthResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
690 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
691 case 23: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
692 pMindResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
693 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
694 case 24: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
695 pBodyResistanceAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
696 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
697 case 25: |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
698 pSkillPointsAttributeDescription = RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
699 break; |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
700 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
701 } |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
702 |
224 | 703 pClassTXT_Raw = 0; |
704 pClassTXT_Raw = (char *)pEvents_LOD->LoadRaw("class.txt", 0); | |
705 strtok(pClassTXT_Raw, "\r"); | |
2282 | 706 for (int i=0; i<36; ++i) |
224 | 707 { |
708 test_string = strtok(NULL, "\r") + 1; | |
2260
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
709 auto tokens = Tokenize(test_string, '\t'); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
710 Assert(tokens.size() == 3, "Invalid number of tokens"); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
711 pClassDescriptions[i]=RemoveQuotes(tokens[1]); |
eab43c3d7767
Using new tokenizer in Items.cpp initialize function
Grumpy7
parents:
2253
diff
changeset
|
712 } |
222 | 713 |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
714 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
715 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
716 ItemGen::PopulateSpecialBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
717 ItemGen::PopulateArtifactBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
718 ItemGen::PopulateRegularBonusMap(); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
719 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
720 |
224 | 721 } |
0 | 722 |
723 //----- (00456D17) -------------------------------------------------------- | |
724 void ItemsTable::SetSpecialBonus(ItemGen *pItem) | |
725 { | |
385 | 726 if ( pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL ) |
0 | 727 { |
570 | 728 pItem->uEnchantmentType = pItems[pItem->uItemID]._bonus_type; |
385 | 729 pItem->uSpecEnchantmentType = pItems[pItem->uItemID]._additional_value; |
1599 | 730 pItem->m_enchantmentStrength = pItems[pItem->uItemID]._bonus_strength; |
0 | 731 } |
732 } | |
733 | |
734 //----- (00456D43) -------------------------------------------------------- | |
377 | 735 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem) |
0 | 736 { |
377 | 737 return this->pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL; |
0 | 738 } |
739 | |
740 //----- (00456D5E) -------------------------------------------------------- | |
377 | 741 bool ItemsTable::IsMaterialNonCommon(ItemGen *pItem) |
0 | 742 { |
385 | 743 return pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL || |
744 pItems[pItem->uItemID].uMaterial == MATERIAL_RELIC || | |
745 pItems[pItem->uItemID].uMaterial == MATERIAL_ARTEFACT; | |
0 | 746 } |
747 | |
748 | |
749 //----- (00453B3C) -------------------------------------------------------- | |
750 void ItemsTable::LoadPotions() | |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
751 { |
0 | 752 |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
753 CHAR Text[90]; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
754 char* test_string; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
755 unsigned int uRow; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
756 unsigned int uColumn; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
757 unsigned __int8 potion_value; |
222 | 758 |
2369
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
759 free(pPotionNotesTXT_Raw); |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
760 auto tokens = Tokenize("", '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
761 char* pPotionsTXT_Raw = (char *)pEvents_LOD->LoadRaw("potion.txt", 0); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
762 test_string = strtok(pPotionsTXT_Raw ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
763 while (test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
764 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
765 tokens = Tokenize(test_string, '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
766 if (!strcmp(tokens[0], "222")) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
767 break; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
768 test_string = strtok(NULL ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
769 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
770 if (!test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
771 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
772 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
773 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
774 } |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
775 |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
776 for (uRow = 0;uRow < 50; ++uRow) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
777 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
778 if (tokens.size() < 50) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
779 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
780 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, tokens.size()); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
781 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
782 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
783 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
784 for (uColumn = 0; uColumn < 50; ++uColumn) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
785 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
786 char* currValue = tokens[uColumn + 7]; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
787 potion_value = atoi(currValue); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
788 if ( !potion_value && tolower(currValue[0]) == 'e') |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
789 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
790 potion_value = atoi(currValue + 1); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
791 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
792 this->potion_data[uRow][uColumn]=potion_value; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
793 } |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
794 |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
795 test_string = strtok(NULL ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
796 if (!test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
797 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
798 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, 0); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
799 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
800 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
801 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
802 tokens = Tokenize(test_string, '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
803 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
804 } |
0 | 805 |
806 //----- (00453CE5) -------------------------------------------------------- | |
807 void ItemsTable::LoadPotionNotes() | |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
808 { |
222 | 809 |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
810 CHAR Text[90]; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
811 char* test_string; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
812 unsigned int uRow; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
813 unsigned int uColumn; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
814 unsigned __int8 potion_note; |
222 | 815 |
2369
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2355
diff
changeset
|
816 free(pPotionNotesTXT_Raw); |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
817 auto tokens = Tokenize("", '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
818 char* pPotionNotesTXT_Raw = (char *)pEvents_LOD->LoadRaw("potnotes.txt", 0); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
819 test_string = strtok(pPotionNotesTXT_Raw ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
820 while (test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
821 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
822 tokens = Tokenize(test_string, '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
823 if (!strcmp(tokens[0], "222")) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
824 break; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
825 test_string = strtok(NULL ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
826 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
827 if (!test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
828 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
829 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
830 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
831 } |
0 | 832 |
2284
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
833 for (uRow = 0;uRow < 50; ++uRow) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
834 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
835 if (tokens.size() < 50) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
836 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
837 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, tokens.size()); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
838 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
839 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
840 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
841 for (uColumn = 0; uColumn < 50; ++uColumn) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
842 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
843 char* currValue = tokens[uColumn + 7]; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
844 potion_note = atoi(currValue); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
845 if ( !potion_note && tolower(currValue[0]) == 'e') |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
846 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
847 potion_note = atoi(currValue + 1); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
848 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
849 this->potion_note[uRow][uColumn]=potion_note; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
850 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
851 |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
852 test_string = strtok(NULL ,"\r") + 1; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
853 if (!test_string) |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
854 { |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
855 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, 0); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
856 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
857 return; |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
858 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
859 tokens = Tokenize(test_string, '\t'); |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
860 } |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
861 |
40c4065234f8
Tokenizing ItemsTable::LoadPotions and ItemsTable::LoadPotionNotes()
Grumpy7
parents:
2282
diff
changeset
|
862 |
222 | 863 } |
0 | 864 |
865 | |
866 //----- (00456442) -------------------------------------------------------- | |
867 unsigned int ItemGen::GetValue() | |
463 | 868 { |
869 unsigned int uBaseValue; // edi@1 | |
870 unsigned int bonus; | |
0 | 871 |
463 | 872 uBaseValue = pItemsTable->pItems[this->uItemID].uValue; |
873 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) ) | |
874 return uBaseValue; | |
570 | 875 if (uEnchantmentType ) |
1599 | 876 return uBaseValue + 100 * m_enchantmentStrength;; |
463 | 877 if (uSpecEnchantmentType ) |
878 { | |
879 bonus = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType].iTreasureLevel; | |
880 if ( bonus > 10 ) | |
881 return uBaseValue + bonus; | |
882 else | |
883 return uBaseValue * bonus; | |
884 } | |
885 return uBaseValue; | |
886 } | |
0 | 887 |
888 //----- (00456499) -------------------------------------------------------- | |
889 const char *ItemGen::GetDisplayName() | |
890 { | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
891 if (IsIdentified()) |
366 | 892 return GetIdentifiedName(); |
0 | 893 else |
366 | 894 return pItemsTable->pItems[uItemID].pUnidentifiedName; |
0 | 895 } |
896 | |
897 //----- (004564B3) -------------------------------------------------------- | |
898 const char *ItemGen::GetIdentifiedName() | |
899 { | |
377 | 900 unsigned __int8 equip_type; |
901 const char *player_name; | |
902 const char *nameModificator; | |
903 const char *format_str; | |
0 | 904 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
905 equip_type = GetItemEquipType(); |
377 | 906 if ( (equip_type == EQUIP_REAGENT) || (equip_type == EQUIP_POTION) || (equip_type == EQUIP_GOLD) ) |
0 | 907 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
908 sprintf(item__getname_buffer.data(), "%s", pItemsTable->pItems[uItemID].pName); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
909 return item__getname_buffer.data(); |
0 | 910 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
911 sprintf(item__getname_buffer.data(), "%s", pItemsTable->pItems[uItemID].pName); |
1358
61010a655c94
a few itemID changed to their enum values + added a few new ones
Grumpy7
parents:
1297
diff
changeset
|
912 if ( uItemID == ITEM_LICH_JAR_FULL ) //Lich Jar |
0 | 913 { |
377 | 914 if ( (uHolderPlayer >0 )&& (uHolderPlayer <= 4) ) |
0 | 915 { |
377 | 916 player_name = pPlayers[uHolderPlayer]->pName; |
917 if ( player_name[strlen(player_name) - 1] == 's' ) | |
918 format_str = pGlobalTXT_LocalizationStrings[655]; //"%s' Jar" | |
0 | 919 else |
377 | 920 format_str = pGlobalTXT_LocalizationStrings[654]; //"%s's Jar" |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
921 sprintf(item__getname_buffer.data(), format_str, pPlayers[uHolderPlayer]->pName); |
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
922 return item__getname_buffer.data(); |
0 | 923 } |
924 } | |
377 | 925 if ( !pItemsTable->IsMaterialNonCommon(this) ) |
0 | 926 { |
570 | 927 if ( uEnchantmentType ) |
0 | 928 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
929 strcat(item__getname_buffer.data(), " "); |
570 | 930 nameModificator = pItemsTable->pEnchantments[uEnchantmentType-1].pOfName; |
0 | 931 } |
932 else | |
933 { | |
377 | 934 if ( !uSpecEnchantmentType ) |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
935 return item__getname_buffer.data(); |
377 | 936 if ( uSpecEnchantmentType == 16 //Drain Hit Points from target. |
937 || uSpecEnchantmentType == 39 //Double damage vs Demons. | |
938 || uSpecEnchantmentType == 40 //Double damage vs Dragons | |
939 || uSpecEnchantmentType == 45 //+5 Speed and Accuracy | |
940 || uSpecEnchantmentType == 56 //+5 Might and Endurance. | |
941 || uSpecEnchantmentType == 57 //+5 Intellect and Personality. | |
942 || uSpecEnchantmentType == 58 //Increased Value. | |
943 || uSpecEnchantmentType == 60 //+3 Unarmed and Dodging skills | |
944 || uSpecEnchantmentType == 61 //+3 Stealing and Disarm skills. | |
945 || uSpecEnchantmentType == 59 //Increased Weapon speed. | |
946 || uSpecEnchantmentType == 63 //Double Damage vs. Elves. | |
947 || uSpecEnchantmentType == 64 //Double Damage vs. Undead. | |
948 || uSpecEnchantmentType == 67 //Adds 5 points of Body damage and +2 Disarm skill. | |
949 || uSpecEnchantmentType == 68 ) //Adds 6-8 points of Cold damage and +5 Armor Class. | |
950 { //enchantment and name positions inverted! | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
951 sprintf( item__getname_buffer.data(), "%s %s", |
377 | 952 pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd, |
953 pItemsTable->pItems[uItemID].pName); | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
954 return item__getname_buffer.data(); |
0 | 955 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
956 strcat(item__getname_buffer.data(), " "); |
377 | 957 nameModificator = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd; |
0 | 958 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
959 strcat(item__getname_buffer.data(), nameModificator); |
0 | 960 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
961 return item__getname_buffer.data(); |
0 | 962 } |
963 | |
964 | |
965 //----- (00456620) -------------------------------------------------------- | |
385 | 966 void ItemsTable::GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *out_item) |
2286 | 967 { |
968 int treasureLevelMinus1; // ebx@3 | |
559 | 969 int current_chance; // ebx@43 |
970 int tmp_chance; // ecx@47 | |
971 int v17; // ebx@57 | |
972 int v18; // edx@62 | |
2262 | 973 unsigned int special_chance; // edx@86 |
974 unsigned int v26; // edx@89 | |
559 | 975 unsigned int v27; // eax@89 |
976 int v32; // ecx@91 | |
977 int v33; // eax@91 | |
2334 | 978 // unsigned int v34; // eax@97 |
559 | 979 int v45; // eax@120 |
980 int v46; // edx@120 | |
981 int j; // eax@121 | |
982 int val_list[800]; // [sp+Ch] [bp-C88h]@33 | |
983 int total_chance; // [sp+C8Ch] [bp-8h]@33 | |
984 signed int v56; // [sp+CA0h] [bp+Ch]@55 | |
985 int v57; // [sp+CA0h] [bp+Ch]@62 | |
986 | |
987 if (!out_item) | |
1583 | 988 out_item = (ItemGen *)malloc(sizeof(ItemGen)); |
559 | 989 memset(out_item, 0, sizeof(*out_item)); |
990 | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
991 |
2286 | 992 treasureLevelMinus1 = treasure_level - 1; |
559 | 993 if ( uTreasureType ) //generate known treasure type |
2286 | 994 { |
559 | 995 ITEM_EQUIP_TYPE requested_equip; |
996 PLAYER_SKILL_TYPE requested_skill = PLAYER_SKILL_INVALID; | |
997 switch (uTreasureType) | |
998 { | |
1989 | 999 case 20: requested_equip = EQUIP_SINGLE_HANDED; break; |
559 | 1000 case 21: requested_equip = EQUIP_ARMOUR; break; |
1001 case 22: requested_skill = PLAYER_SKILL_MISC; break; | |
1002 case 23: requested_skill = PLAYER_SKILL_SWORD; break; | |
1003 case 24: requested_skill = PLAYER_SKILL_DAGGER; break; | |
1004 case 25: requested_skill = PLAYER_SKILL_AXE; break; | |
1005 case 26: requested_skill = PLAYER_SKILL_SPEAR; break; | |
1006 case 27: requested_skill = PLAYER_SKILL_BOW; break; | |
1007 case 28: requested_skill = PLAYER_SKILL_MACE; break; | |
1008 case 29: requested_skill = PLAYER_SKILL_CLUB; break; | |
1009 case 30: requested_skill = PLAYER_SKILL_STAFF; break; | |
1010 case 31: requested_skill = PLAYER_SKILL_LEATHER; break; | |
1011 case 32: requested_skill = PLAYER_SKILL_CHAIN; break; | |
1012 case 33: requested_skill = PLAYER_SKILL_PLATE; break; | |
1013 case 34: requested_equip = EQUIP_SHIELD; break; | |
1014 case 35: requested_equip = EQUIP_HELMET; break; | |
1015 case 36: requested_equip = EQUIP_BELT; break; | |
1016 case 37: requested_equip = EQUIP_CLOAK; break; | |
1017 case 38: requested_equip = EQUIP_GAUNTLETS; break; | |
1018 case 39: requested_equip = EQUIP_BOOTS; break; | |
1019 case 40: requested_equip = EQUIP_RING; break; | |
1020 case 41: requested_equip = EQUIP_AMULET; break; | |
1021 case 42: requested_equip = EQUIP_WAND; break; | |
1022 case 43: requested_equip = EQUIP_SPELL_SCROLL; break; | |
1023 case 44: requested_equip = EQUIP_POTION; break; | |
1024 case 45: requested_equip = EQUIP_REAGENT; break; | |
1025 case 46: requested_equip = EQUIP_GEM; break; | |
1026 default: | |
1027 __debugbreak(); // check this condition | |
1028 requested_equip = (ITEM_EQUIP_TYPE)(uTreasureType - 1); | |
1029 break; | |
1030 } | |
1031 memset(val_list, 0, sizeof(val_list)); | |
1032 total_chance = 0; | |
1033 j=0; | |
1034 //a2a = 1; | |
1035 if (requested_skill == PLAYER_SKILL_INVALID) // no skill for this item needed | |
1036 { | |
1037 for (uint i = 1; i < 500; ++i) | |
1038 { | |
1039 if (pItems[i].uEquipType == requested_equip) | |
1040 { | |
1041 val_list[j] = i; | |
1042 ++j; | |
1043 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1044 } | |
1045 } | |
1046 } | |
1047 else //have needed skill | |
1048 { | |
1049 for (uint i = 1; i < 500; ++i) | |
1050 { | |
1051 if (pItems[i].uSkillType == requested_skill) | |
1052 { | |
1053 val_list[j] = i; | |
1054 ++j; | |
1055 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1056 } | |
1057 } | |
1058 } | |
1059 | |
1060 current_chance = 0; | |
1061 if ( total_chance ) | |
2286 | 1062 { |
1063 current_chance = rand() % total_chance + 1; | |
1064 tmp_chance = 0; | |
1065 j=0; | |
1066 while(tmp_chance < current_chance) | |
1067 { | |
1068 out_item->uItemID = val_list[j]; | |
1069 tmp_chance += pItems[val_list[j]].uChanceByTreasureLvl[treasure_level - 1]; | |
1070 ++j; | |
1071 } | |
0 | 1072 } |
2286 | 1073 else |
1074 { | |
1075 out_item->uItemID = 1; | |
1076 } | |
1077 } | |
559 | 1078 else |
2286 | 1079 { |
559 | 1080 //artifact |
2286 | 1081 if ( treasureLevelMinus1 == 5 ) |
1082 { | |
1083 v56 = 0; | |
1084 for(int i=0; i<29; ++i) | |
559 | 1085 v56 += pParty->pIsArtifactFound[i]; |
2286 | 1086 v17 = rand() % 29; |
1087 if ((rand() % 100 < 5) && !pParty->pIsArtifactFound[v17] && v56 < 13) | |
1088 { | |
559 | 1089 pParty->pIsArtifactFound[v17] = 1; |
1090 out_item->uAttributes = 0; | |
1091 out_item->uItemID = v17 + 500; | |
1092 SetSpecialBonus(out_item); | |
1093 return; | |
2286 | 1094 } |
1095 } | |
1096 | |
559 | 1097 v57 = 0; |
2286 | 1098 v18 = rand() % this->uChanceByTreasureLvlSumm[treasure_level - 1] + 1; |
1099 while (v57 < v18) | |
1100 { | |
1101 ++out_item->uItemID; | |
1102 v57 += pItems[out_item->uItemID].uChanceByTreasureLvl[treasureLevelMinus1]; | |
559 | 1103 } |
2286 | 1104 } |
1105 if (out_item->GetItemEquipType() == EQUIP_POTION && out_item->uItemID != ITEM_POTION_BOTTLE ) | |
1106 {// if it potion set potion spec | |
1107 out_item->uEnchantmentType = 0; | |
1108 for (int i=0; i<2; ++i) | |
1109 out_item->uEnchantmentType += rand() % 4 + 1; | |
1110 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; | |
1111 } | |
559 | 1112 |
1113 if ( out_item->uItemID == ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION | |
1114 && !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) | |
1115 out_item->uItemID = ITEM_SPELLBOOK_LIGHT_SUN_BURST; | |
2286 | 1116 if ( pItemsTable->pItems[out_item->uItemID].uItemID_Rep_St ) |
559 | 1117 out_item->uAttributes = 0; |
1118 else | |
1119 out_item->uAttributes = 1; | |
385 | 1120 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1121 if ( out_item->GetItemEquipType() != EQUIP_POTION ) |
559 | 1122 { |
1123 out_item->uSpecEnchantmentType = 0; | |
570 | 1124 out_item->uEnchantmentType = 0; |
559 | 1125 } |
1126 //try get special enhansment | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1127 switch (out_item->GetItemEquipType()) |
559 | 1128 { |
1989 | 1129 case EQUIP_SINGLE_HANDED: |
1130 case EQUIP_TWO_HANDED : | |
559 | 1131 case EQUIP_BOW : |
2286 | 1132 if ( !uBonusChanceWpSpecial[treasureLevelMinus1] ) |
559 | 1133 return; |
2286 | 1134 if ((uint)(rand() % 100)>=uBonusChanceWpSpecial[treasureLevelMinus1]) |
559 | 1135 return; |
1136 break; | |
1137 case EQUIP_ARMOUR : | |
1138 case EQUIP_SHIELD : | |
1139 case EQUIP_HELMET : | |
1140 case EQUIP_BELT : | |
1141 case EQUIP_CLOAK : | |
1142 case EQUIP_GAUNTLETS : | |
1143 case EQUIP_BOOTS : | |
1144 case EQUIP_RING : | |
570 | 1145 |
2286 | 1146 if ( !uBonusChanceStandart[treasureLevelMinus1] ) |
559 | 1147 return; |
1148 special_chance = rand() % 100; | |
2286 | 1149 if ( special_chance < uBonusChanceStandart[treasureLevelMinus1]) |
559 | 1150 { |
2286 | 1151 v26 = rand() %pEnchantmentsSumm[out_item->GetItemEquipType()-3] + 1; |
1152 v27 = 0; | |
1153 while(v27 < v26) | |
1154 { | |
570 | 1155 ++out_item->uEnchantmentType; |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1156 v27+=pEnchantments[out_item->uEnchantmentType].to_item[out_item->GetItemEquipType()-3]; |
2286 | 1157 } |
570 | 1158 |
2286 | 1159 v33 = rand() % (bonus_ranges[treasureLevelMinus1].maxR - bonus_ranges[treasureLevelMinus1].minR + 1); |
1160 out_item->m_enchantmentStrength = v33 + bonus_ranges[treasureLevelMinus1].minR; | |
570 | 1161 v32 = out_item->uEnchantmentType - 1; |
1162 if ( v32 == 21 || v32 == 22 || v32 == 23 ) //Armsmaster skill, Dodge skill, Unarmed skill | |
1599 | 1163 out_item->m_enchantmentStrength = out_item->m_enchantmentStrength/2; |
1164 if ( out_item->m_enchantmentStrength <= 0 ) | |
1165 out_item->m_enchantmentStrength = 1; | |
559 | 1166 return; |
1167 | |
1168 } | |
2286 | 1169 else if ( special_chance >= uBonusChanceStandart[treasureLevelMinus1] + uBonusChanceSpecial[treasureLevelMinus1] ) |
1170 return; | |
559 | 1171 break; |
1172 case EQUIP_WAND: | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1173 out_item->uNumCharges = rand() % 6 + out_item->GetDamageMod() + 1; |
559 | 1174 out_item->uMaxCharges = out_item->uNumCharges; |
2286 | 1175 return; |
559 | 1176 default: |
224 | 1177 return; |
559 | 1178 } |
1179 | |
1180 j=0; | |
1181 int spc_sum=0; | |
1182 int spc; | |
1183 memset(&val_list, 0, 3200); | |
2262 | 1184 for (unsigned int i=0; i<pSpecialEnchantments_count;++i) |
2286 | 1185 { |
1186 int tr_lv= pSpecialEnchantments[i].iTreasureLevel; | |
1187 if ((treasure_level - 1 == 2) && ( tr_lv == 1 || tr_lv == 0 ) || | |
1188 (treasure_level - 1 == 3) && (tr_lv == 2 || tr_lv == 1 || tr_lv == 0) || | |
1189 (treasure_level - 1 == 4) && (tr_lv == 3 || tr_lv == 2 || tr_lv == 1) || | |
1190 (treasure_level - 1 == 5) && (tr_lv == 3) | |
1191 ) | |
1192 { | |
1193 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; | |
1194 spc_sum+=spc; | |
1195 if(spc) | |
559 | 1196 { |
2286 | 1197 val_list[j++]=i; |
559 | 1198 } |
2286 | 1199 } |
1200 } | |
559 | 1201 |
2378 | 1202 v46 = rand()%spc_sum+1;//ñëó÷àéíûå çíà÷åíèÿ îò 1 äî spc_sum |
559 | 1203 j=0; |
2286 | 1204 v45 = 0; |
1205 while (v45<v46) | |
1206 { | |
1207 ++j; | |
1208 out_item->uSpecEnchantmentType=val_list[j]; | |
1209 v45+=pSpecialEnchantments[val_list[j]].to_item_apply[out_item->GetItemEquipType()]; | |
1210 } | |
0 | 1211 } |
1212 | |
1213 //----- (004505CC) -------------------------------------------------------- | |
1214 bool ItemGen::GenerateArtifact() | |
1215 { | |
1216 signed int uNumArtifactsNotFound; // esi@1 | |
463 | 1217 int artifacts_list[32]; |
0 | 1218 |
385 | 1219 memset(artifacts_list, 0,sizeof(artifacts_list)); |
0 | 1220 uNumArtifactsNotFound = 0; |
385 | 1221 |
1222 for (int i=500;i<529;++i) | |
484 | 1223 if ( !pParty->pIsArtifactFound[i-500] ) |
385 | 1224 artifacts_list[uNumArtifactsNotFound++] = i; |
1225 | |
1226 Reset(); | |
0 | 1227 if ( uNumArtifactsNotFound ) |
1228 { | |
385 | 1229 uItemID = artifacts_list[rand() % uNumArtifactsNotFound]; |
1230 pItemsTable->SetSpecialBonus(this); | |
1231 return true; | |
0 | 1232 } |
1233 else | |
385 | 1234 return false; |
1235 | |
0 | 1236 } |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1237 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1238 std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* >ItemGen::regularBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1239 std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* >ItemGen::specialBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1240 std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* >ItemGen::artifactBonusMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1241 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1242 #define NEWBONUSINTOSPECIALLIST(x,y) AddToMap(ItemGen::specialBonusMap, enchId, x, y); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1243 #define NEWBONUSINTOSPECIALLIST2(x,y,z) AddToMap(ItemGen::specialBonusMap, enchId, x, y, z); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1244 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1245 #define NEWBONUSINTOREGULARLIST(x) AddToMap(ItemGen::regularBonusMap, enchId, x); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1246 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1247 #define NEWBONUSINTOARTIFACTLIST(x,y) AddToMap(ItemGen::artifactBonusMap, itemId, x, y); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1248 #define NEWBONUSINTOARTIFACTLIST2(x,y,z) AddToMap(ItemGen::artifactBonusMap, itemId, x, y, z); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1249 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1250 void ItemGen::AddToMap( std::map<int, std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* > &maptoadd, int enchId, CHARACTER_ATTRIBUTE_TYPE attrId, int bonusValue /*= 0*/, unsigned __int16 Player::* skillPtr /*= NULL*/ ) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1251 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1252 auto key = maptoadd.find(enchId); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1253 std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* currMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1254 if (key == maptoadd.end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1255 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1256 currMap = new std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1257 maptoadd[enchId] = currMap; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1258 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1259 else |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1260 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1261 currMap = key->second; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1262 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1263 Assert(currMap->find(attrId) == currMap->end(), "Attribute %d already present for enchantment %d", attrId, enchId); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1264 (*currMap)[attrId] = new CEnchantment(bonusValue, skillPtr); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1265 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1266 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1267 void ItemGen::PopulateSpecialBonusMap() |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1268 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1269 int enchId = 1;// of Protection, +10 to all Resistances |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1270 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1271 NEWBONUSINTOSPECIALLIST( CHARACTER_ATTRIBUTE_RESIST_AIR, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1272 NEWBONUSINTOSPECIALLIST( CHARACTER_ATTRIBUTE_RESIST_WATER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1273 NEWBONUSINTOSPECIALLIST( CHARACTER_ATTRIBUTE_RESIST_EARTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1274 NEWBONUSINTOSPECIALLIST( CHARACTER_ATTRIBUTE_RESIST_MIND, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1275 NEWBONUSINTOSPECIALLIST( CHARACTER_ATTRIBUTE_RESIST_BODY, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1276 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1277 enchId = 2;//of The Gods, +10 to all Seven Statistics |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1278 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_STRENGTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1279 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1280 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1281 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1282 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ACCURACY, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1283 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_SPEED, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1284 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_LUCK, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1285 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1286 enchId = 26;//of Air Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1287 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_AIR,0, &Player::skillAir); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1288 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1289 enchId = 27;//of Body Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1290 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_BODY,0, &Player::skillBody); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1291 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1292 enchId = 28;//of Dark Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1293 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_DARK,0, &Player::skillDark); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1294 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1295 enchId = 29;//of Earth Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1296 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_EARTH,0, &Player::skillEarth); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1297 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1298 enchId = 30;//of Fire Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1299 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_FIRE,0, &Player::skillFire); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1300 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1301 enchId = 31;//of Light Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1302 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_LIGHT,0, &Player::skillLight); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1303 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1304 enchId = 32;//of Mind Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1305 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_MIND,0, &Player::skillMind); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1306 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1307 enchId = 33;//of Spirit Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1308 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_SPIRIT,0, &Player::skillSpirit); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1309 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1310 enchId = 34;//of Water Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1311 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_WATER,0, &Player::skillWater); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1312 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1313 enchId = 42;//of Doom |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1314 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_STRENGTH, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1315 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1316 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1317 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1318 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ACCURACY, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1319 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_SPEED, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1320 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_LUCK, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1321 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_HEALTH, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1322 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_MANA, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1323 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_AC_BONUS, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1324 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1325 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1326 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_WATER, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1327 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_EARTH, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1328 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_MIND, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1329 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_BODY, 1); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1330 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1331 enchId = 43;//of Earth |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1332 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1333 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_AC_BONUS, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1334 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_HEALTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1335 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1336 enchId = 44;//of Life |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1337 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_HEALTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1338 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1339 enchId = 45;//Rogues |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1340 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_SPEED, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1341 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ACCURACY, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1342 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1343 enchId = 46;//of The Dragon |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1344 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_STRENGTH, 25); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1345 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1346 enchId = 47;//of The Eclipse |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1347 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_MANA, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1348 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1349 enchId = 48;//of The Golem |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1350 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1351 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_AC_BONUS, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1352 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1353 enchId = 49;//of The Moon |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1354 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1355 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_LUCK, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1356 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1357 enchId = 50;//of The Phoenix |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1358 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, 30); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1359 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1360 enchId = 51;//of The Sky |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1361 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_MANA, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1362 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_SPEED, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1363 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1364 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1365 enchId = 52;//of The Stars |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1366 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1367 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ACCURACY, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1368 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1369 enchId = 53;//of The Sun |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1370 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_STRENGTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1371 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1372 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1373 enchId = 54;//of The Troll |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1374 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1375 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1376 enchId = 55;//of The Unicorn |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1377 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_LUCK, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1378 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1379 enchId = 56;//Warriors |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1380 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_STRENGTH, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1381 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1382 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1383 enchId = 57;//Wizards |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1384 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1385 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1386 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1387 enchId = 60;//Monks' |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1388 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_DODGE, 3, &Player::skillDodge); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1389 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_UNARMED, 3, &Player::skillUnarmed); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1390 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1391 enchId = 61;//Thieves' |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1392 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 3, &Player::skillStealing); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1393 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_STEALING, 3, &Player::skillDisarmTrap); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1394 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1395 enchId = 62;//of Identifying |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1396 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_ITEM_ID, 3, &Player::skillItemId); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1397 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID, 3, &Player::skillMonsterId); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1398 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1399 enchId = 67;//Assassins' |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1400 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 2, &Player::skillDisarmTrap); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1401 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1402 enchId = 68;//Barbarians' |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1403 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_AC_BONUS, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1404 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1405 enchId = 69;//of the Storm |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1406 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, 20); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1407 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1408 enchId = 70;//of the Ocean |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1409 NEWBONUSINTOSPECIALLIST(CHARACTER_ATTRIBUTE_RESIST_WATER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1410 NEWBONUSINTOSPECIALLIST2(CHARACTER_ATTRIBUTE_SKILL_ALCHEMY, 2, &Player::skillAlchemy); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1411 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1412 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1413 void ItemGen::PopulateRegularBonusMap() |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1414 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1415 int enchId = 1;//of Might |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1416 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_STRENGTH); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1417 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1418 enchId = 2;//of Thought |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1419 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1420 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1421 enchId = 3;//of Charm |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1422 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_WILLPOWER); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1423 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1424 enchId = 4;//of Vigor |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1425 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_ENDURANCE); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1426 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1427 enchId = 5;//of Precision |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1428 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_ACCURACY); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1429 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1430 enchId = 6;//of Speed |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1431 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SPEED); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1432 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1433 enchId = 7;//of Luck |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1434 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_LUCK); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1435 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1436 enchId = 8;//of Health |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1437 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_HEALTH); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1438 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1439 enchId = 9;//of Magic |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1440 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_MANA); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1441 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1442 enchId = 10;//of Defense |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1443 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_AC_BONUS); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1444 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1445 enchId = 11;//of Fire Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1446 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1447 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1448 enchId = 12;//of Air Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1449 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_AIR); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1450 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1451 enchId = 13;//of Water Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1452 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_WATER); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1453 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1454 enchId = 14;//of Earth Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1455 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_EARTH); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1456 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1457 enchId = 15;//of Mind Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1458 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_MIND); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1459 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1460 enchId = 16;//of Body Resistance |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1461 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_RESIST_BODY); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1462 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1463 enchId = 17;//of Alchemy |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1464 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_ALCHEMY); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1465 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1466 enchId = 18;//of Stealing |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1467 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_STEALING); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1468 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1469 enchId = 19;//of Disarming |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1470 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1471 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1472 enchId = 20;//of Items |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1473 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_ITEM_ID); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1474 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1475 enchId = 21;//of Monsters |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1476 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_MONSTER_ID); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1477 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1478 enchId = 22;//of Arms |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1479 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1480 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1481 enchId = 23;//of Dodging |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1482 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_DODGE); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1483 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1484 enchId = 24;//of the Fist |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1485 NEWBONUSINTOREGULARLIST(CHARACTER_ATTRIBUTE_SKILL_UNARMED); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1486 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1487 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1488 void ItemGen::PopulateArtifactBonusMap() |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1489 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1490 int itemId; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1491 itemId = ITEM_ARTIFACT_PUCK; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1492 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1493 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1494 itemId = ITEM_ARTIFACT_IRON_FEATHER; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1495 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1496 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1497 itemId = ITEM_ARTIFACT_WALLACE; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1498 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1499 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1500 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1501 itemId = ITEM_ARTIFACT_CORSAIR; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1502 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_LUCK, 40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1503 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1504 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_STEALING, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1505 |
1648 | 1506 itemId = ITEM_ARTIFACT_GOVERNORS_ARMOR; |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1507 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1508 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1509 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1510 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1511 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ACCURACY, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1512 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1513 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_LUCK, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1514 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1515 itemId = ITEM_ARTIFACT_YORUBA; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1516 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 25); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1517 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1518 itemId = ITEM_ARTIFACT_SPLITTER; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1519 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1520 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1521 itemId = ITEM_ARTEFACT_ULLYSES, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1522 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ACCURACY, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1523 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1524 itemId = ITEM_ARTEFACT_HANDS_OF_THE_MASTER, |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1525 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_DODGE, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1526 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_UNARMED, 10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1527 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1528 itemId = ITEM_ARTIFACT_LEAGUE_BOOTS; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1529 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 40); |
1826 | 1530 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_WATER, 0, &Player::skillWater); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1531 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1532 itemId = ITEM_ARTIFACT_RULERS_RING; |
1826 | 1533 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_MIND, 0, &Player::skillMind); |
1534 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_DARK, 0, &Player::skillDark); | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1535 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1536 itemId = ITEM_RELIC_MASH; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1537 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 150); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1538 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1539 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1540 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1541 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1542 itemId = ITEM_RELIC_ETHRICS_STAFF; |
1826 | 1543 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_DARK, 0, &Player::skillDark); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1544 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_MEDITATION, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1545 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1546 itemId = ITEM_RELIC_HARECS_LEATHER; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1547 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1548 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_STEALING, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1549 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_LUCK, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1550 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1551 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_WATER, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1552 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1553 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_EARTH, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1554 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_MIND, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1555 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_BODY, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1556 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1557 itemId = ITEM_RELIC_OLD_NICK; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1558 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_TRAP_DISARM, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1559 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1560 itemId = ITEM_RELIC_AMUCK; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1561 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 100); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1562 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 100); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1563 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_AC_BONUS, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1564 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1565 itemId = ITEM_RELIC_GLORY_SHIELD; |
1826 | 1566 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_SPIRIT, 0, &Player::skillSpirit); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1567 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_SHIELD, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1568 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_MIND, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1569 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_BODY, -10); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1570 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1571 itemId = ITEM_RELIC_KELEBRIM; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1572 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1573 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_EARTH, -30); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1574 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1575 itemId = ITEM_RELIC_TALEDONS_HELM; |
1826 | 1576 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_LIGHT, 0, &Player::skillLight); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1577 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1578 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1579 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_LUCK, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1580 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1581 itemId = ITEM_RELIC_SCHOLARS_CAP; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1582 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_LEARNING, +15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1583 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, -50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1584 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1585 itemId = ITEM_RELIC_PHYNAXIAN_CROWN; |
1826 | 1586 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_FIRE, 0, &Player::skillFire); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1587 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_WATER, +50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1588 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 30); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1589 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_AC_BONUS, -20); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1590 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1591 itemId = ITEM_RILIC_TITANS_BELT; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1592 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 75); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1593 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1594 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1595 itemId = ITEM_RELIC_TWILIGHT; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1596 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1597 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_LUCK, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1598 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1599 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_WATER, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1600 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1601 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_EARTH, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1602 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_MIND, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1603 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_BODY, -15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1604 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1605 itemId = ITEM_RELIC_ANIA_SELVING; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1606 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ACCURACY, 150); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1607 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_BOW, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1608 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_AC_BONUS, -25); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1609 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1610 itemId = ITEM_RELIC_JUSTICE; |
1826 | 1611 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_MIND, 0, &Player::skillMind); |
1612 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_BODY, 0, &Player::skillBody); | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1613 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, -40); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1614 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1615 itemId = ITEM_RELIC_MEKORIGS_HAMMER; |
1826 | 1616 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_SPIRIT, 0, &Player::skillSpirit); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1617 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 75); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1618 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, -50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1619 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1620 itemId = ITEM_ARTIFACT_HERMES_SANDALS; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1621 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 100); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1622 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ACCURACY, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1623 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_AIR, 50); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1624 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1625 itemId = ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1626 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, -20); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1627 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, -20); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1628 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1629 itemId = ITEM_ARTIFACT_MINDS_EYE; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1630 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_WILLPOWER, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1631 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_INTELLIGENCE, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1632 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1633 itemId = ITEM_ELVEN_CHAINMAIL; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1634 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1635 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ACCURACY, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1636 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1637 itemId = ITEM_FORGE_GAUNTLETS; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1638 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1639 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_ENDURANCE, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1640 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_RESIST_FIRE, 30); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1641 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1642 itemId = ITEM_ARTIFACT_HEROS_BELT; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1643 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_STRENGTH, 15); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1644 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SKILL_ARMSMASTER, 5); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1645 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1646 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1647 void ItemGen::GetItemBonusSpecialEnchantment( Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* additiveBonus, int* halfSkillBonus ) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1648 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1649 auto bonusList = ItemGen::specialBonusMap.find(this->uSpecEnchantmentType); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1650 if (bonusList == ItemGen::specialBonusMap.end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1651 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1652 return; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1653 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1654 std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* currList = bonusList->second; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1655 if (currList->find(attrToGet) != currList->end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1656 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1657 CEnchantment* currBonus = (*currList)[attrToGet]; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1658 if (currBonus->statPtr != NULL) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1659 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1660 if (currBonus->statBonus == 0) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1661 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1662 *halfSkillBonus = owner->*currBonus->statPtr / 2; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1663 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1664 else |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1665 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1666 if (*additiveBonus < currBonus->statBonus) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1667 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1668 *additiveBonus = currBonus->statBonus; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1669 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1670 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1671 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1672 else |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1673 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1674 *additiveBonus += currBonus->statBonus; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1675 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1676 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1677 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1678 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1679 void ItemGen::GetItemBonusArtifact( Player* owner, CHARACTER_ATTRIBUTE_TYPE attrToGet, int* bonusSum ) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1680 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1681 auto bonusList = ItemGen::artifactBonusMap.find(this->uItemID); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1682 if (bonusList == ItemGen::artifactBonusMap.end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1683 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1684 return; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1685 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1686 std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* currList = bonusList->second; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1687 if (currList->find(attrToGet) != currList->end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1688 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1689 CEnchantment* currBonus = (*currList)[attrToGet]; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1690 if (currBonus->statPtr != NULL) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1691 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1692 *bonusSum = owner->*currBonus->statPtr / 2; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1693 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1694 else |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1695 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1696 *bonusSum += currBonus->statBonus; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1697 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1698 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1699 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1700 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1701 bool ItemGen::IsRegularEnchanmentForAttribute( CHARACTER_ATTRIBUTE_TYPE attrToGet ) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1702 { |
1685
2a309997c42f
Player::StealFromShop started cleanup, fixing a few errors caused by not commiting everything
Grumpy7
parents:
1682
diff
changeset
|
1703 auto bonusList = ItemGen::specialBonusMap.find(this->uEnchantmentType); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1704 if (bonusList == ItemGen::specialBonusMap.end()) |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1705 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1706 return false; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1707 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1708 std::map<CHARACTER_ATTRIBUTE_TYPE, CEnchantment*>* currList = bonusList->second; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1709 return (currList->find(attrToGet) != currList->end()); |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1710 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1711 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1712 ITEM_EQUIP_TYPE ItemGen::GetItemEquipType() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1713 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1714 return pItemsTable->pItems[this->uItemID].uEquipType; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1715 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1716 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1717 unsigned char ItemGen::GetPlayerSkillType() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1718 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1719 return pItemsTable->pItems[this->uItemID].uSkillType; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1720 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1721 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1722 char* ItemGen::GetIconName() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1723 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1724 return pItemsTable->pItems[this->uItemID].pIconName; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1725 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1726 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1727 unsigned __int8 ItemGen::GetDamageDice() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1728 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1729 return pItemsTable->pItems[this->uItemID].uDamageDice; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1730 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1731 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1732 unsigned __int8 ItemGen::GetDamageRoll() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1733 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1734 return pItemsTable->pItems[this->uItemID].uDamageRoll; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1735 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1736 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1737 unsigned __int8 ItemGen::GetDamageMod() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1738 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1739 return pItemsTable->pItems[this->uItemID].uDamageMod; |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1740 } |
461 | 1741 //----- (004B8E3D) -------------------------------------------------------- |
463 | 1742 void GenerateStandartShopItems() |
1920 | 1743 { |
1744 signed int item_count; | |
1745 signed int shop_index; | |
1746 int treasure_lvl; | |
1747 int item_class; | |
1748 int mdf; | |
463 | 1749 |
1920 | 1750 shop_index = (signed int)window_SpeakInHouse->ptr_1C; |
1751 if ( uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType] ) | |
1752 { | |
1753 for (item_count = 0; item_count < uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType]; ++item_count ) | |
1754 { | |
1755 if (shop_index <= 14) //weapon shop | |
1756 { | |
1757 treasure_lvl = shopWeap_variation_ord[shop_index].treasure_level; | |
1758 item_class = shopWeap_variation_ord[shop_index].item_class[rand() % 4]; | |
1759 } | |
1760 else if (shop_index <= 28) //armor shop | |
1761 { | |
1762 mdf = 0; | |
1763 if (item_count > 3) | |
1764 ++mdf;// rechek offsets | |
1765 treasure_lvl = shopArmr_variation_ord[2*(shop_index - 15) + mdf].treasure_level; | |
1766 item_class = shopArmr_variation_ord[2*(shop_index - 15) + mdf].item_class[rand() % 4]; | |
1767 } | |
1768 else if (shop_index <= 41) //magic shop | |
1769 { | |
1770 treasure_lvl = shopMagic_treasure_lvl[shop_index - 28]; | |
1771 item_class = 22; //misc | |
1772 } | |
1773 else if (shop_index <= 53) //alchemist shop | |
1774 { | |
1775 if (item_count < 6) | |
1776 { | |
1777 pParty->StandartItemsInShops[shop_index][item_count].Reset(); | |
1778 pParty->StandartItemsInShops[shop_index][item_count].uItemID = 220; //potion bottle | |
1779 continue; | |
1780 } | |
1781 else | |
1782 { | |
1783 treasure_lvl = shopAlch_treasure_lvl[shop_index - 41]; | |
1784 item_class = 45; //reagent | |
1785 } | |
1786 } | |
1787 pItemsTable->GenerateItem(treasure_lvl, item_class, &pParty->StandartItemsInShops[shop_index][item_count]); | |
1788 pParty->StandartItemsInShops[shop_index][item_count].SetIdentified(); //identified | |
1789 } | |
1790 } | |
1791 pParty->InTheShopFlags[shop_index] = 0; | |
1792 } | |
463 | 1793 |
1794 //----- (004B8F94) -------------------------------------------------------- | |
1795 void GenerateSpecialShopItems() | |
1920 | 1796 { |
1797 signed int item_count; | |
1798 signed int shop_index; | |
1799 int treasure_lvl; | |
1800 int item_class; | |
1801 int mdf; | |
463 | 1802 |
1920 | 1803 shop_index = (signed int)window_SpeakInHouse->ptr_1C; |
1804 if ( uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType] ) | |
1805 { | |
1806 for ( item_count = 0; item_count < uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType]; ++item_count ) | |
1807 { | |
1808 if (shop_index <= 14) //weapon shop | |
1809 { | |
1810 treasure_lvl = shopWeap_variation_spc[shop_index].treasure_level; | |
1811 item_class = shopWeap_variation_spc[shop_index].item_class[rand() % 4]; | |
1812 } | |
1813 else if (shop_index <= 28) //armor shop | |
1814 { | |
1815 mdf = 0; | |
1816 if (item_count > 3) | |
1817 ++mdf; | |
1818 treasure_lvl = shopArmr_variation_spc[2*(shop_index - 15) + mdf].treasure_level; | |
1819 item_class = shopArmr_variation_spc[2*(shop_index - 15) + mdf].item_class[rand() % 4]; | |
1820 } | |
1821 else if (shop_index <= 41) //magic shop | |
1822 { | |
1823 treasure_lvl = shopMagicSpc_treasure_lvl[shop_index - 28]; | |
1824 item_class = 22; //misc | |
1825 } | |
1826 else if (shop_index <= 53) //alchemist shop | |
1827 { | |
1828 if (item_count < 6) | |
1829 { | |
1830 pParty->SpecialItemsInShops[shop_index][item_count].Reset(); | |
1831 pParty->SpecialItemsInShops[shop_index][item_count].uItemID = rand() % 32 + 740; //mscrool | |
1832 continue; | |
1833 } | |
1834 else | |
1835 { | |
1836 treasure_lvl = shopAlchSpc_treasure_lvl[shop_index - 41]; | |
1837 item_class = 44; //potion | |
1838 } | |
1839 } | |
1840 pItemsTable->GenerateItem(treasure_lvl, item_class, &pParty->SpecialItemsInShops[shop_index][item_count]); | |
1841 pParty->SpecialItemsInShops[shop_index][item_count].SetIdentified(); //identified | |
1842 } | |
1843 } | |
1844 pParty->InTheShopFlags[shop_index] = 0; | |
1845 } | |
461 | 1846 |
1847 | |
463 | 1848 //----- (00450218) -------------------------------------------------------- |
598 | 1849 void GenerateItemsInChest() |
526 | 1850 { |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1851 unsigned int mapType; // eax@1 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1852 MapInfo *currMapInfo; // esi@1 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1853 ItemGen *currItem; // ebx@2 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1854 int additionaItemCount; // ebp@4 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1855 int treasureLevelBot; // edi@4 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1856 int treasureLevelTop; // esi@4 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1857 signed int treasureLevelRange; // esi@4 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1858 int resultTreasureLevel; // edx@4 |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1859 int goldAmount; // esi@8 |
598 | 1860 int v11; // ebp@25 |
1861 int v12; // esi@25 | |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1862 signed int whatToGenerateProb; // [sp+10h] [bp-18h]@1 |
461 | 1863 |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1864 mapType = pMapStats->GetMapInfo(pCurrentMapName); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1865 currMapInfo = &pMapStats->pInfos[mapType]; |
598 | 1866 for(int i=1; i<20;++i) |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1867 { |
598 | 1868 for(int j=0; j<140;++j) |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1869 { |
526 | 1870 |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1871 currItem = &pChests[i].igChestItems[j]; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1872 if ( currItem->uItemID < 0 ) |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1873 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1874 additionaItemCount = rand() % 5; //additional items in chect |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1875 treasureLevelBot = byte_4E8168[abs(currItem->uItemID)-1][2*currMapInfo->Treasure_prob]; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1876 treasureLevelTop = byte_4E8168[abs(currItem->uItemID)-1][2*currMapInfo->Treasure_prob+1]; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1877 treasureLevelRange = treasureLevelTop - treasureLevelBot + 1; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1878 resultTreasureLevel = treasureLevelBot + rand() % treasureLevelRange; //treasure level |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1879 if (resultTreasureLevel<7) |
598 | 1880 { |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1881 v11 = 0; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1882 do |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1883 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1884 whatToGenerateProb = rand() % 100; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1885 if (whatToGenerateProb<20) |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1886 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1887 currItem->Reset(); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1888 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1889 else if (whatToGenerateProb<60) //generate gold |
598 | 1890 { |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1891 goldAmount=0; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1892 currItem->Reset(); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1893 switch (resultTreasureLevel) |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1894 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1895 case 1: //small gold |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1896 goldAmount = rand() % 51 + 50; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1897 currItem->uItemID = 197; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1898 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1899 case 2://small gold |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1900 goldAmount = rand() % 101 + 100; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1901 currItem->uItemID = 197; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1902 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1903 case 3: //medium |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1904 goldAmount = rand() % 301 + 200; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1905 currItem->uItemID = 198; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1906 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1907 case 4: //medium |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1908 goldAmount = rand() % 501 + 500; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1909 currItem->uItemID = 198; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1910 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1911 case 5: //big |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1912 goldAmount = rand() % 1001 + 1000; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1913 currItem->uItemID = 199; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1914 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1915 case 6: //big |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1916 goldAmount = rand() % 3001 + 2000; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1917 currItem->uItemID = 199; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1918 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1919 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1920 currItem->SetIdentified(); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1921 currItem->uSpecEnchantmentType = goldAmount; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1922 } |
598 | 1923 else |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1924 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1925 pItemsTable->GenerateItem(resultTreasureLevel, 0, currItem); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1926 } |
598 | 1927 v12 = 0; |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1928 while ( !(pChests[i].igChestItems[v12].uItemID==0) &&(v12<140)) |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1929 { |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1930 ++v12; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1931 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1932 if (v12 >= 140) |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1933 break; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1934 currItem=&pChests[i].igChestItems[v12]; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1935 v11++; |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1936 } while (v11 < additionaItemCount + 1); // + 1 because it's the item at pChests[i].igChestItems[j] and the additional ones |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1937 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1938 else |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1939 currItem->GenerateArtifact(); |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1940 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1941 } |
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1942 } |
598 | 1943 |
2287
4e3236a4ea63
GenerateItemsInChest cleaned up a bit, unified the two switches
Grumpy7
parents:
2286
diff
changeset
|
1944 } |
461 | 1945 |
1946 | |
1947 | |
1948 | |
463 | 1949 // 4505CC: using guessed type int var_A0[32]; |
1950 //----- (004B3703) -------------------------------------------------------- | |
473 | 1951 void FillAviableSkillsToTeach( int _this ) |
1952 { | |
1838 | 1953 const char *v30; // ecx@65 |
473 | 1954 unsigned int v29; // edx@56 |
1955 int v15; // ecx@19 | |
1956 int v33; // [sp-4h] [bp-2Ch]@23 | |
1957 int v34; // [sp-4h] [bp-2Ch]@43 | |
1958 int v21; // ecx@34 | |
1959 int v35[5]; // [sp+Ch] [bp-1Ch]@8 | |
1960 int v37=0; // [sp+24h] [bp-4h]@1* | |
1961 int i=0; | |
1962 | |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
1963 dword_F8B1DC_currentShopOption = 0; |
473 | 1964 |
1965 switch (_this) | |
463 | 1966 { |
473 | 1967 case 1: //shop weapon |
1968 for (int i=0; i<2; ++i) | |
1969 { | |
1970 for (int j=0; j<4; ++j) | |
1971 { | |
1972 if ( i ) | |
1973 v21 = shopWeap_variation_spc[(unsigned int)window_SpeakInHouse->ptr_1C].item_class[j]; | |
1974 else | |
1975 v21 = shopWeap_variation_ord[(unsigned int)window_SpeakInHouse->ptr_1C].item_class[j]; | |
463 | 1976 |
473 | 1977 switch (v21) |
463 | 1978 { |
473 | 1979 case 23: v34 = 37; break; |
1980 case 24: v34 = 38; break; | |
1981 case 25: v34 = 39; break; | |
1982 case 26: v34 = 40; break; | |
1983 case 27: v34 = 41; break; | |
1984 case 28: v34 = 42; break; | |
1985 case 30: v34 = 36; break; | |
1986 default: | |
1987 continue; | |
1988 } | |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
1989 v37 = sub_4BE571_AddItemToSet(v34, v35, v37, 5); |
463 | 1990 } |
1991 } | |
473 | 1992 break; |
1993 case 2: //shop armor | |
1994 | |
1995 for (int i=0; i<2; ++i) | |
463 | 1996 { |
473 | 1997 for (int j=0; j<2; ++j) |
463 | 1998 { |
473 | 1999 for (int k=0; k<4; ++k) |
463 | 2000 { |
473 | 2001 if ( i ) |
2002 v15 = shopArmr_variation_spc[(unsigned int)window_SpeakInHouse->ptr_1C-15+j].item_class[k]; | |
2003 else | |
2004 v15 = shopArmr_variation_ord[(unsigned int)window_SpeakInHouse->ptr_1C-15+j].item_class[k]; | |
2005 switch (v15) | |
463 | 2006 { |
473 | 2007 case 31: v33 = 45; break; |
2008 case 32: v33 = 46; break; | |
2009 case 33: v33 = 47; break; | |
2010 case 34: v33 = 44; break; | |
2011 default: | |
2012 continue; | |
463 | 2013 } |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2014 v37 = sub_4BE571_AddItemToSet(v33, v35, v37, 5); |
463 | 2015 } |
2016 } | |
2017 } | |
473 | 2018 break; |
2019 case 3: //shop magic | |
2020 v37 = 2; | |
2021 v35[0] = 57; | |
2022 v35[1] = 59; | |
2023 break; | |
2024 case 4: //shop alchemist | |
2025 v37 = 2; | |
2026 v35[0] = 71; | |
2027 v35[1] = 68; | |
2028 break; | |
2029 case 21: //tavern | |
2030 v37 = 3; | |
2031 v35[0] = 70; | |
2032 v35[1] = 65; | |
2033 v35[2] = 62; | |
2034 break; | |
2035 case 23: //temple | |
2036 v37 = 3; | |
2037 v35[0] = 67; | |
2038 v35[1] = 66; | |
2039 v35[2] = 58; | |
2040 break; | |
2041 case 30: ///trainig | |
2042 v37 = 2; | |
2043 v35[0] = 69; | |
2044 v35[1] = 60; | |
2045 break; | |
2046 } | |
2047 for(i=0;i<v37;++i) | |
2048 { | |
2049 v29=v35[i]; | |
2050 switch(v29) | |
463 | 2051 { |
473 | 2052 case 40 :v30 = pSkillNames[4]; break; |
2053 case 5 : v30 = pSkillNames[23]; break; | |
2054 case 36 :v30 = pSkillNames[0]; break; | |
2055 case 37 :v30 = pSkillNames[1]; break; | |
2056 case 38 :v30 = pSkillNames[2]; break; | |
2057 case 39 :v30 = pSkillNames[3]; break; | |
2058 case 41 :v30 = pSkillNames[5]; break; | |
2059 case 42 :v30 = pSkillNames[6]; break; | |
2060 case 44 :v30 = pSkillNames[8]; break; | |
2061 case 45 :v30 = pSkillNames[9]; break; | |
2062 case 46 :v30 = pSkillNames[10]; break; | |
2063 case 47 :v30 = pSkillNames[11]; break; | |
2064 case 66 :v30 = pSkillNames[30]; break; | |
2065 case 57 :v30 = pSkillNames[21]; break; | |
2066 case 58 :v30 = pSkillNames[22]; break; | |
2067 case 60 :v30 = pSkillNames[24]; break; | |
2068 case 62 :v30 = pSkillNames[26]; break; | |
2069 case 65 :v30 = pSkillNames[29]; break; | |
2070 case 67:v30 = pSkillNames[31]; break; | |
2071 case 68:v30 = pSkillNames[32]; break; | |
2072 case 69:v30 = pSkillNames[33]; break; | |
2073 case 70:v30 = pSkillNames[34]; break; | |
2074 case 71:v30 = pSkillNames[35]; break; | |
2075 default: | |
463 | 2076 v30 = pGlobalTXT_LocalizationStrings[127]; //"No Text!" |
2077 } | |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2078 pShopOptions[dword_F8B1DC_currentShopOption] = const_cast<char *>(v30); |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2079 ++dword_F8B1DC_currentShopOption; |
473 | 2080 CreateButtonInColumn(i+1, v29); |
463 | 2081 } |
972 | 2082 pDialogueWindow->_41D08F_set_keyboard_control_group(i, 1, 0, 2); |
473 | 2083 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; |
2084 } | |
475 | 2085 |
2086 //----- (004BE571) -------------------------------------------------------- | |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2087 int sub_4BE571_AddItemToSet(int valueToAdd, int *outPutSet, int elemsAlreadyPresent, int elemsNeeded) |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2088 { |
475 | 2089 int i; // esi@3 |
2090 | |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2091 if ( elemsAlreadyPresent < elemsNeeded ) |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2092 { |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2093 for ( i = 0; i < elemsAlreadyPresent; ++i ) |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2094 { |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2095 if ( valueToAdd == outPutSet[i] ) |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2096 return elemsAlreadyPresent; |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2097 } |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2098 outPutSet[elemsAlreadyPresent] = valueToAdd; |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2099 return elemsAlreadyPresent + 1; |
475 | 2100 } |
2285
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2101 return elemsNeeded; |
4fd03103be62
sub_4BE571 changed to sub_4BE571_AddItemToSet + cleaned up, dword_F8B1DC changed to dword_F8B1DC_currentShopOption + moved out of mm7_data
Grumpy7
parents:
2284
diff
changeset
|
2102 } |
1297 | 2103 //----- (0043C91D) -------------------------------------------------------- |
2288 | 2104 int GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder) |
1297 | 2105 { |
2106 int result; // eax@2 | |
475 | 2107 |
1297 | 2108 result = 0; //BUG fn is void |
2288 | 2109 if ( item_id > 500 ) |
1297 | 2110 { |
2111 switch ( item_id ) | |
2112 { | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2113 case ITEM_RELIC_HARECS_LEATHER: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2114 if (byte_5111F6_OwnedArtifacts[2] != 0) |
2288 | 2115 item_id = 234; |
2116 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2117 case ITEM_ARTIFACT_YORUBA: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2118 if (byte_5111F6_OwnedArtifacts[1] != 0) |
2288 | 2119 item_id = 236; |
2120 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2121 case ITEM_ARTIFACT_GOVERNORS_ARMOR: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2122 if (byte_5111F6_OwnedArtifacts[0] != 0) |
2288 | 2123 item_id = 235; |
2124 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2125 case ITEM_ELVEN_CHAINMAIL: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2126 if (byte_5111F6_OwnedArtifacts[16] != 0) |
2288 | 2127 item_id = 73; |
2128 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2129 case ITEM_ARTIFACT_LEAGUE_BOOTS: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2130 if (byte_5111F6_OwnedArtifacts[3] != 0) |
2288 | 2131 item_id = 312; |
2132 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2133 case ITEM_RELIC_TALEDONS_HELM: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2134 if (byte_5111F6_OwnedArtifacts[4] != 0) |
2288 | 2135 item_id = 239; |
2136 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2137 case ITEM_RELIC_SCHOLARS_CAP: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2138 if (byte_5111F6_OwnedArtifacts[5] != 0) |
2288 | 2139 item_id = 240; |
2140 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2141 case ITEM_RELIC_PHYNAXIAN_CROWN: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2142 if (byte_5111F6_OwnedArtifacts[6] != 0) |
2288 | 2143 item_id = 241; |
2144 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2145 case ITEM_ARTIFACT_MINDS_EYE: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2146 if (byte_5111F6_OwnedArtifacts[7] != 0) |
2288 | 2147 item_id = 93; |
2148 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2149 case ITEM_RARE_SHADOWS_MASK: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2150 if (byte_5111F6_OwnedArtifacts[8] != 0) |
2288 | 2151 item_id = 344; |
2152 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2153 case ITEM_RILIC_TITANS_BELT: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2154 if (byte_5111F6_OwnedArtifacts[9] != 0) |
2288 | 2155 item_id = 324; |
2156 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2157 case ITEM_ARTIFACT_HEROS_BELT: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2158 if (byte_5111F6_OwnedArtifacts[10] != 0) |
2288 | 2159 item_id = 104; |
2160 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2161 case ITEM_RELIC_TWILIGHT: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2162 if (byte_5111F6_OwnedArtifacts[11] != 0) |
2288 | 2163 item_id = 325; |
2164 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2165 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2166 if (byte_5111F6_OwnedArtifacts[12] != 0) |
2288 | 2167 item_id = 330; |
2168 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2169 case ITEM_RARE_SUN_CLOAK: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2170 if (byte_5111F6_OwnedArtifacts[13] != 0) |
2288 | 2171 item_id = 347; |
2172 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2173 case ITEM_RARE_MOON_CLOAK: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2174 if (byte_5111F6_OwnedArtifacts[14] != 0) |
2288 | 2175 item_id = 348; |
2176 break; | |
2289
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2177 case ITEM_RARE_VAMPIRES_CAPE: |
60293358b4b3
byte_5111F6 to byte_5111F6_OwnedArtifacts, changed magic numbers to enums in GetItemTextureFilename
Grumpy7
parents:
2288
diff
changeset
|
2178 if (byte_5111F6_OwnedArtifacts[15] != 0) |
2288 | 2179 item_id = 350; |
2180 break; | |
2181 default: | |
2182 return 0; | |
1297 | 2183 } |
2288 | 2184 } |
2185 | |
2186 switch (pItemsTable->pItems[item_id].uEquipType) | |
2187 { | |
2188 case EQUIP_ARMOUR: | |
1297 | 2189 if ( !shoulder ) |
2288 | 2190 return sprintf(pOut, "item%3.3dv%d", item_id, index); |
2191 else if ( shoulder == 1 ) | |
2192 return sprintf(pOut, "item%3.3dv%da1", item_id, index); | |
2193 else if ( shoulder == 2 ) | |
2194 return sprintf(pOut, "item%3.3dv%da2", item_id, index); | |
2195 break; | |
2196 case EQUIP_CLOAK: | |
2197 if ( !shoulder ) | |
2198 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
2199 else | |
2200 return sprintf(pOut, "item%3.3dv%da1", item_id, index); | |
2201 default: | |
2202 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
1297 | 2203 } |
2288 | 2204 |
1297 | 2205 result = item_id - 504; |
2206 return result; | |
2207 } | |
475 | 2208 |
2250 | 2209 |
2210 //----- (004BDAAF) -------------------------------------------------------- | |
2211 bool ItemGen::MerchandiseTest(int _2da_idx) | |
2212 { | |
2213 bool test; | |
2214 | |
2215 if ( (p2DEvents[_2da_idx - 1].uType != 4 || (signed int)this->uItemID < 740 || (signed int)this->uItemID > 771) | |
2216 && ((signed int)this->uItemID >= 600 || (signed int)this->uItemID >= 529 && (signed int)this->uItemID <= 599) || this->IsStolen()) | |
2217 return false; | |
2218 switch( p2DEvents[_2da_idx - 1].uType ) | |
2219 { | |
2220 case BuildingType_WeaponShop: | |
2221 { | |
2222 test = this->GetItemEquipType() <= EQUIP_BOW; | |
2223 break; | |
2224 } | |
2225 case BuildingType_ArmorShop: | |
2226 { | |
2227 test = this->GetItemEquipType() >= EQUIP_ARMOUR && this->GetItemEquipType() <= EQUIP_BOOTS; | |
2228 break; | |
2229 } | |
2230 case BuildingType_MagicShop: | |
2231 { | |
2232 test = this->GetPlayerSkillType() == PLAYER_SKILL_MISC || this->GetItemEquipType() == EQIUP_ANY; | |
2233 break; | |
2234 } | |
2235 case BuildingType_AlchemistShop: | |
2236 { | |
2237 test = this->GetItemEquipType() == EQUIP_REAGENT || this->GetItemEquipType() == EQUIP_POTION | |
2238 || (this->GetItemEquipType() > EQUIP_POTION && !(this->GetItemEquipType() != EQUIP_MESSAGE_SCROLL | |
2239 || (signed int)this->uItemID < 740) && this->uItemID != 771); | |
2240 break; | |
2241 } | |
2242 default: | |
2243 { | |
2244 test = false; | |
2245 break; | |
2246 } | |
2247 } | |
2248 return test; | |
2249 } |