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