annotate Spells.cpp @ 2188:0ae56373cc35

CastSpell continue
author Ritor1
date Tue, 28 Jan 2014 22:41:49 +0600
parents d28d3c006077
children aff7a7b072b7
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 "LOD.h"
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
6 #include "texts.h"
0
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 #include "mm7_data.h"
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
9 #include "Party.h"
2037
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents: 1679
diff changeset
10 #include "OurMath.h"
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
11 #include "SpriteObject.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
12 #include "ObjectList.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
13 #include "Indoor.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
14 #include "AudioPlayer.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
15 #include "Actor.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
16 #include "Game.h"
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
17 #include "stru6.h"
0
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
20 std::array<TownPortalData, 6> TownPortalList = //4ECBB8
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
21 {{
839
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
22 {Vec3_int_(-5121, 2107, 1), 1536, 0, 21, 0},
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
23 {Vec3_int_(-15148, -10240, 1473), 0, 0, 4, 0},
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
24 {Vec3_int_(-10519, 5375, 753), 512, 0, 3, 0},
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
25 {Vec3_int_(3114, -11055, 513), 0, 0, 10, 0},
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
26 {Vec3_int_(-158, 7624, 1), 512, 0, 7, 0},
ae8f83e1b0cf coordinates for the town portal
x1diablo
parents: 490
diff changeset
27 {Vec3_int_(-1837, -4247, 65), 65, 0, 8, 0}
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
28 }} ;
0
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30 struct SpellStats *pSpellStats;
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
33 std::array<stru324_spell, 103> stru_4E3ACC =
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
34 {{
488
Nomad
parents: 363
diff changeset
35 {10, 0},
Nomad
parents: 363
diff changeset
36 {1000, 0}, {1010, 0}, {1020, 0}, {1030, 0}, {1040, 0}, {1050, 0}, {1060, 0}, {1070, 0}, {1080, 0}, {1090, 0}, {1100, 0},
Nomad
parents: 363
diff changeset
37 {2000, 0}, {2010, 0}, {2020, 0}, {2030, 0}, {2040, 0}, {2050, 0}, {2060, 0}, {2070, 0}, {2080, 0}, {2090, 0}, {2100, 0},
Nomad
parents: 363
diff changeset
38 {3000, 0}, {3010, 0}, {3020, 0}, {3030, 0}, {3040, 0}, {3050, 0}, {3060, 0}, {3070, 0}, {3080, 0}, {3090, 0}, {3100, 0},
Nomad
parents: 363
diff changeset
39 {4000, 0}, {4010, 0}, {4020, 0}, {4030, 0}, {4040, 0}, {4050, 0}, {4060, 0}, {4070, 0}, {4080, 0}, {4090, 0}, {4100, 0},
Nomad
parents: 363
diff changeset
40 {5000, 0}, {5010, 0}, {5020, 0}, {5030, 0}, {5040, 0}, {5050, 0}, {5060, 0}, {5070, 0}, {5080, 0}, {5090, 0}, {5100, 0},
Nomad
parents: 363
diff changeset
41 {6000, 0}, {6010, 0}, {6020, 0}, {6030, 0}, {6040, 0}, {6050, 0}, {6060, 0}, {6070, 0}, {6080, 0}, {6090, 0}, {6100, 0},
Nomad
parents: 363
diff changeset
42 {7000, 0}, {7010, 0}, {7020, 0}, {7030, 0}, {7040, 0}, {7050, 0}, {7060, 0}, {7070, 0}, {7080, 0}, {7090, 0}, {7100, 0},
Nomad
parents: 363
diff changeset
43 {8000, 0}, {8010, 0}, {8020, 0}, {8030, 0}, {8040, 0}, {8050, 0}, {8060, 0}, {8070, 0}, {8080, 0}, {8090, 0}, {8100, 0},
1086
74ab0ed7e308 arrows working
zipi
parents: 1016
diff changeset
44 {9000, 0}, {9010, 0}, {9020, 0}, {9030, 0}, {9040, 0}, {9050, 0}, {9060, 0}, {9070, 0}, {9080, 0}, {9090, 0}, {9100, 0},
74ab0ed7e308 arrows working
zipi
parents: 1016
diff changeset
45 {545, 0},
74ab0ed7e308 arrows working
zipi
parents: 1016
diff changeset
46 {545, 0},
74ab0ed7e308 arrows working
zipi
parents: 1016
diff changeset
47 {555, 0}
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
48 }};
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
49 //9 spellbook pages 11 spells per page 9*11 =99 +1 zero struct at 0. It counted from 1!
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
50 std::array<SpellData, 100> pSpellDatas={{
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
51 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
52
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
53 {1, 1, 1, 1, 60, 60, 60, 40, 0, 0},//0
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
54 {2, 2, 2, 2, 110, 110, 100, 90, 768, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
55 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
56 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
57 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
58 {8, 8, 8, 8, 100, 100, 90, 80, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
59 {10, 10, 10, 10, 150, 150, 150, 150, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
60 {15, 15, 15, 15, 120, 120, 120, 120, 1536, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
61 {20, 20, 20, 20, 100, 100, 100, 90, 264, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
62 {25, 25, 25, 25, 100, 100, 100, 90, 268, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
63 {30, 30, 30, 30, 90, 90, 90, 90, 3855, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
64
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
65 {1, 1, 1, 0, 60, 60, 60, 60, 0, 0}, //1
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
66 {2, 2, 2, 2, 120, 120, 120, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
67 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
68 {4, 4, 4, 4, 110, 100, 90, 80, 258, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
69 {5, 5, 5, 5, 90, 90, 70, 50, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
70 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
71 {10, 10, 10, 10, 100, 100, 90, 70, 2048, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
72 {15, 15, 15, 15, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
73 {20, 20, 20, 20, 100, 100, 100, 90, 2570, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
74 {25, 25, 25, 25, 250, 250, 250, 250, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
75 {30, 30, 30, 30, 90, 90, 90, 90, 276, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
76
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
77 {1, 1, 1, 1, 60, 60, 60, 20, 0, 0}, //2
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
78 {2, 2, 2, 2, 110, 100, 90, 70, 514, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
79 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
80 {4, 4, 4, 4, 110, 100, 90, 80, 1024, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
81 {5, 5, 5, 5, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
82 {8, 8, 8, 8, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
83 {10, 10, 10, 10, 100, 100, 90, 80, 2313, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
84 {15, 15, 15, 15, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
85 {20, 20, 20, 20, 200, 200, 200, 200, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
86 {25, 25, 25, 25, 80, 80, 80, 80, 780, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
87 {30, 30, 30, 30, 250, 250, 250, 250, 0, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
88
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
89 {1, 1, 1, 1, 80, 80, 80, 80, 0, 0}, //3
192
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, 773, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
93 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
94 {8, 8, 8, 8, 100, 100, 90, 80, 2304, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
95 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
96 {15, 15, 15, 15, 90, 90, 90, 80, 2048, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
97 {20, 20, 20, 20, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
98 {25, 25, 25, 25, 100, 100, 100, 90, 276, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
99 {30, 30, 30, 30, 90, 90, 90, 90, 25, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
100
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
101 {1, 1, 1, 1, 100, 100, 100, 100, 0, 0}, //4
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
102 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
103 {3, 3, 3, 3, 90, 90, 90, 90, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
104 {4, 4, 4, 4, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
105 {5, 5, 5, 5, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
106 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
107 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
108 {15, 15, 15, 15, 100, 100, 100, 100, 2058, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
109 {20, 20, 20, 20, 240, 240, 240, 240, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
110 {25, 25, 25, 25, 150, 150, 150, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
111 {30, 30, 30, 30, 1000, 1000, 1000, 1000, 0, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
112
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
113 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0}, //5
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
114 {2, 2, 2, 2, 110, 110, 110, 110, 771, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
115 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
116 {4, 4, 4, 4, 110, 100, 90, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
117 {5, 5, 5, 5, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
118 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
119 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
120 {15, 15, 15, 15, 80, 80, 80, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
121 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
122 {25, 25, 25, 25, 110, 110, 110, 100, 268, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
123 {30, 30, 30, 30, 120, 120, 120, 120, 0, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
124
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
125 {1, 1, 1, 1, 120, 120, 120, 120, 0, 0}, //6
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
126 {2, 2, 2, 2, 100, 100, 100, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
127 {3, 3, 3, 3, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
128 {4, 4, 4, 4, 110, 100, 90, 80, 520, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
129 {5, 5, 5, 5, 110, 110, 110, 110, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
130 {8, 8, 8, 8, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
131 {10, 10, 10, 10, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
132 {15, 15, 15, 15, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
133 {20, 20, 20, 20, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
134 {25, 25, 25, 25, 110, 110, 110, 100, 1310, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
135 {30, 30, 30, 30, 100, 100, 100, 100, 0, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
136
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
137 {5, 5, 5, 5, 110, 100, 90, 80, 1024, 0}, //7
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
138 {10, 10, 10, 10, 120, 110, 100, 90, 4112, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
139 {15, 15, 15, 15, 120, 110, 100, 90, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
140 {20, 20, 20, 20, 160, 140, 120, 100, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
141 {25, 25, 25, 25, 140, 140, 140, 140, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
142 {30, 30, 30, 30, 500, 500, 500, 500, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
143 {35, 35, 35, 35, 135, 135, 120, 100, 281, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
144 {40, 40, 40, 40, 500, 500, 500, 500, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
145 {45, 45, 45, 45, 250, 250, 250, 250, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
146 {50, 50, 50, 50, 150, 150, 150, 135, 5140, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
147 {55, 55, 55, 55, 300, 300, 300, 300, 0, 0},
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
148
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
149 {10, 10, 10, 10, 140, 140, 140, 140, 0, 0}, //8
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
150 {15, 15, 15, 15, 120, 110, 100, 90, 2585, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
151 {20, 20, 20, 20, 120, 100, 90, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
152 {25, 25, 25, 25, 120, 120, 120, 120, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
153 {30, 30, 30, 30, 90, 90, 80, 70, 1542, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
154 {35, 35, 35, 35, 120, 120, 100, 80, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
155 {40, 40, 40, 40, 110, 110, 110, 110, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
156 {45, 45, 45, 45, 200, 200, 200, 150, 0, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
157 {50, 50, 50, 50, 120, 120, 120, 100, 6400, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
158 {55, 55, 55, 55, 250, 250, 250, 250, 306, 0},
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
159 {60, 60, 60, 60, 300, 300, 300, 300, 2073, 0}
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
160 }};
0
Ritor1
parents:
diff changeset
161
490
Nomad
parents: 488
diff changeset
162
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
163 std::array<unsigned int, 25> wand_spell_ids =
490
Nomad
parents: 488
diff changeset
164 {
Nomad
parents: 488
diff changeset
165 // 135 Wand of Fire 136 Wand of Sparks 137 Wand of Poison 138 Wand of Stunning 139 Wand of Harm
Nomad
parents: 488
diff changeset
166 SPELL_FIRE_FIRE_BOLT, SPELL_AIR_SPARKS, SPELL_WATER_POISON_SPRAY, SPELL_EARTH_STUN, SPELL_BODY_HARM,
Nomad
parents: 488
diff changeset
167 // 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
Nomad
parents: 488
diff changeset
168 SPELL_LIGHT_LIGHT_BOLT, SPELL_WATER_ICE_BOLT, SPELL_SPIRIT_SPIRIT_LASH, SPELL_MIND_MIND_BLAST, SPELL_EARTH_DEADLY_SWARM,
Nomad
parents: 488
diff changeset
169 // 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
Nomad
parents: 488
diff changeset
170 SPELL_FIRE_FIREBALL, SPELL_WATER_ACID_BURST, SPELL_AIR_LIGHNING_BOLT, SPELL_EARTH_BLADES, SPELL_MIND_CHARM,
Nomad
parents: 488
diff changeset
171 // 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
Nomad
parents: 488
diff changeset
172 SPELL_WATER_ICE_BLAST, SPELL_BODY_FLYING_FIST, SPELL_EARTH_ROCK_BLAST, SPELL_LIGHT_PARALYZE, SPELL_DARK_TOXIC_CLOUD,
Nomad
parents: 488
diff changeset
173 // 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
Nomad
parents: 488
diff changeset
174 SPELL_AIR_IMPLOSION, SPELL_EARTH_MASS_DISTORTION, SPELL_DARK_SHARPMETAL, SPELL_DARK_SHRINKING_RAY, SPELL_FIRE_INCINERATE
Nomad
parents: 488
diff changeset
175 };
Nomad
parents: 488
diff changeset
176
Nomad
parents: 488
diff changeset
177
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1165
diff changeset
178 std::array<std::array<unsigned char, 12>, 9> pSpellbookSpellIndices = // 4E2430
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1165
diff changeset
179 {{ //0 1 2 3 4 5 6 7 8 9 10 11
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
180 {0, 3, 1, 8, 11, 7, 4, 10, 6, 2, 5, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
181 {0, 11, 2, 9, 6, 8, 5, 10, 3, 7, 1, 4},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
182 {0, 4, 8, 9, 1, 10, 3, 11, 7, 6, 2, 5},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
183 {0, 7, 10, 8, 2, 11, 1, 5, 3, 6, 4, 9},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
184 {0, 5, 10, 11, 7, 2, 8, 1, 4, 9, 3, 6},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
185 {0, 5, 9, 8, 3, 7, 6, 4, 1, 11, 2, 10},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
186 {0, 1, 6, 9, 3, 5, 8, 11, 7, 10, 4, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
187 {0, 1, 10, 11, 9, 4, 3, 6, 5, 7, 8, 2},
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
188 {0, 9, 3, 7, 1, 5, 2, 10, 11, 8, 6, 4}
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1165
diff changeset
189 }};
0
Ritor1
parents:
diff changeset
190
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
191 std::array<std::array<struct SpellBookIconPos, 12>, 9> pIconPos={{
363
2bc1c8d68f41 Allocator and SpellCost Tip
Gloval
parents: 357
diff changeset
192
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
193 { 0, 0, 17, 13, 115, 2, 217, 15,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
194 299, 6, 28, 125, 130, 133, 294, 114,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
195 11, 232, 134, 233, 237, 171, 296, 231},
0
Ritor1
parents:
diff changeset
196
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
197 { 0, 0, 19, 9, 117, 3, 206, 13,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
198 285, 7, 16, 123, 113, 101, 201, 118,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
199 317, 110, 11, 230, 149, 236, 296, 234},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
200
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
201 { 0, 0, 17, 9, 140, 0, 210, 34,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
202 293, 5, 15, 98, 78, 121, 175, 136,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
203 301, 115, 15, 226, 154, 225, 272, 220},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
204
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
205 { 0, 0, 7, 9, 156, 2, 277, 9,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
206 11, 117, 111, 82, 180, 102, 303, 108,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
207 10, 229, 120, 221, 201, 217, 296, 225},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
208
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
209 { 0, 0, 18, 8, 89, 15, 192, 14,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
210 292, 7, 22, 129, 125, 146, 217, 136,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
211 305, 115, 22, 226, 174, 237, 290, 231},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
212
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
213 { 0, 0, 18, 12, 148, 9, 292, 7,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
214 17, 122, 121, 99, 220, 87, 293, 112,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
215 13, 236, 128, 213, 220, 223, 315, 223},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
216
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
217 { 0, 0, 23, 14, 127, 8, 204, 0,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
218 306, 8, 14, 115, 122, 132, 200, 116,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
219 293, 122, 20, 228, 154, 228, 294, 239},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
220
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
221 { 0, 0, 19, 14, 124, 10, 283, 12,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
222 8, 105, 113, 89, 190, 82, 298, 108,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
223 18, 181, 101, 204, 204, 203, 285, 218},
357
b07cf89108d5 Spell positions in book
Gloval
parents: 210
diff changeset
224
1206
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
225 { 0, 0, 18, 17, 110, 16, 201, 15,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
226 307, 15, 18, 148, 125, 166, 201, 123,
ab6560001f5b arrays to std::arrays phase 2 - some more arrays converted
Grumpy7
parents: 1205
diff changeset
227 275, 120, 28, 235, 217, 222, 324, 216}}};
0
Ritor1
parents:
diff changeset
228
Ritor1
parents:
diff changeset
229
Ritor1
parents:
diff changeset
230 //----- (0042EB31) --------------------------------------------------------
Ritor1
parents:
diff changeset
231 bool SpellBuff::NotExpired()
Ritor1
parents:
diff changeset
232 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
233 return (signed __int64)this->uExpireTime > 0 ? true:false;
0
Ritor1
parents:
diff changeset
234 }
Ritor1
parents:
diff changeset
235
Ritor1
parents:
diff changeset
236
Ritor1
parents:
diff changeset
237 //----- (00458585) --------------------------------------------------------
Ritor1
parents:
diff changeset
238 void SpellBuff::Reset()
Ritor1
parents:
diff changeset
239 {
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
240 uSkill = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
241 uPower = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
242 uExpireTime = 0i64;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
243 uCaster = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
244 uFlags = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
245 if (uOverlayID)
0
Ritor1
parents:
diff changeset
246 {
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
247 pOtherOverlayList->pOverlays[uOverlayID - 1].Reset();
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
248 pOtherOverlayList->bRedraw = true;
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
249 uOverlayID = 0;
0
Ritor1
parents:
diff changeset
250 }
Ritor1
parents:
diff changeset
251 }
Ritor1
parents:
diff changeset
252
Ritor1
parents:
diff changeset
253 //----- (004585CA) --------------------------------------------------------
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
254 bool SpellBuff::IsBuffExpiredToTime( __int64 time_end )
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
255 {
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
256 if (uExpireTime && (uExpireTime < time_end))
0
Ritor1
parents:
diff changeset
257 {
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
258 uExpireTime = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
259 uPower = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
260 uSkill = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
261 uOverlayID = 0;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
262 return true;
0
Ritor1
parents:
diff changeset
263 }
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
264 return false;
0
Ritor1
parents:
diff changeset
265 }
Ritor1
parents:
diff changeset
266
Ritor1
parents:
diff changeset
267 //----- (004584E0) --------------------------------------------------------
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
268 bool SpellBuff::Apply( signed __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int uOverlayID, unsigned __int8 caster )
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
269 {
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1306
diff changeset
270 if (this->uExpireTime && (uExpireTime < this->uExpireTime))
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
271 return false;
0
Ritor1
parents:
diff changeset
272
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
273 this->uSkill = uSkillLevel;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
274 this->uPower = uPower;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
275 this->uExpireTime = uExpireTime;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
276 if (this->uOverlayID && this->uOverlayID != uOverlayID)
0
Ritor1
parents:
diff changeset
277 {
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
278 pOtherOverlayList->pOverlays[this->uOverlayID - 1].Reset();
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
279 pOtherOverlayList->bRedraw = true;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
280 this->uOverlayID = 0;
0
Ritor1
parents:
diff changeset
281 }
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
282 this->uOverlayID = uOverlayID;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
283 this->uCaster = caster;
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
284
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
285 return true;
0
Ritor1
parents:
diff changeset
286 }
Ritor1
parents:
diff changeset
287
Ritor1
parents:
diff changeset
288 //----- (0045384A) --------------------------------------------------------
Ritor1
parents:
diff changeset
289 void SpellStats::Initialize()
982
08fd1436ef35 enums & lod
Nomad
parents: 910
diff changeset
290 {
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
291 int decode_step;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
292 char* test_string;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
293 bool break_loop;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
294 unsigned char c;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
295 unsigned int temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
296 char* tmp_pos;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
297
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
298 if ( pSpellsTXT_Raw )
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1519
diff changeset
299 free(pSpellsTXT_Raw);
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
300 pSpellsTXT_Raw = NULL;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 142
diff changeset
301
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
302 pSpellsTXT_Raw = (char *)pEvents_LOD->LoadRaw("spells.txt", 0);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
303 strtok(pSpellsTXT_Raw, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
304 strtok(NULL, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
305 for(int i=1; i<100; ++i)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
306 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
307 test_string=strtok(NULL, "\r")+1;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
308 decode_step =0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
309 break_loop=false;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
310 do
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
311 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
312 c = *(unsigned char*)test_string;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
313 temp_str_len = 0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
314 while((c!='\t')&&(c>0))
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
315 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
316 ++temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
317 c=test_string[temp_str_len];
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
318 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
319 tmp_pos=test_string+temp_str_len;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
320 if (*tmp_pos == 0)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
321 break_loop = true;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
322 *tmp_pos = 0;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
323 if (temp_str_len)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
324 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
325 switch (decode_step)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
326 {
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
327 case 2:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
328 pInfos[i].pName=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
329 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
330 case 3:
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
331 pInfos[i].uSchool = SPELL_SCHOOL_NONE;
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
332 if (!_stricmp("fire", test_string) )
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
333 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
334 pInfos[i].uSchool =SPELL_SCHOOL_FIRE;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
335 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
336 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
337 if ( !_stricmp("air", test_string) )
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
338 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
339 pInfos[i].uSchool = SPELL_SCHOOL_AIR;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
340 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
341 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
342 if ( !_stricmp("water", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
343 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
344 pInfos[i].uSchool = SPELL_SCHOOL_WATER;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
345 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
346 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
347 if ( !_stricmp("earth", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
348 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
349 pInfos[i].uSchool = SPELL_SCHOOL_EARTH;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
350 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
351 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
352 if ( !_stricmp("spirit", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
353 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
354 pInfos[i].uSchool = SPELL_SCHOOL_SPIRIT;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
355 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
356 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
357 if ( !_stricmp("mind", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
358 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
359 pInfos[i].uSchool = SPELL_SCHOOL_MIND;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
360 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
361 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
362 if ( !_stricmp("body", test_string) )
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
363 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
364 pInfos[i].uSchool = SPELL_SCHOOL_BODY;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
365 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
366 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
367 if ( !_stricmp("light", test_string) )
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
368 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
369 pInfos[i].uSchool = SPELL_SCHOOL_LIGHT;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
370 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
371 }
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
372 if ( !_stricmp("dark", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
373 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
374 pInfos[i].uSchool = SPELL_SCHOOL_DARK;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
375 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
376 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
377
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1086
diff changeset
378 if ( !_stricmp("magic", test_string))
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
379 {
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
380 pInfos[i].uSchool = SPELL_SCHOOL_MAGIC;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
381 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
382 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
383 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
384 case 4:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
385 pInfos[i].pShortName=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
386 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
387 case 5:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
388 pInfos[i].pDescription=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
389 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
390 case 6:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
391 pInfos[i].pBasicSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
392 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
393 case 7:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
394 pInfos[i].pExpertSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
395 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
396 case 8:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
397 pInfos[i].pMasterSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
398 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
399 case 9:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
400 pInfos[i].pGrandmasterSkillDesc=RemoveQuotes(test_string);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
401 break;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
402 case 10:
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
403 int in_string_pos=0;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
404 unsigned char test;
191
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
405 int in_str_len=strlen(test_string);
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
406 for (int j=0; j<in_str_len; ++j)
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
407 {
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
408 test= tolower(test_string[j]);
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
409 switch (test)
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
410 {
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
411 case 'm':
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
412 pSpellDatas[i].stats|=1;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
413 break;
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
414 case 'e':
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
415 pSpellDatas[i].stats|=2;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
416 break;
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
417 case 'c':
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
418 pSpellDatas[i].stats|=4;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
419 break;
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
420 case 'x':
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
421 pSpellDatas[i].stats|=8;
192
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
422 break;
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
423 }
1c8add70bcf9 spell init fixed
Gloval
parents: 191
diff changeset
424 }
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 else
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
429 break_loop=true;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
430 ++decode_step;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
431 test_string=tmp_pos+1;
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
432 } while ((decode_step<11)&&!break_loop);
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
433 if ((i%11)==0)
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
434 strtok(NULL, "\r");
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
435 }
4813b57396ba spell init in progress
Gloval
parents: 189
diff changeset
436
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
437 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
438 //----- (00448DF8) --------------------------------------------------------
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
439 void __fastcall EventCastSpell(int uSpellID, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz)//sub_448DF8
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
440 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
441 int v9; // esi@1
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
442 double v10; // st7@4
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
443 double v11; // st6@4
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
444 double v12; // st5@4
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
445 double v13; // st7@6
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
446 int v14; // ST44_4@7
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
447 signed int v15; // ebx@9
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
448 signed int v16; // edx@15
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
449 char *v17; // ecx@16
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
450 unsigned __int16 v18; // ax@20
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
451 char *v19; // ecx@31
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
452 int v20; // edx@35
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
453 signed int v21; // edx@37
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
454 char *v22; // ecx@38
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
455 unsigned __int16 v23; // ax@41
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
456 int i; // esi@42
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
457 signed int v25; // edx@55
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
458 char *v26; // ecx@56
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
459 unsigned __int16 v27; // ax@59
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
460 int j; // esi@60
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
461 signed int v29; // edx@66
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
462 char *v30; // ecx@67
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
463 unsigned __int16 v31; // ax@70
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
464 //Player *v32; // eax@80
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
465 //unsigned __int16 v33; // si@85
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
466 int v34; // eax@96
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
467 int v35; // eax@97
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
468 unsigned __int64 v36; // qax@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
469 SpellBuff *v37; // ecx@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
470 int v38; // esi@103
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
471 signed __int64 v39; // qax@105
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
472 int v40; // ebx@108
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
473 int v41; // ebx@109
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
474 int v42; // esi@111
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
475 int v43; // ebx@111
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
476 int v44; // eax@117
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
477 //unsigned __int16 v45; // si@137
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
478 unsigned __int16 v46; // [sp-8h] [bp-BCh]@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
479 int v47; // [sp-4h] [bp-B8h]@35
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
480 unsigned __int16 v48; // [sp-4h] [bp-B8h]@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
481 int v49; // [sp+0h] [bp-B4h]@35
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
482 int v50; // [sp+0h] [bp-B4h]@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
483 int v51; // [sp+4h] [bp-B0h]@35
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
484 unsigned __int8 v52; // [sp+4h] [bp-B0h]@99
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
485 float v53; // [sp+14h] [bp-A0h]@4
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
486 float v54; // [sp+18h] [bp-9Ch]@4
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
487 int v55; // [sp+28h] [bp-8Ch]@7
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
488 unsigned int yaw; // [sp+30h] [bp-84h]@7
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
489 int pitch; // [sp+34h] [bp-80h]@7
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
490 //SpriteObject a1; // [sp+38h] [bp-7Ch]@12
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
491 int v59; // [sp+A8h] [bp-Ch]@1
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
492 int v60; // [sp+ACh] [bp-8h]@1
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
493 //int spellnum_; // [sp+B0h] [bp-4h]@1
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
494 //signed int levela; // [sp+BCh] [bp+8h]@80
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
495 int a6_4; // [sp+C8h] [bp+14h]@117
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
496 float a7a; // [sp+CCh] [bp+18h]@6
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
497 signed int a7b; // [sp+CCh] [bp+18h]@12
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
498 int a7c; // [sp+CCh] [bp+18h]@29
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
499 int a7d; // [sp+CCh] [bp+18h]@55
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
500 float a8a; // [sp+D0h] [bp+1Ch]@6
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
501 int a8b; // [sp+D0h] [bp+1Ch]@37
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
502 int a8c; // [sp+D0h] [bp+1Ch]@55
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
503 float toza; // [sp+D4h] [bp+20h]@6
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
504
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
505 v9 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
506 v59 = uSkillLevel + 1;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
507 //spellnum_ = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
508 v60 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
509 if ( tox || toy || toz )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
510 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
511 v10 = (double)tox - (double)fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
512 v53 = v10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
513 v11 = (double)toy - (double)fromy;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
514 v54 = v11;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
515 v12 = (double)toz;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
516 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
517 else
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
518 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
519 v10 = (double)pParty->vPosition.x - (double)fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
520 v53 = v10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
521 v11 = (double)pParty->vPosition.y - (double)fromy;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
522 v54 = v11;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
523 v12 = (double)(pParty->vPosition.z + pParty->sEyelevel);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
524 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
525 a7a = v12 - (double)fromz;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
526 toza = v11 * v11;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
527 a8a = v10 * v10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
528 v13 = sqrt(a7a * a7a + a8a + toza);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
529 if ( v13 <= 1.0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
530 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
531 LOBYTE(v55) = 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
532 yaw = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
533 pitch = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
534 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
535 else
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
536 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
537 v55 = (signed __int64)v13;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
538 v14 = (signed __int64)sqrt(a8a + toza);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
539 yaw = stru_5C6E00->Atan2((signed __int64)v53, (signed __int64)v54);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
540 pitch = stru_5C6E00->Atan2(v14, (signed __int64)a7a);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
541 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
542 v15 = v59;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
543 if ( v59 <= 0 || v59 > 4 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
544 v15 = 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
545 a7b = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
546
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
547 SpriteObject a1; // [sp+38h] [bp-7Ch]@12
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
548 //SpriteObject::SpriteObject(&a1);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
549
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
550 a1.uType = stru_4E3ACC[uSpellID].uType;
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
551 if ( uSpellID > 58 )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
552 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
553 if ( uSpellID == SPELL_BODY_PROTECTION_FROM_BODY )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
554 goto LABEL_117;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
555 if ( uSpellID != SPELL_LIGHT_DAY_OF_THE_GODS )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
556 return;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
557 v40 = v15 - 2;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
558 if ( v40 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
559 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
560 v41 = v40 - 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
561 if ( !v41 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
562 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
563 v42 = 14400 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
564 v43 = 4 * uSkill + 10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
565 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
566 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
567 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
568 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
569 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
570 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
571 v36 = pParty->uTimePlayed + v39;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
572 v37->Apply(v36, a7b, v43, 0, 0);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
573 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
574 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
575 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
576 if ( v41 == 1 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
577 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
578 v42 = 18000 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
579 v43 = 5 * uSkill + 10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
580 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
581 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
582 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
583 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
584 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
585 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
586 v36 = pParty->uTimePlayed + v39;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
587 v37->Apply(v36, a7b, v43, 0, 0);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
588 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
589 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
590 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
591 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
592 v42 = 10800 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
593 v43 = 3 * uSkill + 10;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
594 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
595 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
596 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
597 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
598 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
599 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
600 v36 = pParty->uTimePlayed + v39;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
601 v37->Apply(v36, a7b, v43, 0, 0);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
602 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
603 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
604 }
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
605 if ( uSpellID != 58 )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
606 {
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
607 switch ( uSpellID )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
608 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
609 case SPELL_FIRE_FIRE_BOLT:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
610 case SPELL_FIRE_FIREBALL:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
611 case SPELL_AIR_LIGHNING_BOLT:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
612 case SPELL_WATER_ICE_BOLT:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
613 case SPELL_WATER_ACID_BURST:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
614 case SPELL_WATER_ICE_BLAST:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
615 case SPELL_EARTH_BLADES:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
616 case SPELL_EARTH_ROCK_BLAST:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
617 a1.stru_24.Reset();
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
618 v16 = 0;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
619 a1.spell_id = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
620 a1.spell_level = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
621 a1.spell_skill = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
622 if ( (signed int)pObjectList->uNumObjects <= 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
623 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
624 //v18 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
625 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
626 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
627 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
628 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
629 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
630 a1.field_60_distance_related_prolly_lod = v55;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
631 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
632 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
633 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
634 a1.spell_target_pid = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
635 a1.uFacing = yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
636 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
637 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
638 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
639 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
640 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
641 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
642 v17 = (char *)&pObjectList->pObjects->uObjectID;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
643 while ( (short)a1.uType != *(short *)v17 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
644 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
645 ++v16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
646 v17 += 56;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
647 if ( v16 >= (signed int)pObjectList->uNumObjects )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
648 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
649 //v18 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
650 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
651 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
652 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
653 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
654 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
655 a1.field_60_distance_related_prolly_lod = v55;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
656 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
657 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
658 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
659 a1.spell_target_pid = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
660 a1.uFacing = yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
661 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
662 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
663 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
664 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
665 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
666 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
667 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
668 v18 = v16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
669 a1.uObjectDescID = v18;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
670 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
671 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
672 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
673 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
674 a1.field_60_distance_related_prolly_lod = v55;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
675 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
676 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
677 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
678 a1.spell_target_pid = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
679 a1.uFacing = yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
680 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
681 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
682 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
683 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
684 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
685 case SPELL_WATER_POISON_SPRAY:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
686 switch ( v15 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
687 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
688 case 1:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
689 v60 = 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
690 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
691 case 2:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
692 v60 = 3;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
693 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
694 case 3:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
695 v60 = 5;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
696 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
697 case 4:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
698 v60 = 7;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
699 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
700 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
701 a7c = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
702 if ( v60 != 1 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
703 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
704 a8b = a7c / (v60 - 1);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
705 a1.stru_24.Reset();
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
706 v21 = 0;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
707 a1.spell_id = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
708 a1.spell_level = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
709 a1.spell_skill = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
710 if ( (signed int)pObjectList->uNumObjects <= 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
711 v23 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
712 else
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
713 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
714 v22 = (char *)&pObjectList->pObjects->uObjectID;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
715 while ( (short)a1.uType != *(short *)v22 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
716 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
717 ++v21;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
718 v22 += 56;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
719 if ( v21 >= (signed int)pObjectList->uNumObjects )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
720 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
721 v23 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
722 a1.uObjectDescID = v23;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
723 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
724 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
725 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
726 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
727 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
728 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
729 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
730 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
731 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
732 for ( i = a7c / -2; i <= a7c / 2; i += a8b )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
733 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
734 a1.uFacing = i + yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
735 a1.Create((signed __int16)(i + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
736 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
737 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
738 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
739 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
740 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
741 v23 = v21;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
742 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
743 a1.uObjectDescID = v23;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
744 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
745 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
746 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
747 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
748 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
749 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
750 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
751 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
752 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
753 for ( i = a7c / -2; i <= a7c / 2; i += a8b )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
754 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
755 a1.uFacing = i + yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
756 a1.Create((signed __int16)(i + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
757 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
758 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
759 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
760 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
761 a1.stru_24.Reset();
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
762 a1.spell_id = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
763 a1.spell_level = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
764 a1.spell_skill = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
765 if ( (signed int)pObjectList->uNumObjects <= 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
766 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
767 //v18 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
768 a1.uObjectDescID = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
769 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
770 a1.vPosition.x = fromx;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
771 a1.uAttributes = 16;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
772 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
773 a1.field_60_distance_related_prolly_lod = v55;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
774 //v20 = yaw;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
775 a1.uSpriteFrameID = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
776 a1.spell_caster_pid = 8000 | OBJECT_Item;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
777 a1.spell_target_pid = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
778 a1.uFacing = yaw;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
779 a1.uSoundID = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
780 //v51 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
781 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
782 //v47 = pitch;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
783 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
784 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
785 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
786 }
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
787 //v19 = (char *)&pObjectList->pObjects->uObjectID;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
788 for ( v16 = 0; v16 < (signed int)pObjectList->uNumObjects; ++v16 )
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
789 {
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
790 if ( (short)a1.uType == pObjectList->pObjects[v16].uObjectID )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
791 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
792 //v18 = v16;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
793 a1.uObjectDescID = v16;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
794 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
795 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
796 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
797 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
798 a1.field_60_distance_related_prolly_lod = v55;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
799 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
800 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
801 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
802 a1.spell_target_pid = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
803 a1.uFacing = yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
804 a1.uSoundID = 0;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
805 //v51 = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
806 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
807 //v47 = pitch;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
808 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
809 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
810 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
811 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
812 //v19 += 56;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
813 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
814 //v18 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
815 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
816 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
817 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
818 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
819 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
820 a1.field_60_distance_related_prolly_lod = v55;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
821 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
822 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
823 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
824 a1.spell_target_pid = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
825 a1.uFacing = yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
826 a1.uSoundID = 0;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
827 //v51 = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
828 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
829 //v47 = pitch;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
830 a1.Create(yaw, pitch, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
831 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
832 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
833 case SPELL_AIR_SPARKS:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
834 switch ( v15 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
835 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
836 case 1:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
837 v60 = 3;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
838 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
839 case 2:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
840 v60 = 5;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
841 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
842 case 3:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
843 v60 = 7;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
844 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
845 case 4:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
846 v60 = 9;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
847 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
848 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
849 a7d = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
850 a8c = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v60 - 1);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
851 a1.stru_24.Reset();
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
852 v25 = 0;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
853 a1.spell_id = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
854 a1.spell_level = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
855 a1.spell_skill = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
856 if ( (signed int)pObjectList->uNumObjects <= 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
857 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
858 //v27 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
859 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
860 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
861 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
862 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
863 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
864 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
865 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
866 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
867 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
868 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
869 for ( j = a7d / -2; j <= a7d / 2; j += a8c )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
870 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
871 a1.uFacing = j + yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
872 a1.Create((signed __int16)(j + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
873 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
874 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
875 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
876 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
877 v26 = (char *)&pObjectList->pObjects->uObjectID;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
878 while ( (short)a1.uType != *(short *)v26 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
879 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
880 ++v25;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
881 v26 += 56;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
882 if ( v25 >= (signed int)pObjectList->uNumObjects )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
883 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
884 v27 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
885 a1.uObjectDescID = v27;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
886 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
887 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
888 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
889 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
890 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
891 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
892 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
893 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
894 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
895 for ( j = a7d / -2; j <= a7d / 2; j += a8c )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
896 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
897 a1.uFacing = j + yaw;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
898 a1.Create((signed __int16)(j + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
899 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
900 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
901 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
902 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
903 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
904 v27 = v25;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
905 a1.uObjectDescID = v27;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
906 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
907 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
908 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
909 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
910 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
911 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
912 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
913 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
914 a1.uSoundID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
915 for ( j = a7d / -2; j <= a7d / 2; j += a8c )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
916 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
917 a1.uFacing = j + yaw;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
918 a1.Create((signed __int16)(j + (short)yaw), pitch,
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
919 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
920 }
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
921 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
922 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
923 case SPELL_EARTH_DEATH_BLOSSOM:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
924 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
925 return;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
926 a1.stru_24.Reset();
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
927 v29 = 0;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
928 a1.spell_id = uSpellID;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
929 a1.spell_level = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
930 a1.spell_skill = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
931 if ( (signed int)pObjectList->uNumObjects <= 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
932 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
933 //v31 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
934 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
935 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
936 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
937 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
938 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
939 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
940 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
941 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
942 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
943 a1.uSoundID = 0;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
944 //v51 = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
945 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
946 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
947 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
948 a1.Create(yaw, v47, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
949 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
950 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
951 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
952 v30 = (char *)&pObjectList->pObjects->uObjectID;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
953 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
954
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
955 case SPELL_FIRE_HASTE:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
956 if ( v15 > 0 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
957 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
958 if ( v15 <= 2 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
959 v9 = 60 * (uSkill + 60);
2106
b52c09e01e7e PlaySound() blv_door and other sounds
Ritor1
parents: 2105
diff changeset
960 else if ( v15 == 3 )
b52c09e01e7e PlaySound() blv_door and other sounds
Ritor1
parents: 2105
diff changeset
961 v9 = 180 * (uSkill + 20);
b52c09e01e7e PlaySound() blv_door and other sounds
Ritor1
parents: 2105
diff changeset
962 else if ( v15 == 4 )
b52c09e01e7e PlaySound() blv_door and other sounds
Ritor1
parents: 2105
diff changeset
963 v9 = 240 * (uSkill + 15);
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
964 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
965 //levela = 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
966 //v32 = pParty->pPlayers;//[0].pConditions[1];
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
967 //do
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
968 for (uint i = 0; i < 4; ++i)
1362
d6cf8ead9242 Condition checking functions slightly renamed, some final changes in Player::SetCondition
Grumpy7
parents: 1361
diff changeset
969 if (pParty->pPlayers[i].IsWeak())
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
970 return;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
971 //while ( v32 <= &pParty->pPlayers[3] );
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
972 //if ( !levela )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
973 // return;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
974 pParty->pPartyBuffs[PARTY_BUFF_HASTE].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(v9 * 128) * 0.033333335),
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
975 v15, 0, 0, 0);
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
976 //v33 = spellnum_;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
977 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 0);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
978 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 1);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
979 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 2);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
980 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 3);
2105
7ee21636d67a PlaySound() continue
Ritor1
parents: 2101
diff changeset
981 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);//çâóê àëòàðÿ
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
982 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
983 case SPELL_AIR_SHIELD:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
984 case SPELL_EARTH_STONESKIN:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
985 case SPELL_SPIRIT_HEROISM:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
986 switch ( v15 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
987 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
988 case 1:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
989 case 2:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
990 v9 = 300 * (uSkill + 12);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
991 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
992 case 3:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
993 v9 = 900 * (uSkill + 4);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
994 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
995 case 4:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
996 v9 = 3600 * (uSkill + 1);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
997 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
998 }
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
999 switch ( uSpellID )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1000 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1001 case 17:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1002 v60 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1003 uSkill = 14;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1004 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1005 case 38:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1006 v35 = uSkill + 5;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1007 uSkill = 15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1008 v60 = v35;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1009 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1010 case 51:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1011 v34 = uSkill + 5;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1012 uSkill = 9;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1013 v60 = v34;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1014 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1015 }
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1016 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 0);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1017 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 1);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1018 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 2);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1019 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 3);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1020 //v52 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1021 //v50 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1022 //v48 = v60;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1023 //v46 = v15;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1024 v36 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(v9 << 7) * 0.033333335);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1025 //v37 = &pParty->pPartyBuffs[uSkill];
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1026 pParty->pPartyBuffs[uSkill].Apply(v36, v15, v60, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1027 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1028 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1029 case SPELL_FIRE_IMMOLATION:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1030 if ( v15 == 2 || v15 == 3 || v15 != 4 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1031 v38 = 60 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1032 else
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1033 v38 = 600 * uSkill;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1034 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 0);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1035 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 1);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1036 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 2);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1037 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 3);
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1038 v52 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1039 v50 = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1040 v48 = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1041 v46 = v15;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1042 v39 = (signed __int64)((double)(v38 << 7) * 0.033333335);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1043 v37 = &pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION];
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1044 v36 = pParty->uTimePlayed + v39;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1045 v37->Apply(v36, v46, v48, v50, v52);
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1046 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1047 return;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1048 case SPELL_FIRE_PROTECTION_FROM_FIRE:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1049 case SPELL_AIR_PROTECTION_FROM_AIR:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1050 case SPELL_WATER_PROTECTION_FROM_WATER:
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1051 case SPELL_EARTH_PROTECTION_FROM_EARTH:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1052 goto LABEL_117;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1053 default:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1054 return;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1055 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1056 while ( (short)a1.uType != *(short *)v30 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1057 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1058 ++v29;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1059 v30 += 56;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1060 if ( v29 >= (signed int)pObjectList->uNumObjects )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1061 {
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1062 //v31 = 0;
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1063 a1.uObjectDescID = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1064 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1065 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1066 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1067 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1068 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1069 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1070 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1071 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1072 a1.uSoundID = 0;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1073 //v51 = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1074 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1075 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1076 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1077 a1.Create(yaw, v47, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1078 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1079 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1080 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1081 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1082 v31 = v29;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1083 a1.uObjectDescID = v31;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1084 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1085 a1.vPosition.x = fromx;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1086 a1.uAttributes = 16;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1087 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1088 a1.field_60_distance_related_prolly_lod = v55;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1089 a1.uSpriteFrameID = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1090 a1.spell_caster_pid = 8000 | OBJECT_Item;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1091 a1.spell_target_pid = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1092 a1.uSoundID = 0;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1093 //v51 = 0;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1094 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1095 //v20 = yaw;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1096 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1097 a1.Create(yaw, v47, v49, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1098 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1099 return;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1100 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1101 LABEL_117:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1102 v44 = uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1103 a6_4 = 3600 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1104 if ( v15 == 1 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1105 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1106 v60 = v44;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1107 goto LABEL_125;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1108 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1109 if ( v15 == 2 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1110 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1111 v44 = 2 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1112 v60 = v44;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1113 goto LABEL_125;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1114 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1115 if ( v15 == 3 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1116 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1117 v44 = 3 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1118 v60 = v44;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1119 goto LABEL_125;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1120 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1121 if ( v15 == 4 )
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1122 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1123 v44 = 4 * uSkill;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1124 v60 = v44;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1125 goto LABEL_125;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1126 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1127 LABEL_125:
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1128 switch ( uSpellID )
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1129 {
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1130 case 3:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1131 uSkill = 6;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1132 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1133 case 14:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1134 uSkill = 0;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1135 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1136 case 25:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1137 uSkill = 17;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1138 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1139 case 36:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1140 uSkill = 4;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1141 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1142 case 58:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1143 uSkill = 12;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1144 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1145 case 69:
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1146 uSkill = 1;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1147 break;
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1148 }
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1149 //v45 = spellnum_;
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1150 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 0);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1151 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 1);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1152 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 2);
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1153 pGame->pStru6Instance->SetPlayerBuffAnim(uSpellID, 3);
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1154 pParty->pPartyBuffs[uSkill].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)a6_4 * 4.2666669), v15, v60, 0, 0);
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1155 //levela = 1;
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1156 //LABEL_138:
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1157 //if ( levela )
2101
ee2724b9ca05 RasterLine2D fix and etc.
Ritor1
parents: 2037
diff changeset
1158 //LABEL_139:
1519
4c787c28ddce Clean CastSpellInfo. (2)
yoctozepto
parents: 1362
diff changeset
1159 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0);
1296
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
1160 }
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
1161 //----- (00427769) --------------------------------------------------------
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
1162 bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID)
1296
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
1163 {
2107
85e9766d6124 sub_427769_spell to sub_427769_isSpellQuickCastableOnShiftClick
Grumpy7
parents: 2037
diff changeset
1164 return ( pSpellDatas[uSpellID].stats & 0xC );
1297
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1165 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1166 //----- (0043AFE3) --------------------------------------------------------
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1167 int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4)
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1168 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1169 int result; // eax@1
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1170 unsigned int v5; // [sp-4h] [bp-8h]@9
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1171
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1172 result = 0;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1173 if ( a1 == 7 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1174 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1175 if ( a3 <= 0 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1176 return result;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1177 if ( a3 <= 2 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1178 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1179 v5 = 6;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1180 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1181 else
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1182 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1183 if ( a3 == 3 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1184 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1185 v5 = 8;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1186 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1187 else
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1188 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1189 if ( a3 != 4 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1190 return result;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1191 v5 = 10;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1192 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1193 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1194 result = GetDiceResult(a2, v5);
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1195 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1196 else
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1197 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1198 if ( a1 == 44 )
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1199 result = a4 * (LOBYTE(pSpellDatas[40].field_10) + 2 * a2) / 100;
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1200 else
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1201 result = *((char *)&pSpellDatas[0].field_10 + 20 * a1)
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1202 + GetDiceResult(a2, *((char *)&pSpellDatas[0].field_10 + 20 * a1 + 1));
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1203 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1296
diff changeset
1204 return result;
1295
86a83e12d795 moving files
Ritor1
parents: 1206
diff changeset
1205 }