Mercurial > mm7
annotate Items.cpp @ 1743:26c1a3d50635
Merge
author | Ritor1 |
---|---|
date | Thu, 26 Sep 2013 23:42:25 +0600 |
parents | 8251e59fd7c1 |
children | bdac32c645c5 |
rev | line source |
---|---|
1165
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1104
diff
changeset
|
1 #ifdef _MSC_VER |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1104
diff
changeset
|
2 #define _CRT_SECURE_NO_WARNINGS |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1104
diff
changeset
|
3 #endif |
29a8defbad9e
temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents:
1104
diff
changeset
|
4 |
0 | 5 #include <stdlib.h> |
6 | |
7 #include "Items.h" | |
8 #include "MapInfo.h" | |
461 | 9 #include "GUIWindow.h" |
10 #include "Events2D.h" | |
11 #include "Chest.h" | |
0 | 12 #include "LOD.h" |
13 #include "Monsters.h" | |
14 #include "Party.h" | |
15 #include "FactionTable.h" | |
16 #include "StorylineTextTable.h" | |
189 | 17 #include "texts.h" |
0 | 18 #include "mm7_data.h" |
19 | |
20 | |
21 | |
463 | 22 struct ITEM_VARIATION |
23 { | |
24 unsigned __int16 treasure_level; | |
25 unsigned __int16 item_class[4]; | |
26 }; | |
27 | |
28 | |
1202 | 29 std::array<const char, 5> uItemsAmountPerShopType={ 0, 6, 8, 12, 12}; |
463 | 30 |
526 | 31 const ITEM_VARIATION shopWeap_variation_ord[15] ={ |
463 | 32 { 0, { 0, 0, 0, 0 }}, |
33 { 1, { 23, 27, 20, 20 }}, | |
34 { 1, { 23, 24, 28, 20 }}, | |
35 { 2, { 23, 24, 25, 20 }}, | |
36 { 2, { 27, 27, 26, 26 }}, | |
37 { 4, { 24, 30, 25, 27 }}, | |
38 { 4, { 24, 30, 25, 27 }}, | |
39 { 3, { 30, 24, 20, 20 }}, | |
40 { 2, { 20, 20, 20, 20 }}, | |
41 { 3, { 27, 27, 26, 26 }}, | |
42 { 3, { 28, 28, 25, 25 }}, | |
43 { 2, { 23, 23, 24, 24 }}, | |
44 { 3, { 23, 23, 26, 26 }}, | |
45 { 2, { 30, 26, 26, 26 }}, | |
46 { 2, { 28, 25, 28, 29 }}}; | |
47 | |
526 | 48 const ITEM_VARIATION shopArmr_variation_ord[28] ={ |
463 | 49 { 1, { 35, 35, 38, 38 }}, |
50 { 1, { 31, 31, 31, 34 }}, | |
51 { 1, { 35, 35, 38, 38 }}, | |
52 { 1, { 31, 31, 32, 34 }}, | |
53 { 2, { 35, 35, 38, 38 }}, | |
54 { 2, { 31, 32, 32, 33 }}, | |
55 { 2, { 35, 35, 38, 38 }}, | |
56 { 2, { 31, 31, 32, 32 }}, | |
57 { 4, { 35, 35, 38, 38 }}, | |
58 { 4, { 31, 32, 33, 34 }}, | |
59 { 4, { 35, 35, 38, 38 }}, | |
60 { 4, { 31, 32, 33, 34 }}, | |
61 { 3, { 35, 35, 38, 38 }}, | |
62 { 3, { 31, 31, 31, 31 }}, | |
63 { 2, { 35, 35, 38, 38 }}, | |
64 { 2, { 31, 32, 34, 34 }}, | |
65 { 3, { 35, 35, 38, 38 }}, | |
66 { 3, { 31, 31, 32, 32 }}, | |
67 { 3, { 35, 35, 38, 38 }}, | |
68 { 3, { 32, 32, 32, 33 }}, | |
69 { 3, { 35, 35, 38, 38 }}, | |
70 { 3, { 31, 31, 31, 32 }}, | |
71 { 3, { 35, 35, 38, 38 }}, | |
72 { 3, { 33, 31, 32, 34 }}, | |
73 { 3, { 35, 35, 38, 38 }}, | |
74 { 3, { 33, 31, 32, 34 }}, | |
75 { 4, { 35, 35, 38, 38 }}, | |
76 { 4, { 33, 31, 32, 34 }}}; | |
77 | |
78 | |
79 | |
526 | 80 const unsigned __int16 shopMagic_treasure_lvl[14]= {0, 1, 1, 2, 2, 4, 4, 3, 2, 2, 2, 2, 2, 2}; |
81 const unsigned __int16 shopAlch_treasure_lvl[13] = {0, 1, 1, 2, 2, 3, 3, 4, 4, 2, 2, 2, 2}; | |
463 | 82 |
526 | 83 const ITEM_VARIATION shopWeap_variation_spc[15]={ |
463 | 84 { 0, { 0, 0, 0, 0 }}, |
470 | 85 { 2, { 25, 30, 20, 20}}, |
86 { 2, { 23, 24, 28, 20}}, | |
87 { 3, { 23, 24, 25, 20}}, | |
88 { 3, { 27, 27, 26, 26}}, | |
89 { 5, { 23, 26, 28, 27}}, | |
90 { 5, { 23, 26, 28, 27}}, | |
91 { 4, { 30, 24, 20, 20}}, | |
92 { 3, { 20, 20, 20, 20}}, | |
93 { 4, { 27, 27, 26, 26}}, | |
94 { 4, { 28, 28, 25, 25}}, | |
95 { 4, { 23, 23, 24, 24}}, | |
96 { 4, { 24, 24, 27, 20}}, | |
97 { 4, { 30, 26, 26, 26}}, | |
98 { 4, { 28, 25, 28, 29}}}; | |
463 | 99 |
526 | 100 const ITEM_VARIATION shopArmr_variation_spc[28]={ |
470 | 101 { 2, { 35, 35, 38, 38 }}, |
102 { 2, { 31, 31, 31, 34 }}, | |
103 { 2, { 35, 35, 38, 38 }}, | |
104 { 2, { 31, 31, 32, 34 }}, | |
105 { 3, { 35, 35, 38, 38 }}, | |
106 { 3, { 31, 32, 32, 33 }}, | |
107 { 3, { 35, 35, 38, 38 }}, | |
108 { 3, { 31, 31, 32, 32 }}, | |
109 { 5, { 35, 35, 38, 38 }}, | |
110 { 5, { 31, 32, 33, 34 }}, | |
111 { 5, { 35, 35, 38, 38 }}, | |
112 { 5, { 31, 32, 33, 34 }}, | |
113 { 4, { 35, 35, 38, 38 }}, | |
114 { 4, { 31, 31, 31, 31 }}, | |
115 { 3, { 35, 35, 38, 38 }}, | |
116 { 3, { 31, 32, 34, 34 }}, | |
117 { 4, { 35, 35, 38, 38 }}, | |
118 { 4, { 31, 31, 32, 33 }}, | |
119 { 4, { 35, 35, 38, 38 }}, | |
120 { 4, { 32, 32, 33, 34 }}, | |
121 { 4, { 35, 35, 38, 38 }}, | |
122 { 4, { 31, 31, 31, 32 }}, | |
123 { 4, { 35, 35, 38, 38 }}, | |
124 { 4, { 32, 32, 32, 32 }}, | |
125 { 4, { 35, 35, 38, 38 }}, | |
126 { 4, { 34, 34, 34, 34 }}, | |
127 { 5, { 35, 35, 38, 38 }}, | |
128 { 5, { 33, 33, 33, 33 }} | |
129 }; | |
463 | 130 |
526 | 131 const unsigned __int16 shopMagicSpc_treasure_lvl[14] = {0, 2, 2, 3, 3, 5, 5, 4, 3, 3, 3, 3, 3, 3}; |
132 const unsigned __int16 shopAlchSpc_treasure_lvl[13] = {0, 2, 2, 3, 3, 4, 4, 5, 5, 3, 2, 2, 2}; | |
133 | |
134 | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
135 std::array< std::array<char, 14>, 7> byte_4E8168={{ //byte_4E8178 |
526 | 136 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, |
137 { 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, | |
138 { 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3}, | |
139 { 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4}, | |
140 { 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5}, | |
141 { 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
|
142 { 2, 2, 2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}}}; |
0 | 143 |
475 | 144 int sub_4BE571(int a1, int *a2, int a3, int a4); |
0 | 145 |
1682 | 146 ItemGen *ptr_50C9A4_ItemToEnchant; |
0 | 147 |
315 | 148 struct ItemsTable *pItemsTable; // 005D29E0 |
0 | 149 |
150 | |
151 | |
152 | |
153 | |
154 //----- (00439DF3) -------------------------------------------------------- | |
385 | 155 int ItemGen::_439DF3_get_additional_damage(int *damage_type, bool *draintargetHP) |
156 { | |
157 *damage_type = 0; | |
158 if ( !uItemID ) | |
159 return 0; | |
160 UpdateTempBonus(pParty->uTimePlayed); | |
161 if (uItemID == 501 ) //Iron Feather -sword | |
162 { | |
163 *damage_type = 1; | |
164 return rand() % 10 + 6; | |
165 } | |
166 if (uItemID == 507 ) //Ghoulsbane -axe | |
167 { | |
168 *damage_type = 0; | |
169 return rand() % 16 + 3; | |
170 } | |
171 if ( uItemID == 510 ) //Ullyses -bow | |
172 { | |
173 *damage_type = 2; | |
174 return rand() % 4 + 9; | |
175 } | |
176 if ( uItemID == 517 ) //Old Nick -dagger | |
177 { | |
178 *damage_type = 8; | |
179 return 8; | |
180 } | |
0 | 181 |
385 | 182 switch (uSpecEnchantmentType) |
183 { | |
184 case 4: //Adds 3-4 points of Cold damage. | |
185 *damage_type = 2; | |
186 return rand() % 2 + 3; | |
187 break; | |
188 case 5: //Adds 6-8 points of Cold damage. | |
189 *damage_type = 2; | |
190 return rand() % 3 + 6; | |
191 break; | |
192 case 6: //Adds 9-12 points of Cold damage. | |
193 *damage_type = 2; | |
194 return rand() % 4 + 9; | |
195 break; | |
196 case 7: //Adds 2-5 points of Electrical damage. | |
197 *damage_type = 1; | |
198 return rand() % 4 + 2; | |
199 break; | |
200 case 8: //Adds 4-10 points of Electrical damage. | |
201 *damage_type = 1; | |
202 return rand() % 7 + 4; | |
203 break; | |
204 case 9: //Adds 6-15 points of Electrical damage. | |
205 *damage_type = 1; | |
206 return rand() % 10 + 6; | |
207 break; | |
208 case 10: //Adds 1-6 points of Fire damage. | |
209 *damage_type = 0; | |
210 return GetDiceResult(1, 6); | |
211 break; | |
212 case 11: //Adds 2-12 points of Fire damage. | |
213 *damage_type = 0; | |
214 return GetDiceResult(2, 6); | |
215 break; | |
216 case 12: //Adds 3-18 points of Fire damage. | |
217 *damage_type = 0; | |
218 return GetDiceResult(3, 6); | |
219 break; | |
220 case 13: //Adds 5 points of Body damage. | |
221 *damage_type = 8; | |
222 return 5; | |
223 break; | |
224 case 14: //Adds 8 points of Body damage. | |
225 *damage_type = 8; | |
226 return 8; | |
227 break; | |
228 case 15: //Adds 12 points of Body damage. | |
229 *damage_type = 8; | |
230 return 12; | |
231 break; | |
232 case 16: //Drain Hit Points from target. | |
233 case 41: //Drain Hit Points from target and Increased Weapon speed. | |
234 *damage_type = 10; | |
235 *draintargetHP = true; | |
236 return 0; | |
237 break; | |
238 case 46: //Adds 10-20 points of Fire damage and +25 Might. | |
239 *damage_type = 0; | |
240 return rand() % 11 + 10; | |
241 break; | |
242 default: | |
243 *damage_type = 0; | |
244 return 0; | |
245 | |
246 } | |
247 | |
248 } | |
0 | 249 |
250 | |
251 //----- (00402F07) -------------------------------------------------------- | |
252 void ItemGen::Reset() | |
253 { | |
377 | 254 this->uHolderPlayer = 0; |
0 | 255 this->uAttributes = 0; |
256 this->uNumCharges = 0; | |
377 | 257 this->uSpecEnchantmentType = 0; |
1599 | 258 this->m_enchantmentStrength = 0; |
570 | 259 this->uEnchantmentType = 0; |
0 | 260 this->uItemID = 0; |
261 this->uBodyAnchor = 0; | |
262 this->uExpireTime = 0i64; | |
263 } | |
264 | |
265 //----- (00458260) -------------------------------------------------------- | |
266 void ItemGen::UpdateTempBonus(__int64 uTimePlayed) | |
267 { | |
463 | 268 if ( this->uAttributes & ITEM_TEMP_BONUS ) |
0 | 269 { |
270 if ( uTimePlayed > (signed __int64)this->uExpireTime ) | |
271 { | |
570 | 272 this->uEnchantmentType = 0; |
377 | 273 this->uSpecEnchantmentType = 0; |
463 | 274 this->uAttributes = this->uAttributes&(~ITEM_TEMP_BONUS); |
0 | 275 } |
276 } | |
277 } | |
278 | |
279 //----- (0045814E) -------------------------------------------------------- | |
374 | 280 void ItemsTable::Release() |
0 | 281 { |
282 if ( pMonstersTXT_Raw ) | |
1583 | 283 free(pMonstersTXT_Raw); |
0 | 284 if ( pMonsterPlacementTXT_Raw ) |
1583 | 285 free(pMonsterPlacementTXT_Raw); |
0 | 286 if ( pSkillDescTXT_Raw ) |
1583 | 287 free(pSkillDescTXT_Raw); |
374 | 288 if (pSpcItemsTXT_Raw ) |
1583 | 289 free(pSpcItemsTXT_Raw); |
374 | 290 if ( pStdItemsTXT_Raw ) |
1583 | 291 free(pStdItemsTXT_Raw); |
374 | 292 if ( pRndItemsTXT_Raw ) |
1583 | 293 free(pRndItemsTXT_Raw); |
374 | 294 if ( pItemsTXT_Raw ) |
1583 | 295 free(pItemsTXT_Raw); |
0 | 296 if ( pHostileTXT_Raw ) |
1583 | 297 free(pHostileTXT_Raw); |
0 | 298 if ( pHistoryTXT_Raw ) |
1583 | 299 free(pHistoryTXT_Raw); |
0 | 300 if ( pPotionsTXT_Raw ) |
1583 | 301 free(pPotionsTXT_Raw); |
0 | 302 if ( pPotionNotesTXT_Raw ) |
1583 | 303 free(pPotionNotesTXT_Raw); |
374 | 304 pSpcItemsTXT_Raw = NULL; |
305 pSkillDescTXT_Raw = NULL; | |
306 pStdItemsTXT_Raw = NULL; | |
307 pRndItemsTXT_Raw = NULL; | |
308 pItemsTXT_Raw = NULL; | |
0 | 309 } |
310 | |
1082 | 311 |
0 | 312 //----- (00456D84) -------------------------------------------------------- |
313 void ItemsTable::Initialize() | |
224 | 314 { |
315 int i,j; | |
316 char* test_string; | |
229 | 317 unsigned char c; |
224 | 318 bool break_loop; |
319 unsigned int temp_str_len; | |
320 char* tmp_pos; | |
321 int decode_step; | |
322 int item_counter; | |
323 | |
324 pMapStats = new MapStats; | |
325 pMapStats->Initialize(); | |
326 | |
327 pMonsterStats = new MonsterStats; | |
328 pMonsterStats->Initialize(); | |
329 pMonsterStats->InitializePlacements(); | |
330 | |
331 pSpellStats = new SpellStats; | |
332 pSpellStats->Initialize(); | |
333 | |
334 LoadPotions(); | |
335 LoadPotionNotes(); | |
336 | |
337 pFactionTable = new FactionTable; | |
338 pFactionTable->Initialize(); | |
339 | |
340 pStorylineText = new StorylineText; | |
341 pStorylineText->Initialize(); | |
0 | 342 |
224 | 343 pStdItemsTXT_Raw = NULL; |
344 pStdItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stditems.txt", 0); | |
345 strtok(pStdItemsTXT_Raw, "\r"); | |
346 strtok(NULL, "\r"); | |
347 strtok(NULL, "\r"); | |
348 strtok(NULL, "\r"); | |
349 //Standard Bonuses by Group | |
350 for (i=0;i<24;++i) | |
351 { | |
352 test_string = strtok(NULL, "\r") + 1; | |
353 break_loop = false; | |
354 decode_step=0; | |
355 do | |
356 { | |
357 c = *(unsigned char*)test_string; | |
358 temp_str_len = 0; | |
359 while((c!='\t')&&(c>0)) | |
360 { | |
361 ++temp_str_len; | |
362 c=test_string[temp_str_len]; | |
363 } | |
364 tmp_pos=test_string+temp_str_len; | |
365 if (*tmp_pos == 0) | |
366 break_loop = true; | |
367 *tmp_pos = 0; | |
368 if (temp_str_len) | |
369 { | |
370 switch (decode_step) | |
371 { | |
372 case 0: | |
373 pEnchantments[i].pBonusStat=RemoveQuotes(test_string); | |
374 break; | |
375 case 1: | |
376 pEnchantments[i].pOfName= RemoveQuotes(test_string); | |
377 break; | |
378 default: | |
379 pEnchantments[i].to_item[decode_step-2]=atoi(test_string); | |
380 } | |
381 } | |
382 else | |
383 { | |
570 | 384 if (decode_step) |
224 | 385 break_loop = true; |
386 } | |
387 ++decode_step; | |
388 test_string=tmp_pos+1; | |
389 } while ((decode_step<11)&&!break_loop); | |
390 } | |
0 | 391 |
224 | 392 memset(&pEnchantmentsSumm, 0, 36); |
393 for(i=0;i<9;++i) | |
394 { | |
395 for (j=0;j<24;++j) | |
396 pEnchantmentsSumm[i]+=pEnchantments[j].to_item[i]; | |
397 } | |
0 | 398 |
224 | 399 //Bonus range for Standard by Level |
400 strtok(NULL, "\r"); | |
401 strtok(NULL, "\r"); | |
402 strtok(NULL, "\r"); | |
403 strtok(NULL, "\r"); | |
404 strtok(NULL, "\r"); | |
405 for(i=0;i<6;++i) //counted from 1 | |
406 { | |
407 test_string = strtok(NULL, "\r") + 1; | |
408 break_loop = false; | |
409 decode_step=0; | |
410 do | |
411 { | |
412 c = *(unsigned char*)test_string; | |
413 temp_str_len = 0; | |
414 while((c!='\t')&&(c>0)) | |
415 { | |
416 ++temp_str_len; | |
417 c=test_string[temp_str_len]; | |
418 } | |
419 tmp_pos=test_string+temp_str_len; | |
420 if (*tmp_pos == 0) | |
421 break_loop = true; | |
422 *tmp_pos = 0; | |
423 if (decode_step==2) | |
424 bonus_ranges[i].minR = atoi(test_string); | |
425 else if (decode_step==3) | |
426 bonus_ranges[i].maxR =atoi(test_string); | |
427 ++decode_step; | |
428 test_string=tmp_pos+1; | |
429 } while ((decode_step<4)&&!break_loop); | |
430 } | |
431 | |
222 | 432 |
224 | 433 pSpcItemsTXT_Raw = 0; |
434 pSpcItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spcitems.txt", 0); | |
435 strtok(pSpcItemsTXT_Raw, "\r"); | |
436 strtok(NULL, "\r"); | |
437 strtok(NULL, "\r"); | |
438 strtok(NULL, "\r"); | |
439 for (i=0;i<72;++i) | |
440 { | |
441 test_string = strtok(NULL, "\r") + 1; | |
442 break_loop = false; | |
443 decode_step=0; | |
444 do | |
445 { | |
446 c = *(unsigned char*)test_string; | |
447 temp_str_len = 0; | |
448 while((c!='\t')&&(c>0)) | |
449 { | |
450 ++temp_str_len; | |
451 c=test_string[temp_str_len]; | |
452 } | |
453 tmp_pos=test_string+temp_str_len; | |
454 if (*tmp_pos == 0) | |
455 break_loop = true; | |
456 *tmp_pos = 0; | |
457 if (temp_str_len) | |
458 { | |
459 switch (decode_step) | |
460 { | |
461 case 0: | |
462 pSpecialEnchantments[i].pBonusStatement=RemoveQuotes(test_string); | |
463 break; | |
464 case 1: | |
465 pSpecialEnchantments[i].pNameAdd= RemoveQuotes(test_string); | |
466 break; | |
467 case 14: | |
468 int res; | |
469 res=atoi(test_string); | |
470 if(!res) | |
471 { | |
472 ++test_string; | |
473 while (*test_string==' ')//fix X 2 case | |
474 ++test_string; | |
222 | 475 res=atoi(test_string); |
224 | 476 } |
477 pSpecialEnchantments[i].iValue=res; | |
478 break; | |
479 case 15: | |
480 pSpecialEnchantments[i].iTreasureLevel= tolower(*test_string) - 97;; | |
481 break; | |
482 default: | |
483 pSpecialEnchantments[i].to_item_apply[decode_step-2]=atoi(test_string); | |
484 } | |
485 } | |
486 else | |
487 { | |
570 | 488 if (decode_step) |
224 | 489 break_loop = true; |
490 } | |
491 ++decode_step; | |
492 test_string=tmp_pos+1; | |
493 } while ((decode_step<16)&&!break_loop); | |
494 } | |
495 | |
496 pSpecialEnchantments_count = 71; | |
497 memset(&pSpecialEnchantmentsSumm, 0, 96); | |
498 for(i=0;i<12;++i) | |
499 { | |
570 | 500 for (j=0;j<=pSpecialEnchantments_count;++j) |
224 | 501 pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i]; |
502 } | |
222 | 503 |
224 | 504 Initialize2DA(); |
222 | 505 |
224 | 506 pItemsTXT_Raw = NULL; |
507 pItemsTXT_Raw = (char*) pEvents_LOD->LoadRaw("items.txt", 0); | |
508 strtok(pItemsTXT_Raw, "\r"); | |
509 strtok(NULL, "\r"); | |
510 uAllItemsCount = 0; | |
511 item_counter = 0; | |
222 | 512 while (true) |
513 { | |
514 test_string = strtok(NULL, "\r") + 1; | |
515 break_loop = false; | |
516 decode_step=0; | |
517 do | |
518 { | |
519 c = *(unsigned char*)test_string; | |
520 temp_str_len = 0; | |
521 while((c!='\t')&&(c>0)) | |
522 { | |
523 ++temp_str_len; | |
524 c=test_string[temp_str_len]; | |
525 } | |
526 tmp_pos=test_string+temp_str_len; | |
527 if (*tmp_pos == 0) | |
528 break_loop = true; | |
529 *tmp_pos = 0; | |
530 if (temp_str_len) | |
531 { | |
532 switch (decode_step) | |
533 { | |
534 case 0: //Item # | |
535 item_counter=atoi(test_string); | |
536 uAllItemsCount=item_counter; | |
537 break; | |
538 case 1: //Pic File | |
539 pItems[item_counter].pIconName = RemoveQuotes(test_string); | |
540 break; | |
541 case 2: //Name | |
542 pItems[item_counter].pName = RemoveQuotes(test_string); | |
543 break; | |
544 case 3: //Value | |
545 pItems[item_counter].uValue=atoi(test_string); | |
546 break; | |
547 case 4: //Equip Stat | |
548 { | |
1104 | 549 if ( !_stricmp(test_string, "weapon") ) |
222 | 550 { |
816 | 551 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; |
222 | 552 break; |
553 } | |
1104 | 554 if ( !_stricmp(test_string, "weapon2") ) |
222 | 555 { |
816 | 556 pItems[item_counter].uEquipType = EQUIP_MAIN_HAND; |
222 | 557 break; |
558 } | |
1104 | 559 if ( !_stricmp(test_string, "weapon1or2") ) |
222 | 560 { |
816 | 561 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; |
222 | 562 break; |
563 } | |
1104 | 564 if ( !(_stricmp(test_string, "missile")&&_stricmp(test_string, "bow"))) |
222 | 565 { |
365 | 566 pItems[item_counter].uEquipType = EQUIP_BOW; |
222 | 567 break; |
568 } | |
1104 | 569 if ( !_stricmp(test_string, "armor") ) |
222 | 570 { |
365 | 571 pItems[item_counter].uEquipType = EQUIP_ARMOUR; |
222 | 572 break; |
573 } | |
1104 | 574 if ( !_stricmp(test_string, "shield") ) |
222 | 575 { |
365 | 576 pItems[item_counter].uEquipType = EQUIP_SHIELD; |
222 | 577 break; |
578 } | |
1104 | 579 if ( !_stricmp(test_string, "helm") ) |
222 | 580 { |
365 | 581 pItems[item_counter].uEquipType = EQUIP_HELMET; |
222 | 582 break; |
583 } | |
1104 | 584 if ( !_stricmp(test_string, "belt") ) |
222 | 585 { |
365 | 586 pItems[item_counter].uEquipType = EQUIP_BELT; |
222 | 587 break; |
588 } | |
1104 | 589 if ( !_stricmp(test_string, "cloak") ) |
222 | 590 { |
365 | 591 pItems[item_counter].uEquipType = EQUIP_CLOAK; |
222 | 592 break; |
593 } | |
1104 | 594 if ( !_stricmp(test_string, "gauntlets") ) |
222 | 595 { |
365 | 596 pItems[item_counter].uEquipType = EQUIP_GAUNTLETS; |
222 | 597 break; |
598 } | |
1104 | 599 if ( !_stricmp(test_string, "boots") ) |
222 | 600 { |
365 | 601 pItems[item_counter].uEquipType = EQUIP_BOOTS; |
222 | 602 break; |
603 } | |
1104 | 604 if ( !_stricmp(test_string, "ring") ) |
222 | 605 { |
365 | 606 pItems[item_counter].uEquipType = EQUIP_RING; |
222 | 607 break; |
608 } | |
1104 | 609 if ( !_stricmp(test_string, "amulet") ) |
222 | 610 { |
365 | 611 pItems[item_counter].uEquipType = EQUIP_AMULET; |
222 | 612 break; |
613 } | |
1104 | 614 if ( !_stricmp(test_string, "weaponw") ) |
222 | 615 { |
365 | 616 pItems[item_counter].uEquipType = EQUIP_WAND; |
222 | 617 break; |
618 } | |
1104 | 619 if ( !(_stricmp(test_string, "herb")&&_stricmp(test_string, "reagent"))) |
222 | 620 { |
365 | 621 pItems[item_counter].uEquipType = EQUIP_REAGENT; |
222 | 622 break; |
623 } | |
1104 | 624 if ( !_stricmp(test_string, "bottle") ) |
222 | 625 { |
365 | 626 pItems[item_counter].uEquipType = EQUIP_POTION; |
222 | 627 break; |
628 } | |
1104 | 629 if ( !_stricmp(test_string, "sscroll") ) |
222 | 630 { |
374 | 631 pItems[item_counter].uEquipType = EQUIP_SPELL_SCROLL; |
222 | 632 break; |
633 } | |
1104 | 634 if ( !_stricmp(test_string, "book") ) |
222 | 635 { |
365 | 636 pItems[item_counter].uEquipType = EQUIP_BOOK; |
222 | 637 break; |
638 } | |
1104 | 639 if ( !_stricmp(test_string, "mscroll") ) |
222 | 640 { |
374 | 641 pItems[item_counter].uEquipType = EQUIP_MESSAGE_SCROLL; |
222 | 642 break; |
643 } | |
1104 | 644 if ( !_stricmp(test_string, "gold") ) |
222 | 645 { |
365 | 646 pItems[item_counter].uEquipType = EQUIP_GOLD; |
222 | 647 break; |
648 } | |
1104 | 649 if ( !_stricmp(test_string, "gem") ) |
222 | 650 { |
365 | 651 pItems[item_counter].uEquipType = EQUIP_GEM; |
222 | 652 break; |
653 } | |
365 | 654 pItems[item_counter].uEquipType = EQUIP_NONE; |
222 | 655 break; |
656 } | |
657 case 5: //Skill Group | |
658 { | |
1104 | 659 if ( !_stricmp(test_string, "staff") ) |
222 | 660 { |
374 | 661 pItems[item_counter].uSkillType = PLAYER_SKILL_STAFF; |
222 | 662 break; |
663 } | |
1104 | 664 if ( !_stricmp(test_string, "sword") ) |
222 | 665 { |
374 | 666 pItems[item_counter].uSkillType = PLAYER_SKILL_SWORD; |
222 | 667 break; |
668 } | |
1104 | 669 if ( !_stricmp(test_string, "dagger") ) |
222 | 670 { |
374 | 671 pItems[item_counter].uSkillType = PLAYER_SKILL_DAGGER; |
222 | 672 break; |
673 } | |
1104 | 674 if ( !_stricmp(test_string, "axe") ) |
222 | 675 { |
374 | 676 pItems[item_counter].uSkillType = PLAYER_SKILL_AXE; |
222 | 677 break; |
678 } | |
1104 | 679 if ( !_stricmp(test_string, "spear") ) |
222 | 680 { |
374 | 681 pItems[item_counter].uSkillType = PLAYER_SKILL_SPEAR; |
222 | 682 break; |
683 } | |
1104 | 684 if ( !_stricmp(test_string, "bow") ) |
222 | 685 { |
374 | 686 pItems[item_counter].uSkillType = PLAYER_SKILL_BOW; |
222 | 687 break; |
688 } | |
1104 | 689 if ( !_stricmp(test_string, "mace") ) |
222 | 690 { |
374 | 691 pItems[item_counter].uSkillType = PLAYER_SKILL_MACE; |
222 | 692 break; |
693 } | |
1104 | 694 if ( !_stricmp(test_string, "blaster") ) |
222 | 695 { |
374 | 696 pItems[item_counter].uSkillType = PLAYER_SKILL_BLASTER; |
222 | 697 break; |
698 } | |
1104 | 699 if ( !_stricmp(test_string, "shield") ) |
222 | 700 { |
374 | 701 pItems[item_counter].uSkillType = PLAYER_SKILL_SHIELD; |
222 | 702 break; |
703 } | |
1104 | 704 if ( !_stricmp(test_string, "leather") ) |
222 | 705 { |
374 | 706 pItems[item_counter].uSkillType = PLAYER_SKILL_LEATHER; |
222 | 707 break; |
708 } | |
1104 | 709 if ( !_stricmp(test_string, "chain") ) |
222 | 710 { |
374 | 711 pItems[item_counter].uSkillType = PLAYER_SKILL_CHAIN; |
222 | 712 break; |
713 } | |
1104 | 714 if ( !_stricmp(test_string, "plate") ) |
222 | 715 { |
374 | 716 pItems[item_counter].uSkillType = PLAYER_SKILL_PLATE; |
222 | 717 break; |
718 } | |
1104 | 719 if ( !_stricmp(test_string, "club") ) |
222 | 720 { |
374 | 721 pItems[item_counter].uSkillType = PLAYER_SKILL_CLUB; |
222 | 722 break; |
723 } | |
385 | 724 pItems[item_counter].uSkillType = PLAYER_SKILL_MISC; |
222 | 725 break; |
726 } | |
727 case 6: //Mod1 | |
728 { | |
729 int ii; | |
730 char* test_char; | |
731 int tst_len; | |
732 tst_len=strlen(test_string); | |
733 pItems[item_counter].uDamageDice=0; | |
734 pItems[item_counter].uDamageRoll=0; | |
735 test_char=test_string; | |
736 for (ii=0; ii<tst_len; ++ii) | |
737 { | |
738 if (tolower(*test_char)=='d') | |
739 { | |
740 *test_char=0; | |
741 pItems[item_counter].uDamageDice=atoi(test_string); | |
742 pItems[item_counter].uDamageRoll=atoi(test_char+1); | |
743 *test_char='d'; | |
744 break; | |
745 } | |
746 ++test_char; | |
747 } | |
748 test_char=test_string; | |
559 | 749 if ((ii==tst_len)&&(tolower(*test_char)!='s')) |
222 | 750 { |
559 | 751 pItems[item_counter].uDamageDice=atoi(test_char); |
222 | 752 pItems[item_counter].uDamageRoll=1; |
753 } | |
754 break; | |
755 } | |
756 case 7: //Mod2 | |
757 pItems[item_counter].uDamageMod=atoi(test_string); | |
758 break; | |
759 case 8: //material | |
760 { | |
1104 | 761 if ( !_stricmp(test_string, "artifact") ) |
222 | 762 { |
377 | 763 pItems[item_counter].uMaterial = MATERIAL_ARTEFACT; |
222 | 764 break; |
765 } | |
1104 | 766 if ( !_stricmp(test_string, "relic") ) |
222 | 767 { |
377 | 768 pItems[item_counter].uMaterial = MATERIAL_RELIC; |
222 | 769 break; |
770 } | |
1104 | 771 if ( !_stricmp(test_string, "special") ) |
222 | 772 { |
377 | 773 pItems[item_counter].uMaterial = MATERIAL_SPECIAL; |
222 | 774 break; |
775 } | |
377 | 776 pItems[item_counter].uMaterial = MATERIAL_COMMON; |
222 | 777 break;} |
778 case 9: //ID/Rep/St | |
779 pItems[item_counter].uItemID_Rep_St=atoi(test_string); | |
780 break; | |
781 case 10: //Not identified name | |
782 pItems[item_counter].pUnidentifiedName = RemoveQuotes(test_string); | |
783 break; | |
784 case 11: //Sprite Index | |
785 pItems[item_counter].uSpriteID=atoi(test_string); | |
786 break; | |
787 case 12: //VarA | |
224 | 788 { |
222 | 789 pItems[item_counter]._additional_value=0; |
790 pItems[item_counter]._bonus_type=0; | |
377 | 791 if (pItems[item_counter].uMaterial==MATERIAL_SPECIAL) |
222 | 792 { |
224 | 793 for(int ii=0; ii<24; ++ii) |
794 { | |
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
|
795 if (!_stricmp(test_string,pEnchantments[ii].pOfName)) |
224 | 796 { |
797 pItems[item_counter]._bonus_type=ii+1; | |
222 | 798 break; |
224 | 799 } |
800 } | |
801 if (!pItems[item_counter]._bonus_type) | |
802 { | |
803 for(int ii=0; ii<72; ++ii) | |
804 { | |
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
|
805 if (!_stricmp(test_string,pSpecialEnchantments[ii].pNameAdd)) |
222 | 806 { |
224 | 807 pItems[item_counter]._additional_value=ii+1; |
222 | 808 } |
224 | 809 } |
810 } | |
222 | 811 } |
224 | 812 |
222 | 813 break; |
224 | 814 } |
222 | 815 case 13: //VarB |
377 | 816 if ((pItems[item_counter].uMaterial==MATERIAL_SPECIAL)&&(pItems[item_counter]._bonus_type)) |
222 | 817 { |
818 char b_s=atoi(test_string); | |
819 if (b_s) | |
820 pItems[item_counter]._bonus_strength=b_s; | |
821 else | |
822 pItems[item_counter]._bonus_strength=1; | |
823 } | |
824 else | |
825 pItems[item_counter]._bonus_strength=0; | |
826 break; | |
827 case 14: //Equip X | |
828 pItems[item_counter].uEquipX=atoi(test_string); | |
829 break; | |
830 case 15: //Equip Y | |
831 pItems[item_counter].uEquipY=atoi(test_string); | |
832 break; | |
833 case 16: //Notes | |
834 pItems[item_counter].pDescription = RemoveQuotes(test_string); | |
835 break; | |
224 | 836 |
222 | 837 } |
838 } | |
839 else | |
840 { | |
570 | 841 if (decode_step) |
222 | 842 break_loop = true; |
843 } | |
844 ++decode_step; | |
845 test_string=tmp_pos+1; | |
846 } while ((decode_step<17)&&!break_loop); | |
847 ++item_counter; | |
848 if (item_counter>799) | |
849 break; | |
850 } | |
851 | |
224 | 852 |
853 pRndItemsTXT_Raw = NULL; | |
854 uAllItemsCount = item_counter; | |
855 pRndItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("rnditems.txt", 0); | |
856 strtok(pRndItemsTXT_Raw, "\r"); | |
857 strtok(NULL, "\r"); | |
858 strtok(NULL, "\r"); | |
859 strtok(NULL, "\r"); | |
860 item_counter = 0; | |
861 while (true) | |
862 { | |
863 test_string = strtok(NULL, "\r") + 1; | |
864 break_loop = false; | |
865 decode_step=0; | |
866 do | |
867 { | |
868 c = *(unsigned char*)test_string; | |
869 temp_str_len = 0; | |
870 while((c!='\t')&&(c>0)) | |
871 { | |
872 ++temp_str_len; | |
873 c=test_string[temp_str_len]; | |
874 } | |
875 tmp_pos=test_string+temp_str_len; | |
876 if (*tmp_pos == 0) | |
877 break_loop = true; | |
878 *tmp_pos = 0; | |
879 if (temp_str_len) | |
880 { | |
881 switch (decode_step) | |
882 { | |
883 case 0: | |
884 item_counter=atoi(test_string); | |
885 break; | |
886 case 2: | |
887 pItems[item_counter].uChanceByTreasureLvl1=atoi(test_string); | |
888 break; | |
889 case 3: | |
890 pItems[item_counter].uChanceByTreasureLvl2=atoi(test_string); | |
891 break; | |
892 case 4: | |
893 pItems[item_counter].uChanceByTreasureLvl3=atoi(test_string); | |
894 break; | |
895 case 5: | |
896 pItems[item_counter].uChanceByTreasureLvl4=atoi(test_string); | |
897 break; | |
898 case 6: | |
899 pItems[item_counter].uChanceByTreasureLvl5=atoi(test_string); | |
900 break; | |
901 case 7: | |
902 pItems[item_counter].uChanceByTreasureLvl6=atoi(test_string); | |
903 break; | |
904 } | |
905 } | |
906 else | |
907 { | |
570 | 908 if (decode_step) |
224 | 909 break_loop = true; |
910 } | |
911 ++decode_step; | |
912 test_string=tmp_pos+1; | |
913 } while ((decode_step<8)&&!break_loop); | |
914 ++item_counter; | |
915 if (item_counter>618) | |
916 break; | |
917 } | |
918 | |
1006 | 919 //ChanceByTreasureLvl Summ - to calculate chance |
224 | 920 memset(&uChanceByTreasureLvlSumm, 0, 24); |
921 for(i=0;i<6;++i) | |
922 { | |
598 | 923 for (j=1;j<item_counter;++j) |
224 | 924 uChanceByTreasureLvlSumm[i]+=pItems[j].uChanceByTreasureLvl[i]; |
925 } | |
222 | 926 |
224 | 927 strtok(NULL, "\r"); |
928 strtok(NULL, "\r"); | |
929 strtok(NULL, "\r"); | |
930 strtok(NULL, "\r"); | |
931 strtok(NULL, "\r"); | |
932 for (i=0;i<3;++i) | |
933 { | |
934 test_string = strtok(NULL, "\r") + 1; | |
935 break_loop = false; | |
936 decode_step=0; | |
937 do | |
938 { | |
939 c = *(unsigned char*)test_string; | |
940 temp_str_len = 0; | |
941 while((c!='\t')&&(c>0)) | |
942 { | |
943 ++temp_str_len; | |
944 c=test_string[temp_str_len]; | |
945 } | |
946 tmp_pos=test_string+temp_str_len; | |
947 if (*tmp_pos == 0) | |
948 break_loop = true; | |
949 *tmp_pos = 0; | |
950 if (temp_str_len) | |
951 { | |
952 switch (decode_step) | |
953 { | |
954 case 2: | |
955 switch (i) | |
956 { | |
957 case 0: | |
958 uBonusChanceStandart[0]=atoi(test_string); | |
959 break; | |
960 case 1: | |
961 uBonusChanceSpecial[0]=atoi(test_string); | |
962 break; | |
963 case 2: | |
964 uBonusChanceWpSpecial[0]=atoi(test_string); | |
965 break; | |
966 } | |
967 break; | |
968 case 3: | |
969 switch (i) | |
970 { | |
971 case 0: | |
972 uBonusChanceStandart[1]=atoi(test_string); | |
973 break; | |
974 case 1: | |
975 uBonusChanceSpecial[1]=atoi(test_string); | |
976 break; | |
977 case 2: | |
978 uBonusChanceWpSpecial[1]=atoi(test_string); | |
979 break; | |
980 } | |
981 break; | |
982 case 4: | |
983 switch (i) | |
984 { | |
985 case 0: | |
986 uBonusChanceStandart[2]=atoi(test_string); | |
987 break; | |
988 case 1: | |
989 uBonusChanceSpecial[2]=atoi(test_string); | |
990 break; | |
991 case 2: | |
992 uBonusChanceWpSpecial[2]=atoi(test_string); | |
993 break; | |
994 } | |
995 break; | |
996 case 5: | |
997 switch (i) | |
998 { | |
999 case 0: | |
1000 uBonusChanceStandart[3]=atoi(test_string); | |
1001 break; | |
1002 case 1: | |
1003 uBonusChanceSpecial[3]=atoi(test_string); | |
1004 break; | |
1005 case 2: | |
1006 uBonusChanceWpSpecial[3]=atoi(test_string); | |
1007 break; | |
1008 } | |
1009 break; | |
1010 case 6: | |
1011 switch (i) | |
1012 { | |
1013 case 0: | |
1014 uBonusChanceStandart[4]=atoi(test_string); | |
1015 break; | |
1016 case 1: | |
1017 uBonusChanceSpecial[4]=atoi(test_string); | |
1018 break; | |
1019 case 2: | |
1020 uBonusChanceWpSpecial[4]=atoi(test_string); | |
1021 break; | |
1022 } | |
1023 break; | |
1024 case 7: | |
1025 switch (i) | |
1026 { | |
1027 case 0: | |
1028 uBonusChanceStandart[5]=atoi(test_string); | |
1029 break; | |
1030 case 1: | |
1031 uBonusChanceSpecial[5]=atoi(test_string); | |
1032 break; | |
1033 case 2: | |
1034 uBonusChanceWpSpecial[5]=atoi(test_string); | |
1035 break; | |
1036 } | |
1037 break; | |
1038 } | |
1039 } | |
1040 else | |
1041 { | |
570 | 1042 if (decode_step) |
224 | 1043 break_loop = true; |
1044 } | |
1045 ++decode_step; | |
1046 test_string=tmp_pos+1; | |
1047 } while ((decode_step<8)&&!break_loop); | |
1048 } | |
222 | 1049 |
705 | 1050 if ( pRndItemsTXT_Raw ) |
1051 { | |
1583 | 1052 free(pRndItemsTXT_Raw); |
705 | 1053 pRndItemsTXT_Raw = NULL; |
1054 } | |
1055 | |
224 | 1056 pSkillDescTXT_Raw = NULL; |
1057 pSkillDescTXT_Raw = (char *)pEvents_LOD->LoadRaw("skilldes.txt", 0); | |
1058 strtok(pSkillDescTXT_Raw, "\r"); | |
1059 for (i=0; i<37; ++i) | |
1060 { | |
1061 test_string = strtok(NULL, "\r") + 1; | |
1062 break_loop = false; | |
1063 decode_step=0; | |
1064 do | |
1065 { | |
1066 c = *(unsigned char*)test_string; | |
1067 temp_str_len = 0; | |
1068 while((c!='\t')&&(c>0)) | |
1069 { | |
1070 ++temp_str_len; | |
1071 c=test_string[temp_str_len]; | |
1072 } | |
1073 tmp_pos=test_string+temp_str_len; | |
1074 if (*tmp_pos == 0) | |
1075 break_loop = true; | |
1076 *tmp_pos = 0; | |
1077 if (temp_str_len) | |
1078 { | |
1079 switch (decode_step) | |
1080 { | |
1081 case 1: | |
1082 pSkillDesc[i] = RemoveQuotes(test_string); | |
1083 break; | |
1084 case 2: | |
1085 pNormalSkillDesc[i] = RemoveQuotes(test_string); | |
1086 break; | |
1087 case 3: | |
1088 pExpertSkillDesc[i] = RemoveQuotes(test_string); | |
1089 break; | |
1090 case 4: | |
1091 pMasterSkillDesc[i] = RemoveQuotes(test_string); | |
1092 break; | |
1093 case 5: | |
1094 pGrandSkillDesc[i] = RemoveQuotes(test_string); | |
1095 break; | |
1096 } | |
1097 } | |
1098 else | |
1099 { | |
570 | 1100 if (decode_step) |
224 | 1101 break_loop = true; |
1102 } | |
1103 ++decode_step; | |
1104 test_string=tmp_pos+1; | |
1105 } while ((decode_step<6)&&!break_loop); | |
1106 } | |
1107 | |
1108 pStatsTXT_Raw = 0; | |
1109 pStatsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stats.txt", 0); | |
1110 strtok(pStatsTXT_Raw, "\r"); | |
1111 for (i=0; i<26; ++i) | |
1112 { | |
1113 test_string = strtok(NULL, "\r") + 1; | |
1114 break_loop = false; | |
1115 decode_step=0; | |
1116 do | |
1117 { | |
1118 c = *(unsigned char*)test_string; | |
1119 temp_str_len = 0; | |
1120 while((c!='\t')&&(c>0)) | |
1121 { | |
1122 ++temp_str_len; | |
1123 c=test_string[temp_str_len]; | |
1124 } | |
1125 tmp_pos=test_string+temp_str_len; | |
1126 if (*tmp_pos == 0) | |
1127 break_loop = true; | |
1128 *tmp_pos = 0; | |
1129 if (temp_str_len) | |
1130 { | |
1131 switch (i) | |
1132 { | |
1133 case 0: | |
1134 case 1: | |
1135 case 2: | |
1136 case 3: | |
1137 case 4: | |
1138 case 5: | |
1139 case 6: | |
1140 pAttributeDescriptions[i] = RemoveQuotes(test_string); | |
1141 break; | |
1142 case 7: | |
1143 pHealthPointsAttributeDescription = RemoveQuotes(test_string); | |
1144 break; | |
1145 case 8: | |
1146 pArmourClassAttributeDescription = RemoveQuotes(test_string); | |
1147 break; | |
1148 case 9: | |
1149 pSpellPointsAttributeDescription = RemoveQuotes(test_string); | |
1150 break; | |
1151 case 10: | |
1152 pPlayerConditionAttributeDescription = RemoveQuotes(test_string); | |
1153 break; | |
1154 case 11: | |
1155 pFastSpellAttributeDescription = RemoveQuotes(test_string); | |
1156 break; | |
1157 case 12: | |
1158 pPlayerAgeAttributeDescription = RemoveQuotes(test_string); | |
1159 break; | |
1160 case 13: | |
1161 pPlayerLevelAttributeDescription = RemoveQuotes(test_string); | |
1162 break; | |
1163 case 14: | |
1164 pPlayerExperienceAttributeDescription = RemoveQuotes(test_string); | |
1165 break; | |
1166 case 15: | |
1167 pAttackBonusAttributeDescription = RemoveQuotes(test_string); | |
1168 break; | |
1169 case 16: | |
1170 pAttackDamageAttributeDescription = RemoveQuotes(test_string); | |
1171 break; | |
1172 case 17: | |
1173 pMissleBonusAttributeDescription = RemoveQuotes(test_string); | |
1174 break; | |
1175 case 18: | |
1176 pMissleDamageAttributeDescription = RemoveQuotes(test_string); | |
1177 break; | |
1178 case 19: | |
1179 pFireResistanceAttributeDescription = RemoveQuotes(test_string); | |
1180 break; | |
1181 case 20: | |
1182 pAirResistanceAttributeDescription = RemoveQuotes(test_string); | |
1183 break; | |
1184 case 21: | |
1185 pWaterResistanceAttributeDescription = RemoveQuotes(test_string); | |
1186 break; | |
1187 case 22: | |
1188 pEarthResistanceAttributeDescription = RemoveQuotes(test_string); | |
1189 break; | |
1190 case 23: | |
1191 pMindResistanceAttributeDescription = RemoveQuotes(test_string); | |
1192 break; | |
1193 case 24: | |
1194 pBodyResistanceAttributeDescription = RemoveQuotes(test_string); | |
1195 break; | |
1196 case 25: | |
1197 pSkillPointsAttributeDescription = RemoveQuotes(test_string); | |
1198 break; | |
1199 } | |
1200 } | |
1201 else | |
1202 { | |
570 | 1203 if (decode_step) |
224 | 1204 break_loop = true; |
1205 } | |
1206 ++decode_step; | |
1207 test_string=tmp_pos+1; | |
1208 } while ((decode_step<2)&&!break_loop); | |
1209 } | |
222 | 1210 |
1211 | |
224 | 1212 pClassTXT_Raw = 0; |
1213 pClassTXT_Raw = (char *)pEvents_LOD->LoadRaw("class.txt", 0); | |
1214 strtok(pClassTXT_Raw, "\r"); | |
1215 for (i=0; i<36; ++i) | |
1216 { | |
1217 test_string = strtok(NULL, "\r") + 1; | |
1218 break_loop = false; | |
1219 decode_step=0; | |
1220 do | |
1221 { | |
1222 c = *(unsigned char*)test_string; | |
1223 temp_str_len = 0; | |
1224 while((c!='\t')&&(c>0)) | |
1225 { | |
1226 ++temp_str_len; | |
1227 c=test_string[temp_str_len]; | |
1228 } | |
1229 tmp_pos=test_string+temp_str_len; | |
1230 if (*tmp_pos == 0) | |
1231 break_loop = true; | |
1232 *tmp_pos = 0; | |
1233 if (temp_str_len) | |
1234 { | |
229 | 1235 //if(i) |
224 | 1236 pClassDescriptions[i]=RemoveQuotes(test_string); |
1237 } | |
1238 else | |
1239 { | |
570 | 1240 if (decode_step) |
224 | 1241 break_loop = true; |
1242 } | |
1243 ++decode_step; | |
1244 test_string=tmp_pos+1; | |
1245 } while ((decode_step<2)&&!break_loop); | |
1246 } | |
222 | 1247 |
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
|
1248 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1251 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
|
1252 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
|
1253 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 |
224 | 1255 } |
0 | 1256 |
1257 //----- (00456D17) -------------------------------------------------------- | |
1258 void ItemsTable::SetSpecialBonus(ItemGen *pItem) | |
1259 { | |
385 | 1260 if ( pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL ) |
0 | 1261 { |
570 | 1262 pItem->uEnchantmentType = pItems[pItem->uItemID]._bonus_type; |
385 | 1263 pItem->uSpecEnchantmentType = pItems[pItem->uItemID]._additional_value; |
1599 | 1264 pItem->m_enchantmentStrength = pItems[pItem->uItemID]._bonus_strength; |
0 | 1265 } |
1266 } | |
1267 | |
1268 //----- (00456D43) -------------------------------------------------------- | |
377 | 1269 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem) |
0 | 1270 { |
377 | 1271 return this->pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL; |
0 | 1272 } |
1273 | |
1274 //----- (00456D5E) -------------------------------------------------------- | |
377 | 1275 bool ItemsTable::IsMaterialNonCommon(ItemGen *pItem) |
0 | 1276 { |
385 | 1277 return pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL || |
1278 pItems[pItem->uItemID].uMaterial == MATERIAL_RELIC || | |
1279 pItems[pItem->uItemID].uMaterial == MATERIAL_ARTEFACT; | |
0 | 1280 } |
1281 | |
1282 | |
1283 //----- (00453B3C) -------------------------------------------------------- | |
1284 void ItemsTable::LoadPotions() | |
222 | 1285 { |
0 | 1286 |
222 | 1287 CHAR Text[90]; // [sp+Ch] [bp-6Ch]@26 |
1288 char* test_string; | |
1289 unsigned int uRow; | |
1290 unsigned int uColumn; | |
1291 unsigned __int8 potion_value; | |
1292 | |
1293 if ( pPotionsTXT_Raw ) | |
1583 | 1294 free(pPotionsTXT_Raw); |
222 | 1295 pPotionsTXT_Raw = NULL; |
1296 pPotionsTXT_Raw = (char *)pEvents_LOD->LoadRaw("potion.txt", 0); | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1297 test_string = strtok(pPotionsTXT_Raw,"\t\r\n"); |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1298 while ( 1 ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1299 { |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1300 if ( !test_string ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1301 { |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1302 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1303 return; |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1304 } |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1305 if ( !strcmp(test_string, "222") ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1306 break; |
222 | 1307 |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1308 test_string = strtok(NULL, "\t\r\n"); |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1309 } |
222 | 1310 while ( 1 ) |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1311 { |
222 | 1312 test_string = strtok(NULL, "\t\r\n"); |
1313 | |
1314 if ( !test_string ) | |
1315 { | |
1316 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1317 return; | |
1318 } | |
1319 if ( !strcmp(test_string, "222") ) | |
1320 break; | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1321 } |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1322 |
222 | 1323 for (uRow = 0;uRow < 50; ++uRow) |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1324 { |
222 | 1325 int skip_count; |
1326 for (skip_count = 0;skip_count < 6; ++skip_count) | |
1327 { | |
1328 if ( !strtok(NULL, "\r\t\n") ) | |
1329 break; | |
1330 } | |
1331 if ( skip_count != 6 ) | |
1332 break; | |
1333 for (uColumn = 0; uColumn < 50; ++uColumn) | |
1334 { | |
1335 test_string = strtok(NULL, "\r\t\n"); | |
1336 if ( !test_string ) | |
1337 break; | |
1338 potion_value = atoi(test_string); | |
233 | 1339 unsigned char c=*test_string; |
222 | 1340 if ( !potion_value ) |
1341 { | |
1342 if ( tolower(c) == 'e' ) | |
1343 potion_value = atoi(test_string + 1); | |
1344 else | |
1345 potion_value = 0; | |
1346 } | |
1347 this->potion_data[uRow][uColumn]=potion_value; | |
1348 } | |
1349 if ( uColumn != 50 ) | |
1350 break; | |
1351 strtok(NULL, "\r\t\n"); | |
1352 } | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1353 |
222 | 1354 if ( uRow != 50 ) |
1355 { | |
1356 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, uColumn); | |
1357 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1358 } | |
1359 if ( pPotionsTXT_Raw ) | |
1360 { | |
1583 | 1361 free(pPotionsTXT_Raw); |
222 | 1362 pPotionsTXT_Raw = 0; |
1363 } | |
1364 } | |
0 | 1365 |
1366 //----- (00453CE5) -------------------------------------------------------- | |
1367 void ItemsTable::LoadPotionNotes() | |
222 | 1368 { |
1369 | |
1370 CHAR Text[90]; | |
1371 char* test_string; | |
1372 unsigned int uRow; | |
1373 unsigned int uColumn; | |
1374 unsigned __int8 potion_note; | |
1375 | |
1376 if ( pPotionNotesTXT_Raw ) | |
1583 | 1377 free(pPotionNotesTXT_Raw); |
222 | 1378 pPotionNotesTXT_Raw = NULL; |
1379 pPotionNotesTXT_Raw = (char *)pEvents_LOD->LoadRaw("potnotes.txt", 0); | |
1380 test_string = strtok(pPotionNotesTXT_Raw ,"\t\r\n"); | |
1381 while ( 1 ) | |
1382 { | |
1383 if ( !test_string ) | |
1384 { | |
1385 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1386 return; | |
1387 } | |
1388 if ( !strcmp(test_string, "222") ) | |
1389 break; | |
1390 test_string = strtok(NULL, "\t\r\n"); | |
1391 } | |
1392 while ( 1 ) | |
1393 { | |
1394 test_string = strtok(NULL, "\t\r\n"); | |
1395 | |
1396 if ( !test_string ) | |
1397 { | |
1398 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1399 return; | |
1400 } | |
1401 if ( !strcmp(test_string, "222") ) | |
1402 break; | |
1403 } | |
0 | 1404 |
222 | 1405 for (uRow = 0;uRow < 50; ++uRow) |
1406 { | |
1407 int skip_count; | |
1408 for (skip_count = 0;skip_count < 6; ++skip_count) | |
1409 { | |
1410 if ( !strtok(NULL, "\r\t\n") ) | |
1411 break; | |
1412 } | |
1413 if ( skip_count != 6 ) | |
1414 break; | |
1415 for (uColumn = 0; uColumn < 50; ++uColumn) | |
1416 { | |
1417 test_string = strtok(NULL, "\r\t\n"); | |
1418 if ( !test_string ) | |
1419 break; | |
1420 potion_note = atoi(test_string); | |
233 | 1421 unsigned char c=*test_string; |
222 | 1422 if ( !potion_note ) |
1423 { | |
1424 if ( tolower(c) == 'e' ) | |
1425 potion_note = atoi(test_string + 1); | |
1426 else | |
1427 potion_note = 0; | |
1428 } | |
1429 this->potion_note[uRow][uColumn]=potion_note; | |
1430 } | |
1431 if ( uColumn != 50 ) | |
1432 break; | |
1433 strtok(NULL, "\r\t\n"); | |
1434 } | |
1435 if ( uRow != 50 ) | |
1436 { | |
1437 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, uColumn); | |
1438 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1439 } | |
1440 } | |
0 | 1441 |
1442 | |
1443 //----- (00456442) -------------------------------------------------------- | |
1444 unsigned int ItemGen::GetValue() | |
463 | 1445 { |
1446 unsigned int uBaseValue; // edi@1 | |
1447 unsigned int bonus; | |
0 | 1448 |
463 | 1449 uBaseValue = pItemsTable->pItems[this->uItemID].uValue; |
1450 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) ) | |
1451 return uBaseValue; | |
570 | 1452 if (uEnchantmentType ) |
1599 | 1453 return uBaseValue + 100 * m_enchantmentStrength;; |
463 | 1454 if (uSpecEnchantmentType ) |
1455 { | |
1456 bonus = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType].iTreasureLevel; | |
1457 if ( bonus > 10 ) | |
1458 return uBaseValue + bonus; | |
1459 else | |
1460 return uBaseValue * bonus; | |
1461 } | |
1462 return uBaseValue; | |
1463 } | |
0 | 1464 |
1465 //----- (00456499) -------------------------------------------------------- | |
1466 const char *ItemGen::GetDisplayName() | |
1467 { | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
1468 if (IsIdentified()) |
366 | 1469 return GetIdentifiedName(); |
0 | 1470 else |
366 | 1471 return pItemsTable->pItems[uItemID].pUnidentifiedName; |
0 | 1472 } |
1473 | |
1474 //----- (004564B3) -------------------------------------------------------- | |
1475 const char *ItemGen::GetIdentifiedName() | |
1476 { | |
377 | 1477 unsigned __int8 equip_type; |
1478 const char *player_name; | |
1479 const char *nameModificator; | |
1480 const char *format_str; | |
0 | 1481 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1482 equip_type = GetItemEquipType(); |
377 | 1483 if ( (equip_type == EQUIP_REAGENT) || (equip_type == EQUIP_POTION) || (equip_type == EQUIP_GOLD) ) |
0 | 1484 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1485 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
|
1486 return item__getname_buffer.data(); |
0 | 1487 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1488 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
|
1489 if ( uItemID == ITEM_LICH_JAR_FULL ) //Lich Jar |
0 | 1490 { |
377 | 1491 if ( (uHolderPlayer >0 )&& (uHolderPlayer <= 4) ) |
0 | 1492 { |
377 | 1493 player_name = pPlayers[uHolderPlayer]->pName; |
1494 strlen(player_name); | |
1495 if ( player_name[strlen(player_name) - 1] == 's' ) | |
1496 format_str = pGlobalTXT_LocalizationStrings[655]; //"%s' Jar" | |
0 | 1497 else |
377 | 1498 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
|
1499 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
|
1500 return item__getname_buffer.data(); |
0 | 1501 } |
1502 } | |
377 | 1503 if ( !pItemsTable->IsMaterialNonCommon(this) ) |
0 | 1504 { |
570 | 1505 if ( uEnchantmentType ) |
0 | 1506 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1507 strcat(item__getname_buffer.data(), " "); |
570 | 1508 nameModificator = pItemsTable->pEnchantments[uEnchantmentType-1].pOfName; |
0 | 1509 } |
1510 else | |
1511 { | |
377 | 1512 if ( !uSpecEnchantmentType ) |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1513 return item__getname_buffer.data(); |
377 | 1514 if ( uSpecEnchantmentType == 16 //Drain Hit Points from target. |
1515 || uSpecEnchantmentType == 39 //Double damage vs Demons. | |
1516 || uSpecEnchantmentType == 40 //Double damage vs Dragons | |
1517 || uSpecEnchantmentType == 45 //+5 Speed and Accuracy | |
1518 || uSpecEnchantmentType == 56 //+5 Might and Endurance. | |
1519 || uSpecEnchantmentType == 57 //+5 Intellect and Personality. | |
1520 || uSpecEnchantmentType == 58 //Increased Value. | |
1521 || uSpecEnchantmentType == 60 //+3 Unarmed and Dodging skills | |
1522 || uSpecEnchantmentType == 61 //+3 Stealing and Disarm skills. | |
1523 || uSpecEnchantmentType == 59 //Increased Weapon speed. | |
1524 || uSpecEnchantmentType == 63 //Double Damage vs. Elves. | |
1525 || uSpecEnchantmentType == 64 //Double Damage vs. Undead. | |
1526 || uSpecEnchantmentType == 67 //Adds 5 points of Body damage and +2 Disarm skill. | |
1527 || uSpecEnchantmentType == 68 ) //Adds 6-8 points of Cold damage and +5 Armor Class. | |
1528 { //enchantment and name positions inverted! | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1529 sprintf( item__getname_buffer.data(), "%s %s", |
377 | 1530 pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd, |
1531 pItemsTable->pItems[uItemID].pName); | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1532 return item__getname_buffer.data(); |
0 | 1533 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1534 strcat(item__getname_buffer.data(), " "); |
377 | 1535 nameModificator = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd; |
0 | 1536 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1537 strcat(item__getname_buffer.data(), nameModificator); |
0 | 1538 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1539 return item__getname_buffer.data(); |
0 | 1540 } |
1541 | |
1542 | |
1543 //----- (00456620) -------------------------------------------------------- | |
385 | 1544 void ItemsTable::GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *out_item) |
559 | 1545 { |
0 | 1546 |
559 | 1547 ItemsTable *v5; // edi@1 |
1548 int v6; // ebx@3 | |
1549 int *v7; // ecx@33 | |
1550 //int v8; // eax@34 | |
1551 //int v9; // eax@39 | |
1552 int current_chance; // ebx@43 | |
1553 int tmp_chance; // ecx@47 | |
1554 unsigned int *v12; // edx@48 | |
1555 unsigned int v13; // eax@49 | |
1556 signed int v14; // ebx@52 | |
1557 int v15; // eax@53 | |
1558 signed int v16; // eax@55 | |
1559 int v17; // ebx@57 | |
1560 int v18; // edx@62 | |
1561 signed int v19; // ebx@70 | |
1562 unsigned __int8 v20; // al@81 | |
1563 int v21; // eax@84 | |
1564 int v22; // ebx@85 | |
1565 int v23; // eax@86 | |
1566 int v24; // ebx@86 | |
1567 int special_chance; // edx@86 | |
1568 int v26; // edx@89 | |
1569 unsigned int v27; // eax@89 | |
1570 int i; // ebx@89 | |
1571 unsigned int v29; // ecx@90 | |
1572 int v30; // ebx@91 | |
1573 int v31; // eax@91 | |
1574 int v32; // ecx@91 | |
1575 int v33; // eax@91 | |
1576 int v34; // eax@97 | |
1577 unsigned __int8 v35; // sf@97 | |
1578 unsigned __int8 v36; // of@97 | |
1579 int v37; // ebx@98 | |
1580 int v38; // edx@99 | |
1581 signed int v39; // ebx@101 | |
1582 int v40; // ecx@102 | |
1583 char v41; // zf@107 | |
1584 char v42; // al@108 | |
1585 char v43; // al@111 | |
1586 int *v44; // edx@118 | |
1587 int v45; // eax@120 | |
1588 int v46; // edx@120 | |
1589 int j; // eax@121 | |
1590 unsigned int v48; // ecx@123 | |
1591 int v49; // eax@123 | |
1592 int v50; // eax@123 | |
1593 int val_list[800]; // [sp+Ch] [bp-C88h]@33 | |
1594 int total_chance; // [sp+C8Ch] [bp-8h]@33 | |
1595 int v53; // [sp+C90h] [bp-4h]@1 | |
1596 int v54; // [sp+C9Ch] [bp+8h]@3 | |
1597 //int v55; // [sp+CA0h] [bp+Ch]@34 | |
1598 signed int v56; // [sp+CA0h] [bp+Ch]@55 | |
1599 int v57; // [sp+CA0h] [bp+Ch]@62 | |
1600 int *v58; // [sp+CA0h] [bp+Ch]@102 | |
1601 int v59; // [sp+CA0h] [bp+Ch]@123 | |
1602 //signed int a2a; // [sp+CA4h] [bp+10h]@33 | |
1603 int a2b; // [sp+CA4h] [bp+10h]@101 | |
1604 int a2c; // [sp+CA4h] [bp+10h]@120 | |
1605 | |
1606 v5 = this; | |
1607 if (!out_item) | |
1583 | 1608 out_item = (ItemGen *)malloc(sizeof(ItemGen)); |
559 | 1609 memset(out_item, 0, sizeof(*out_item)); |
1610 | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
1611 |
559 | 1612 v6 = treasure_level - 1; |
1613 v54 = treasure_level - 1; | |
1614 if ( uTreasureType ) //generate known treasure type | |
0 | 1615 { |
559 | 1616 ITEM_EQUIP_TYPE requested_equip; |
1617 PLAYER_SKILL_TYPE requested_skill = PLAYER_SKILL_INVALID; | |
1618 switch (uTreasureType) | |
1619 { | |
816 | 1620 case 20: requested_equip = EQUIP_OFF_HAND; break; |
559 | 1621 case 21: requested_equip = EQUIP_ARMOUR; break; |
1622 case 22: requested_skill = PLAYER_SKILL_MISC; break; | |
1623 case 23: requested_skill = PLAYER_SKILL_SWORD; break; | |
1624 case 24: requested_skill = PLAYER_SKILL_DAGGER; break; | |
1625 case 25: requested_skill = PLAYER_SKILL_AXE; break; | |
1626 case 26: requested_skill = PLAYER_SKILL_SPEAR; break; | |
1627 case 27: requested_skill = PLAYER_SKILL_BOW; break; | |
1628 case 28: requested_skill = PLAYER_SKILL_MACE; break; | |
1629 case 29: requested_skill = PLAYER_SKILL_CLUB; break; | |
1630 case 30: requested_skill = PLAYER_SKILL_STAFF; break; | |
1631 case 31: requested_skill = PLAYER_SKILL_LEATHER; break; | |
1632 case 32: requested_skill = PLAYER_SKILL_CHAIN; break; | |
1633 case 33: requested_skill = PLAYER_SKILL_PLATE; break; | |
1634 case 34: requested_equip = EQUIP_SHIELD; break; | |
1635 case 35: requested_equip = EQUIP_HELMET; break; | |
1636 case 36: requested_equip = EQUIP_BELT; break; | |
1637 case 37: requested_equip = EQUIP_CLOAK; break; | |
1638 case 38: requested_equip = EQUIP_GAUNTLETS; break; | |
1639 case 39: requested_equip = EQUIP_BOOTS; break; | |
1640 case 40: requested_equip = EQUIP_RING; break; | |
1641 case 41: requested_equip = EQUIP_AMULET; break; | |
1642 case 42: requested_equip = EQUIP_WAND; break; | |
1643 case 43: requested_equip = EQUIP_SPELL_SCROLL; break; | |
1644 case 44: requested_equip = EQUIP_POTION; break; | |
1645 case 45: requested_equip = EQUIP_REAGENT; break; | |
1646 case 46: requested_equip = EQUIP_GEM; break; | |
1647 default: | |
1648 __debugbreak(); // check this condition | |
1649 requested_equip = (ITEM_EQUIP_TYPE)(uTreasureType - 1); | |
1650 break; | |
1651 } | |
1652 memset(val_list, 0, sizeof(val_list)); | |
1653 total_chance = 0; | |
1654 j=0; | |
1655 //a2a = 1; | |
1656 if (requested_skill == PLAYER_SKILL_INVALID) // no skill for this item needed | |
1657 { | |
1658 for (uint i = 1; i < 500; ++i) | |
1659 { | |
1660 if (pItems[i].uEquipType == requested_equip) | |
1661 { | |
1662 val_list[j] = i; | |
1663 ++j; | |
1664 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1665 } | |
1666 } | |
1667 } | |
1668 else //have needed skill | |
1669 { | |
1670 for (uint i = 1; i < 500; ++i) | |
1671 { | |
1672 if (pItems[i].uSkillType == requested_skill) | |
1673 { | |
1674 val_list[j] = i; | |
1675 ++j; | |
1676 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1677 } | |
1678 } | |
1679 } | |
1680 | |
1681 current_chance = 0; | |
1682 if ( total_chance ) | |
1683 current_chance = rand() % total_chance; | |
1684 | |
1685 out_item->uItemID = val_list[0]; | |
1686 if (!out_item->uItemID) | |
1687 out_item->uItemID = 1; | |
1688 | |
1689 if ( pItems[out_item->uItemID].uChanceByTreasureLvl[treasure_level - 1] < current_chance ) | |
1690 { | |
1691 j=0; | |
1692 tmp_chance=pItems[out_item->uItemID].uChanceByTreasureLvl[treasure_level - 1]; | |
1693 do | |
1694 { | |
1695 ++j; | |
1696 out_item->uItemID = val_list[j]; | |
1697 tmp_chance += pItems[val_list[j]].uChanceByTreasureLvl[treasure_level - 1]; | |
1698 } | |
1699 while ( tmp_chance < current_chance ); | |
1700 } | |
1701 | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1702 if (out_item->GetItemEquipType() == EQUIP_POTION && out_item->uItemID != ITEM_POTION_BOTTLE ) |
559 | 1703 {// if it potion set potion spec |
570 | 1704 out_item->uEnchantmentType = 0; |
559 | 1705 for (int i=0; i<2; ++i) |
570 | 1706 out_item->uEnchantmentType += rand() % 4 + 1; |
1707 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; | |
559 | 1708 } |
0 | 1709 } |
559 | 1710 else |
0 | 1711 { |
559 | 1712 //artifact |
1713 v56 = 0; | |
1714 for(int i=0; i<29; ++i) | |
1715 v56 += pParty->pIsArtifactFound[i]; | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
1716 |
559 | 1717 v17 = rand() % 29; |
385 | 1718 |
559 | 1719 if ( v6 == 5 && (rand() % 100 < 5) && !pParty->pIsArtifactFound[v17] && v56 < 13 ) |
1720 { | |
1721 pParty->pIsArtifactFound[v17] = 1; | |
1722 out_item->uAttributes = 0; | |
1723 out_item->uItemID = v17 + 500; | |
1724 SetSpecialBonus(out_item); | |
1725 return; | |
1726 } | |
1727 | |
1728 v57 = 0; | |
1729 v18 = rand() % v5->uChanceByTreasureLvlSumm[treasure_level - 1]; | |
1730 out_item->uItemID = 0; | |
1731 if ( v18 > 0 ) | |
1732 { | |
1733 do | |
598 | 1734 { |
1735 v57 += pItems[out_item->uItemID + 1].uChanceByTreasureLvl[v6]; | |
1736 ++out_item->uItemID; | |
1737 } | |
559 | 1738 while ( v57 < v18 ); |
1739 } | |
1740 | |
1741 if ( !v18 ) | |
1742 out_item->uItemID = 1; | |
1743 if ( !out_item->uItemID ) | |
1744 out_item->uItemID = 1; | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1745 if (out_item->GetItemEquipType() == EQUIP_POTION && out_item->uItemID != ITEM_POTION_BOTTLE ) |
559 | 1746 {// if it potion set potion spec |
570 | 1747 out_item->uEnchantmentType = 0; |
559 | 1748 for (int i=0; i<2; ++i) |
570 | 1749 out_item->uEnchantmentType += rand() % 4 + 1; |
1750 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; | |
559 | 1751 } |
570 | 1752 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; |
559 | 1753 } |
1754 | |
1755 if ( out_item->uItemID == ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION | |
1756 && !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) | |
1757 out_item->uItemID = ITEM_SPELLBOOK_LIGHT_SUN_BURST; | |
1758 if ( pItemsTable->pItems[out_item->uItemID + 1].uItemID_Rep_St ) | |
1759 out_item->uAttributes = 0; | |
1760 else | |
1761 out_item->uAttributes = 1; | |
385 | 1762 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1763 if ( out_item->GetItemEquipType() != EQUIP_POTION ) |
559 | 1764 { |
1765 out_item->uSpecEnchantmentType = 0; | |
570 | 1766 out_item->uEnchantmentType = 0; |
559 | 1767 } |
1768 //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
|
1769 switch (out_item->GetItemEquipType()) |
559 | 1770 { |
816 | 1771 case EQUIP_OFF_HAND: |
1772 case EQUIP_MAIN_HAND : | |
559 | 1773 case EQUIP_BOW : |
1774 if ( !uBonusChanceWpSpecial[v6] ) | |
1775 return; | |
1776 if ((rand() % 100)>=uBonusChanceWpSpecial[v6]) | |
1777 return; | |
1778 break; | |
1779 case EQUIP_ARMOUR : | |
1780 case EQUIP_SHIELD : | |
1781 case EQUIP_HELMET : | |
1782 case EQUIP_BELT : | |
1783 case EQUIP_CLOAK : | |
1784 case EQUIP_GAUNTLETS : | |
1785 case EQUIP_BOOTS : | |
1786 case EQUIP_RING : | |
570 | 1787 |
559 | 1788 if ( !uBonusChanceStandart[v6] ) |
1789 return; | |
1790 special_chance = rand() % 100; | |
1791 if ( special_chance < uBonusChanceStandart[v6]) | |
1792 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1793 v26 = rand() %pEnchantmentsSumm[out_item->GetItemEquipType()-3]; |
570 | 1794 out_item->uEnchantmentType = 0; |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1795 v27=pEnchantments[out_item->uEnchantmentType].to_item[out_item->GetItemEquipType()-3]; |
570 | 1796 if (v26>v27 ) |
1797 { | |
1798 do | |
559 | 1799 { |
570 | 1800 ++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
|
1801 v27+=pEnchantments[out_item->uEnchantmentType].to_item[out_item->GetItemEquipType()-3]; |
570 | 1802 } while (v26>v27); |
1803 } | |
1804 ++out_item->uEnchantmentType; | |
1805 | |
1806 v33 = rand() % (bonus_ranges[v6].maxR - bonus_ranges[v6].minR + 1); | |
1599 | 1807 out_item->m_enchantmentStrength = v33 + bonus_ranges[v6].minR; |
570 | 1808 v32 = out_item->uEnchantmentType - 1; |
1809 if ( v32 == 21 || v32 == 22 || v32 == 23 ) //Armsmaster skill, Dodge skill, Unarmed skill | |
1599 | 1810 out_item->m_enchantmentStrength = out_item->m_enchantmentStrength/2; |
1811 if ( out_item->m_enchantmentStrength <= 0 ) | |
1812 out_item->m_enchantmentStrength = 1; | |
559 | 1813 return; |
1814 | |
1815 } | |
570 | 1816 if ( !uBonusChanceSpecial[v6]) |
1817 return; | |
559 | 1818 v34 = uBonusChanceStandart[v6] + uBonusChanceSpecial[v6]; |
570 | 1819 if ( special_chance>v34 ) |
559 | 1820 return; |
1821 break; | |
1822 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
|
1823 out_item->uNumCharges = rand() % 6 + out_item->GetDamageMod() + 1; |
559 | 1824 out_item->uMaxCharges = out_item->uNumCharges; |
1825 default: | |
224 | 1826 return; |
559 | 1827 } |
1828 | |
1829 j=0; | |
1830 int spc_sum=0; | |
1831 int spc; | |
1832 memset(&val_list, 0, 3200); | |
1833 for (int i=0; i<pSpecialEnchantments_count;++i) | |
1834 { | |
1835 int tr_lv= pSpecialEnchantments[i].iTreasureLevel; | |
1836 switch ( treasure_level - 1 ) | |
1837 { | |
0 | 1838 case 2: |
559 | 1839 if ((tr_lv==1)||(tr_lv==0)) |
1840 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1841 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1842 spc_sum+=spc; |
1843 if(spc) | |
1844 { | |
1845 val_list[j++]=i; | |
1846 } | |
1847 } | |
1848 break; | |
0 | 1849 case 3: |
559 | 1850 if ((tr_lv==2)||(tr_lv==1)||(tr_lv==0)) |
1851 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1852 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1853 spc_sum+=spc; |
1854 if(spc) | |
1855 { | |
1856 val_list[j++]=i; | |
1857 } | |
1858 } | |
1859 break; | |
1860 case 4: | |
1861 if ((tr_lv==3)||(tr_lv==2)||(tr_lv==1)) | |
1862 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1863 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1864 spc_sum+=spc; |
1865 if(spc) | |
1866 { | |
1867 val_list[j++]=i; | |
1868 } | |
1869 } | |
1870 break; | |
1871 case 5: | |
1872 if (tr_lv==3) | |
1873 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1874 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1875 spc_sum+=spc; |
1876 if(spc) | |
1877 { | |
1878 val_list[j++]=i; | |
1879 } | |
1880 } | |
1881 break; | |
0 | 1882 } |
559 | 1883 } |
1884 | |
1885 v46 = rand()%spc_sum+1; | |
1886 j=0; | |
1887 out_item->uSpecEnchantmentType =val_list[j]; | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1888 v45=pSpecialEnchantments[val_list[j]].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1889 if (v45<v46) |
1890 { | |
1891 do | |
245 | 1892 { |
559 | 1893 ++j; |
1894 out_item->uSpecEnchantmentType=val_list[j]; | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1895 v45+=pSpecialEnchantments[val_list[j]].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1896 } while (v45<v46); |
1897 } | |
1898 ++out_item->uSpecEnchantmentType; | |
0 | 1899 } |
1900 | |
1901 //----- (004505CC) -------------------------------------------------------- | |
1902 bool ItemGen::GenerateArtifact() | |
1903 { | |
1904 signed int uNumArtifactsNotFound; // esi@1 | |
463 | 1905 int artifacts_list[32]; |
0 | 1906 |
385 | 1907 memset(artifacts_list, 0,sizeof(artifacts_list)); |
0 | 1908 uNumArtifactsNotFound = 0; |
385 | 1909 |
1910 for (int i=500;i<529;++i) | |
484 | 1911 if ( !pParty->pIsArtifactFound[i-500] ) |
385 | 1912 artifacts_list[uNumArtifactsNotFound++] = i; |
1913 | |
1914 Reset(); | |
0 | 1915 if ( uNumArtifactsNotFound ) |
1916 { | |
385 | 1917 uItemID = artifacts_list[rand() % uNumArtifactsNotFound]; |
1918 pItemsTable->SetSpecialBonus(this); | |
1919 return true; | |
0 | 1920 } |
1921 else | |
385 | 1922 return false; |
1923 | |
0 | 1924 } |
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
|
1925 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1926 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
|
1927 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
|
1928 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
|
1929 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1930 #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
|
1931 #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
|
1932 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1933 #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
|
1934 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1935 #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
|
1936 #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
|
1937 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1938 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
|
1939 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1940 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
|
1941 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
|
1942 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
|
1943 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1944 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
|
1945 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
|
1946 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1947 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
|
1948 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1949 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
|
1950 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1951 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
|
1952 (*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
|
1953 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1954 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1955 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
|
1956 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1957 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
|
1958 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
|
1959 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
|
1960 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
|
1961 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
|
1962 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
|
1963 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
|
1964 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1965 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
|
1966 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
|
1967 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
|
1968 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
|
1969 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
|
1970 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
|
1971 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
|
1972 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
|
1973 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1974 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
|
1975 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
|
1976 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1977 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
|
1978 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
|
1979 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1980 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
|
1981 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
|
1982 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1983 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
|
1984 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
|
1985 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1986 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
|
1987 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
|
1988 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1989 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
|
1990 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
|
1991 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1992 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
|
1993 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
|
1994 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1995 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
|
1996 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
|
1997 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1998 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
|
1999 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
|
2000 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2001 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
|
2002 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
|
2003 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
|
2004 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
|
2005 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
|
2006 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
|
2007 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
|
2008 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
|
2009 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
|
2010 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
|
2011 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
|
2012 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
|
2013 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
|
2014 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
|
2015 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
|
2016 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
|
2017 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
|
2018 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2019 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
|
2020 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
|
2021 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
|
2022 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
|
2023 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2024 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
|
2025 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
|
2026 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2027 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
|
2028 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
|
2029 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
|
2030 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2031 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
|
2032 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
|
2033 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2034 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
|
2035 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
|
2036 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2037 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
|
2038 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
|
2039 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
|
2040 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2041 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
|
2042 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
|
2043 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
|
2044 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2045 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
|
2046 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
|
2047 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2048 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
|
2049 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
|
2050 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
|
2051 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
|
2052 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2053 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
|
2054 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
|
2055 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
|
2056 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2057 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
|
2058 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
|
2059 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
|
2060 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2061 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
|
2062 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
|
2063 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2064 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
|
2065 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
|
2066 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2067 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
|
2068 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
|
2069 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
|
2070 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2071 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
|
2072 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
|
2073 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
|
2074 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2075 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
|
2076 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
|
2077 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
|
2078 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2079 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
|
2080 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
|
2081 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
|
2082 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2083 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
|
2084 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
|
2085 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
|
2086 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2087 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
|
2088 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
|
2089 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2090 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
|
2091 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
|
2092 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2093 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
|
2094 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
|
2095 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2096 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
|
2097 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
|
2098 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
|
2099 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2100 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2101 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
|
2102 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2103 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
|
2104 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
|
2105 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2106 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
|
2107 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
|
2108 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2109 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
|
2110 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
|
2111 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2112 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
|
2113 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
|
2114 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2115 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
|
2116 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
|
2117 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2118 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
|
2119 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
|
2120 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2121 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
|
2122 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
|
2123 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2124 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
|
2125 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
|
2126 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2127 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
|
2128 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
|
2129 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2130 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
|
2131 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
|
2132 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2133 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
|
2134 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
|
2135 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2136 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
|
2137 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
|
2138 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2139 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
|
2140 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
|
2141 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2142 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
|
2143 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
|
2144 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2145 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
|
2146 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
|
2147 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2148 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
|
2149 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
|
2150 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2151 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
|
2152 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
|
2153 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2154 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
|
2155 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
|
2156 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2157 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
|
2158 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
|
2159 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2160 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
|
2161 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
|
2162 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2163 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
|
2164 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
|
2165 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2166 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
|
2167 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
|
2168 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2169 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
|
2170 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
|
2171 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2172 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
|
2173 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
|
2174 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2175 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2176 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
|
2177 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2178 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
|
2179 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
|
2180 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
|
2181 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2182 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
|
2183 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
|
2184 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2185 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
|
2186 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
|
2187 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
|
2188 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2189 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
|
2190 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
|
2191 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
|
2192 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
|
2193 |
1648 | 2194 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
|
2195 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
|
2196 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
|
2197 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
|
2198 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
|
2199 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
|
2200 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
|
2201 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
|
2202 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2203 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
|
2204 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
|
2205 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2206 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
|
2207 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
|
2208 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2209 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
|
2210 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
|
2211 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2212 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
|
2213 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
|
2214 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
|
2215 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2216 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
|
2217 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
|
2218 NEWBONUSINTOARTIFACTLIST(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
|
2219 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2220 itemId = ITEM_ARTIFACT_RULERS_RING; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2221 NEWBONUSINTOARTIFACTLIST(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
|
2222 NEWBONUSINTOARTIFACTLIST(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
|
2223 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2224 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
|
2225 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
|
2226 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
|
2227 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
|
2228 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
|
2229 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2230 itemId = ITEM_RELIC_ETHRICS_STAFF; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2231 NEWBONUSINTOARTIFACTLIST(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
|
2232 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
|
2233 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2234 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
|
2235 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
|
2236 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
|
2237 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
|
2238 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
|
2239 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
|
2240 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
|
2241 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
|
2242 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
|
2243 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
|
2244 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2245 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
|
2246 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
|
2247 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2248 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
|
2249 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
|
2250 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
|
2251 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
|
2252 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2253 itemId = ITEM_RELIC_GLORY_SHIELD; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2254 NEWBONUSINTOARTIFACTLIST(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
|
2255 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
|
2256 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
|
2257 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
|
2258 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2259 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
|
2260 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
|
2261 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
|
2262 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2263 itemId = ITEM_RELIC_TALEDONS_HELM; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2264 NEWBONUSINTOARTIFACTLIST(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
|
2265 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
|
2266 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
|
2267 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
|
2268 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2269 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
|
2270 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
|
2271 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
|
2272 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2273 itemId = ITEM_RELIC_PHYNAXIAN_CROWN; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2274 NEWBONUSINTOARTIFACTLIST(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
|
2275 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
|
2276 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
|
2277 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
|
2278 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2279 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
|
2280 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
|
2281 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
|
2282 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2283 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
|
2284 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
|
2285 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
|
2286 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
|
2287 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
|
2288 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
|
2289 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
|
2290 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
|
2291 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
|
2292 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2293 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
|
2294 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
|
2295 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
|
2296 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
|
2297 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2298 itemId = ITEM_RELIC_JUSTICE; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2299 NEWBONUSINTOARTIFACTLIST(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
|
2300 NEWBONUSINTOARTIFACTLIST(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
|
2301 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
|
2302 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2303 itemId = ITEM_RELIC_MEKORIGS_HAMMER; |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2304 NEWBONUSINTOARTIFACTLIST(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
|
2305 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
|
2306 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
|
2307 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2308 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
|
2309 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
|
2310 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
|
2311 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
|
2312 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2313 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
|
2314 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
|
2315 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
|
2316 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2317 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
|
2318 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
|
2319 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
|
2320 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2321 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
|
2322 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
|
2323 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
|
2324 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2325 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
|
2326 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
|
2327 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
|
2328 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
|
2329 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2330 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
|
2331 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
|
2332 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
|
2333 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2334 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2335 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
|
2336 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2337 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
|
2338 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
|
2339 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2340 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
|
2341 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2342 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
|
2343 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
|
2344 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2345 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
|
2346 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
|
2347 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2348 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
|
2349 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2350 *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
|
2351 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2352 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
|
2353 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2354 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
|
2355 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2356 *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
|
2357 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2358 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2359 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2360 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
|
2361 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2362 *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
|
2363 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2364 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2365 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2366 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2367 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
|
2368 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2369 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
|
2370 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
|
2371 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2372 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
|
2373 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2374 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
|
2375 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
|
2376 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2377 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
|
2378 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
|
2379 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2380 *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
|
2381 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2382 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
|
2383 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2384 *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
|
2385 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2386 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2387 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2388 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2389 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
|
2390 { |
1685
2a309997c42f
Player::StealFromShop started cleanup, fixing a few errors caused by not commiting everything
Grumpy7
parents:
1682
diff
changeset
|
2391 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
|
2392 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
|
2393 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2394 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
|
2395 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2396 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
|
2397 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
|
2398 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
|
2399 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2400 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2401 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
|
2402 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2403 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
|
2404 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2405 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2406 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
|
2407 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2408 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
|
2409 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2410 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2411 char* ItemGen::GetIconName() |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2412 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2413 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
|
2414 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2415 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2416 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
|
2417 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2418 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
|
2419 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2420 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2421 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
|
2422 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2423 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
|
2424 } |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2425 |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2426 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
|
2427 { |
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
2428 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
|
2429 } |
461 | 2430 //----- (004B8E3D) -------------------------------------------------------- |
463 | 2431 void GenerateStandartShopItems() |
2432 { | |
2433 signed int item_count; | |
2434 signed int shop_index; | |
2435 int treasure_lvl; | |
2436 int item_class; | |
2437 int mdf; | |
2438 | |
2439 shop_index = (signed int)window_SpeakInHouse->ptr_1C; | |
2440 if ( uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType] ) | |
2441 { | |
2442 for (item_count=0; item_count<=uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType]; ++item_count ) | |
2443 { | |
2444 if (shop_index<=14) //weapon shop | |
2445 { | |
2446 treasure_lvl = shopWeap_variation_ord[shop_index].treasure_level; | |
2447 item_class =shopWeap_variation_ord[shop_index].item_class[rand() % 4]; | |
2448 } | |
2449 else if (shop_index<=28) //armor shop | |
2450 { | |
2451 mdf =0; | |
2452 if (item_count > 3) | |
2453 ++mdf;// rechek offsets | |
2454 treasure_lvl = shopArmr_variation_ord[2*(shop_index-15)+mdf].treasure_level; | |
2455 item_class =shopArmr_variation_ord[2*(shop_index-15)+mdf].item_class[rand() % 4]; | |
2456 } | |
2457 else if (shop_index<=41) //magic shop | |
2458 { | |
2459 treasure_lvl = shopMagic_treasure_lvl[shop_index-28]; | |
2460 item_class = 22; //misc | |
2461 } | |
2462 else if (shop_index<=53) //alchemist shop | |
2463 { | |
2464 if (item_count<6) | |
2465 { | |
2466 pParty->StandartItemsInShops[shop_index][item_count].Reset(); | |
2467 pParty->StandartItemsInShops[shop_index][item_count].uItemID = 220; //potion bottle | |
2468 continue; | |
2469 } | |
2470 else | |
2471 { | |
2472 treasure_lvl = shopAlch_treasure_lvl[shop_index-41]; | |
2473 item_class = 45; //reagent | |
2474 } | |
2475 } | |
2476 pItemsTable->GenerateItem(treasure_lvl, item_class, &pParty->StandartItemsInShops[shop_index][item_count]); | |
2477 pParty->StandartItemsInShops[shop_index][item_count].SetIdentified(); //identified | |
2478 } | |
2479 } | |
2480 pParty->InTheShopFlags[shop_index] = 0; | |
2481 } | |
2482 | |
2483 //----- (004B8F94) -------------------------------------------------------- | |
2484 void GenerateSpecialShopItems() | |
461 | 2485 { |
463 | 2486 signed int item_count; |
2487 signed int shop_index; | |
2488 int treasure_lvl; | |
2489 int item_class; | |
2490 int mdf; | |
2491 | |
2492 shop_index = (signed int)window_SpeakInHouse->ptr_1C; | |
2493 if ( uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType] ) | |
2494 { | |
2495 for (item_count=0; item_count<=uItemsAmountPerShopType[p2DEvents[shop_index - 1].uType]; ++item_count ) | |
2496 { | |
2497 if (shop_index<=14) //weapon shop | |
2498 { | |
2499 treasure_lvl = shopWeap_variation_spc[shop_index].treasure_level; | |
2500 item_class = shopWeap_variation_spc[shop_index].item_class[rand() % 4]; | |
2501 } | |
2502 else if (shop_index<=28) //armor shop | |
2503 { | |
2504 mdf =0; | |
2505 if (item_count > 3) | |
2506 ++mdf; | |
470 | 2507 treasure_lvl = shopArmr_variation_spc[2*(shop_index-15)+mdf].treasure_level; |
2508 item_class =shopArmr_variation_spc[2*(shop_index-15)+mdf].item_class[rand() % 4]; | |
463 | 2509 } |
2510 else if (shop_index<=41) //magic shop | |
2511 { | |
2512 treasure_lvl = shopMagicSpc_treasure_lvl[shop_index-28]; | |
2513 item_class = 22; //misc | |
2514 } | |
2515 else if (shop_index<=53) //alchemist shop | |
2516 { | |
2517 if (item_count<6) | |
2518 { | |
470 | 2519 pParty->SpecialItemsInShops[shop_index][item_count].Reset(); |
2520 pParty->SpecialItemsInShops[shop_index][item_count].uItemID = rand() % 32 + 740; //mscrool | |
463 | 2521 continue; |
2522 } | |
2523 else | |
2524 { | |
470 | 2525 treasure_lvl = shopAlchSpc_treasure_lvl[shop_index-41]; |
463 | 2526 item_class = 44; //potion |
2527 } | |
2528 } | |
470 | 2529 pItemsTable->GenerateItem(treasure_lvl, item_class, &pParty->SpecialItemsInShops[shop_index][item_count]); |
2530 pParty->SpecialItemsInShops[shop_index][item_count].SetIdentified(); //identified | |
463 | 2531 } |
2532 } | |
2533 pParty->InTheShopFlags[shop_index] = 0; | |
461 | 2534 } |
2535 | |
2536 | |
463 | 2537 //----- (00450218) -------------------------------------------------------- |
598 | 2538 void GenerateItemsInChest() |
526 | 2539 { |
598 | 2540 unsigned int v0; // eax@1 |
2541 Chest *v1; // ebx@1 | |
2542 MapInfo *v2; // esi@1 | |
2543 ItemGen *v3; // ebx@2 | |
2544 int v4; // ebp@4 | |
2545 int v5; // edi@4 | |
2546 int v6; // esi@4 | |
2547 int v7; // eax@4 | |
2548 signed int v8; // esi@4 | |
2549 int v9; // edx@4 | |
2550 int v10; // esi@8 | |
2551 int v11; // ebp@25 | |
2552 int v12; // esi@25 | |
2553 signed int v13; // ebp@27 | |
2554 ItemGen *v14; // edi@28 | |
2555 signed int v15; // edx@32 | |
2556 signed __int64 v16; // qtt@32 | |
2557 int v17; // esi@34 | |
2558 signed int v18; // [sp+10h] [bp-18h]@1 | |
2559 int v19; // [sp+14h] [bp-14h]@4 | |
2560 MapInfo *v20; // [sp+18h] [bp-10h]@1 | |
2561 Chest *v21; // [sp+1Ch] [bp-Ch]@1 | |
2562 int v22; // [sp+20h] [bp-8h]@26 | |
2563 signed int v23; // [sp+24h] [bp-4h]@2 | |
461 | 2564 |
598 | 2565 v18 = rand() % 100; //main random |
1477
7ef4b64f6329
* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents:
1358
diff
changeset
|
2566 v0 = pMapStats->GetMapInfo(pCurrentMapName); |
598 | 2567 // v1 = pChests; |
2568 v2 = &pMapStats->pInfos[v0]; | |
2569 //v21 = pChests; | |
2570 //v20 = &pMapStats->pInfos[v0]; | |
2571 for(int i=1; i<20;++i) | |
2572 { | |
2573 for(int j=0; j<140;++j) | |
2574 { | |
526 | 2575 |
598 | 2576 v3 = &pChests[i].igChestItems[j]; |
2577 if ( v3->uItemID < 0 ) | |
2578 { | |
2579 v4 = rand() % 5; //additional items in chect | |
2580 v5 = (unsigned __int8)byte_4E8168[abs((int)v3->uItemID)-1][2*v2->Treasure_prob]; | |
2581 v6 = (unsigned __int8)byte_4E8168[abs((int)v3->uItemID)-1][2*v2->Treasure_prob+1]; | |
2582 v8 = v6 - v5 + 1; | |
2583 v9 = v5 + rand() % v8; //treasure level | |
2584 if (v9<7) | |
2585 { | |
2586 if (v18<20) | |
2587 { | |
2588 v3->Reset(); | |
2589 } | |
2590 else if (v18<60) //generate gold | |
2591 { | |
2592 v10=0; | |
2593 v3->Reset(); | |
2594 switch (v9) | |
2595 { | |
2596 case 1: //small gold | |
2597 v10 = rand() % 51 + 50; | |
2598 v3->uItemID = 197; | |
2599 break; | |
2600 case 2://small gold | |
2601 v10 = rand() % 101 + 100; | |
2602 v3->uItemID = 197; | |
2603 break; | |
2604 case 3: //medium | |
2605 v10 = rand() % 301 + 200; | |
2606 v3->uItemID = 198; | |
2607 break; | |
2608 case 4: //medium | |
2609 v10 = rand() % 501 + 500; | |
2610 v3->uItemID = 198; | |
2611 break; | |
2612 case 5: //big | |
2613 v10 = rand() % 1001 + 1000; | |
2614 v3->uItemID = 199; | |
2615 break; | |
2616 case 6: //big | |
2617 v10 = rand() % 3001 + 2000; | |
2618 v3->uItemID = 199; | |
2619 break; | |
2620 } | |
2621 v3->SetIdentified(); | |
2622 v3->uSpecEnchantmentType = v10; | |
2623 } | |
2624 else | |
2625 { | |
2626 pItemsTable->GenerateItem(v9, 0, v3); | |
2627 } | |
2628 | |
2629 v12 = 0; | |
2630 //generate more items | |
2631 for (v11=0; v11<v4; ++v11) | |
2632 { | |
2633 | |
2634 if ( v12 >= 140 ) | |
2635 break; | |
2636 while ( !(pChests[i].igChestItems[v12].uItemID==0) &&(v12<140)) | |
2637 { | |
2638 ++v12; | |
2639 } | |
2640 v14=&pChests[i].igChestItems[v12]; | |
2641 v18 = rand() % 100; | |
2642 if (v18<20) | |
2643 { | |
2644 v3->Reset(); | |
2645 } | |
2646 else if (v18<60) //generate gold | |
2647 { | |
2648 v10=0; | |
2649 v3->Reset(); | |
2650 switch (v9) | |
2651 { | |
2652 case 1: //small gold | |
2653 v10 = rand() % 51 + 50; | |
2654 v14->uItemID = 197; | |
2655 break; | |
2656 case 2://small gold | |
2657 v10 = rand() % 101 + 100; | |
2658 v14->uItemID = 197; | |
2659 break; | |
2660 case 3: //medium | |
2661 v10 = rand() % 301 + 200; | |
2662 v14->uItemID = 198; | |
2663 break; | |
2664 case 4: //medium | |
2665 v10 = rand() % 501 + 500; | |
2666 v14->uItemID = 198; | |
2667 break; | |
2668 case 5: //big | |
2669 v10 = rand() % 1001 + 1000; | |
2670 v14->uItemID = 199; | |
2671 break; | |
2672 case 6: //big | |
2673 v10 = rand() % 3001 + 2000; | |
2674 v14->uItemID = 199; | |
2675 break; | |
2676 } | |
2677 v14->SetIdentified(); | |
2678 v14->uSpecEnchantmentType = v10; | |
2679 } | |
2680 else | |
2681 { | |
2682 pItemsTable->GenerateItem(v9, 0, v14); | |
2683 } | |
2684 ++v12; | |
2685 } | |
2686 } | |
2687 else | |
2688 v3->GenerateArtifact(); | |
526 | 2689 } |
598 | 2690 } |
2691 } | |
2692 | |
2693 } | |
461 | 2694 |
2695 | |
2696 | |
2697 | |
463 | 2698 // 4505CC: using guessed type int var_A0[32]; |
2699 //----- (004B3703) -------------------------------------------------------- | |
473 | 2700 void FillAviableSkillsToTeach( int _this ) |
2701 { | |
2702 char *v30; // ecx@65 | |
2703 unsigned int v29; // edx@56 | |
2704 int v15; // ecx@19 | |
2705 int v33; // [sp-4h] [bp-2Ch]@23 | |
2706 int v34; // [sp-4h] [bp-2Ch]@43 | |
2707 int v21; // ecx@34 | |
2708 int v35[5]; // [sp+Ch] [bp-1Ch]@8 | |
2709 int v37=0; // [sp+24h] [bp-4h]@1* | |
2710 int i=0; | |
2711 | |
2712 dword_F8B1DC = 0; | |
2713 | |
2714 switch (_this) | |
463 | 2715 { |
473 | 2716 case 1: //shop weapon |
2717 for (int i=0; i<2; ++i) | |
2718 { | |
2719 for (int j=0; j<4; ++j) | |
2720 { | |
2721 if ( i ) | |
2722 v21 = shopWeap_variation_spc[(unsigned int)window_SpeakInHouse->ptr_1C].item_class[j]; | |
2723 else | |
2724 v21 = shopWeap_variation_ord[(unsigned int)window_SpeakInHouse->ptr_1C].item_class[j]; | |
463 | 2725 |
473 | 2726 switch (v21) |
463 | 2727 { |
473 | 2728 case 23: v34 = 37; break; |
2729 case 24: v34 = 38; break; | |
2730 case 25: v34 = 39; break; | |
2731 case 26: v34 = 40; break; | |
2732 case 27: v34 = 41; break; | |
2733 case 28: v34 = 42; break; | |
2734 case 30: v34 = 36; break; | |
2735 default: | |
2736 continue; | |
2737 } | |
2738 v37 = sub_4BE571(v34, v35, v37, 5); | |
463 | 2739 } |
2740 } | |
473 | 2741 break; |
2742 case 2: //shop armor | |
2743 | |
2744 for (int i=0; i<2; ++i) | |
463 | 2745 { |
473 | 2746 for (int j=0; j<2; ++j) |
463 | 2747 { |
473 | 2748 for (int k=0; k<4; ++k) |
463 | 2749 { |
473 | 2750 if ( i ) |
2751 v15 = shopArmr_variation_spc[(unsigned int)window_SpeakInHouse->ptr_1C-15+j].item_class[k]; | |
2752 else | |
2753 v15 = shopArmr_variation_ord[(unsigned int)window_SpeakInHouse->ptr_1C-15+j].item_class[k]; | |
2754 switch (v15) | |
463 | 2755 { |
473 | 2756 case 31: v33 = 45; break; |
2757 case 32: v33 = 46; break; | |
2758 case 33: v33 = 47; break; | |
2759 case 34: v33 = 44; break; | |
2760 default: | |
2761 continue; | |
463 | 2762 } |
473 | 2763 v37 = sub_4BE571(v33, v35, v37, 5); |
463 | 2764 } |
2765 } | |
2766 } | |
473 | 2767 break; |
2768 case 3: //shop magic | |
2769 v37 = 2; | |
2770 v35[0] = 57; | |
2771 v35[1] = 59; | |
2772 break; | |
2773 case 4: //shop alchemist | |
2774 v37 = 2; | |
2775 v35[0] = 71; | |
2776 v35[1] = 68; | |
2777 break; | |
2778 case 21: //tavern | |
2779 v37 = 3; | |
2780 v35[0] = 70; | |
2781 v35[1] = 65; | |
2782 v35[2] = 62; | |
2783 break; | |
2784 case 23: //temple | |
2785 v37 = 3; | |
2786 v35[0] = 67; | |
2787 v35[1] = 66; | |
2788 v35[2] = 58; | |
2789 break; | |
2790 case 30: ///trainig | |
2791 v37 = 2; | |
2792 v35[0] = 69; | |
2793 v35[1] = 60; | |
2794 break; | |
2795 } | |
2796 for(i=0;i<v37;++i) | |
2797 { | |
2798 v29=v35[i]; | |
2799 switch(v29) | |
463 | 2800 { |
473 | 2801 case 40 :v30 = pSkillNames[4]; break; |
2802 case 5 : v30 = pSkillNames[23]; break; | |
2803 case 36 :v30 = pSkillNames[0]; break; | |
2804 case 37 :v30 = pSkillNames[1]; break; | |
2805 case 38 :v30 = pSkillNames[2]; break; | |
2806 case 39 :v30 = pSkillNames[3]; break; | |
2807 case 41 :v30 = pSkillNames[5]; break; | |
2808 case 42 :v30 = pSkillNames[6]; break; | |
2809 case 44 :v30 = pSkillNames[8]; break; | |
2810 case 45 :v30 = pSkillNames[9]; break; | |
2811 case 46 :v30 = pSkillNames[10]; break; | |
2812 case 47 :v30 = pSkillNames[11]; break; | |
2813 case 66 :v30 = pSkillNames[30]; break; | |
2814 case 57 :v30 = pSkillNames[21]; break; | |
2815 case 58 :v30 = pSkillNames[22]; break; | |
2816 case 60 :v30 = pSkillNames[24]; break; | |
2817 case 62 :v30 = pSkillNames[26]; break; | |
2818 case 65 :v30 = pSkillNames[29]; break; | |
2819 case 67:v30 = pSkillNames[31]; break; | |
2820 case 68:v30 = pSkillNames[32]; break; | |
2821 case 69:v30 = pSkillNames[33]; break; | |
2822 case 70:v30 = pSkillNames[34]; break; | |
2823 case 71:v30 = pSkillNames[35]; break; | |
2824 default: | |
463 | 2825 v30 = pGlobalTXT_LocalizationStrings[127]; //"No Text!" |
2826 } | |
473 | 2827 pShopOptions[dword_F8B1DC] = v30; |
2828 ++dword_F8B1DC; | |
2829 CreateButtonInColumn(i+1, v29); | |
463 | 2830 } |
972 | 2831 pDialogueWindow->_41D08F_set_keyboard_control_group(i, 1, 0, 2); |
473 | 2832 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; |
2833 } | |
475 | 2834 |
2835 //----- (004BE571) -------------------------------------------------------- | |
2836 int sub_4BE571(int a1, int *a2, int a3, int a4) | |
2837 { | |
2838 int result; // eax@1 | |
2839 int i; // esi@3 | |
2840 | |
2841 result = a3; | |
2842 if ( a3 < a4 ) | |
2843 { | |
2844 for ( i = 0; i < a3; ++i ) | |
2845 { | |
2846 if ( a1 == a2[i] ) | |
2847 break; | |
2848 } | |
2849 if ( i == a3 ) | |
2850 { | |
2851 a2[a3] = a1; | |
2852 result = a3 + 1; | |
2853 } | |
2854 return result; | |
2855 } | |
2856 else | |
2857 { | |
2858 return a4; | |
2859 } | |
2860 } | |
1297 | 2861 //----- (0043C91D) -------------------------------------------------------- |
2862 int __fastcall GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder) | |
2863 { | |
2864 int result; // eax@2 | |
2865 char v5; // zf@3 | |
2866 const char *v6; // [sp-Ch] [bp-18h]@88 | |
2867 signed int v7; // [sp-8h] [bp-14h]@61 | |
2868 int v8; // [sp-4h] [bp-10h]@61 | |
2869 signed int v9; // [sp-4h] [bp-10h]@69 | |
475 | 2870 |
1297 | 2871 result = 0; //BUG fn is void |
2872 if ( item_id <= 500 ) | |
2873 { | |
2874 //v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0; | |
2875 v5 = party_has_equipment[(item_id - 100) + 32 + 2] == 0; | |
2876 switch ( item_id ) | |
2877 { | |
2878 case 516: | |
2879 v5 = byte_5111F6[2] == 0; | |
2880 break; | |
2881 case 505: | |
2882 v5 = byte_5111F6[1] == 0; | |
2883 break; | |
2884 case 504: | |
2885 v5 = byte_5111F6[0] == 0; | |
2886 break; | |
2887 case 533: | |
2888 v5 = byte_5111F6[16] == 0; | |
2889 break; | |
2890 case 512: | |
2891 v5 = byte_5111F6[3] == 0; | |
2892 break; | |
2893 case 521: | |
2894 v5 = byte_5111F6[4] == 0; | |
2895 break; | |
2896 case 522: | |
2897 v5 = byte_5111F6[5] == 0; | |
2898 break; | |
2899 case 523: | |
2900 v5 = byte_5111F6[6] == 0; | |
2901 break; | |
2902 case 532: | |
2903 v5 = byte_5111F6[7] == 0; | |
2904 break; | |
2905 case 544: | |
2906 v5 = byte_5111F6[8] == 0; | |
2907 break; | |
2908 case 524: | |
2909 v5 = byte_5111F6[9] == 0; | |
2910 break; | |
2911 case 535: | |
2912 v5 = byte_5111F6[10] == 0; | |
2913 break; | |
2914 case 525: | |
2915 v5 = byte_5111F6[11] == 0; | |
2916 break; | |
2917 case 530: | |
2918 v5 = byte_5111F6[12] == 0; | |
2919 break; | |
2920 case 547: | |
2921 v5 = byte_5111F6[13] == 0; | |
2922 break; | |
2923 case 548: | |
2924 v5 = byte_5111F6[14] == 0; | |
2925 break; | |
2926 case 550: | |
2927 v5 = byte_5111F6[15] == 0; | |
2928 break; | |
2929 default: | |
2930 break; | |
2931 } | |
2932 if ( v5 ) | |
2933 return result; | |
2934 result = 516; | |
2935 if ( item_id < 66 || item_id > 78 ) | |
2936 { | |
2937 if ( item_id == 516 ) | |
2938 { | |
2939 if ( !shoulder ) | |
2940 return sprintf(pOut, "item%3.3dv%d", 234, index); | |
2941 if ( shoulder == 1 ) | |
2942 return sprintf(pOut, "item%3.3dv%da1", 234, index); | |
2943 if ( shoulder == 2 ) | |
2944 return sprintf(pOut, "item%3.3dv%da2", 234, index); | |
2945 } | |
2946 if ( item_id != 504 && item_id != 505 && item_id != 533 ) | |
2947 { | |
2948 if ( (item_id < 100 || item_id > 104) && item_id != 524 && item_id != 535 ) | |
2949 { | |
2950 if ( item_id >= 115 && item_id <= 119 || item_id == 512 ) | |
2951 { | |
2952 if ( item_id == 512 ) | |
2953 item_id = 312; | |
2954 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
2955 } | |
2956 if ( (item_id < 89 || item_id > 99) && item_id != 521 && item_id != 522 && item_id != 523 && item_id != 532 && item_id != 544 ) | |
2957 { | |
2958 result = 525; | |
2959 if ( (item_id < 105 || item_id > 109) && item_id != 525 && item_id != 530 && item_id != 547 && item_id != 548 && item_id != 550 ) | |
2960 return result; | |
2961 switch ( item_id ) | |
2962 { | |
2963 case 525: | |
2964 item_id = 325; | |
2965 break; | |
2966 case 530: | |
2967 item_id = 330; | |
2968 break; | |
2969 case 547: | |
2970 item_id = 347; | |
2971 break; | |
2972 case 548: | |
2973 item_id = 348; | |
2974 break; | |
2975 case 550: | |
2976 item_id = 350; | |
2977 break; | |
2978 } | |
2979 if ( !shoulder ) | |
2980 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
2981 return sprintf(pOut, "item%3.3dv%da1", item_id, index); | |
2982 } | |
2983 if ( item_id == 521 ) | |
2984 return sprintf(pOut, "item%3.3dv%d", 239, index); | |
2985 if ( item_id == 522 ) | |
2986 return sprintf(pOut, "item%3.3dv%d", 240, index); | |
2987 if ( item_id == 523 ) | |
2988 return sprintf(pOut, "item%3.3dv%d", 241, index); | |
2989 if ( item_id != 532 ) | |
2990 { | |
2991 if ( item_id == 544 ) | |
2992 item_id = 344; | |
2993 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
2994 } | |
2995 return sprintf(pOut, "item%3.3dv%d", 93, index); | |
2996 } | |
2997 if ( item_id == 524 ) | |
2998 return sprintf(pOut, "item%3.3dv%d", 324, index); | |
2999 if ( item_id == 535 ) | |
3000 item_id = 104; | |
3001 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
3002 } | |
3003 } | |
3004 if ( item_id != 516 ) | |
3005 { | |
3006 switch ( item_id ) | |
3007 { | |
3008 case 504: | |
3009 item_id = 235; | |
3010 break; | |
3011 case 505: | |
3012 item_id = 236; | |
3013 break; | |
3014 case 533: | |
3015 item_id = 73; | |
3016 break; | |
3017 } | |
3018 if ( !shoulder ) | |
3019 return sprintf(pOut, "item%3.3dv%d", item_id, index); | |
3020 if ( shoulder == 1 ) | |
3021 return sprintf(pOut, "item%3.3dv%da1", item_id, index); | |
3022 if ( shoulder == 2 ) | |
3023 return sprintf(pOut, "item%3.3dv%da2", item_id, index); | |
3024 } | |
3025 if ( !shoulder ) | |
3026 return sprintf(pOut, "item%3.3dv%d", 234, index); | |
3027 if ( shoulder == 1 ) | |
3028 return sprintf(pOut, "item%3.3dv%da1", 234, index); | |
3029 if ( shoulder == 2 ) | |
3030 return sprintf(pOut, "item%3.3dv%da2", 234, index); | |
3031 } | |
3032 result = item_id - 504; | |
3033 return result; | |
3034 } | |
475 | 3035 |