annotate Spells.cpp @ 357:b07cf89108d5

Spell positions in book
author Gloval
date Thu, 21 Feb 2013 14:26:00 +0400
parents fcdb80fc1f74
children 2bc1c8d68f41
rev   line source
0
Ritor1
parents:
diff changeset
1 #include <stdlib.h>
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3 #include "Spells.h"
Ritor1
parents:
diff changeset
4 #include "Overlays.h"
Ritor1
parents:
diff changeset
5 #include "Allocator.h"
Ritor1
parents:
diff changeset
6 #include "LOD.h"
Ritor1
parents:
diff changeset
7 #include "stru123.h"
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
8 #include "texts.h"
0
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 #include "mm7_data.h"
Ritor1
parents:
diff changeset
11
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13
Ritor1
parents:
diff changeset
14
Ritor1
parents:
diff changeset
15
Ritor1
parents:
diff changeset
16 struct SpellStats *pSpellStats;
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19 stru324_spell stru_4E3ACC[102];
Ritor1
parents:
diff changeset
20
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
21 SpellData pSpellDatas[100]={
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
22 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
23 {1, 1, 1, 1, 60, 60, 60, 40, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
24 {2, 2, 2, 2, 110, 110, 100, 90, 768, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
25 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
26 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
27 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
28 {8, 8, 8, 8, 100, 100, 90, 80, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
29 {10, 10, 10, 10, 150, 150, 150, 150, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
30 {15, 15, 15, 15, 120, 120, 120, 120, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
31 {20, 20, 20, 20, 100, 100, 100, 90, 264, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
32 {25, 25, 25, 25, 100, 100, 100, 90, 268, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
33 {30, 30, 30, 30, 90, 90, 90, 90, 3855, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
34 {1, 1, 1, 0, 60, 60, 60, 60, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
35 {2, 2, 2, 2, 120, 120, 120, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
36 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
37 {4, 4, 4, 4, 110, 100, 90, 80, 258, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
38 {5, 5, 5, 5, 90, 90, 70, 50, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
39 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
40 {10, 10, 10, 10, 100, 100, 90, 70, 2048, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
41 {15, 15, 15, 15, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
42 {20, 20, 20, 20, 100, 100, 100, 90, 2570, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
43 {25, 25, 25, 25, 250, 250, 250, 250, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
44 {30, 30, 30, 30, 90, 90, 90, 90, 276, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
45 {1, 1, 1, 1, 60, 60, 60, 20, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
46 {2, 2, 2, 2, 110, 100, 90, 70, 514, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
47 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
48 {4, 4, 4, 4, 110, 100, 90, 80, 1024, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
49 {5, 5, 5, 5, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
50 {8, 8, 8, 8, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
51 {10, 10, 10, 10, 100, 100, 90, 80, 2313, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
52 {15, 15, 15, 15, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
53 {20, 20, 20, 20, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
54 {25, 25, 25, 25, 80, 80, 80, 80, 780, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
55 {30, 30, 30, 30, 250, 250, 250, 250, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
56 {1, 1, 1, 1, 80, 80, 80, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
57 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
58 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
59 {4, 4, 4, 4, 110, 100, 90, 80, 773, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
60 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
61 {8, 8, 8, 8, 100, 100, 90, 80, 2304, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
62 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
63 {15, 15, 15, 15, 90, 90, 90, 80, 2048, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
64 {20, 20, 20, 20, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
65 {25, 25, 25, 25, 100, 100, 100, 90, 276, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
66 {30, 30, 30, 30, 90, 90, 90, 90, 25, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
67 {1, 1, 1, 1, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
68 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
69 {3, 3, 3, 3, 90, 90, 90, 90, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
70 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
71 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
72 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
73 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
74 {15, 15, 15, 15, 100, 100, 100, 100, 2058, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
75 {20, 20, 20, 20, 240, 240, 240, 240, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
76 {25, 25, 25, 25, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
77 {30, 30, 30, 30, 1000, 1000, 1000, 1000, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
78 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
79 {2, 2, 2, 2, 110, 110, 110, 110, 771, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
80 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
81 {4, 4, 4, 4, 110, 100, 90, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
82 {5, 5, 5, 5, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
83 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
84 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
85 {15, 15, 15, 15, 80, 80, 80, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
86 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
87 {25, 25, 25, 25, 110, 110, 110, 100, 268, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
88 {30, 30, 30, 30, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
89 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
90 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
91 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
92 {4, 4, 4, 4, 110, 100, 90, 80, 520, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
93 {5, 5, 5, 5, 110, 110, 110, 110, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
94 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
95 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
96 {15, 15, 15, 15, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
97 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
98 {25, 25, 25, 25, 110, 110, 110, 100, 1310, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
99 {30, 30, 30, 30, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
100 {5, 5, 5, 5, 110, 100, 90, 80, 1024, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
101 {10, 10, 10, 10, 120, 110, 100, 90, 4112, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
102 {15, 15, 15, 15, 120, 110, 100, 90, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
103 {20, 20, 20, 20, 160, 140, 120, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
104 {25, 25, 25, 25, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
105 {30, 30, 30, 30, 500, 500, 500, 500, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
106 {35, 35, 35, 35, 135, 135, 120, 100, 281, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
107 {40, 40, 40, 40, 500, 500, 500, 500, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
108 {45, 45, 45, 45, 250, 250, 250, 250, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
109 {50, 50, 50, 50, 150, 150, 150, 135, 5140, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
110 {55, 55, 55, 55, 300, 300, 300, 300, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
111 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
112 {15, 15, 15, 15, 120, 110, 100, 90, 2585, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
113 {20, 20, 20, 20, 120, 100, 90, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
114 {25, 25, 25, 25, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
115 {30, 30, 30, 30, 90, 90, 80, 70, 1542, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
116 {35, 35, 35, 35, 120, 120, 100, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
117 {40, 40, 40, 40, 110, 110, 110, 110, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
118 {45, 45, 45, 45, 200, 200, 200, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
119 {50, 50, 50, 50, 120, 120, 120, 100, 6400, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
120 {55, 55, 55, 55, 250, 250, 250, 250, 306, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
121 {60, 60, 60, 60, 300, 300, 300, 300, 2073, 0}
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
122 };
0
Ritor1
parents:
diff changeset
123
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
124 unsigned char pSpellbookSpellIndices[9][12] = // 4E2430
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
125 {
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
126 {0, 3, 1, 8, 11, 7, 4, 10, 6, 2, 5, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
127 {0, 11, 2, 9, 6, 8, 5, 10, 3, 7, 1, 4},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
128 {0, 4, 8, 9, 1, 10, 3, 11, 7, 6, 2, 5},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
129 {0, 7, 10, 8, 2, 11, 1, 5, 3, 6, 4, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
130 {0, 5, 10, 11, 7, 2, 8, 1, 4, 9, 3, 6},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
131 {0, 5, 9, 8, 3, 7, 6, 4, 1, 11, 2, 10},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
132 {0, 1, 6, 9, 3, 5, 8, 11, 7, 10, 4, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
133 {0, 1, 10, 11, 9, 4, 3, 6, 5, 7, 8, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
134 {0, 9, 3, 7, 1, 5, 2, 10, 11, 8, 6, 4}
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
135 };
0
Ritor1
parents:
diff changeset
136
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
137 struct SpellBookIconPos pIconPos[108]={
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
138 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
139 {17, 13},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
140 {115, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
141 {217, 15},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
142 {299, 6},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
143 {28, 125},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
144 {130, 133},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
145 {294, 114},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
146 {11, 232},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
147 {134, 233},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
148 {237, 171},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
149 {296, 231},
0
Ritor1
parents:
diff changeset
150
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
151 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
152 {19, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
153 {117, 3},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
154 {206, 13},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
155 {285, 7},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
156 {16, 123},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
157 {113, 101},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
158 {201, 118},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
159 {317, 110},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
160 {11, 230},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
161 {149, 236},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
162 {296, 234},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
163
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
164 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
165 {17, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
166 {140, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
167 {210, 34},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
168 {293, 5},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
169 {15, 98},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
170 {78, 121},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
171 {175, 136},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
172 {301, 115},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
173 {15, 226},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
174 {154, 225},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
175 {272, 220},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
176
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
177 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
178 {7, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
179 {156, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
180 {277, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
181 {11, 117},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
182 {111, 82},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
183 {180, 102},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
184 {303, 108},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
185 {10, 229},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
186 {120, 221},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
187 {201, 217},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
188 {296, 225},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
189
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
190 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
191 {18, 8},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
192 {89, 15},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
193 {192, 14},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
194 {292, 7},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
195 {22, 129},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
196 {125, 146},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
197 {217, 136},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
198 {305, 115},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
199 {22, 226},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
200 {174, 237},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
201 {290, 231},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
202
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
203 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
204 {18, 12},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
205 {148, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
206 {292, 7},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
207 {17, 122},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
208 {121, 99},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
209 {220, 87},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
210 {293, 112},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
211 {13, 236},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
212 {128, 213},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
213 {220, 223},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
214 {315, 223},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
215
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
216 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
217 {23, 14},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
218 {127, 8},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
219 {204, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
220 {306, 8},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
221 {14, 115},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
222 {122, 132},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
223 {200, 116},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
224 {293, 122},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
225 {20, 228},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
226 {154, 228},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
227 {294, 239},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
228
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
229 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
230 {19, 14},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
231 {124, 10},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
232 {283, 12},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
233 {8, 105},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
234 {113, 89},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
235 {190, 82},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
236 {298, 108},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
237 {18, 181},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
238 {101, 204},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
239 {204, 203},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
240 {285, 218},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
241
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
242 {0, 0},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
243 {18, 17},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
244 {110, 16},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
245 {201, 15},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
246 {307, 15},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
247 {18, 148},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
248 {125, 166},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
249 {201, 123},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
250 {275, 120},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
251 {28, 235},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
252 {217, 222},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
253 {324, 216} };
0
Ritor1
parents:
diff changeset
254
Ritor1
parents:
diff changeset
255
Ritor1
parents:
diff changeset
256 //----- (0042EB31) --------------------------------------------------------
Ritor1
parents:
diff changeset
257 bool SpellBuff::NotExpired()
Ritor1
parents:
diff changeset
258 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
259 return (signed __int64)this->uExpireTime > 0 ? true:false;
0
Ritor1
parents:
diff changeset
260 }
Ritor1
parents:
diff changeset
261
Ritor1
parents:
diff changeset
262
Ritor1
parents:
diff changeset
263 //----- (00458585) --------------------------------------------------------
Ritor1
parents:
diff changeset
264 void SpellBuff::Reset()
Ritor1
parents:
diff changeset
265 {
Ritor1
parents:
diff changeset
266 SpellBuff *v1; // esi@1
Ritor1
parents:
diff changeset
267 unsigned __int16 v2; // ax@1
Ritor1
parents:
diff changeset
268
Ritor1
parents:
diff changeset
269 this->uSkill = 0;
Ritor1
parents:
diff changeset
270 this->uPower = 0;
Ritor1
parents:
diff changeset
271 this->uExpireTime = 0i64;
Ritor1
parents:
diff changeset
272 this->uCaster = 0;
Ritor1
parents:
diff changeset
273 this->uFlags = 0;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
274 if ( this->uOverlayID )
0
Ritor1
parents:
diff changeset
275 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
276 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * this->uOverlayID + 105])->Reset();
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
277 pOtherOverlayList->bRedraw = true;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
278 this->uOverlayID = 0;
0
Ritor1
parents:
diff changeset
279 }
Ritor1
parents:
diff changeset
280 }
Ritor1
parents:
diff changeset
281
Ritor1
parents:
diff changeset
282 //----- (004585CA) --------------------------------------------------------
Ritor1
parents:
diff changeset
283 signed int SpellBuff::_4585CA(__int64 a2)
Ritor1
parents:
diff changeset
284 {
Ritor1
parents:
diff changeset
285 signed int result; // eax@3
Ritor1
parents:
diff changeset
286
Ritor1
parents:
diff changeset
287 if ( this->uExpireTime && (signed __int64)this->uExpireTime < a2 )
Ritor1
parents:
diff changeset
288 {
Ritor1
parents:
diff changeset
289 this->uExpireTime = 0i64;
Ritor1
parents:
diff changeset
290 this->uPower = 0;
Ritor1
parents:
diff changeset
291 this->uSkill = 0;
Ritor1
parents:
diff changeset
292 this->uOverlayID = 0;
Ritor1
parents:
diff changeset
293 result = 1;
Ritor1
parents:
diff changeset
294 }
Ritor1
parents:
diff changeset
295 else
Ritor1
parents:
diff changeset
296 {
Ritor1
parents:
diff changeset
297 result = 0;
Ritor1
parents:
diff changeset
298 }
Ritor1
parents:
diff changeset
299 return result;
Ritor1
parents:
diff changeset
300 }
Ritor1
parents:
diff changeset
301
Ritor1
parents:
diff changeset
302 //----- (004584E0) --------------------------------------------------------
Ritor1
parents:
diff changeset
303 signed int SpellBuff::Apply(unsigned __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int a5, unsigned __int8 a6)
Ritor1
parents:
diff changeset
304 {
Ritor1
parents:
diff changeset
305 SpellBuff *v6; // esi@1
Ritor1
parents:
diff changeset
306 signed int result; // eax@3
Ritor1
parents:
diff changeset
307 int v8; // eax@4
Ritor1
parents:
diff changeset
308
Ritor1
parents:
diff changeset
309 v6 = this;
Ritor1
parents:
diff changeset
310 if ( this->uExpireTime && (signed __int64)uExpireTime < (signed __int64)this->uExpireTime )
Ritor1
parents:
diff changeset
311 {
Ritor1
parents:
diff changeset
312 result = 0;
Ritor1
parents:
diff changeset
313 }
Ritor1
parents:
diff changeset
314 else
Ritor1
parents:
diff changeset
315 {
Ritor1
parents:
diff changeset
316 this->uSkill = uSkillLevel;
Ritor1
parents:
diff changeset
317 this->uPower = uPower;
Ritor1
parents:
diff changeset
318 LOWORD(v8) = this->uOverlayID;
Ritor1
parents:
diff changeset
319 this->uExpireTime = uExpireTime;
Ritor1
parents:
diff changeset
320 if ( (short)v8 )
Ritor1
parents:
diff changeset
321 {
Ritor1
parents:
diff changeset
322 v8 = (unsigned __int16)v8;
Ritor1
parents:
diff changeset
323 if ( (unsigned __int16)v8 != a5 )
Ritor1
parents:
diff changeset
324 {
Ritor1
parents:
diff changeset
325 ((OtherOverlay *)&stru_5E4C90._decor_events[20 * v8 + 105])->Reset();
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
326 pOtherOverlayList->bRedraw = true;
0
Ritor1
parents:
diff changeset
327 v6->uOverlayID = 0;
Ritor1
parents:
diff changeset
328 }
Ritor1
parents:
diff changeset
329 }
Ritor1
parents:
diff changeset
330 v6->uOverlayID = a5;
Ritor1
parents:
diff changeset
331 v6->uCaster = a6;
Ritor1
parents:
diff changeset
332 result = 1;
Ritor1
parents:
diff changeset
333 }
Ritor1
parents:
diff changeset
334 return result;
Ritor1
parents:
diff changeset
335 }
Ritor1
parents:
diff changeset
336
Ritor1
parents:
diff changeset
337 //----- (0045384A) --------------------------------------------------------
Ritor1
parents:
diff changeset
338 void SpellStats::Initialize()
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
339 {
0
Ritor1
parents:
diff changeset
340
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
341 int decode_step;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
342 char* test_string;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
343 bool break_loop;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
344 unsigned char c;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
345 unsigned int temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
346 char* tmp_pos;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
347
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
348 if ( pSpellsTXT_Raw )
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
349 pAllocator->FreeChunk(pSpellsTXT_Raw);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
350 pSpellsTXT_Raw = NULL;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
351
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
352 pSpellsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spells.txt", 0);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
353 strtok(pSpellsTXT_Raw, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
354 strtok(NULL, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
355 for(int i=1; i<100; ++i)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
356 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
357 test_string=strtok(NULL, "\r")+1;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
358 decode_step =0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
359 break_loop=false;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
360 do
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
361 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
362 c = *(unsigned char*)test_string;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
363 temp_str_len = 0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
364 while((c!='\t')&&(c>0))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
365 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
366 ++temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
367 c=test_string[temp_str_len];
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
368 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
369 tmp_pos=test_string+temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
370 if (*tmp_pos == 0)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
371 break_loop = true;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
372 *tmp_pos = 0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
373 if (temp_str_len)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
374 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
375 switch (decode_step)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
376 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
377 case 2:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
378 pInfos[i].pName=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
379 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
380 case 3:
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
381 pInfos[i].uSchool = SPELL_SCHOOL_NONE;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
382 if (!_strcmpi("fire", test_string) )
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
383 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
384 pInfos[i].uSchool =SPELL_SCHOOL_FIRE;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
385 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
386 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
387 if ( !_strcmpi("air", test_string) )
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
388 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
389 pInfos[i].uSchool = SPELL_SCHOOL_AIR;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
390 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
391 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
392 if ( !_strcmpi("water", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
393 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
394 pInfos[i].uSchool = SPELL_SCHOOL_WATER;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
395 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
396 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
397 if ( !_strcmpi("earth", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
398 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
399 pInfos[i].uSchool = SPELL_SCHOOL_EARTH;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
400 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
401 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
402 if ( !_strcmpi("spirit", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
403 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
404 pInfos[i].uSchool = SPELL_SCHOOL_SPIRIT;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
405 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
406 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
407 if ( !_strcmpi("mind", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
408 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
409 pInfos[i].uSchool = SPELL_SCHOOL_MIND;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
410 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
411 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
412 if ( !_strcmpi("body", test_string) )
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
413 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
414 pInfos[i].uSchool = SPELL_SCHOOL_BODY;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
415 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
416 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
417 if ( !_strcmpi("light", test_string) )
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
418 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
419 pInfos[i].uSchool = SPELL_SCHOOL_LIGHT;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
420 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
421 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
422 if ( !_strcmpi("dark", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
423 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
424 pInfos[i].uSchool = SPELL_SCHOOL_DARK;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
425 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
426 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
427
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
428 if ( !_strcmpi("magic", test_string))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
429 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
430 pInfos[i].uSchool = SPELL_SCHOOL_MAGIC;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
431 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
432 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
433 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
434 case 4:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
435 pInfos[i].pShortName=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
436 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
437 case 5:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
438 pInfos[i].pDescription=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
439 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
440 case 6:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
441 pInfos[i].pBasicSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
442 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
443 case 7:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
444 pInfos[i].pExpertSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
445 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
446 case 8:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
447 pInfos[i].pMasterSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
448 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
449 case 9:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
450 pInfos[i].pGrandmasterSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
451 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
452 case 10:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
453 int in_string_pos=0;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
454 unsigned char test;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
455 int in_str_len=strlen(test_string);
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
456 for (int j=0; j<in_str_len; ++j)
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
457 {
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
458 test= tolower(test_string[j]);
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
459 switch (test)
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
460 {
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
461 case 109:
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
462 pSpellDatas[i].field_12|=1;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
463 break;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
464 case 101:
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
465 pSpellDatas[i].field_12|=2;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
466 break;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
467 case 99:
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
468 pSpellDatas[i].field_12|=4;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
469 break;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
470 case 120:
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
471 pSpellDatas[i].field_12|=8;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
472 break;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
473 }
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
474 }
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
475 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
476 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
477 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
478 else
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
479 break_loop=true;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
480 ++decode_step;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
481 test_string=tmp_pos+1;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
482 } while ((decode_step<11)&&!break_loop);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
483 if ((i%11)==0)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
484 strtok(NULL, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
485 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
486
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
487 }