Mercurial > mm7
annotate Items.cpp @ 1947:33f3103b062b
pActorBuffs[1] to pActorBuffs[ACTOR_BUFF_CHARM]
author | Grumpy7 |
---|---|
date | Fri, 25 Oct 2013 11:09:52 -0700 |
parents | 5fcf6023f9c3 |
children | 33787c8938a5 |
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 { | |
1933
5fcf6023f9c3
DamageMonsterFromParty some additional vars removed, changed the ordering part to something more readable
Grumpy7
parents:
1920
diff
changeset
|
157 *draintargetHP = false; |
385 | 158 *damage_type = 0; |
159 if ( !uItemID ) | |
160 return 0; | |
161 UpdateTempBonus(pParty->uTimePlayed); | |
162 if (uItemID == 501 ) //Iron Feather -sword | |
163 { | |
164 *damage_type = 1; | |
165 return rand() % 10 + 6; | |
166 } | |
167 if (uItemID == 507 ) //Ghoulsbane -axe | |
168 { | |
169 *damage_type = 0; | |
170 return rand() % 16 + 3; | |
171 } | |
172 if ( uItemID == 510 ) //Ullyses -bow | |
173 { | |
174 *damage_type = 2; | |
175 return rand() % 4 + 9; | |
176 } | |
177 if ( uItemID == 517 ) //Old Nick -dagger | |
178 { | |
179 *damage_type = 8; | |
180 return 8; | |
181 } | |
0 | 182 |
385 | 183 switch (uSpecEnchantmentType) |
184 { | |
185 case 4: //Adds 3-4 points of Cold damage. | |
186 *damage_type = 2; | |
187 return rand() % 2 + 3; | |
188 break; | |
189 case 5: //Adds 6-8 points of Cold damage. | |
190 *damage_type = 2; | |
191 return rand() % 3 + 6; | |
192 break; | |
193 case 6: //Adds 9-12 points of Cold damage. | |
194 *damage_type = 2; | |
195 return rand() % 4 + 9; | |
196 break; | |
197 case 7: //Adds 2-5 points of Electrical damage. | |
198 *damage_type = 1; | |
199 return rand() % 4 + 2; | |
200 break; | |
201 case 8: //Adds 4-10 points of Electrical damage. | |
202 *damage_type = 1; | |
203 return rand() % 7 + 4; | |
204 break; | |
205 case 9: //Adds 6-15 points of Electrical damage. | |
206 *damage_type = 1; | |
207 return rand() % 10 + 6; | |
208 break; | |
209 case 10: //Adds 1-6 points of Fire damage. | |
210 *damage_type = 0; | |
211 return GetDiceResult(1, 6); | |
212 break; | |
213 case 11: //Adds 2-12 points of Fire damage. | |
214 *damage_type = 0; | |
215 return GetDiceResult(2, 6); | |
216 break; | |
217 case 12: //Adds 3-18 points of Fire damage. | |
218 *damage_type = 0; | |
219 return GetDiceResult(3, 6); | |
220 break; | |
221 case 13: //Adds 5 points of Body damage. | |
222 *damage_type = 8; | |
223 return 5; | |
224 break; | |
225 case 14: //Adds 8 points of Body damage. | |
226 *damage_type = 8; | |
227 return 8; | |
228 break; | |
229 case 15: //Adds 12 points of Body damage. | |
230 *damage_type = 8; | |
231 return 12; | |
232 break; | |
233 case 16: //Drain Hit Points from target. | |
234 case 41: //Drain Hit Points from target and Increased Weapon speed. | |
235 *damage_type = 10; | |
236 *draintargetHP = true; | |
237 return 0; | |
238 break; | |
239 case 46: //Adds 10-20 points of Fire damage and +25 Might. | |
240 *damage_type = 0; | |
241 return rand() % 11 + 10; | |
242 break; | |
243 default: | |
244 *damage_type = 0; | |
245 return 0; | |
246 | |
247 } | |
248 | |
249 } | |
0 | 250 |
251 | |
252 //----- (00402F07) -------------------------------------------------------- | |
253 void ItemGen::Reset() | |
254 { | |
377 | 255 this->uHolderPlayer = 0; |
0 | 256 this->uAttributes = 0; |
257 this->uNumCharges = 0; | |
377 | 258 this->uSpecEnchantmentType = 0; |
1599 | 259 this->m_enchantmentStrength = 0; |
570 | 260 this->uEnchantmentType = 0; |
0 | 261 this->uItemID = 0; |
262 this->uBodyAnchor = 0; | |
263 this->uExpireTime = 0i64; | |
264 } | |
265 | |
266 //----- (00458260) -------------------------------------------------------- | |
267 void ItemGen::UpdateTempBonus(__int64 uTimePlayed) | |
268 { | |
463 | 269 if ( this->uAttributes & ITEM_TEMP_BONUS ) |
0 | 270 { |
271 if ( uTimePlayed > (signed __int64)this->uExpireTime ) | |
272 { | |
570 | 273 this->uEnchantmentType = 0; |
377 | 274 this->uSpecEnchantmentType = 0; |
463 | 275 this->uAttributes = this->uAttributes&(~ITEM_TEMP_BONUS); |
0 | 276 } |
277 } | |
278 } | |
279 | |
280 //----- (0045814E) -------------------------------------------------------- | |
374 | 281 void ItemsTable::Release() |
0 | 282 { |
283 if ( pMonstersTXT_Raw ) | |
1583 | 284 free(pMonstersTXT_Raw); |
0 | 285 if ( pMonsterPlacementTXT_Raw ) |
1583 | 286 free(pMonsterPlacementTXT_Raw); |
0 | 287 if ( pSkillDescTXT_Raw ) |
1583 | 288 free(pSkillDescTXT_Raw); |
374 | 289 if (pSpcItemsTXT_Raw ) |
1583 | 290 free(pSpcItemsTXT_Raw); |
374 | 291 if ( pStdItemsTXT_Raw ) |
1583 | 292 free(pStdItemsTXT_Raw); |
374 | 293 if ( pRndItemsTXT_Raw ) |
1583 | 294 free(pRndItemsTXT_Raw); |
374 | 295 if ( pItemsTXT_Raw ) |
1583 | 296 free(pItemsTXT_Raw); |
0 | 297 if ( pHostileTXT_Raw ) |
1583 | 298 free(pHostileTXT_Raw); |
0 | 299 if ( pHistoryTXT_Raw ) |
1583 | 300 free(pHistoryTXT_Raw); |
0 | 301 if ( pPotionsTXT_Raw ) |
1583 | 302 free(pPotionsTXT_Raw); |
0 | 303 if ( pPotionNotesTXT_Raw ) |
1583 | 304 free(pPotionNotesTXT_Raw); |
374 | 305 pSpcItemsTXT_Raw = NULL; |
306 pSkillDescTXT_Raw = NULL; | |
307 pStdItemsTXT_Raw = NULL; | |
308 pRndItemsTXT_Raw = NULL; | |
309 pItemsTXT_Raw = NULL; | |
0 | 310 } |
311 | |
1082 | 312 |
0 | 313 //----- (00456D84) -------------------------------------------------------- |
314 void ItemsTable::Initialize() | |
224 | 315 { |
316 int i,j; | |
317 char* test_string; | |
229 | 318 unsigned char c; |
224 | 319 bool break_loop; |
320 unsigned int temp_str_len; | |
321 char* tmp_pos; | |
322 int decode_step; | |
323 int item_counter; | |
324 | |
325 pMapStats = new MapStats; | |
326 pMapStats->Initialize(); | |
327 | |
328 pMonsterStats = new MonsterStats; | |
329 pMonsterStats->Initialize(); | |
330 pMonsterStats->InitializePlacements(); | |
331 | |
332 pSpellStats = new SpellStats; | |
333 pSpellStats->Initialize(); | |
334 | |
335 LoadPotions(); | |
336 LoadPotionNotes(); | |
337 | |
338 pFactionTable = new FactionTable; | |
339 pFactionTable->Initialize(); | |
340 | |
341 pStorylineText = new StorylineText; | |
342 pStorylineText->Initialize(); | |
0 | 343 |
224 | 344 pStdItemsTXT_Raw = NULL; |
345 pStdItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stditems.txt", 0); | |
346 strtok(pStdItemsTXT_Raw, "\r"); | |
347 strtok(NULL, "\r"); | |
348 strtok(NULL, "\r"); | |
349 strtok(NULL, "\r"); | |
350 //Standard Bonuses by Group | |
351 for (i=0;i<24;++i) | |
352 { | |
353 test_string = strtok(NULL, "\r") + 1; | |
354 break_loop = false; | |
355 decode_step=0; | |
356 do | |
357 { | |
358 c = *(unsigned char*)test_string; | |
359 temp_str_len = 0; | |
360 while((c!='\t')&&(c>0)) | |
361 { | |
362 ++temp_str_len; | |
363 c=test_string[temp_str_len]; | |
364 } | |
365 tmp_pos=test_string+temp_str_len; | |
366 if (*tmp_pos == 0) | |
367 break_loop = true; | |
368 *tmp_pos = 0; | |
369 if (temp_str_len) | |
370 { | |
371 switch (decode_step) | |
372 { | |
373 case 0: | |
374 pEnchantments[i].pBonusStat=RemoveQuotes(test_string); | |
375 break; | |
376 case 1: | |
377 pEnchantments[i].pOfName= RemoveQuotes(test_string); | |
378 break; | |
379 default: | |
380 pEnchantments[i].to_item[decode_step-2]=atoi(test_string); | |
381 } | |
382 } | |
383 else | |
384 { | |
570 | 385 if (decode_step) |
224 | 386 break_loop = true; |
387 } | |
388 ++decode_step; | |
389 test_string=tmp_pos+1; | |
390 } while ((decode_step<11)&&!break_loop); | |
391 } | |
0 | 392 |
224 | 393 memset(&pEnchantmentsSumm, 0, 36); |
394 for(i=0;i<9;++i) | |
395 { | |
396 for (j=0;j<24;++j) | |
397 pEnchantmentsSumm[i]+=pEnchantments[j].to_item[i]; | |
398 } | |
0 | 399 |
224 | 400 //Bonus range for Standard by Level |
401 strtok(NULL, "\r"); | |
402 strtok(NULL, "\r"); | |
403 strtok(NULL, "\r"); | |
404 strtok(NULL, "\r"); | |
405 strtok(NULL, "\r"); | |
406 for(i=0;i<6;++i) //counted from 1 | |
407 { | |
408 test_string = strtok(NULL, "\r") + 1; | |
409 break_loop = false; | |
410 decode_step=0; | |
411 do | |
412 { | |
413 c = *(unsigned char*)test_string; | |
414 temp_str_len = 0; | |
415 while((c!='\t')&&(c>0)) | |
416 { | |
417 ++temp_str_len; | |
418 c=test_string[temp_str_len]; | |
419 } | |
420 tmp_pos=test_string+temp_str_len; | |
421 if (*tmp_pos == 0) | |
422 break_loop = true; | |
423 *tmp_pos = 0; | |
424 if (decode_step==2) | |
425 bonus_ranges[i].minR = atoi(test_string); | |
426 else if (decode_step==3) | |
427 bonus_ranges[i].maxR =atoi(test_string); | |
428 ++decode_step; | |
429 test_string=tmp_pos+1; | |
430 } while ((decode_step<4)&&!break_loop); | |
431 } | |
432 | |
222 | 433 |
224 | 434 pSpcItemsTXT_Raw = 0; |
435 pSpcItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spcitems.txt", 0); | |
436 strtok(pSpcItemsTXT_Raw, "\r"); | |
437 strtok(NULL, "\r"); | |
438 strtok(NULL, "\r"); | |
439 strtok(NULL, "\r"); | |
440 for (i=0;i<72;++i) | |
441 { | |
442 test_string = strtok(NULL, "\r") + 1; | |
443 break_loop = false; | |
444 decode_step=0; | |
445 do | |
446 { | |
447 c = *(unsigned char*)test_string; | |
448 temp_str_len = 0; | |
449 while((c!='\t')&&(c>0)) | |
450 { | |
451 ++temp_str_len; | |
452 c=test_string[temp_str_len]; | |
453 } | |
454 tmp_pos=test_string+temp_str_len; | |
455 if (*tmp_pos == 0) | |
456 break_loop = true; | |
457 *tmp_pos = 0; | |
458 if (temp_str_len) | |
459 { | |
460 switch (decode_step) | |
461 { | |
462 case 0: | |
463 pSpecialEnchantments[i].pBonusStatement=RemoveQuotes(test_string); | |
464 break; | |
465 case 1: | |
466 pSpecialEnchantments[i].pNameAdd= RemoveQuotes(test_string); | |
467 break; | |
468 case 14: | |
469 int res; | |
470 res=atoi(test_string); | |
471 if(!res) | |
472 { | |
473 ++test_string; | |
474 while (*test_string==' ')//fix X 2 case | |
475 ++test_string; | |
222 | 476 res=atoi(test_string); |
224 | 477 } |
478 pSpecialEnchantments[i].iValue=res; | |
479 break; | |
480 case 15: | |
481 pSpecialEnchantments[i].iTreasureLevel= tolower(*test_string) - 97;; | |
482 break; | |
483 default: | |
484 pSpecialEnchantments[i].to_item_apply[decode_step-2]=atoi(test_string); | |
485 } | |
486 } | |
487 else | |
488 { | |
570 | 489 if (decode_step) |
224 | 490 break_loop = true; |
491 } | |
492 ++decode_step; | |
493 test_string=tmp_pos+1; | |
494 } while ((decode_step<16)&&!break_loop); | |
495 } | |
496 | |
497 pSpecialEnchantments_count = 71; | |
498 memset(&pSpecialEnchantmentsSumm, 0, 96); | |
499 for(i=0;i<12;++i) | |
500 { | |
570 | 501 for (j=0;j<=pSpecialEnchantments_count;++j) |
224 | 502 pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i]; |
503 } | |
222 | 504 |
224 | 505 Initialize2DA(); |
222 | 506 |
224 | 507 pItemsTXT_Raw = NULL; |
508 pItemsTXT_Raw = (char*) pEvents_LOD->LoadRaw("items.txt", 0); | |
509 strtok(pItemsTXT_Raw, "\r"); | |
510 strtok(NULL, "\r"); | |
511 uAllItemsCount = 0; | |
512 item_counter = 0; | |
222 | 513 while (true) |
514 { | |
515 test_string = strtok(NULL, "\r") + 1; | |
516 break_loop = false; | |
517 decode_step=0; | |
518 do | |
519 { | |
520 c = *(unsigned char*)test_string; | |
521 temp_str_len = 0; | |
522 while((c!='\t')&&(c>0)) | |
523 { | |
524 ++temp_str_len; | |
525 c=test_string[temp_str_len]; | |
526 } | |
527 tmp_pos=test_string+temp_str_len; | |
528 if (*tmp_pos == 0) | |
529 break_loop = true; | |
530 *tmp_pos = 0; | |
531 if (temp_str_len) | |
532 { | |
533 switch (decode_step) | |
534 { | |
535 case 0: //Item # | |
536 item_counter=atoi(test_string); | |
537 uAllItemsCount=item_counter; | |
538 break; | |
539 case 1: //Pic File | |
540 pItems[item_counter].pIconName = RemoveQuotes(test_string); | |
541 break; | |
542 case 2: //Name | |
543 pItems[item_counter].pName = RemoveQuotes(test_string); | |
544 break; | |
545 case 3: //Value | |
546 pItems[item_counter].uValue=atoi(test_string); | |
547 break; | |
548 case 4: //Equip Stat | |
549 { | |
1104 | 550 if ( !_stricmp(test_string, "weapon") ) |
222 | 551 { |
816 | 552 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; |
222 | 553 break; |
554 } | |
1104 | 555 if ( !_stricmp(test_string, "weapon2") ) |
222 | 556 { |
816 | 557 pItems[item_counter].uEquipType = EQUIP_MAIN_HAND; |
222 | 558 break; |
559 } | |
1104 | 560 if ( !_stricmp(test_string, "weapon1or2") ) |
222 | 561 { |
816 | 562 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; |
222 | 563 break; |
564 } | |
1104 | 565 if ( !(_stricmp(test_string, "missile")&&_stricmp(test_string, "bow"))) |
222 | 566 { |
365 | 567 pItems[item_counter].uEquipType = EQUIP_BOW; |
222 | 568 break; |
569 } | |
1104 | 570 if ( !_stricmp(test_string, "armor") ) |
222 | 571 { |
365 | 572 pItems[item_counter].uEquipType = EQUIP_ARMOUR; |
222 | 573 break; |
574 } | |
1104 | 575 if ( !_stricmp(test_string, "shield") ) |
222 | 576 { |
365 | 577 pItems[item_counter].uEquipType = EQUIP_SHIELD; |
222 | 578 break; |
579 } | |
1104 | 580 if ( !_stricmp(test_string, "helm") ) |
222 | 581 { |
365 | 582 pItems[item_counter].uEquipType = EQUIP_HELMET; |
222 | 583 break; |
584 } | |
1104 | 585 if ( !_stricmp(test_string, "belt") ) |
222 | 586 { |
365 | 587 pItems[item_counter].uEquipType = EQUIP_BELT; |
222 | 588 break; |
589 } | |
1104 | 590 if ( !_stricmp(test_string, "cloak") ) |
222 | 591 { |
365 | 592 pItems[item_counter].uEquipType = EQUIP_CLOAK; |
222 | 593 break; |
594 } | |
1104 | 595 if ( !_stricmp(test_string, "gauntlets") ) |
222 | 596 { |
365 | 597 pItems[item_counter].uEquipType = EQUIP_GAUNTLETS; |
222 | 598 break; |
599 } | |
1104 | 600 if ( !_stricmp(test_string, "boots") ) |
222 | 601 { |
365 | 602 pItems[item_counter].uEquipType = EQUIP_BOOTS; |
222 | 603 break; |
604 } | |
1104 | 605 if ( !_stricmp(test_string, "ring") ) |
222 | 606 { |
365 | 607 pItems[item_counter].uEquipType = EQUIP_RING; |
222 | 608 break; |
609 } | |
1104 | 610 if ( !_stricmp(test_string, "amulet") ) |
222 | 611 { |
365 | 612 pItems[item_counter].uEquipType = EQUIP_AMULET; |
222 | 613 break; |
614 } | |
1104 | 615 if ( !_stricmp(test_string, "weaponw") ) |
222 | 616 { |
365 | 617 pItems[item_counter].uEquipType = EQUIP_WAND; |
222 | 618 break; |
619 } | |
1104 | 620 if ( !(_stricmp(test_string, "herb")&&_stricmp(test_string, "reagent"))) |
222 | 621 { |
365 | 622 pItems[item_counter].uEquipType = EQUIP_REAGENT; |
222 | 623 break; |
624 } | |
1104 | 625 if ( !_stricmp(test_string, "bottle") ) |
222 | 626 { |
365 | 627 pItems[item_counter].uEquipType = EQUIP_POTION; |
222 | 628 break; |
629 } | |
1104 | 630 if ( !_stricmp(test_string, "sscroll") ) |
222 | 631 { |
374 | 632 pItems[item_counter].uEquipType = EQUIP_SPELL_SCROLL; |
222 | 633 break; |
634 } | |
1104 | 635 if ( !_stricmp(test_string, "book") ) |
222 | 636 { |
365 | 637 pItems[item_counter].uEquipType = EQUIP_BOOK; |
222 | 638 break; |
639 } | |
1104 | 640 if ( !_stricmp(test_string, "mscroll") ) |
222 | 641 { |
374 | 642 pItems[item_counter].uEquipType = EQUIP_MESSAGE_SCROLL; |
222 | 643 break; |
644 } | |
1104 | 645 if ( !_stricmp(test_string, "gold") ) |
222 | 646 { |
365 | 647 pItems[item_counter].uEquipType = EQUIP_GOLD; |
222 | 648 break; |
649 } | |
1104 | 650 if ( !_stricmp(test_string, "gem") ) |
222 | 651 { |
365 | 652 pItems[item_counter].uEquipType = EQUIP_GEM; |
222 | 653 break; |
654 } | |
365 | 655 pItems[item_counter].uEquipType = EQUIP_NONE; |
222 | 656 break; |
657 } | |
658 case 5: //Skill Group | |
659 { | |
1104 | 660 if ( !_stricmp(test_string, "staff") ) |
222 | 661 { |
374 | 662 pItems[item_counter].uSkillType = PLAYER_SKILL_STAFF; |
222 | 663 break; |
664 } | |
1104 | 665 if ( !_stricmp(test_string, "sword") ) |
222 | 666 { |
374 | 667 pItems[item_counter].uSkillType = PLAYER_SKILL_SWORD; |
222 | 668 break; |
669 } | |
1104 | 670 if ( !_stricmp(test_string, "dagger") ) |
222 | 671 { |
374 | 672 pItems[item_counter].uSkillType = PLAYER_SKILL_DAGGER; |
222 | 673 break; |
674 } | |
1104 | 675 if ( !_stricmp(test_string, "axe") ) |
222 | 676 { |
374 | 677 pItems[item_counter].uSkillType = PLAYER_SKILL_AXE; |
222 | 678 break; |
679 } | |
1104 | 680 if ( !_stricmp(test_string, "spear") ) |
222 | 681 { |
374 | 682 pItems[item_counter].uSkillType = PLAYER_SKILL_SPEAR; |
222 | 683 break; |
684 } | |
1104 | 685 if ( !_stricmp(test_string, "bow") ) |
222 | 686 { |
374 | 687 pItems[item_counter].uSkillType = PLAYER_SKILL_BOW; |
222 | 688 break; |
689 } | |
1104 | 690 if ( !_stricmp(test_string, "mace") ) |
222 | 691 { |
374 | 692 pItems[item_counter].uSkillType = PLAYER_SKILL_MACE; |
222 | 693 break; |
694 } | |
1104 | 695 if ( !_stricmp(test_string, "blaster") ) |
222 | 696 { |
374 | 697 pItems[item_counter].uSkillType = PLAYER_SKILL_BLASTER; |
222 | 698 break; |
699 } | |
1104 | 700 if ( !_stricmp(test_string, "shield") ) |
222 | 701 { |
374 | 702 pItems[item_counter].uSkillType = PLAYER_SKILL_SHIELD; |
222 | 703 break; |
704 } | |
1104 | 705 if ( !_stricmp(test_string, "leather") ) |
222 | 706 { |
374 | 707 pItems[item_counter].uSkillType = PLAYER_SKILL_LEATHER; |
222 | 708 break; |
709 } | |
1104 | 710 if ( !_stricmp(test_string, "chain") ) |
222 | 711 { |
374 | 712 pItems[item_counter].uSkillType = PLAYER_SKILL_CHAIN; |
222 | 713 break; |
714 } | |
1104 | 715 if ( !_stricmp(test_string, "plate") ) |
222 | 716 { |
374 | 717 pItems[item_counter].uSkillType = PLAYER_SKILL_PLATE; |
222 | 718 break; |
719 } | |
1104 | 720 if ( !_stricmp(test_string, "club") ) |
222 | 721 { |
374 | 722 pItems[item_counter].uSkillType = PLAYER_SKILL_CLUB; |
222 | 723 break; |
724 } | |
385 | 725 pItems[item_counter].uSkillType = PLAYER_SKILL_MISC; |
222 | 726 break; |
727 } | |
728 case 6: //Mod1 | |
729 { | |
730 int ii; | |
731 char* test_char; | |
732 int tst_len; | |
733 tst_len=strlen(test_string); | |
734 pItems[item_counter].uDamageDice=0; | |
735 pItems[item_counter].uDamageRoll=0; | |
736 test_char=test_string; | |
737 for (ii=0; ii<tst_len; ++ii) | |
738 { | |
739 if (tolower(*test_char)=='d') | |
740 { | |
741 *test_char=0; | |
742 pItems[item_counter].uDamageDice=atoi(test_string); | |
743 pItems[item_counter].uDamageRoll=atoi(test_char+1); | |
744 *test_char='d'; | |
745 break; | |
746 } | |
747 ++test_char; | |
748 } | |
749 test_char=test_string; | |
559 | 750 if ((ii==tst_len)&&(tolower(*test_char)!='s')) |
222 | 751 { |
559 | 752 pItems[item_counter].uDamageDice=atoi(test_char); |
222 | 753 pItems[item_counter].uDamageRoll=1; |
754 } | |
755 break; | |
756 } | |
757 case 7: //Mod2 | |
758 pItems[item_counter].uDamageMod=atoi(test_string); | |
759 break; | |
760 case 8: //material | |
761 { | |
1104 | 762 if ( !_stricmp(test_string, "artifact") ) |
222 | 763 { |
377 | 764 pItems[item_counter].uMaterial = MATERIAL_ARTEFACT; |
222 | 765 break; |
766 } | |
1104 | 767 if ( !_stricmp(test_string, "relic") ) |
222 | 768 { |
377 | 769 pItems[item_counter].uMaterial = MATERIAL_RELIC; |
222 | 770 break; |
771 } | |
1104 | 772 if ( !_stricmp(test_string, "special") ) |
222 | 773 { |
377 | 774 pItems[item_counter].uMaterial = MATERIAL_SPECIAL; |
222 | 775 break; |
776 } | |
377 | 777 pItems[item_counter].uMaterial = MATERIAL_COMMON; |
222 | 778 break;} |
779 case 9: //ID/Rep/St | |
780 pItems[item_counter].uItemID_Rep_St=atoi(test_string); | |
781 break; | |
782 case 10: //Not identified name | |
783 pItems[item_counter].pUnidentifiedName = RemoveQuotes(test_string); | |
784 break; | |
785 case 11: //Sprite Index | |
786 pItems[item_counter].uSpriteID=atoi(test_string); | |
787 break; | |
788 case 12: //VarA | |
224 | 789 { |
222 | 790 pItems[item_counter]._additional_value=0; |
791 pItems[item_counter]._bonus_type=0; | |
377 | 792 if (pItems[item_counter].uMaterial==MATERIAL_SPECIAL) |
222 | 793 { |
224 | 794 for(int ii=0; ii<24; ++ii) |
795 { | |
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
|
796 if (!_stricmp(test_string,pEnchantments[ii].pOfName)) |
224 | 797 { |
798 pItems[item_counter]._bonus_type=ii+1; | |
222 | 799 break; |
224 | 800 } |
801 } | |
802 if (!pItems[item_counter]._bonus_type) | |
803 { | |
804 for(int ii=0; ii<72; ++ii) | |
805 { | |
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
|
806 if (!_stricmp(test_string,pSpecialEnchantments[ii].pNameAdd)) |
222 | 807 { |
224 | 808 pItems[item_counter]._additional_value=ii+1; |
222 | 809 } |
224 | 810 } |
811 } | |
222 | 812 } |
224 | 813 |
222 | 814 break; |
224 | 815 } |
222 | 816 case 13: //VarB |
377 | 817 if ((pItems[item_counter].uMaterial==MATERIAL_SPECIAL)&&(pItems[item_counter]._bonus_type)) |
222 | 818 { |
819 char b_s=atoi(test_string); | |
820 if (b_s) | |
821 pItems[item_counter]._bonus_strength=b_s; | |
822 else | |
823 pItems[item_counter]._bonus_strength=1; | |
824 } | |
825 else | |
826 pItems[item_counter]._bonus_strength=0; | |
827 break; | |
828 case 14: //Equip X | |
829 pItems[item_counter].uEquipX=atoi(test_string); | |
830 break; | |
831 case 15: //Equip Y | |
832 pItems[item_counter].uEquipY=atoi(test_string); | |
833 break; | |
834 case 16: //Notes | |
835 pItems[item_counter].pDescription = RemoveQuotes(test_string); | |
836 break; | |
224 | 837 |
222 | 838 } |
839 } | |
840 else | |
841 { | |
570 | 842 if (decode_step) |
222 | 843 break_loop = true; |
844 } | |
845 ++decode_step; | |
846 test_string=tmp_pos+1; | |
847 } while ((decode_step<17)&&!break_loop); | |
848 ++item_counter; | |
849 if (item_counter>799) | |
850 break; | |
851 } | |
852 | |
224 | 853 |
854 pRndItemsTXT_Raw = NULL; | |
855 uAllItemsCount = item_counter; | |
856 pRndItemsTXT_Raw = (char *)pEvents_LOD->LoadRaw("rnditems.txt", 0); | |
857 strtok(pRndItemsTXT_Raw, "\r"); | |
858 strtok(NULL, "\r"); | |
859 strtok(NULL, "\r"); | |
860 strtok(NULL, "\r"); | |
861 item_counter = 0; | |
862 while (true) | |
863 { | |
864 test_string = strtok(NULL, "\r") + 1; | |
865 break_loop = false; | |
866 decode_step=0; | |
867 do | |
868 { | |
869 c = *(unsigned char*)test_string; | |
870 temp_str_len = 0; | |
871 while((c!='\t')&&(c>0)) | |
872 { | |
873 ++temp_str_len; | |
874 c=test_string[temp_str_len]; | |
875 } | |
876 tmp_pos=test_string+temp_str_len; | |
877 if (*tmp_pos == 0) | |
878 break_loop = true; | |
879 *tmp_pos = 0; | |
880 if (temp_str_len) | |
881 { | |
882 switch (decode_step) | |
883 { | |
884 case 0: | |
885 item_counter=atoi(test_string); | |
886 break; | |
887 case 2: | |
888 pItems[item_counter].uChanceByTreasureLvl1=atoi(test_string); | |
889 break; | |
890 case 3: | |
891 pItems[item_counter].uChanceByTreasureLvl2=atoi(test_string); | |
892 break; | |
893 case 4: | |
894 pItems[item_counter].uChanceByTreasureLvl3=atoi(test_string); | |
895 break; | |
896 case 5: | |
897 pItems[item_counter].uChanceByTreasureLvl4=atoi(test_string); | |
898 break; | |
899 case 6: | |
900 pItems[item_counter].uChanceByTreasureLvl5=atoi(test_string); | |
901 break; | |
902 case 7: | |
903 pItems[item_counter].uChanceByTreasureLvl6=atoi(test_string); | |
904 break; | |
905 } | |
906 } | |
907 else | |
908 { | |
570 | 909 if (decode_step) |
224 | 910 break_loop = true; |
911 } | |
912 ++decode_step; | |
913 test_string=tmp_pos+1; | |
914 } while ((decode_step<8)&&!break_loop); | |
915 ++item_counter; | |
916 if (item_counter>618) | |
917 break; | |
918 } | |
919 | |
1006 | 920 //ChanceByTreasureLvl Summ - to calculate chance |
224 | 921 memset(&uChanceByTreasureLvlSumm, 0, 24); |
922 for(i=0;i<6;++i) | |
923 { | |
598 | 924 for (j=1;j<item_counter;++j) |
224 | 925 uChanceByTreasureLvlSumm[i]+=pItems[j].uChanceByTreasureLvl[i]; |
926 } | |
222 | 927 |
224 | 928 strtok(NULL, "\r"); |
929 strtok(NULL, "\r"); | |
930 strtok(NULL, "\r"); | |
931 strtok(NULL, "\r"); | |
932 strtok(NULL, "\r"); | |
933 for (i=0;i<3;++i) | |
934 { | |
935 test_string = strtok(NULL, "\r") + 1; | |
936 break_loop = false; | |
937 decode_step=0; | |
938 do | |
939 { | |
940 c = *(unsigned char*)test_string; | |
941 temp_str_len = 0; | |
942 while((c!='\t')&&(c>0)) | |
943 { | |
944 ++temp_str_len; | |
945 c=test_string[temp_str_len]; | |
946 } | |
947 tmp_pos=test_string+temp_str_len; | |
948 if (*tmp_pos == 0) | |
949 break_loop = true; | |
950 *tmp_pos = 0; | |
951 if (temp_str_len) | |
952 { | |
953 switch (decode_step) | |
954 { | |
955 case 2: | |
956 switch (i) | |
957 { | |
958 case 0: | |
959 uBonusChanceStandart[0]=atoi(test_string); | |
960 break; | |
961 case 1: | |
962 uBonusChanceSpecial[0]=atoi(test_string); | |
963 break; | |
964 case 2: | |
965 uBonusChanceWpSpecial[0]=atoi(test_string); | |
966 break; | |
967 } | |
968 break; | |
969 case 3: | |
970 switch (i) | |
971 { | |
972 case 0: | |
973 uBonusChanceStandart[1]=atoi(test_string); | |
974 break; | |
975 case 1: | |
976 uBonusChanceSpecial[1]=atoi(test_string); | |
977 break; | |
978 case 2: | |
979 uBonusChanceWpSpecial[1]=atoi(test_string); | |
980 break; | |
981 } | |
982 break; | |
983 case 4: | |
984 switch (i) | |
985 { | |
986 case 0: | |
987 uBonusChanceStandart[2]=atoi(test_string); | |
988 break; | |
989 case 1: | |
990 uBonusChanceSpecial[2]=atoi(test_string); | |
991 break; | |
992 case 2: | |
993 uBonusChanceWpSpecial[2]=atoi(test_string); | |
994 break; | |
995 } | |
996 break; | |
997 case 5: | |
998 switch (i) | |
999 { | |
1000 case 0: | |
1001 uBonusChanceStandart[3]=atoi(test_string); | |
1002 break; | |
1003 case 1: | |
1004 uBonusChanceSpecial[3]=atoi(test_string); | |
1005 break; | |
1006 case 2: | |
1007 uBonusChanceWpSpecial[3]=atoi(test_string); | |
1008 break; | |
1009 } | |
1010 break; | |
1011 case 6: | |
1012 switch (i) | |
1013 { | |
1014 case 0: | |
1015 uBonusChanceStandart[4]=atoi(test_string); | |
1016 break; | |
1017 case 1: | |
1018 uBonusChanceSpecial[4]=atoi(test_string); | |
1019 break; | |
1020 case 2: | |
1021 uBonusChanceWpSpecial[4]=atoi(test_string); | |
1022 break; | |
1023 } | |
1024 break; | |
1025 case 7: | |
1026 switch (i) | |
1027 { | |
1028 case 0: | |
1029 uBonusChanceStandart[5]=atoi(test_string); | |
1030 break; | |
1031 case 1: | |
1032 uBonusChanceSpecial[5]=atoi(test_string); | |
1033 break; | |
1034 case 2: | |
1035 uBonusChanceWpSpecial[5]=atoi(test_string); | |
1036 break; | |
1037 } | |
1038 break; | |
1039 } | |
1040 } | |
1041 else | |
1042 { | |
570 | 1043 if (decode_step) |
224 | 1044 break_loop = true; |
1045 } | |
1046 ++decode_step; | |
1047 test_string=tmp_pos+1; | |
1048 } while ((decode_step<8)&&!break_loop); | |
1049 } | |
222 | 1050 |
705 | 1051 if ( pRndItemsTXT_Raw ) |
1052 { | |
1583 | 1053 free(pRndItemsTXT_Raw); |
705 | 1054 pRndItemsTXT_Raw = NULL; |
1055 } | |
1056 | |
224 | 1057 pSkillDescTXT_Raw = NULL; |
1058 pSkillDescTXT_Raw = (char *)pEvents_LOD->LoadRaw("skilldes.txt", 0); | |
1059 strtok(pSkillDescTXT_Raw, "\r"); | |
1060 for (i=0; i<37; ++i) | |
1061 { | |
1062 test_string = strtok(NULL, "\r") + 1; | |
1063 break_loop = false; | |
1064 decode_step=0; | |
1065 do | |
1066 { | |
1067 c = *(unsigned char*)test_string; | |
1068 temp_str_len = 0; | |
1069 while((c!='\t')&&(c>0)) | |
1070 { | |
1071 ++temp_str_len; | |
1072 c=test_string[temp_str_len]; | |
1073 } | |
1074 tmp_pos=test_string+temp_str_len; | |
1075 if (*tmp_pos == 0) | |
1076 break_loop = true; | |
1077 *tmp_pos = 0; | |
1078 if (temp_str_len) | |
1079 { | |
1080 switch (decode_step) | |
1081 { | |
1082 case 1: | |
1083 pSkillDesc[i] = RemoveQuotes(test_string); | |
1084 break; | |
1085 case 2: | |
1086 pNormalSkillDesc[i] = RemoveQuotes(test_string); | |
1087 break; | |
1088 case 3: | |
1089 pExpertSkillDesc[i] = RemoveQuotes(test_string); | |
1090 break; | |
1091 case 4: | |
1092 pMasterSkillDesc[i] = RemoveQuotes(test_string); | |
1093 break; | |
1094 case 5: | |
1095 pGrandSkillDesc[i] = RemoveQuotes(test_string); | |
1096 break; | |
1097 } | |
1098 } | |
1099 else | |
1100 { | |
570 | 1101 if (decode_step) |
224 | 1102 break_loop = true; |
1103 } | |
1104 ++decode_step; | |
1105 test_string=tmp_pos+1; | |
1106 } while ((decode_step<6)&&!break_loop); | |
1107 } | |
1108 | |
1109 pStatsTXT_Raw = 0; | |
1110 pStatsTXT_Raw = (char *)pEvents_LOD->LoadRaw("stats.txt", 0); | |
1111 strtok(pStatsTXT_Raw, "\r"); | |
1112 for (i=0; i<26; ++i) | |
1113 { | |
1114 test_string = strtok(NULL, "\r") + 1; | |
1115 break_loop = false; | |
1116 decode_step=0; | |
1117 do | |
1118 { | |
1119 c = *(unsigned char*)test_string; | |
1120 temp_str_len = 0; | |
1121 while((c!='\t')&&(c>0)) | |
1122 { | |
1123 ++temp_str_len; | |
1124 c=test_string[temp_str_len]; | |
1125 } | |
1126 tmp_pos=test_string+temp_str_len; | |
1127 if (*tmp_pos == 0) | |
1128 break_loop = true; | |
1129 *tmp_pos = 0; | |
1130 if (temp_str_len) | |
1131 { | |
1132 switch (i) | |
1133 { | |
1134 case 0: | |
1135 case 1: | |
1136 case 2: | |
1137 case 3: | |
1138 case 4: | |
1139 case 5: | |
1140 case 6: | |
1141 pAttributeDescriptions[i] = RemoveQuotes(test_string); | |
1142 break; | |
1143 case 7: | |
1144 pHealthPointsAttributeDescription = RemoveQuotes(test_string); | |
1145 break; | |
1146 case 8: | |
1147 pArmourClassAttributeDescription = RemoveQuotes(test_string); | |
1148 break; | |
1149 case 9: | |
1150 pSpellPointsAttributeDescription = RemoveQuotes(test_string); | |
1151 break; | |
1152 case 10: | |
1153 pPlayerConditionAttributeDescription = RemoveQuotes(test_string); | |
1154 break; | |
1155 case 11: | |
1156 pFastSpellAttributeDescription = RemoveQuotes(test_string); | |
1157 break; | |
1158 case 12: | |
1159 pPlayerAgeAttributeDescription = RemoveQuotes(test_string); | |
1160 break; | |
1161 case 13: | |
1162 pPlayerLevelAttributeDescription = RemoveQuotes(test_string); | |
1163 break; | |
1164 case 14: | |
1165 pPlayerExperienceAttributeDescription = RemoveQuotes(test_string); | |
1166 break; | |
1167 case 15: | |
1168 pAttackBonusAttributeDescription = RemoveQuotes(test_string); | |
1169 break; | |
1170 case 16: | |
1171 pAttackDamageAttributeDescription = RemoveQuotes(test_string); | |
1172 break; | |
1173 case 17: | |
1174 pMissleBonusAttributeDescription = RemoveQuotes(test_string); | |
1175 break; | |
1176 case 18: | |
1177 pMissleDamageAttributeDescription = RemoveQuotes(test_string); | |
1178 break; | |
1179 case 19: | |
1180 pFireResistanceAttributeDescription = RemoveQuotes(test_string); | |
1181 break; | |
1182 case 20: | |
1183 pAirResistanceAttributeDescription = RemoveQuotes(test_string); | |
1184 break; | |
1185 case 21: | |
1186 pWaterResistanceAttributeDescription = RemoveQuotes(test_string); | |
1187 break; | |
1188 case 22: | |
1189 pEarthResistanceAttributeDescription = RemoveQuotes(test_string); | |
1190 break; | |
1191 case 23: | |
1192 pMindResistanceAttributeDescription = RemoveQuotes(test_string); | |
1193 break; | |
1194 case 24: | |
1195 pBodyResistanceAttributeDescription = RemoveQuotes(test_string); | |
1196 break; | |
1197 case 25: | |
1198 pSkillPointsAttributeDescription = RemoveQuotes(test_string); | |
1199 break; | |
1200 } | |
1201 } | |
1202 else | |
1203 { | |
570 | 1204 if (decode_step) |
224 | 1205 break_loop = true; |
1206 } | |
1207 ++decode_step; | |
1208 test_string=tmp_pos+1; | |
1209 } while ((decode_step<2)&&!break_loop); | |
1210 } | |
222 | 1211 |
1212 | |
224 | 1213 pClassTXT_Raw = 0; |
1214 pClassTXT_Raw = (char *)pEvents_LOD->LoadRaw("class.txt", 0); | |
1215 strtok(pClassTXT_Raw, "\r"); | |
1216 for (i=0; i<36; ++i) | |
1217 { | |
1218 test_string = strtok(NULL, "\r") + 1; | |
1219 break_loop = false; | |
1220 decode_step=0; | |
1221 do | |
1222 { | |
1223 c = *(unsigned char*)test_string; | |
1224 temp_str_len = 0; | |
1225 while((c!='\t')&&(c>0)) | |
1226 { | |
1227 ++temp_str_len; | |
1228 c=test_string[temp_str_len]; | |
1229 } | |
1230 tmp_pos=test_string+temp_str_len; | |
1231 if (*tmp_pos == 0) | |
1232 break_loop = true; | |
1233 *tmp_pos = 0; | |
1234 if (temp_str_len) | |
1235 { | |
229 | 1236 //if(i) |
224 | 1237 pClassDescriptions[i]=RemoveQuotes(test_string); |
1238 } | |
1239 else | |
1240 { | |
570 | 1241 if (decode_step) |
224 | 1242 break_loop = true; |
1243 } | |
1244 ++decode_step; | |
1245 test_string=tmp_pos+1; | |
1246 } while ((decode_step<2)&&!break_loop); | |
1247 } | |
222 | 1248 |
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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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::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
|
1252 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
|
1253 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
|
1254 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
1255 |
224 | 1256 } |
0 | 1257 |
1258 //----- (00456D17) -------------------------------------------------------- | |
1259 void ItemsTable::SetSpecialBonus(ItemGen *pItem) | |
1260 { | |
385 | 1261 if ( pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL ) |
0 | 1262 { |
570 | 1263 pItem->uEnchantmentType = pItems[pItem->uItemID]._bonus_type; |
385 | 1264 pItem->uSpecEnchantmentType = pItems[pItem->uItemID]._additional_value; |
1599 | 1265 pItem->m_enchantmentStrength = pItems[pItem->uItemID]._bonus_strength; |
0 | 1266 } |
1267 } | |
1268 | |
1269 //----- (00456D43) -------------------------------------------------------- | |
377 | 1270 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem) |
0 | 1271 { |
377 | 1272 return this->pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL; |
0 | 1273 } |
1274 | |
1275 //----- (00456D5E) -------------------------------------------------------- | |
377 | 1276 bool ItemsTable::IsMaterialNonCommon(ItemGen *pItem) |
0 | 1277 { |
385 | 1278 return pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL || |
1279 pItems[pItem->uItemID].uMaterial == MATERIAL_RELIC || | |
1280 pItems[pItem->uItemID].uMaterial == MATERIAL_ARTEFACT; | |
0 | 1281 } |
1282 | |
1283 | |
1284 //----- (00453B3C) -------------------------------------------------------- | |
1285 void ItemsTable::LoadPotions() | |
222 | 1286 { |
0 | 1287 |
222 | 1288 CHAR Text[90]; // [sp+Ch] [bp-6Ch]@26 |
1289 char* test_string; | |
1290 unsigned int uRow; | |
1291 unsigned int uColumn; | |
1292 unsigned __int8 potion_value; | |
1293 | |
1294 if ( pPotionsTXT_Raw ) | |
1583 | 1295 free(pPotionsTXT_Raw); |
222 | 1296 pPotionsTXT_Raw = NULL; |
1297 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
|
1298 test_string = strtok(pPotionsTXT_Raw,"\t\r\n"); |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1299 while ( 1 ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1300 { |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1301 if ( !test_string ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1302 { |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1303 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
|
1304 return; |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1305 } |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1306 if ( !strcmp(test_string, "222") ) |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1307 break; |
222 | 1308 |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1309 test_string = strtok(NULL, "\t\r\n"); |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1310 } |
222 | 1311 while ( 1 ) |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1312 { |
222 | 1313 test_string = strtok(NULL, "\t\r\n"); |
1314 | |
1315 if ( !test_string ) | |
1316 { | |
1317 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1318 return; | |
1319 } | |
1320 if ( !strcmp(test_string, "222") ) | |
1321 break; | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1322 } |
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1323 |
222 | 1324 for (uRow = 0;uRow < 50; ++uRow) |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1325 { |
222 | 1326 int skip_count; |
1327 for (skip_count = 0;skip_count < 6; ++skip_count) | |
1328 { | |
1329 if ( !strtok(NULL, "\r\t\n") ) | |
1330 break; | |
1331 } | |
1332 if ( skip_count != 6 ) | |
1333 break; | |
1334 for (uColumn = 0; uColumn < 50; ++uColumn) | |
1335 { | |
1336 test_string = strtok(NULL, "\r\t\n"); | |
1337 if ( !test_string ) | |
1338 break; | |
1339 potion_value = atoi(test_string); | |
233 | 1340 unsigned char c=*test_string; |
222 | 1341 if ( !potion_value ) |
1342 { | |
1343 if ( tolower(c) == 'e' ) | |
1344 potion_value = atoi(test_string + 1); | |
1345 else | |
1346 potion_value = 0; | |
1347 } | |
1348 this->potion_data[uRow][uColumn]=potion_value; | |
1349 } | |
1350 if ( uColumn != 50 ) | |
1351 break; | |
1352 strtok(NULL, "\r\t\n"); | |
1353 } | |
193
821fd955c379
fixed potion data parsing. Somehow 3d render was affected
Gloval
parents:
189
diff
changeset
|
1354 |
222 | 1355 if ( uRow != 50 ) |
1356 { | |
1357 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, uColumn); | |
1358 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1359 } | |
1360 if ( pPotionsTXT_Raw ) | |
1361 { | |
1583 | 1362 free(pPotionsTXT_Raw); |
222 | 1363 pPotionsTXT_Raw = 0; |
1364 } | |
1365 } | |
0 | 1366 |
1367 //----- (00453CE5) -------------------------------------------------------- | |
1368 void ItemsTable::LoadPotionNotes() | |
222 | 1369 { |
1370 | |
1371 CHAR Text[90]; | |
1372 char* test_string; | |
1373 unsigned int uRow; | |
1374 unsigned int uColumn; | |
1375 unsigned __int8 potion_note; | |
1376 | |
1377 if ( pPotionNotesTXT_Raw ) | |
1583 | 1378 free(pPotionNotesTXT_Raw); |
222 | 1379 pPotionNotesTXT_Raw = NULL; |
1380 pPotionNotesTXT_Raw = (char *)pEvents_LOD->LoadRaw("potnotes.txt", 0); | |
1381 test_string = strtok(pPotionNotesTXT_Raw ,"\t\r\n"); | |
1382 while ( 1 ) | |
1383 { | |
1384 if ( !test_string ) | |
1385 { | |
1386 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1387 return; | |
1388 } | |
1389 if ( !strcmp(test_string, "222") ) | |
1390 break; | |
1391 test_string = strtok(NULL, "\t\r\n"); | |
1392 } | |
1393 while ( 1 ) | |
1394 { | |
1395 test_string = strtok(NULL, "\t\r\n"); | |
1396 | |
1397 if ( !test_string ) | |
1398 { | |
1399 MessageBoxA(0, "Error Pre-Parsing Potion Table", "Load Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1400 return; | |
1401 } | |
1402 if ( !strcmp(test_string, "222") ) | |
1403 break; | |
1404 } | |
0 | 1405 |
222 | 1406 for (uRow = 0;uRow < 50; ++uRow) |
1407 { | |
1408 int skip_count; | |
1409 for (skip_count = 0;skip_count < 6; ++skip_count) | |
1410 { | |
1411 if ( !strtok(NULL, "\r\t\n") ) | |
1412 break; | |
1413 } | |
1414 if ( skip_count != 6 ) | |
1415 break; | |
1416 for (uColumn = 0; uColumn < 50; ++uColumn) | |
1417 { | |
1418 test_string = strtok(NULL, "\r\t\n"); | |
1419 if ( !test_string ) | |
1420 break; | |
1421 potion_note = atoi(test_string); | |
233 | 1422 unsigned char c=*test_string; |
222 | 1423 if ( !potion_note ) |
1424 { | |
1425 if ( tolower(c) == 'e' ) | |
1426 potion_note = atoi(test_string + 1); | |
1427 else | |
1428 potion_note = 0; | |
1429 } | |
1430 this->potion_note[uRow][uColumn]=potion_note; | |
1431 } | |
1432 if ( uColumn != 50 ) | |
1433 break; | |
1434 strtok(NULL, "\r\t\n"); | |
1435 } | |
1436 if ( uRow != 50 ) | |
1437 { | |
1438 wsprintfA(Text, "Error Parsing Potion Table at Row: %d Column: %d", uRow, uColumn); | |
1439 MessageBoxA(0, Text, "Parsing Error", MB_ICONHAND|MB_CANCELTRYCONTINUE); | |
1440 } | |
1441 } | |
0 | 1442 |
1443 | |
1444 //----- (00456442) -------------------------------------------------------- | |
1445 unsigned int ItemGen::GetValue() | |
463 | 1446 { |
1447 unsigned int uBaseValue; // edi@1 | |
1448 unsigned int bonus; | |
0 | 1449 |
463 | 1450 uBaseValue = pItemsTable->pItems[this->uItemID].uValue; |
1451 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) ) | |
1452 return uBaseValue; | |
570 | 1453 if (uEnchantmentType ) |
1599 | 1454 return uBaseValue + 100 * m_enchantmentStrength;; |
463 | 1455 if (uSpecEnchantmentType ) |
1456 { | |
1457 bonus = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType].iTreasureLevel; | |
1458 if ( bonus > 10 ) | |
1459 return uBaseValue + bonus; | |
1460 else | |
1461 return uBaseValue * bonus; | |
1462 } | |
1463 return uBaseValue; | |
1464 } | |
0 | 1465 |
1466 //----- (00456499) -------------------------------------------------------- | |
1467 const char *ItemGen::GetDisplayName() | |
1468 { | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
1469 if (IsIdentified()) |
366 | 1470 return GetIdentifiedName(); |
0 | 1471 else |
366 | 1472 return pItemsTable->pItems[uItemID].pUnidentifiedName; |
0 | 1473 } |
1474 | |
1475 //----- (004564B3) -------------------------------------------------------- | |
1476 const char *ItemGen::GetIdentifiedName() | |
1477 { | |
377 | 1478 unsigned __int8 equip_type; |
1479 const char *player_name; | |
1480 const char *nameModificator; | |
1481 const char *format_str; | |
0 | 1482 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1483 equip_type = GetItemEquipType(); |
377 | 1484 if ( (equip_type == EQUIP_REAGENT) || (equip_type == EQUIP_POTION) || (equip_type == EQUIP_GOLD) ) |
0 | 1485 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1486 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
|
1487 return item__getname_buffer.data(); |
0 | 1488 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1489 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
|
1490 if ( uItemID == ITEM_LICH_JAR_FULL ) //Lich Jar |
0 | 1491 { |
377 | 1492 if ( (uHolderPlayer >0 )&& (uHolderPlayer <= 4) ) |
0 | 1493 { |
377 | 1494 player_name = pPlayers[uHolderPlayer]->pName; |
1495 strlen(player_name); | |
1496 if ( player_name[strlen(player_name) - 1] == 's' ) | |
1497 format_str = pGlobalTXT_LocalizationStrings[655]; //"%s' Jar" | |
0 | 1498 else |
377 | 1499 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
|
1500 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
|
1501 return item__getname_buffer.data(); |
0 | 1502 } |
1503 } | |
377 | 1504 if ( !pItemsTable->IsMaterialNonCommon(this) ) |
0 | 1505 { |
570 | 1506 if ( uEnchantmentType ) |
0 | 1507 { |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1508 strcat(item__getname_buffer.data(), " "); |
570 | 1509 nameModificator = pItemsTable->pEnchantments[uEnchantmentType-1].pOfName; |
0 | 1510 } |
1511 else | |
1512 { | |
377 | 1513 if ( !uSpecEnchantmentType ) |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1514 return item__getname_buffer.data(); |
377 | 1515 if ( uSpecEnchantmentType == 16 //Drain Hit Points from target. |
1516 || uSpecEnchantmentType == 39 //Double damage vs Demons. | |
1517 || uSpecEnchantmentType == 40 //Double damage vs Dragons | |
1518 || uSpecEnchantmentType == 45 //+5 Speed and Accuracy | |
1519 || uSpecEnchantmentType == 56 //+5 Might and Endurance. | |
1520 || uSpecEnchantmentType == 57 //+5 Intellect and Personality. | |
1521 || uSpecEnchantmentType == 58 //Increased Value. | |
1522 || uSpecEnchantmentType == 60 //+3 Unarmed and Dodging skills | |
1523 || uSpecEnchantmentType == 61 //+3 Stealing and Disarm skills. | |
1524 || uSpecEnchantmentType == 59 //Increased Weapon speed. | |
1525 || uSpecEnchantmentType == 63 //Double Damage vs. Elves. | |
1526 || uSpecEnchantmentType == 64 //Double Damage vs. Undead. | |
1527 || uSpecEnchantmentType == 67 //Adds 5 points of Body damage and +2 Disarm skill. | |
1528 || uSpecEnchantmentType == 68 ) //Adds 6-8 points of Cold damage and +5 Armor Class. | |
1529 { //enchantment and name positions inverted! | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1530 sprintf( item__getname_buffer.data(), "%s %s", |
377 | 1531 pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd, |
1532 pItemsTable->pItems[uItemID].pName); | |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1533 return item__getname_buffer.data(); |
0 | 1534 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1535 strcat(item__getname_buffer.data(), " "); |
377 | 1536 nameModificator = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd; |
0 | 1537 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1538 strcat(item__getname_buffer.data(), nameModificator); |
0 | 1539 } |
1205
8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents:
1202
diff
changeset
|
1540 return item__getname_buffer.data(); |
0 | 1541 } |
1542 | |
1543 | |
1544 //----- (00456620) -------------------------------------------------------- | |
385 | 1545 void ItemsTable::GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *out_item) |
559 | 1546 { |
0 | 1547 |
559 | 1548 ItemsTable *v5; // edi@1 |
1549 int v6; // ebx@3 | |
1550 int *v7; // ecx@33 | |
1551 //int v8; // eax@34 | |
1552 //int v9; // eax@39 | |
1553 int current_chance; // ebx@43 | |
1554 int tmp_chance; // ecx@47 | |
1555 unsigned int *v12; // edx@48 | |
1556 unsigned int v13; // eax@49 | |
1557 signed int v14; // ebx@52 | |
1558 int v15; // eax@53 | |
1559 signed int v16; // eax@55 | |
1560 int v17; // ebx@57 | |
1561 int v18; // edx@62 | |
1562 signed int v19; // ebx@70 | |
1563 unsigned __int8 v20; // al@81 | |
1564 int v21; // eax@84 | |
1565 int v22; // ebx@85 | |
1566 int v23; // eax@86 | |
1567 int v24; // ebx@86 | |
1568 int special_chance; // edx@86 | |
1569 int v26; // edx@89 | |
1570 unsigned int v27; // eax@89 | |
1571 int i; // ebx@89 | |
1572 unsigned int v29; // ecx@90 | |
1573 int v30; // ebx@91 | |
1574 int v31; // eax@91 | |
1575 int v32; // ecx@91 | |
1576 int v33; // eax@91 | |
1577 int v34; // eax@97 | |
1578 unsigned __int8 v35; // sf@97 | |
1579 unsigned __int8 v36; // of@97 | |
1580 int v37; // ebx@98 | |
1581 int v38; // edx@99 | |
1582 signed int v39; // ebx@101 | |
1583 int v40; // ecx@102 | |
1584 char v41; // zf@107 | |
1585 char v42; // al@108 | |
1586 char v43; // al@111 | |
1587 int *v44; // edx@118 | |
1588 int v45; // eax@120 | |
1589 int v46; // edx@120 | |
1590 int j; // eax@121 | |
1591 unsigned int v48; // ecx@123 | |
1592 int v49; // eax@123 | |
1593 int v50; // eax@123 | |
1594 int val_list[800]; // [sp+Ch] [bp-C88h]@33 | |
1595 int total_chance; // [sp+C8Ch] [bp-8h]@33 | |
1596 int v53; // [sp+C90h] [bp-4h]@1 | |
1597 int v54; // [sp+C9Ch] [bp+8h]@3 | |
1598 //int v55; // [sp+CA0h] [bp+Ch]@34 | |
1599 signed int v56; // [sp+CA0h] [bp+Ch]@55 | |
1600 int v57; // [sp+CA0h] [bp+Ch]@62 | |
1601 int *v58; // [sp+CA0h] [bp+Ch]@102 | |
1602 int v59; // [sp+CA0h] [bp+Ch]@123 | |
1603 //signed int a2a; // [sp+CA4h] [bp+10h]@33 | |
1604 int a2b; // [sp+CA4h] [bp+10h]@101 | |
1605 int a2c; // [sp+CA4h] [bp+10h]@120 | |
1606 | |
1607 v5 = this; | |
1608 if (!out_item) | |
1583 | 1609 out_item = (ItemGen *)malloc(sizeof(ItemGen)); |
559 | 1610 memset(out_item, 0, sizeof(*out_item)); |
1611 | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
1612 |
559 | 1613 v6 = treasure_level - 1; |
1614 v54 = treasure_level - 1; | |
1615 if ( uTreasureType ) //generate known treasure type | |
0 | 1616 { |
559 | 1617 ITEM_EQUIP_TYPE requested_equip; |
1618 PLAYER_SKILL_TYPE requested_skill = PLAYER_SKILL_INVALID; | |
1619 switch (uTreasureType) | |
1620 { | |
816 | 1621 case 20: requested_equip = EQUIP_OFF_HAND; break; |
559 | 1622 case 21: requested_equip = EQUIP_ARMOUR; break; |
1623 case 22: requested_skill = PLAYER_SKILL_MISC; break; | |
1624 case 23: requested_skill = PLAYER_SKILL_SWORD; break; | |
1625 case 24: requested_skill = PLAYER_SKILL_DAGGER; break; | |
1626 case 25: requested_skill = PLAYER_SKILL_AXE; break; | |
1627 case 26: requested_skill = PLAYER_SKILL_SPEAR; break; | |
1628 case 27: requested_skill = PLAYER_SKILL_BOW; break; | |
1629 case 28: requested_skill = PLAYER_SKILL_MACE; break; | |
1630 case 29: requested_skill = PLAYER_SKILL_CLUB; break; | |
1631 case 30: requested_skill = PLAYER_SKILL_STAFF; break; | |
1632 case 31: requested_skill = PLAYER_SKILL_LEATHER; break; | |
1633 case 32: requested_skill = PLAYER_SKILL_CHAIN; break; | |
1634 case 33: requested_skill = PLAYER_SKILL_PLATE; break; | |
1635 case 34: requested_equip = EQUIP_SHIELD; break; | |
1636 case 35: requested_equip = EQUIP_HELMET; break; | |
1637 case 36: requested_equip = EQUIP_BELT; break; | |
1638 case 37: requested_equip = EQUIP_CLOAK; break; | |
1639 case 38: requested_equip = EQUIP_GAUNTLETS; break; | |
1640 case 39: requested_equip = EQUIP_BOOTS; break; | |
1641 case 40: requested_equip = EQUIP_RING; break; | |
1642 case 41: requested_equip = EQUIP_AMULET; break; | |
1643 case 42: requested_equip = EQUIP_WAND; break; | |
1644 case 43: requested_equip = EQUIP_SPELL_SCROLL; break; | |
1645 case 44: requested_equip = EQUIP_POTION; break; | |
1646 case 45: requested_equip = EQUIP_REAGENT; break; | |
1647 case 46: requested_equip = EQUIP_GEM; break; | |
1648 default: | |
1649 __debugbreak(); // check this condition | |
1650 requested_equip = (ITEM_EQUIP_TYPE)(uTreasureType - 1); | |
1651 break; | |
1652 } | |
1653 memset(val_list, 0, sizeof(val_list)); | |
1654 total_chance = 0; | |
1655 j=0; | |
1656 //a2a = 1; | |
1657 if (requested_skill == PLAYER_SKILL_INVALID) // no skill for this item needed | |
1658 { | |
1659 for (uint i = 1; i < 500; ++i) | |
1660 { | |
1661 if (pItems[i].uEquipType == requested_equip) | |
1662 { | |
1663 val_list[j] = i; | |
1664 ++j; | |
1665 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1666 } | |
1667 } | |
1668 } | |
1669 else //have needed skill | |
1670 { | |
1671 for (uint i = 1; i < 500; ++i) | |
1672 { | |
1673 if (pItems[i].uSkillType == requested_skill) | |
1674 { | |
1675 val_list[j] = i; | |
1676 ++j; | |
1677 total_chance += pItems[i].uChanceByTreasureLvl[treasure_level - 1]; | |
1678 } | |
1679 } | |
1680 } | |
1681 | |
1682 current_chance = 0; | |
1683 if ( total_chance ) | |
1684 current_chance = rand() % total_chance; | |
1685 | |
1686 out_item->uItemID = val_list[0]; | |
1687 if (!out_item->uItemID) | |
1688 out_item->uItemID = 1; | |
1689 | |
1690 if ( pItems[out_item->uItemID].uChanceByTreasureLvl[treasure_level - 1] < current_chance ) | |
1691 { | |
1692 j=0; | |
1693 tmp_chance=pItems[out_item->uItemID].uChanceByTreasureLvl[treasure_level - 1]; | |
1694 do | |
1695 { | |
1696 ++j; | |
1697 out_item->uItemID = val_list[j]; | |
1698 tmp_chance += pItems[val_list[j]].uChanceByTreasureLvl[treasure_level - 1]; | |
1699 } | |
1700 while ( tmp_chance < current_chance ); | |
1701 } | |
1702 | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1703 if (out_item->GetItemEquipType() == EQUIP_POTION && out_item->uItemID != ITEM_POTION_BOTTLE ) |
559 | 1704 {// if it potion set potion spec |
570 | 1705 out_item->uEnchantmentType = 0; |
559 | 1706 for (int i=0; i<2; ++i) |
570 | 1707 out_item->uEnchantmentType += rand() % 4 + 1; |
1708 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; | |
559 | 1709 } |
0 | 1710 } |
559 | 1711 else |
0 | 1712 { |
559 | 1713 //artifact |
1714 v56 = 0; | |
1715 for(int i=0; i<29; ++i) | |
1716 v56 += pParty->pIsArtifactFound[i]; | |
228
46ae2602aceb
Item generation doesn't crash (thou still generates weird stuff)
Nomad
parents:
224
diff
changeset
|
1717 |
559 | 1718 v17 = rand() % 29; |
385 | 1719 |
559 | 1720 if ( v6 == 5 && (rand() % 100 < 5) && !pParty->pIsArtifactFound[v17] && v56 < 13 ) |
1721 { | |
1722 pParty->pIsArtifactFound[v17] = 1; | |
1723 out_item->uAttributes = 0; | |
1724 out_item->uItemID = v17 + 500; | |
1725 SetSpecialBonus(out_item); | |
1726 return; | |
1727 } | |
1728 | |
1729 v57 = 0; | |
1730 v18 = rand() % v5->uChanceByTreasureLvlSumm[treasure_level - 1]; | |
1731 out_item->uItemID = 0; | |
1732 if ( v18 > 0 ) | |
1733 { | |
1734 do | |
598 | 1735 { |
1736 v57 += pItems[out_item->uItemID + 1].uChanceByTreasureLvl[v6]; | |
1737 ++out_item->uItemID; | |
1738 } | |
559 | 1739 while ( v57 < v18 ); |
1740 } | |
1741 | |
1742 if ( !v18 ) | |
1743 out_item->uItemID = 1; | |
1744 if ( !out_item->uItemID ) | |
1745 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
|
1746 if (out_item->GetItemEquipType() == EQUIP_POTION && out_item->uItemID != ITEM_POTION_BOTTLE ) |
559 | 1747 {// if it potion set potion spec |
570 | 1748 out_item->uEnchantmentType = 0; |
559 | 1749 for (int i=0; i<2; ++i) |
570 | 1750 out_item->uEnchantmentType += rand() % 4 + 1; |
1751 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; | |
559 | 1752 } |
570 | 1753 out_item->uEnchantmentType = out_item->uEnchantmentType * treasure_level; |
559 | 1754 } |
1755 | |
1756 if ( out_item->uItemID == ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION | |
1757 && !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 239) ) | |
1758 out_item->uItemID = ITEM_SPELLBOOK_LIGHT_SUN_BURST; | |
1759 if ( pItemsTable->pItems[out_item->uItemID + 1].uItemID_Rep_St ) | |
1760 out_item->uAttributes = 0; | |
1761 else | |
1762 out_item->uAttributes = 1; | |
385 | 1763 |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1764 if ( out_item->GetItemEquipType() != EQUIP_POTION ) |
559 | 1765 { |
1766 out_item->uSpecEnchantmentType = 0; | |
570 | 1767 out_item->uEnchantmentType = 0; |
559 | 1768 } |
1769 //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
|
1770 switch (out_item->GetItemEquipType()) |
559 | 1771 { |
816 | 1772 case EQUIP_OFF_HAND: |
1773 case EQUIP_MAIN_HAND : | |
559 | 1774 case EQUIP_BOW : |
1775 if ( !uBonusChanceWpSpecial[v6] ) | |
1776 return; | |
1777 if ((rand() % 100)>=uBonusChanceWpSpecial[v6]) | |
1778 return; | |
1779 break; | |
1780 case EQUIP_ARMOUR : | |
1781 case EQUIP_SHIELD : | |
1782 case EQUIP_HELMET : | |
1783 case EQUIP_BELT : | |
1784 case EQUIP_CLOAK : | |
1785 case EQUIP_GAUNTLETS : | |
1786 case EQUIP_BOOTS : | |
1787 case EQUIP_RING : | |
570 | 1788 |
559 | 1789 if ( !uBonusChanceStandart[v6] ) |
1790 return; | |
1791 special_chance = rand() % 100; | |
1792 if ( special_chance < uBonusChanceStandart[v6]) | |
1793 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1794 v26 = rand() %pEnchantmentsSumm[out_item->GetItemEquipType()-3]; |
570 | 1795 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
|
1796 v27=pEnchantments[out_item->uEnchantmentType].to_item[out_item->GetItemEquipType()-3]; |
570 | 1797 if (v26>v27 ) |
1798 { | |
1799 do | |
559 | 1800 { |
570 | 1801 ++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
|
1802 v27+=pEnchantments[out_item->uEnchantmentType].to_item[out_item->GetItemEquipType()-3]; |
570 | 1803 } while (v26>v27); |
1804 } | |
1805 ++out_item->uEnchantmentType; | |
1806 | |
1807 v33 = rand() % (bonus_ranges[v6].maxR - bonus_ranges[v6].minR + 1); | |
1599 | 1808 out_item->m_enchantmentStrength = v33 + bonus_ranges[v6].minR; |
570 | 1809 v32 = out_item->uEnchantmentType - 1; |
1810 if ( v32 == 21 || v32 == 22 || v32 == 23 ) //Armsmaster skill, Dodge skill, Unarmed skill | |
1599 | 1811 out_item->m_enchantmentStrength = out_item->m_enchantmentStrength/2; |
1812 if ( out_item->m_enchantmentStrength <= 0 ) | |
1813 out_item->m_enchantmentStrength = 1; | |
559 | 1814 return; |
1815 | |
1816 } | |
570 | 1817 if ( !uBonusChanceSpecial[v6]) |
1818 return; | |
559 | 1819 v34 = uBonusChanceStandart[v6] + uBonusChanceSpecial[v6]; |
570 | 1820 if ( special_chance>v34 ) |
559 | 1821 return; |
1822 break; | |
1823 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
|
1824 out_item->uNumCharges = rand() % 6 + out_item->GetDamageMod() + 1; |
559 | 1825 out_item->uMaxCharges = out_item->uNumCharges; |
1826 default: | |
224 | 1827 return; |
559 | 1828 } |
1829 | |
1830 j=0; | |
1831 int spc_sum=0; | |
1832 int spc; | |
1833 memset(&val_list, 0, 3200); | |
1834 for (int i=0; i<pSpecialEnchantments_count;++i) | |
1835 { | |
1836 int tr_lv= pSpecialEnchantments[i].iTreasureLevel; | |
1837 switch ( treasure_level - 1 ) | |
1838 { | |
0 | 1839 case 2: |
559 | 1840 if ((tr_lv==1)||(tr_lv==0)) |
1841 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1842 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1843 spc_sum+=spc; |
1844 if(spc) | |
1845 { | |
1846 val_list[j++]=i; | |
1847 } | |
1848 } | |
1849 break; | |
0 | 1850 case 3: |
559 | 1851 if ((tr_lv==2)||(tr_lv==1)||(tr_lv==0)) |
1852 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1853 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1854 spc_sum+=spc; |
1855 if(spc) | |
1856 { | |
1857 val_list[j++]=i; | |
1858 } | |
1859 } | |
1860 break; | |
1861 case 4: | |
1862 if ((tr_lv==3)||(tr_lv==2)||(tr_lv==1)) | |
1863 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1864 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1865 spc_sum+=spc; |
1866 if(spc) | |
1867 { | |
1868 val_list[j++]=i; | |
1869 } | |
1870 } | |
1871 break; | |
1872 case 5: | |
1873 if (tr_lv==3) | |
1874 { | |
1709
8251e59fd7c1
ITEM_ENCHANTED to ITEM_HARDENED, created helper functions to get params from itemtable for ItemGens
Grumpy7
parents:
1685
diff
changeset
|
1875 spc=pSpecialEnchantments[i].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1876 spc_sum+=spc; |
1877 if(spc) | |
1878 { | |
1879 val_list[j++]=i; | |
1880 } | |
1881 } | |
1882 break; | |
0 | 1883 } |
559 | 1884 } |
1885 | |
1886 v46 = rand()%spc_sum+1; | |
1887 j=0; | |
1888 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
|
1889 v45=pSpecialEnchantments[val_list[j]].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1890 if (v45<v46) |
1891 { | |
1892 do | |
245 | 1893 { |
559 | 1894 ++j; |
1895 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
|
1896 v45+=pSpecialEnchantments[val_list[j]].to_item_apply[out_item->GetItemEquipType()]; |
559 | 1897 } while (v45<v46); |
1898 } | |
1899 ++out_item->uSpecEnchantmentType; | |
0 | 1900 } |
1901 | |
1902 //----- (004505CC) -------------------------------------------------------- | |
1903 bool ItemGen::GenerateArtifact() | |
1904 { | |
1905 signed int uNumArtifactsNotFound; // esi@1 | |
463 | 1906 int artifacts_list[32]; |
0 | 1907 |
385 | 1908 memset(artifacts_list, 0,sizeof(artifacts_list)); |
0 | 1909 uNumArtifactsNotFound = 0; |
385 | 1910 |
1911 for (int i=500;i<529;++i) | |
484 | 1912 if ( !pParty->pIsArtifactFound[i-500] ) |
385 | 1913 artifacts_list[uNumArtifactsNotFound++] = i; |
1914 | |
1915 Reset(); | |
0 | 1916 if ( uNumArtifactsNotFound ) |
1917 { | |
385 | 1918 uItemID = artifacts_list[rand() % uNumArtifactsNotFound]; |
1919 pItemsTable->SetSpecialBonus(this); | |
1920 return true; | |
0 | 1921 } |
1922 else | |
385 | 1923 return false; |
1924 | |
0 | 1925 } |
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
|
1926 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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::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
|
1928 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
|
1929 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
|
1930 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1932 #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
|
1933 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 #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
|
1935 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1937 #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
|
1938 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1940 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1942 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
|
1943 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
|
1944 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1946 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
|
1947 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1949 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1951 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1953 (*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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1957 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1959 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
|
1960 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
|
1961 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
|
1962 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
|
1963 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
|
1964 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
|
1965 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1967 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
|
1968 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
|
1969 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
|
1970 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
|
1971 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
|
1972 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
|
1973 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
|
1974 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1976 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
|
1977 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1979 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
|
1980 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1982 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
|
1983 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1985 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
|
1986 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1988 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
|
1989 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1991 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
|
1992 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1994 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
|
1995 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
1997 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
|
1998 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2000 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
|
2001 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2003 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
|
2004 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
|
2005 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
|
2006 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
|
2007 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
|
2008 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
|
2009 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
|
2010 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
|
2011 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
|
2012 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
|
2013 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
|
2014 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
|
2015 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
|
2016 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
|
2017 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
|
2018 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
|
2019 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2021 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
|
2022 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
|
2023 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
|
2024 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2026 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
|
2027 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2029 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
|
2030 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
|
2031 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2033 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
|
2034 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2036 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
|
2037 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2039 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
|
2040 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
|
2041 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2043 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
|
2044 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
|
2045 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2047 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
|
2048 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2050 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
|
2051 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
|
2052 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
|
2053 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2055 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
|
2056 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
|
2057 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2059 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
|
2060 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
|
2061 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2063 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
|
2064 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2066 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
|
2067 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2069 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
|
2070 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
|
2071 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2073 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
|
2074 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
|
2075 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2077 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
|
2078 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
|
2079 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2081 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
|
2082 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
|
2083 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2085 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
|
2086 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
|
2087 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2089 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
|
2090 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2092 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
|
2093 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2095 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
|
2096 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2098 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
|
2099 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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2103 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2105 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
|
2106 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2108 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
|
2109 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2111 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
|
2112 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2114 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
|
2115 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2117 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
|
2118 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2120 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
|
2121 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2123 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
|
2124 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2126 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
|
2127 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2129 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
|
2130 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2132 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
|
2133 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2135 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
|
2136 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2138 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
|
2139 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2141 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
|
2142 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2144 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
|
2145 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2147 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
|
2148 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2150 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
|
2151 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2153 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
|
2154 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2156 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
|
2157 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2159 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
|
2160 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2162 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
|
2163 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2165 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
|
2166 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2168 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
|
2169 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2171 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
|
2172 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2174 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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2178 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2180 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
|
2181 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
|
2182 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2184 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
|
2185 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2187 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
|
2188 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
|
2189 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2191 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
|
2192 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
|
2193 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
|
2194 |
1648 | 2195 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
|
2196 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
|
2197 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
|
2198 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
|
2199 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
|
2200 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
|
2201 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
|
2202 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
|
2203 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2205 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
|
2206 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2208 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
|
2209 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2211 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
|
2212 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2214 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
|
2215 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
|
2216 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2218 NEWBONUSINTOARTIFACTLIST(CHARACTER_ATTRIBUTE_SPEED, 40); |
1826 | 2219 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_WATER, 0, &Player::skillWater); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2220 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_ARTIFACT_RULERS_RING; |
1826 | 2222 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_MIND, 0, &Player::skillMind); |
2223 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_DARK, 0, &Player::skillDark); | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2224 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2226 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
|
2227 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
|
2228 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
|
2229 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
|
2230 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_ETHRICS_STAFF; |
1826 | 2232 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_DARK, 0, &Player::skillDark); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2233 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
|
2234 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2236 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
|
2237 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
|
2238 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
|
2239 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
|
2240 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
|
2241 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
|
2242 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
|
2243 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
|
2244 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
|
2245 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2247 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
|
2248 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2250 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
|
2251 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
|
2252 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
|
2253 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_GLORY_SHIELD; |
1826 | 2255 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_SPIRIT, 0, &Player::skillSpirit); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2256 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
|
2257 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
|
2258 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
|
2259 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2261 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
|
2262 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
|
2263 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_TALEDONS_HELM; |
1826 | 2265 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_LIGHT, 0, &Player::skillLight); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2266 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
|
2267 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
|
2268 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
|
2269 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2271 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
|
2272 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
|
2273 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_PHYNAXIAN_CROWN; |
1826 | 2275 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_FIRE, 0, &Player::skillFire); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2276 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
|
2277 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
|
2278 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
|
2279 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2281 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
|
2282 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
|
2283 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2285 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
|
2286 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
|
2287 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
|
2288 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
|
2289 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
|
2290 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
|
2291 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
|
2292 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
|
2293 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2295 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
|
2296 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
|
2297 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
|
2298 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_JUSTICE; |
1826 | 2300 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_MIND, 0, &Player::skillMind); |
2301 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_BODY, 0, &Player::skillBody); | |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2302 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
|
2303 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 itemId = ITEM_RELIC_MEKORIGS_HAMMER; |
1826 | 2305 NEWBONUSINTOARTIFACTLIST2(CHARACTER_ATTRIBUTE_SKILL_SPIRIT, 0, &Player::skillSpirit); |
1604
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create the enchantments + helper functions to get the enchantment strength, moved the whole logic of Player::GetItemsBonus to a case
Grumpy7
parents:
1603
diff
changeset
|
2306 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
|
2307 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
|
2308 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2310 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
|
2311 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
|
2312 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
|
2313 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2315 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
|
2316 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
|
2317 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2319 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
|
2320 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
|
2321 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2323 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
|
2324 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
|
2325 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2327 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
|
2328 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
|
2329 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
|
2330 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2332 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
|
2333 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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2337 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2339 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
|
2340 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2342 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2344 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
|
2345 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2347 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
|
2348 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2350 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 *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
|
2352 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2354 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2356 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 *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
|
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 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2362 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 *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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2369 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2371 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
|
2372 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2374 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2376 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
|
2377 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2379 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
|
2380 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 *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
|
2382 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2384 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 *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
|
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 |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2391 { |
1685
2a309997c42f
Player::StealFromShop started cleanup, fixing a few errors caused by not commiting everything
Grumpy7
parents:
1682
diff
changeset
|
2392 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
|
2393 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
|
2394 { |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2396 } |
4b79ff62df3a
Moved enchantment attribute bonus list to items.cpp/h, created static function that create 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 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
|
2398 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
|
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() |
1920 | 2432 { |
2433 signed int item_count; | |
2434 signed int shop_index; | |
2435 int treasure_lvl; | |
2436 int item_class; | |
2437 int mdf; | |
463 | 2438 |
1920 | 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 } | |
463 | 2482 |
2483 //----- (004B8F94) -------------------------------------------------------- | |
2484 void GenerateSpecialShopItems() | |
1920 | 2485 { |
2486 signed int item_count; | |
2487 signed int shop_index; | |
2488 int treasure_lvl; | |
2489 int item_class; | |
2490 int mdf; | |
463 | 2491 |
1920 | 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; | |
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]; | |
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 { | |
2519 pParty->SpecialItemsInShops[shop_index][item_count].Reset(); | |
2520 pParty->SpecialItemsInShops[shop_index][item_count].uItemID = rand() % 32 + 740; //mscrool | |
2521 continue; | |
2522 } | |
2523 else | |
2524 { | |
2525 treasure_lvl = shopAlchSpc_treasure_lvl[shop_index - 41]; | |
2526 item_class = 44; //potion | |
2527 } | |
2528 } | |
2529 pItemsTable->GenerateItem(treasure_lvl, item_class, &pParty->SpecialItemsInShops[shop_index][item_count]); | |
2530 pParty->SpecialItemsInShops[shop_index][item_count].SetIdentified(); //identified | |
2531 } | |
2532 } | |
2533 pParty->InTheShopFlags[shop_index] = 0; | |
2534 } | |
461 | 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 { | |
1838 | 2702 const char *v30; // ecx@65 |
473 | 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 } | |
1843
2e6d3cd052e0
some char* cast removal + adding const_casts where appropriate
Grumpy7
parents:
1838
diff
changeset
|
2827 pShopOptions[dword_F8B1DC] = const_cast<char *>(v30); |
473 | 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 |