annotate Items.cpp @ 1678:6faacde46271

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