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