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