Mercurial > mm7
comparison Engine/Spells/Spells.h @ 2499:68cdef6879a0
engine folder
author | Ritor1 |
---|---|
date | Fri, 19 Sep 2014 02:57:42 +0600 |
parents | |
children | 30eb6dcac768 |
comparison
equal
deleted
inserted
replaced
2498:92eeeb5200f2 | 2499:68cdef6879a0 |
---|---|
1 #pragma once | |
2 | |
3 #include <array> | |
4 | |
5 #include "../VectorTypes.h" | |
6 | |
7 /* 360 */ | |
8 enum SPELL_TYPE | |
9 { | |
10 SPELL_FIRE_TORCH_LIGHT = 1, | |
11 SPELL_FIRE_FIRE_BOLT = 2, | |
12 SPELL_FIRE_PROTECTION_FROM_FIRE = 3, | |
13 SPELL_FIRE_FIRE_AURA = 4, | |
14 SPELL_FIRE_HASTE = 5, | |
15 SPELL_FIRE_FIREBALL = 6, | |
16 SPELL_FIRE_FIRE_SPIKE = 7, | |
17 SPELL_FIRE_IMMOLATION = 8, | |
18 SPELL_FIRE_METEOR_SHOWER = 9, | |
19 SPELL_FIRE_INFERNO = 10, | |
20 SPELL_FIRE_INCINERATE = 11, | |
21 | |
22 SPELL_AIR_WIZARD_EYE = 12, | |
23 SPELL_AIR_FEATHER_FALL = 13, | |
24 SPELL_AIR_PROTECTION_FROM_AIR = 14, | |
25 SPELL_AIR_SPARKS = 15, | |
26 SPELL_AIR_JUMP = 16, | |
27 SPELL_AIR_SHIELD = 17, | |
28 SPELL_AIR_LIGHNING_BOLT = 18, | |
29 SPELL_AIR_INVISIBILITY = 19, | |
30 SPELL_AIR_IMPLOSION = 20, | |
31 SPELL_AIR_FLY = 21, | |
32 SPELL_AIR_STARBURST = 22, | |
33 | |
34 SPELL_WATER_AWAKEN = 23, | |
35 SPELL_WATER_POISON_SPRAY = 24, | |
36 SPELL_WATER_PROTECTION_FROM_WATER = 25, | |
37 SPELL_WATER_ICE_BOLT = 26, | |
38 SPELL_WATER_WATER_WALK = 27, | |
39 SPELL_WATER_RECHARGE_ITEM = 28, | |
40 SPELL_WATER_ACID_BURST = 29, | |
41 SPELL_WATER_ENCHANT_ITEM = 30, | |
42 SPELL_WATER_TOWN_PORTAL = 31, | |
43 SPELL_WATER_ICE_BLAST = 32, | |
44 SPELL_WATER_LLOYDS_BEACON = 33, | |
45 | |
46 SPELL_EARTH_STUN = 34, | |
47 SPELL_EARTH_SLOW = 35, | |
48 SPELL_EARTH_PROTECTION_FROM_EARTH = 36, | |
49 SPELL_EARTH_DEADLY_SWARM = 37, | |
50 SPELL_EARTH_STONESKIN = 38, | |
51 SPELL_EARTH_BLADES = 39, | |
52 SPELL_EARTH_STONE_TO_FLESH = 40, | |
53 SPELL_EARTH_ROCK_BLAST = 41, | |
54 SPELL_EARTH_TELEKINESIS = 42, | |
55 SPELL_EARTH_DEATH_BLOSSOM = 43, | |
56 SPELL_EARTH_MASS_DISTORTION = 44, | |
57 | |
58 SPELL_SPIRIT_DETECT_LIFE = 45, | |
59 SPELL_SPIRIT_BLESS = 46, | |
60 SPELL_SPIRIT_FATE = 47, | |
61 SPELL_SPIRIT_TURN_UNDEAD = 48, | |
62 SPELL_SPIRIT_REMOVE_CURSE = 49, | |
63 SPELL_SPIRIT_PRESERVATION = 50, | |
64 SPELL_SPIRIT_HEROISM = 51, | |
65 SPELL_SPIRIT_SPIRIT_LASH = 52, | |
66 SPELL_SPIRIT_RAISE_DEAD = 53, | |
67 SPELL_SPIRIT_SHARED_LIFE = 54, | |
68 SPELL_SPIRIT_RESSURECTION = 55, | |
69 | |
70 SPELL_MIND_REMOVE_FEAR = 56, | |
71 SPELL_MIND_MIND_BLAST = 57, | |
72 SPELL_MIND_PROTECTION_FROM_MIND = 58, | |
73 SPELL_MIND_TELEPATHY = 59, | |
74 SPELL_MIND_CHARM = 60, | |
75 SPELL_MIND_CURE_PARALYSIS = 61, | |
76 SPELL_MIND_BERSERK = 62, | |
77 SPELL_MIND_MASS_FEAR = 63, | |
78 SPELL_MIND_CURE_INSANITY = 64, | |
79 SPELL_MIND_PSYCHIC_SHOCK = 65, | |
80 SPELL_MIND_ENSLAVE = 66, | |
81 | |
82 SPELL_BODY_CURE_WEAKNESS = 67, | |
83 SPELL_BODY_FIRST_AID = 68, | |
84 SPELL_BODY_PROTECTION_FROM_BODY = 69, | |
85 SPELL_BODY_HARM = 70, | |
86 SPELL_BODY_REGENERATION = 71, | |
87 SPELL_BODY_CURE_POISON = 72, | |
88 SPELL_BODY_HAMMERHANDS = 73, | |
89 SPELL_BODY_CURE_DISEASE = 74, | |
90 SPELL_BODY_PROTECTION_FROM_MAGIC = 75, | |
91 SPELL_BODY_FLYING_FIST = 76, | |
92 SPELL_BODY_POWER_CURE = 77, | |
93 | |
94 SPELL_LIGHT_LIGHT_BOLT = 78, | |
95 SPELL_LIGHT_DESTROY_UNDEAD = 79, | |
96 SPELL_LIGHT_DISPEL_MAGIC = 80, | |
97 SPELL_LIGHT_PARALYZE = 81, | |
98 SPELL_LIGHT_SUMMON_ELEMENTAL = 82, | |
99 SPELL_LIGHT_DAY_OF_THE_GODS = 83, | |
100 SPELL_LIGHT_PRISMATIC_LIGHT = 84, | |
101 SPELL_LIGHT_DAY_OF_PROTECTION = 85, | |
102 SPELL_LIGHT_HOUR_OF_POWER = 86, | |
103 SPELL_LIGHT_SUNRAY = 87, | |
104 SPELL_LIGHT_DIVINE_INTERVENTION = 88, | |
105 | |
106 SPELL_DARK_REANIMATE = 89, | |
107 SPELL_DARK_TOXIC_CLOUD = 90, | |
108 SPELL_DARK_VAMPIRIC_WEAPON = 91, | |
109 SPELL_DARK_SHRINKING_RAY = 92, | |
110 SPELL_DARK_SHARPMETAL = 93, | |
111 SPELL_DARK_CONTROL_UNDEAD = 94, | |
112 SPELL_DARK_PAIN_REFLECTION = 95, | |
113 SPELL_DARK_SACRIFICE = 96, | |
114 SPELL_DARK_DRAGON_BREATH = 97, | |
115 SPELL_DARK_ARMAGEDDON = 98, | |
116 SPELL_DARK_SOULDRINKER = 99, | |
117 | |
118 SPELL_BOW_ARROW = 100, | |
119 SPELL_101 = 101, | |
120 SPELL_LASER_PROJECTILE = 102, | |
121 | |
122 BECOME_MAGIC_GUILD_MEMBER = 150, | |
123 SPELL_QUEST_COMPLETED = 151, | |
124 SPELL_152 = 152, | |
125 SPELL_DISEASE = 153 | |
126 }; | |
127 | |
128 | |
129 enum SPELL_SCHOOL : int | |
130 { | |
131 SPELL_SCHOOL_FIRE = 0, | |
132 SPELL_SCHOOL_AIR = 1, | |
133 SPELL_SCHOOL_WATER = 2, | |
134 SPELL_SCHOOL_EARTH = 3, | |
135 SPELL_SCHOOL_NONE = 4, | |
136 SPELL_SCHOOL_MAGIC = 5, | |
137 SPELL_SCHOOL_SPIRIT = 6, | |
138 SPELL_SCHOOL_MIND = 7, | |
139 SPELL_SCHOOL_BODY = 8, | |
140 SPELL_SCHOOL_LIGHT = 9, | |
141 SPELL_SCHOOL_DARK = 10 | |
142 }; | |
143 | |
144 | |
145 | |
146 /* 68 */ | |
147 #pragma pack(push, 1) | |
148 struct SpellBuff | |
149 { | |
150 inline SpellBuff() | |
151 { | |
152 uExpireTime = 0; | |
153 uPower = 0; | |
154 uSkill = 0; | |
155 uOverlayID = 0; | |
156 uCaster = 0; | |
157 uFlags = 0; | |
158 } | |
159 | |
160 bool Apply(signed __int64 uExpireTime, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int uOverlayID, unsigned __int8 caster); | |
161 void Reset(); | |
162 bool IsBuffExpiredToTime(__int64 time_end); | |
163 bool NotExpired(); | |
164 | |
165 signed __int64 uExpireTime; | |
166 unsigned __int16 uPower; | |
167 unsigned __int16 uSkill; | |
168 unsigned __int16 uOverlayID; | |
169 unsigned __int8 uCaster; | |
170 unsigned __int8 uFlags; | |
171 }; | |
172 #pragma pack(pop) | |
173 | |
174 | |
175 #pragma pack(push, 1) | |
176 struct SpellInfo | |
177 { | |
178 char *pName; | |
179 char *pShortName; | |
180 char *pDescription; | |
181 char *pBasicSkillDesc; | |
182 char *pExpertSkillDesc; | |
183 char *pMasterSkillDesc; | |
184 char *pGrandmasterSkillDesc; | |
185 SPELL_SCHOOL uSchool; | |
186 int field_20; | |
187 }; | |
188 #pragma pack(pop) | |
189 | |
190 | |
191 | |
192 #pragma pack(push, 1) | |
193 struct SpellStats | |
194 { | |
195 void Initialize(); | |
196 | |
197 SpellInfo pInfos[100]; | |
198 }; | |
199 #pragma pack(pop) | |
200 | |
201 | |
202 | |
203 | |
204 | |
205 | |
206 | |
207 | |
208 | |
209 /* 364 */ | |
210 #pragma pack(push, 1) | |
211 struct stru324_spell | |
212 { | |
213 __int16 uType; | |
214 __int16 field_2; | |
215 }; | |
216 #pragma pack(pop) | |
217 | |
218 /* 151 */ | |
219 #pragma pack(push, 1) | |
220 class SpellData | |
221 { | |
222 public: | |
223 SpellData(__int16 innormalMana, __int16 inExpertLevelMana, __int16 inMasterLevelMana, __int16 inMagisterLevelMana, | |
224 __int16 inNormalLevelRecovery, __int16 inExpertLevelRecovery, __int16 inMasterLevelRecovery, __int16 inMagisterLevelRecovery, | |
225 __int8 inbaseDamage, __int8 inbonusSkillDamage, __int16 instats); | |
226 union | |
227 { | |
228 unsigned __int16 mana_per_skill[4]; | |
229 struct | |
230 { | |
231 unsigned __int16 uNormalLevelMana; | |
232 unsigned __int16 uExpertLevelMana; | |
233 unsigned __int16 uMasterLevelMana; | |
234 unsigned __int16 uMagisterLevelMana; | |
235 }; | |
236 }; | |
237 union | |
238 { | |
239 unsigned __int16 recovery_per_skill[4]; | |
240 struct | |
241 { | |
242 unsigned __int16 uNormalLevelRecovery; | |
243 unsigned __int16 uExpertLevelRecovery; | |
244 unsigned __int16 uMasterLevelRecovery; | |
245 unsigned __int16 uMagisterLevelRecovery; | |
246 }; | |
247 }; | |
248 __int8 baseDamage; | |
249 __int8 bonusSkillDamage; | |
250 __int16 stats; | |
251 // char field_12; | |
252 // char field_13; | |
253 // __int16 field_14; | |
254 }; | |
255 #pragma pack(pop) | |
256 | |
257 #pragma pack(push, 1) | |
258 struct SpellBookIconPos | |
259 { | |
260 unsigned int Xpos; | |
261 unsigned int Ypos; | |
262 }; | |
263 | |
264 #pragma pack(pop) | |
265 | |
266 /* 154 */ | |
267 #pragma pack(push, 1) | |
268 struct TownPortalData | |
269 { | |
270 Vec3_int_ pos; | |
271 __int16 rot_y; | |
272 __int16 rot_x; | |
273 unsigned __int16 uMapInfoID; | |
274 __int16 field_12; | |
275 }; | |
276 #pragma pack(pop) | |
277 extern std::array<TownPortalData, 6> TownPortalList; //4ECBB8 | |
278 | |
279 | |
280 extern struct SpellStats *pSpellStats; | |
281 | |
282 extern std::array<std::array<struct SpellBookIconPos, 12>, 9> pIconPos; | |
283 | |
284 extern std::array<stru324_spell, 103> stru_4E3ACC; | |
285 extern std::array<SpellData, 100> pSpellDatas; | |
286 extern std::array<unsigned int, 25> wand_spell_ids; | |
287 | |
288 int _43AFE3_calc_spell_damage(int spellId, int spellLevel, signed int skillMastery, int currentHp); | |
289 | |
290 bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID); | |
291 void __fastcall EventCastSpell(int uSpellID, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz);//sub_448DF8 |