annotate Spells.cpp @ 145:dac041fc74e8

19.11.12
author Ritor1
date Mon, 19 Nov 2012 09:41:10 +0600
parents 8be5293b6b33
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include <stdlib.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include "Spells.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "Overlays.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "Allocator.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 #include "LOD.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "stru123.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 struct SpellStats *pSpellStats;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 stru324_spell stru_4E3ACC[102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 SpellData pSpellDatas[95];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 //----- (0042EB31) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 bool SpellBuff::NotExpired()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 bool result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 if ( (signed __int64)this->uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 //----- (00458585) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 void SpellBuff::Reset()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 SpellBuff *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 unsigned __int16 v2; // ax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 v2 = this->uOverlayID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 this->uSkill = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 this->uPower = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 this->uExpireTime = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 this->uCaster = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 this->uFlags = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 {
101
8be5293b6b33 odm loading
Nomad
parents: 0
diff changeset
53 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v2 + 105])->Reset();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 pOtherOverlayList->field_3EC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 v1->uOverlayID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 //----- (004585CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 signed int SpellBuff::_4585CA(__int64 a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 signed int result; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 if ( this->uExpireTime && (signed __int64)this->uExpireTime < a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 this->uExpireTime = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 this->uPower = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 this->uSkill = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 this->uOverlayID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 //----- (004584E0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 signed int SpellBuff::Apply(unsigned __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int a5, unsigned __int8 a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 SpellBuff *v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 signed int result; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 v6 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 if ( this->uExpireTime && (signed __int64)uExpireTime < (signed __int64)this->uExpireTime )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 this->uSkill = uSkillLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 this->uPower = uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 LOWORD(v8) = this->uOverlayID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 this->uExpireTime = uExpireTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 if ( (short)v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 v8 = (unsigned __int16)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 if ( (unsigned __int16)v8 != a5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 {
101
8be5293b6b33 odm loading
Nomad
parents: 0
diff changeset
102 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v8 + 105])->Reset();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 pOtherOverlayList->field_3EC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 v6->uOverlayID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 v6->uOverlayID = a5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 v6->uCaster = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 //----- (0045384A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 void SpellStats::Initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 SpellStats *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 const char *v2; // ebp@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 char *v3; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 signed int v4; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 char *v5; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 char v6; // cl@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 int v7; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 size_t v8; // ebp@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 int v9; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 int v10; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 int v11; // eax@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 char *v12; // [sp+10h] [bp-10h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 signed int v13; // [sp+14h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 signed int v14; // [sp+18h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 int v15; // [sp+1Ch] [bp-4h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 if ( pSpellsTXT_Raw )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 pAllocator->FreeChunk(pSpellsTXT_Raw);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 pSpellsTXT_Raw = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 v2 = "\r";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 pSpellsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spells.txt", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 strtok(pSpellsTXT_Raw, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 strtok(0, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 v12 = (char *)&pSpellDatas[1].field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 v3 = (char *)&v1->pInfos[1].uSchool;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 v5 = strtok(0, v2) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 v6 = *v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 while ( v6 != 9 && v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 v6 = v5[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 v15 = (int)&v5[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 if ( !v5[v7] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 v5[v7] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 switch ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 *((char **)v3 - 7) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 *v3 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 if ( _strcmpi("fire", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 if ( _strcmpi("air", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 if ( _strcmpi("water", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 if ( _strcmpi("earth", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 if ( _strcmpi("spirit", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 if ( _strcmpi("mind", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 if ( _strcmpi("body", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 if ( _strcmpi("light", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 if ( _strcmpi("dark", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 if ( !_strcmpi("magic", v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 *v3 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 *v3 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 *v3 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 *v3 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 *v3 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 *v3 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 *v3 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 *v3 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 *v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 *v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 *((char **)v3 - 6) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 *((char **)v3 - 5) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 *((char **)v3 - 4) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 *((char **)v3 - 3) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 *((char **)v3 - 2) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 *((char **)v3 - 1) = RemoveQuotes(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 v8 = strlen(v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 if ( (signed int)v8 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 v9 = tolower((unsigned __int8)v5[v4]) - 99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 v10 = v9 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 v11 = v10 - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 if ( v11 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 *v12 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 *v12 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 *v12 |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 *v12 |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 while ( v4 < (signed int)v8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 v2 = "\r";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 v5 = (char *)(v15 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 while ( v4 - 1 <= 10 && !v13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 if ( !(v14 % 11) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 strtok(0, v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 v12 += 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 v3 += 36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 while ( (signed int)v12 <= (signed int)&pSpellDatas[90].field_12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 }