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