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