0
|
1 #include <stdlib.h>
|
|
2
|
|
3 #include "Spells.h"
|
|
4 #include "Overlays.h"
|
|
5 #include "Allocator.h"
|
|
6 #include "LOD.h"
|
|
7 #include "stru123.h"
|
189
|
8 #include "texts.h"
|
0
|
9
|
|
10 #include "mm7_data.h"
|
|
11
|
|
12
|
|
13
|
|
14
|
839
|
15 TownPortalData TownPortalList[6] = //4ECBB8
|
|
16 {
|
|
17 {Vec3_int_(-5121, 2107, 1), 1536, 0, 21, 0},
|
|
18 {Vec3_int_(-15148, -10240, 1473), 0, 0, 4, 0},
|
|
19 {Vec3_int_(-10519, 5375, 753), 512, 0, 3, 0},
|
|
20 {Vec3_int_(3114, -11055, 513), 0, 0, 10, 0},
|
|
21 {Vec3_int_(-158, 7624, 1), 512, 0, 7, 0},
|
|
22 {Vec3_int_(-1837, -4247, 65), 65, 0, 8, 0}
|
|
23 } ;
|
0
|
24
|
|
25 struct SpellStats *pSpellStats;
|
|
26
|
|
27
|
488
|
28 stru324_spell stru_4E3ACC[100] =
|
|
29 {
|
|
30 {10, 0},
|
|
31 {1000, 0}, {1010, 0}, {1020, 0}, {1030, 0}, {1040, 0}, {1050, 0}, {1060, 0}, {1070, 0}, {1080, 0}, {1090, 0}, {1100, 0},
|
|
32 {2000, 0}, {2010, 0}, {2020, 0}, {2030, 0}, {2040, 0}, {2050, 0}, {2060, 0}, {2070, 0}, {2080, 0}, {2090, 0}, {2100, 0},
|
|
33 {3000, 0}, {3010, 0}, {3020, 0}, {3030, 0}, {3040, 0}, {3050, 0}, {3060, 0}, {3070, 0}, {3080, 0}, {3090, 0}, {3100, 0},
|
|
34 {4000, 0}, {4010, 0}, {4020, 0}, {4030, 0}, {4040, 0}, {4050, 0}, {4060, 0}, {4070, 0}, {4080, 0}, {4090, 0}, {4100, 0},
|
|
35 {5000, 0}, {5010, 0}, {5020, 0}, {5030, 0}, {5040, 0}, {5050, 0}, {5060, 0}, {5070, 0}, {5080, 0}, {5090, 0}, {5100, 0},
|
|
36 {6000, 0}, {6010, 0}, {6020, 0}, {6030, 0}, {6040, 0}, {6050, 0}, {6060, 0}, {6070, 0}, {6080, 0}, {6090, 0}, {6100, 0},
|
|
37 {7000, 0}, {7010, 0}, {7020, 0}, {7030, 0}, {7040, 0}, {7050, 0}, {7060, 0}, {7070, 0}, {7080, 0}, {7090, 0}, {7100, 0},
|
|
38 {8000, 0}, {8010, 0}, {8020, 0}, {8030, 0}, {8040, 0}, {8050, 0}, {8060, 0}, {8070, 0}, {8080, 0}, {8090, 0}, {8100, 0},
|
|
39 {9000, 0}, {9010, 0}, {9020, 0}, {9030, 0}, {9040, 0}, {9050, 0}, {9060, 0}, {9070, 0}, {9080, 0}, {9090, 0}, {9100, 0}
|
|
40 //{545, 0},
|
|
41 //{545, 0},
|
|
42 //{555, 0}
|
|
43 };
|
363
|
44 //9 spellbook pages 11 spells per page 9*11 =99 +1 zero struct at 0. It counted from 1!
|
192
|
45 SpellData pSpellDatas[100]={
|
363
|
46 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
47
|
|
48 {1, 1, 1, 1, 60, 60, 60, 40, 0, 0},//0
|
192
|
49 {2, 2, 2, 2, 110, 110, 100, 90, 768, 0},
|
|
50 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
51 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
|
|
52 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
|
|
53 {8, 8, 8, 8, 100, 100, 90, 80, 1536, 0},
|
|
54 {10, 10, 10, 10, 150, 150, 150, 150, 1536, 0},
|
|
55 {15, 15, 15, 15, 120, 120, 120, 120, 1536, 0},
|
|
56 {20, 20, 20, 20, 100, 100, 100, 90, 264, 0},
|
|
57 {25, 25, 25, 25, 100, 100, 100, 90, 268, 0},
|
|
58 {30, 30, 30, 30, 90, 90, 90, 90, 3855, 0},
|
363
|
59
|
|
60 {1, 1, 1, 0, 60, 60, 60, 60, 0, 0}, //1
|
192
|
61 {2, 2, 2, 2, 120, 120, 120, 100, 0, 0},
|
|
62 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
63 {4, 4, 4, 4, 110, 100, 90, 80, 258, 0},
|
|
64 {5, 5, 5, 5, 90, 90, 70, 50, 0, 0},
|
|
65 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
|
|
66 {10, 10, 10, 10, 100, 100, 90, 70, 2048, 0},
|
|
67 {15, 15, 15, 15, 200, 200, 200, 200, 0, 0},
|
|
68 {20, 20, 20, 20, 100, 100, 100, 90, 2570, 0},
|
|
69 {25, 25, 25, 25, 250, 250, 250, 250, 0, 0},
|
|
70 {30, 30, 30, 30, 90, 90, 90, 90, 276, 0},
|
363
|
71
|
|
72 {1, 1, 1, 1, 60, 60, 60, 20, 0, 0}, //2
|
192
|
73 {2, 2, 2, 2, 110, 100, 90, 70, 514, 0},
|
|
74 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
75 {4, 4, 4, 4, 110, 100, 90, 80, 1024, 0},
|
|
76 {5, 5, 5, 5, 150, 150, 150, 150, 0, 0},
|
|
77 {8, 8, 8, 8, 200, 200, 200, 200, 0, 0},
|
|
78 {10, 10, 10, 10, 100, 100, 90, 80, 2313, 0},
|
|
79 {15, 15, 15, 15, 140, 140, 140, 140, 0, 0},
|
|
80 {20, 20, 20, 20, 200, 200, 200, 200, 0, 0},
|
|
81 {25, 25, 25, 25, 80, 80, 80, 80, 780, 0},
|
|
82 {30, 30, 30, 30, 250, 250, 250, 250, 0, 0},
|
363
|
83
|
|
84 {1, 1, 1, 1, 80, 80, 80, 80, 0, 0}, //3
|
192
|
85 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
|
|
86 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
87 {4, 4, 4, 4, 110, 100, 90, 80, 773, 0},
|
|
88 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
|
|
89 {8, 8, 8, 8, 100, 100, 90, 80, 2304, 0},
|
|
90 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0},
|
|
91 {15, 15, 15, 15, 90, 90, 90, 80, 2048, 0},
|
|
92 {20, 20, 20, 20, 150, 150, 150, 150, 0, 0},
|
|
93 {25, 25, 25, 25, 100, 100, 100, 90, 276, 0},
|
|
94 {30, 30, 30, 30, 90, 90, 90, 90, 25, 0},
|
363
|
95
|
|
96 {1, 1, 1, 1, 100, 100, 100, 100, 0, 0}, //4
|
192
|
97 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
|
|
98 {3, 3, 3, 3, 90, 90, 90, 90, 0, 0},
|
|
99 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
|
|
100 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
|
|
101 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
|
|
102 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
|
|
103 {15, 15, 15, 15, 100, 100, 100, 100, 2058, 0},
|
|
104 {20, 20, 20, 20, 240, 240, 240, 240, 0, 0},
|
|
105 {25, 25, 25, 25, 150, 150, 150, 150, 0, 0},
|
|
106 {30, 30, 30, 30, 1000, 1000, 1000, 1000, 0, 0},
|
363
|
107
|
|
108 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0}, //5
|
192
|
109 {2, 2, 2, 2, 110, 110, 110, 110, 771, 0},
|
|
110 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
111 {4, 4, 4, 4, 110, 100, 90, 80, 0, 0},
|
|
112 {5, 5, 5, 5, 100, 100, 100, 100, 0, 0},
|
|
113 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
|
|
114 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
|
|
115 {15, 15, 15, 15, 80, 80, 80, 80, 0, 0},
|
|
116 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
|
|
117 {25, 25, 25, 25, 110, 110, 110, 100, 268, 0},
|
|
118 {30, 30, 30, 30, 120, 120, 120, 120, 0, 0},
|
363
|
119
|
|
120 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0}, //6
|
192
|
121 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
|
|
122 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
|
|
123 {4, 4, 4, 4, 110, 100, 90, 80, 520, 0},
|
|
124 {5, 5, 5, 5, 110, 110, 110, 110, 0, 0},
|
|
125 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
|
|
126 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
|
|
127 {15, 15, 15, 15, 120, 120, 120, 120, 0, 0},
|
|
128 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
|
|
129 {25, 25, 25, 25, 110, 110, 110, 100, 1310, 0},
|
|
130 {30, 30, 30, 30, 100, 100, 100, 100, 0, 0},
|
363
|
131
|
|
132 {5, 5, 5, 5, 110, 100, 90, 80, 1024, 0}, //7
|
192
|
133 {10, 10, 10, 10, 120, 110, 100, 90, 4112, 0},
|
|
134 {15, 15, 15, 15, 120, 110, 100, 90, 0, 0},
|
|
135 {20, 20, 20, 20, 160, 140, 120, 100, 0, 0},
|
|
136 {25, 25, 25, 25, 140, 140, 140, 140, 0, 0},
|
|
137 {30, 30, 30, 30, 500, 500, 500, 500, 0, 0},
|
|
138 {35, 35, 35, 35, 135, 135, 120, 100, 281, 0},
|
|
139 {40, 40, 40, 40, 500, 500, 500, 500, 0, 0},
|
|
140 {45, 45, 45, 45, 250, 250, 250, 250, 0, 0},
|
|
141 {50, 50, 50, 50, 150, 150, 150, 135, 5140, 0},
|
|
142 {55, 55, 55, 55, 300, 300, 300, 300, 0, 0},
|
363
|
143
|
|
144 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0}, //8
|
192
|
145 {15, 15, 15, 15, 120, 110, 100, 90, 2585, 0},
|
|
146 {20, 20, 20, 20, 120, 100, 90, 120, 0, 0},
|
|
147 {25, 25, 25, 25, 120, 120, 120, 120, 0, 0},
|
|
148 {30, 30, 30, 30, 90, 90, 80, 70, 1542, 0},
|
|
149 {35, 35, 35, 35, 120, 120, 100, 80, 0, 0},
|
|
150 {40, 40, 40, 40, 110, 110, 110, 110, 0, 0},
|
|
151 {45, 45, 45, 45, 200, 200, 200, 150, 0, 0},
|
|
152 {50, 50, 50, 50, 120, 120, 120, 100, 6400, 0},
|
|
153 {55, 55, 55, 55, 250, 250, 250, 250, 306, 0},
|
|
154 {60, 60, 60, 60, 300, 300, 300, 300, 2073, 0}
|
|
155 };
|
0
|
156
|
490
|
157
|
|
158 unsigned int wand_spell_ids[25] =
|
|
159 {
|
|
160 // 135 Wand of Fire 136 Wand of Sparks 137 Wand of Poison 138 Wand of Stunning 139 Wand of Harm
|
|
161 SPELL_FIRE_FIRE_BOLT, SPELL_AIR_SPARKS, SPELL_WATER_POISON_SPRAY, SPELL_EARTH_STUN, SPELL_BODY_HARM,
|
|
162 // 140 Fairy Wand of Light 141 Fairy Wand of Ice 142 Fairy Wand of Lashing 143 Fairy Wand of Mind 144 Fairy Wand of Swarms
|
|
163 SPELL_LIGHT_LIGHT_BOLT, SPELL_WATER_ICE_BOLT, SPELL_SPIRIT_SPIRIT_LASH, SPELL_MIND_MIND_BLAST, SPELL_EARTH_DEADLY_SWARM,
|
|
164 // 145 Alacorn Wand of Fireballs 146 Alacorn Wand of Acid 147 Alacorn Wand of Lightning 148 Alacorn Wand of Blades 149 Alacorn Wand of Charms
|
|
165 SPELL_FIRE_FIREBALL, SPELL_WATER_ACID_BURST, SPELL_AIR_LIGHNING_BOLT, SPELL_EARTH_BLADES, SPELL_MIND_CHARM,
|
|
166 // 150 Arcane Wand of Blasting 151 Arcane Wand of The Fist 152 Arcane Wand of Rocks 153 Arcane Wand of Paralyzing 154 Arcane Wand of Clouds
|
|
167 SPELL_WATER_ICE_BLAST, SPELL_BODY_FLYING_FIST, SPELL_EARTH_ROCK_BLAST, SPELL_LIGHT_PARALYZE, SPELL_DARK_TOXIC_CLOUD,
|
|
168 // 155 Mystic Wand of Implosion 156 Mystic Wand of Distortion 157 Mystic Wand of Sharpmetal 158 Mystic Wand of Shrinking 159 Mystic Wand of Incineration
|
|
169 SPELL_AIR_IMPLOSION, SPELL_EARTH_MASS_DISTORTION, SPELL_DARK_SHARPMETAL, SPELL_DARK_SHRINKING_RAY, SPELL_FIRE_INCINERATE
|
|
170 };
|
|
171
|
|
172
|
357
|
173 unsigned char pSpellbookSpellIndices[9][12] = // 4E2430
|
363
|
174 { //0 1 2 3 4 5 6 7 8 9 10 11
|
357
|
175 {0, 3, 1, 8, 11, 7, 4, 10, 6, 2, 5, 9},
|
|
176 {0, 11, 2, 9, 6, 8, 5, 10, 3, 7, 1, 4},
|
|
177 {0, 4, 8, 9, 1, 10, 3, 11, 7, 6, 2, 5},
|
|
178 {0, 7, 10, 8, 2, 11, 1, 5, 3, 6, 4, 9},
|
|
179 {0, 5, 10, 11, 7, 2, 8, 1, 4, 9, 3, 6},
|
|
180 {0, 5, 9, 8, 3, 7, 6, 4, 1, 11, 2, 10},
|
|
181 {0, 1, 6, 9, 3, 5, 8, 11, 7, 10, 4, 2},
|
|
182 {0, 1, 10, 11, 9, 4, 3, 6, 5, 7, 8, 2},
|
|
183 {0, 9, 3, 7, 1, 5, 2, 10, 11, 8, 6, 4}
|
|
184 };
|
0
|
185
|
363
|
186 struct SpellBookIconPos pIconPos[9][12]={
|
|
187
|
|
188 {{ 0, 0}, { 17, 13}, {115, 2}, {217, 15},
|
|
189 {299, 6}, { 28, 125}, {130, 133}, {294, 114},
|
|
190 { 11, 232}, {134, 233}, {237, 171}, {296, 231}},
|
0
|
191
|
363
|
192 {{ 0, 0}, {19, 9}, {117, 3}, {206, 13},
|
|
193 {285, 7}, {16, 123}, {113, 101}, {201, 118},
|
|
194 {317, 110}, {11, 230}, {149, 236}, {296, 234}},
|
357
|
195
|
363
|
196 {{ 0, 0}, {17, 9}, {140, 0}, {210, 34},
|
|
197 {293, 5}, {15, 98}, { 78, 121}, {175, 136},
|
|
198 {301, 115}, {15, 226}, {154, 225}, {272, 220}},
|
357
|
199
|
363
|
200 {{ 0, 0}, { 7, 9}, {156, 2}, {277, 9},
|
|
201 { 11, 117}, {111, 82}, {180, 102}, {303, 108},
|
|
202 { 10, 229}, {120, 221}, {201, 217}, {296, 225}},
|
357
|
203
|
363
|
204 {{ 0, 0}, {18, 8}, { 89, 15}, {192, 14},
|
|
205 {292, 7}, {22, 129}, {125, 146}, {217, 136},
|
|
206 {305, 115}, {22, 226}, {174, 237}, {290, 231}},
|
357
|
207
|
363
|
208 {{ 0, 0}, { 18, 12}, {148, 9}, {292, 7},
|
|
209 { 17, 122}, {121, 99}, {220, 87}, {293, 112},
|
|
210 { 13, 236}, {128, 213}, {220, 223}, {315, 223}},
|
357
|
211
|
363
|
212 {{ 0, 0}, {23, 14}, {127, 8}, {204, 0},
|
|
213 {306, 8}, {14, 115}, {122, 132}, {200, 116},
|
|
214 {293, 122}, {20, 228}, {154, 228}, {294, 239}},
|
357
|
215
|
363
|
216 {{ 0, 0}, { 19, 14}, {124, 10}, {283, 12},
|
|
217 { 8, 105}, {113, 89}, {190, 82}, {298, 108},
|
|
218 { 18, 181}, {101, 204}, {204, 203}, {285, 218}},
|
357
|
219
|
363
|
220 {{ 0, 0}, {18, 17}, {110, 16}, {201, 15},
|
|
221 {307, 15}, {18, 148}, {125, 166}, {201, 123},
|
|
222 {275, 120}, {28, 235}, {217, 222}, {324, 216}}};
|
0
|
223
|
|
224
|
|
225 //----- (0042EB31) --------------------------------------------------------
|
|
226 bool SpellBuff::NotExpired()
|
|
227 {
|
189
|
228 return (signed __int64)this->uExpireTime > 0 ? true:false;
|
0
|
229 }
|
|
230
|
|
231
|
|
232 //----- (00458585) --------------------------------------------------------
|
|
233 void SpellBuff::Reset()
|
|
234 {
|
|
235
|
|
236 this->uSkill = 0;
|
|
237 this->uPower = 0;
|
|
238 this->uExpireTime = 0i64;
|
|
239 this->uCaster = 0;
|
|
240 this->uFlags = 0;
|
189
|
241 if ( this->uOverlayID )
|
0
|
242 {
|
189
|
243 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * this->uOverlayID + 105])->Reset();
|
142
|
244 pOtherOverlayList->bRedraw = true;
|
189
|
245 this->uOverlayID = 0;
|
0
|
246 }
|
|
247 }
|
|
248
|
|
249 //----- (004585CA) --------------------------------------------------------
|
|
250 signed int SpellBuff::_4585CA(__int64 a2)
|
|
251 {
|
|
252 signed int result; // eax@3
|
|
253
|
|
254 if ( this->uExpireTime && (signed __int64)this->uExpireTime < a2 )
|
|
255 {
|
|
256 this->uExpireTime = 0i64;
|
|
257 this->uPower = 0;
|
|
258 this->uSkill = 0;
|
|
259 this->uOverlayID = 0;
|
|
260 result = 1;
|
|
261 }
|
|
262 else
|
|
263 {
|
|
264 result = 0;
|
|
265 }
|
|
266 return result;
|
|
267 }
|
|
268
|
|
269 //----- (004584E0) --------------------------------------------------------
|
|
270 signed int SpellBuff::Apply(unsigned __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int a5, unsigned __int8 a6)
|
|
271 {
|
|
272 SpellBuff *v6; // esi@1
|
|
273 signed int result; // eax@3
|
|
274 int v8; // eax@4
|
|
275
|
|
276 v6 = this;
|
|
277 if ( this->uExpireTime && (signed __int64)uExpireTime < (signed __int64)this->uExpireTime )
|
|
278 {
|
|
279 result = 0;
|
|
280 }
|
|
281 else
|
|
282 {
|
|
283 this->uSkill = uSkillLevel;
|
|
284 this->uPower = uPower;
|
|
285 LOWORD(v8) = this->uOverlayID;
|
|
286 this->uExpireTime = uExpireTime;
|
|
287 if ( (short)v8 )
|
|
288 {
|
|
289 v8 = (unsigned __int16)v8;
|
|
290 if ( (unsigned __int16)v8 != a5 )
|
|
291 {
|
|
292 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v8 + 105])->Reset();
|
142
|
293 pOtherOverlayList->bRedraw = true;
|
0
|
294 v6->uOverlayID = 0;
|
|
295 }
|
|
296 }
|
|
297 v6->uOverlayID = a5;
|
|
298 v6->uCaster = a6;
|
|
299 result = 1;
|
|
300 }
|
|
301 return result;
|
|
302 }
|
|
303
|
|
304 //----- (0045384A) --------------------------------------------------------
|
|
305 void SpellStats::Initialize()
|
191
|
306 {
|
0
|
307
|
191
|
308 int decode_step;
|
|
309 char* test_string;
|
|
310 bool break_loop;
|
|
311 unsigned char c;
|
|
312 unsigned int temp_str_len;
|
|
313 char* tmp_pos;
|
189
|
314
|
191
|
315 if ( pSpellsTXT_Raw )
|
|
316 pAllocator->FreeChunk(pSpellsTXT_Raw);
|
|
317 pSpellsTXT_Raw = NULL;
|
189
|
318
|
191
|
319 pSpellsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spells.txt", 0);
|
|
320 strtok(pSpellsTXT_Raw, "\r");
|
|
321 strtok(NULL, "\r");
|
|
322 for(int i=1; i<100; ++i)
|
|
323 {
|
|
324 test_string=strtok(NULL, "\r")+1;
|
|
325 decode_step =0;
|
|
326 break_loop=false;
|
|
327 do
|
|
328 {
|
|
329 c = *(unsigned char*)test_string;
|
|
330 temp_str_len = 0;
|
|
331 while((c!='\t')&&(c>0))
|
|
332 {
|
|
333 ++temp_str_len;
|
|
334 c=test_string[temp_str_len];
|
|
335 }
|
|
336 tmp_pos=test_string+temp_str_len;
|
|
337 if (*tmp_pos == 0)
|
|
338 break_loop = true;
|
|
339 *tmp_pos = 0;
|
|
340 if (temp_str_len)
|
|
341 {
|
|
342 switch (decode_step)
|
|
343 {
|
|
344 case 2:
|
|
345 pInfos[i].pName=RemoveQuotes(test_string);
|
|
346 break;
|
|
347 case 3:
|
192
|
348 pInfos[i].uSchool = SPELL_SCHOOL_NONE;
|
191
|
349 if (!_strcmpi("fire", test_string) )
|
|
350 {
|
192
|
351 pInfos[i].uSchool =SPELL_SCHOOL_FIRE;
|
191
|
352 break;
|
|
353 }
|
|
354 if ( !_strcmpi("air", test_string) )
|
|
355 {
|
192
|
356 pInfos[i].uSchool = SPELL_SCHOOL_AIR;
|
191
|
357 break;
|
|
358 }
|
|
359 if ( !_strcmpi("water", test_string))
|
|
360 {
|
192
|
361 pInfos[i].uSchool = SPELL_SCHOOL_WATER;
|
191
|
362 break;
|
|
363 }
|
|
364 if ( !_strcmpi("earth", test_string))
|
|
365 {
|
192
|
366 pInfos[i].uSchool = SPELL_SCHOOL_EARTH;
|
191
|
367 break;
|
|
368 }
|
|
369 if ( !_strcmpi("spirit", test_string))
|
|
370 {
|
192
|
371 pInfos[i].uSchool = SPELL_SCHOOL_SPIRIT;
|
191
|
372 break;
|
|
373 }
|
|
374 if ( !_strcmpi("mind", test_string))
|
|
375 {
|
192
|
376 pInfos[i].uSchool = SPELL_SCHOOL_MIND;
|
191
|
377 break;
|
|
378 }
|
|
379 if ( !_strcmpi("body", test_string) )
|
|
380 {
|
192
|
381 pInfos[i].uSchool = SPELL_SCHOOL_BODY;
|
191
|
382 break;
|
|
383 }
|
|
384 if ( !_strcmpi("light", test_string) )
|
|
385 {
|
192
|
386 pInfos[i].uSchool = SPELL_SCHOOL_LIGHT;
|
191
|
387 break;
|
|
388 }
|
|
389 if ( !_strcmpi("dark", test_string))
|
|
390 {
|
192
|
391 pInfos[i].uSchool = SPELL_SCHOOL_DARK;
|
191
|
392 break;
|
|
393 }
|
|
394
|
|
395 if ( !_strcmpi("magic", test_string))
|
|
396 {
|
192
|
397 pInfos[i].uSchool = SPELL_SCHOOL_MAGIC;
|
191
|
398 break;
|
|
399 }
|
|
400 break;
|
|
401 case 4:
|
|
402 pInfos[i].pShortName=RemoveQuotes(test_string);
|
|
403 break;
|
|
404 case 5:
|
|
405 pInfos[i].pDescription=RemoveQuotes(test_string);
|
|
406 break;
|
|
407 case 6:
|
|
408 pInfos[i].pBasicSkillDesc=RemoveQuotes(test_string);
|
|
409 break;
|
|
410 case 7:
|
|
411 pInfos[i].pExpertSkillDesc=RemoveQuotes(test_string);
|
|
412 break;
|
|
413 case 8:
|
|
414 pInfos[i].pMasterSkillDesc=RemoveQuotes(test_string);
|
|
415 break;
|
|
416 case 9:
|
|
417 pInfos[i].pGrandmasterSkillDesc=RemoveQuotes(test_string);
|
|
418 break;
|
|
419 case 10:
|
|
420 int in_string_pos=0;
|
192
|
421 unsigned char test;
|
191
|
422 int in_str_len=strlen(test_string);
|
192
|
423 for (int j=0; j<in_str_len; ++j)
|
|
424 {
|
|
425 test= tolower(test_string[j]);
|
|
426 switch (test)
|
|
427 {
|
|
428 case 109:
|
|
429 pSpellDatas[i].field_12|=1;
|
|
430 break;
|
|
431 case 101:
|
|
432 pSpellDatas[i].field_12|=2;
|
|
433 break;
|
|
434 case 99:
|
|
435 pSpellDatas[i].field_12|=4;
|
|
436 break;
|
|
437 case 120:
|
|
438 pSpellDatas[i].field_12|=8;
|
|
439 break;
|
|
440 }
|
|
441 }
|
191
|
442 break;
|
|
443 }
|
|
444 }
|
|
445 else
|
|
446 break_loop=true;
|
|
447 ++decode_step;
|
|
448 test_string=tmp_pos+1;
|
|
449 } while ((decode_step<11)&&!break_loop);
|
|
450 if ((i%11)==0)
|
|
451 strtok(NULL, "\r");
|
|
452 }
|
|
453
|
|
454 } |