TrinityCore
SpellDefines.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITY_SPELLDEFINES_H
19#define TRINITY_SPELLDEFINES_H
20
21#include "Define.h"
22#include "FlagsArray.h"
23#include "EnumFlag.h"
24#include "ObjectGuid.h"
25#include "Optional.h"
26#include "Position.h"
27#include <any>
28#include <vector>
29
30class AuraEffect;
31class Corpse;
32class GameObject;
33class Item;
34class Player;
35class Spell;
36class Unit;
37class WorldObject;
38enum Difficulty : uint8;
39enum ProcFlags : uint32;
40enum ProcFlags2 : int32;
41
42namespace UF
43{
44 struct SpellCastVisual;
45}
46
47namespace WorldPackets
48{
49 namespace Spells
50 {
51 struct SpellCastRequest;
52 struct SpellCastVisual;
53 struct SpellTargetData;
54 }
55}
56
58{
59 None = 0,
60 Movement = 0x00000001,
61 DamagePushbackPlayerOnly = 0x00000002,
62 Stun = 0x00000004, // useless, even spells without it get interrupted
63 Combat = 0x00000008,
64 DamageCancelsPlayerOnly = 0x00000010,
65 MeleeCombat = 0x00000020, // NYI
66 Immunity = 0x00000040, // NYI
67 DamageAbsorb = 0x00000080,
68 ZeroDamageCancels = 0x00000100,
69 DamagePushback = 0x00000200,
70 DamageCancels = 0x00000400
71};
72
74
76{
77 None = 0,
78 HostileActionReceived = 0x00000001,
79 Damage = 0x00000002,
80 Action = 0x00000004,
81 Moving = 0x00000008,
82 Turning = 0x00000010,
83 Anim = 0x00000020,
84 Dismount = 0x00000040,
85 UnderWater = 0x00000080, // TODO: disallow casting when swimming (SPELL_FAILED_ONLY_ABOVEWATER)
86 AboveWater = 0x00000100, // TODO: disallow casting when not swimming (SPELL_FAILED_ONLY_UNDERWATER)
87 Sheathing = 0x00000200,
88 Interacting = 0x00000400, // TODO: more than gossip, replace all the feign death removals by aura type
89 Looting = 0x00000800,
90 Attacking = 0x00001000,
91 ItemUse = 0x00002000,
92 DamageChannelDuration = 0x00004000,
93 Shapeshifting = 0x00008000,
94 ActionDelayed = 0x00010000,
95 Mount = 0x00020000,
96 Standing = 0x00040000,
97 LeaveWorld = 0x00080000,
98 StealthOrInvis = 0x00100000,
99 InvulnerabilityBuff = 0x00200000,
100 EnterWorld = 0x00400000,
101 PvPActive = 0x00800000,
102 NonPeriodicDamage = 0x01000000,
103 LandingOrFlight = 0x02000000,
104 Release = 0x04000000,
105 DamageCancelsScript = 0x08000000, // NYI dedicated aura script hook
106 EnteringCombat = 0x10000000,
107 Login = 0x20000000,
108 Summon = 0x40000000,
109 LeavingCombat = 0x80000000,
110
112};
113
115
117{
118 None = 0,
119 Falling = 0x00000001, // Implemented in Unit::UpdatePosition
120 Swimming = 0x00000002,
121 NotMoving = 0x00000004, // NYI
122 Ground = 0x00000008,
123 Transform = 0x00000010, // NYI
124 Jump = 0x00000020,
125 ChangeSpec = 0x00000040,
126 AbandonVehicle = 0x00000080, // Implemented in Unit::_ExitVehicle
127 StartOfEncounter = 0x00000100, // Implemented in Unit::AtStartOfEncounter
128 EndOfEncounter = 0x00000200, // Implemented in Unit::AtEndOfEncounter
129 Disconnect = 0x00000400, // NYI
130 EnteringInstance = 0x00000800, // Implemented in Map::AddPlayerToMap
131 DuelEnd = 0x00001000, // Implemented in Player::DuelComplete
132 LeaveArenaOrBattleground = 0x00002000, // Implemented in Battleground::RemovePlayerAtLeave
133 ChangeTalent = 0x00004000,
134 ChangeGlyph = 0x00008000,
135 SeamlessTransfer = 0x00010000, // NYI
136 WarModeLeave = 0x00020000, // Implemented in Player::UpdateWarModeAuras
137 TouchingGround = 0x00040000, // NYI
138 ChromieTime = 0x00080000, // NYI
139 SplineFlightOrFreeFlight = 0x00100000, // NYI
140 ProcOrPeriodicAttacking = 0x00200000, // NYI
141 StartOfMythicPlusRun = 0x00400000, // Implemented in Unit::AtStartOfEncounter
142 StartOfDungeonEncounter = 0x00800000, // Implemented in Unit::AtStartOfEncounter - Similar to StartOfEncounter (but only with bosses, not m+ run or battleground)
143 EndOfDungeonEncounter = 0x01000000, // Implemented in Unit::AtEndOfEncounter - Similar to EndOfEncounter (but only with bosses, not m+ run or battleground)
144};
145
147
148enum class SpellModOp : uint8
149{
151 Duration = 1,
152 Hate = 2,
153 PointsIndex0 = 3,
154 ProcCharges = 4,
155 Range = 5,
156 Radius = 6,
157 CritChance = 7,
158 Points = 8,
159 ResistPushback = 9,
160 ChangeCastTime = 10,
161 Cooldown = 11,
162 PointsIndex1 = 12,
163 TargetResistance = 13,
164 PowerCost0 = 14, // Used when SpellPowerEntry::PowerIndex == 0
166 HitChance = 16,
167 ChainTargets = 17,
168 ProcChance = 18,
169 Period = 19,
170 ChainAmplitude = 20,
171 StartCooldown = 21,
173 PointsIndex2 = 23,
174 BonusCoefficient = 24,
175 TriggerDamage = 25, // NYI
176 ProcFrequency = 26,
177 Amplitude = 27,
178 DispelResistance = 28,
179 CrowdDamage = 29, // NYI
180 PowerCostOnMiss = 30,
181 Doses = 31,
182 PointsIndex3 = 32,
183 PointsIndex4 = 33,
184 PowerCost1 = 34, // Used when SpellPowerEntry::PowerIndex == 1
186 AreaTriggerMaxSummons = 36, // NYI
187 MaxAuraStacks = 37,
188 ProcCooldown = 38,
189 PowerCost2 = 39, // Used when SpellPowerEntry::PowerIndex == 2
190};
191
192#define MAX_SPELLMOD 40
193
195{
238
240{
243
245{
246 TRIGGERED_NONE = 0x00000000,
247 TRIGGERED_IGNORE_GCD = 0x00000001,
253 // reuse = 0x00000040,
255 // reuse = 0x00000100,
258 // reuse = 0x00000800,
261 // reuse = 0x00004000,
262 // reuse = 0x00008000,
266 TRIGGERED_FULL_MASK = 0x0007FFFF,
267
268 // debug flags (used with .cast triggered commands)
272 TRIGGERED_FULL_DEBUG_MASK = 0xFFFFFFFF
274
276
278{
279 TARGET_FLAG_NONE = 0x00000000,
280 TARGET_FLAG_UNUSED_1 = 0x00000001, // not used
281 TARGET_FLAG_UNIT = 0x00000002, // pguid
282 TARGET_FLAG_UNIT_RAID = 0x00000004, // not sent, used to validate target (if raid member)
283 TARGET_FLAG_UNIT_PARTY = 0x00000008, // not sent, used to validate target (if party member)
284 TARGET_FLAG_ITEM = 0x00000010, // pguid
285 TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // pguid, 3 float
286 TARGET_FLAG_DEST_LOCATION = 0x00000040, // pguid, 3 float
287 TARGET_FLAG_UNIT_ENEMY = 0x00000080, // not sent, used to validate target (if enemy)
288 TARGET_FLAG_UNIT_ALLY = 0x00000100, // not sent, used to validate target (if ally)
289 TARGET_FLAG_CORPSE_ENEMY = 0x00000200, // pguid
290 TARGET_FLAG_UNIT_DEAD = 0x00000400, // not sent, used to validate target (if dead creature)
291 TARGET_FLAG_GAMEOBJECT = 0x00000800, // pguid, used with TARGET_GAMEOBJECT_TARGET
292 TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid
293 TARGET_FLAG_STRING = 0x00002000, // string
294 TARGET_FLAG_GAMEOBJECT_ITEM = 0x00004000, // not sent, used with TARGET_GAMEOBJECT_ITEM_TARGET
295 TARGET_FLAG_CORPSE_ALLY = 0x00008000, // pguid
296 TARGET_FLAG_UNIT_MINIPET = 0x00010000, // pguid, used to validate target (if non combat pet)
297 TARGET_FLAG_GLYPH_SLOT = 0x00020000, // used in glyph spells
298 TARGET_FLAG_DEST_TARGET = 0x00040000, // sometimes appears with DEST_TARGET spells (may appear or not for a given spell)
299 TARGET_FLAG_EXTRA_TARGETS = 0x00080000, // uint32 counter, loop { vec3 - screen position (?), guid }, not used so far
300 TARGET_FLAG_UNIT_PASSENGER = 0x00100000, // guessed, used to validate target (if vehicle passenger)
306
313
315{
317 SpellDestination(float x, float y, float z, float orientation = 0.0f, uint32 mapId = MAPID_INVALID);
318 SpellDestination(Position const& pos);
320 SpellDestination(WorldObject const& wObj);
321
322 void Relocate(Position const& pos);
323 void RelocateOffset(Position const& offset);
324
328};
329
331{
332public:
334 SpellCastTargets(Unit* caster, WorldPackets::Spells::SpellCastRequest const& spellCastRequest);
336
338
339 uint32 GetTargetMask() const { return m_targetMask; }
340 void SetTargetMask(uint32 newMask) { m_targetMask = newMask; }
341
342 void SetTargetFlag(SpellCastTargetFlags flag) { m_targetMask |= flag; }
343
344 ObjectGuid GetUnitTargetGUID() const;
345 Unit* GetUnitTarget() const;
346 void SetUnitTarget(Unit* target);
347
348 ObjectGuid GetGOTargetGUID() const;
349 GameObject* GetGOTarget() const;
350 void SetGOTarget(GameObject* target);
351
352 ObjectGuid GetCorpseTargetGUID() const;
353 Corpse* GetCorpseTarget() const;
354
355 WorldObject* GetObjectTarget() const;
356 ObjectGuid GetObjectTargetGUID() const;
357 void RemoveObjectTarget();
358
359 ObjectGuid GetItemTargetGUID() const { return m_itemTargetGUID; }
360 Item* GetItemTarget() const { return m_itemTarget; }
361 uint32 GetItemTargetEntry() const { return m_itemTargetEntry; }
362 void SetItemTarget(Item* item);
363 void SetTradeItemTarget(Player* caster);
364 void UpdateTradeSlotItem();
365
366 SpellDestination const* GetSrc() const;
367 Position const* GetSrcPos() const;
368 void SetSrc(float x, float y, float z);
369 void SetSrc(Position const& pos);
370 void SetSrc(WorldObject const& wObj);
371 void ModSrc(Position const& pos);
372 void RemoveSrc();
373
374 SpellDestination const* GetDst() const;
375 WorldLocation const* GetDstPos() const;
376 void SetDst(float x, float y, float z, float orientation, uint32 mapId = MAPID_INVALID);
377 void SetDst(Position const& pos);
378 void SetDst(WorldObject const& wObj);
379 void SetDst(SpellDestination const& spellDest);
380 void SetDst(SpellCastTargets const& spellTargets);
381 void ModDst(Position const& pos);
382 void ModDst(SpellDestination const& spellDest);
383 void RemoveDst();
384
385 bool HasSrc() const;
386 bool HasDst() const;
387 bool HasTraj() const { return m_speed != 0; }
388
389 float GetPitch() const { return m_pitch; }
390 void SetPitch(float pitch) { m_pitch = pitch; }
391 float GetSpeed() const { return m_speed; }
392 void SetSpeed(float speed) { m_speed = speed; }
393
394 float GetDist2d() const { return m_src._position.GetExactDist2d(&m_dst._position); }
395 float GetSpeedXY() const { return m_speed * std::cos(m_pitch); }
396 float GetSpeedZ() const { return m_speed * std::sin(m_pitch); }
397
398 void Update(WorldObject* caster);
399 std::string GetTargetString() const { return m_strTarget; }
400
401private:
403
404 // objects (can be used at spell creating and after Update at casting)
407
408 // object GUID/etc, can be used always
412
415
416 float m_pitch, m_speed;
417 std::string m_strTarget;
418};
419
421{
423 CastSpellTargetArg(std::nullptr_t) { Targets.emplace(); }
426 {
427 Targets.emplace();
428 Targets->SetItemTarget(itemTarget);
429 }
431 {
432 Targets.emplace();
433 Targets->SetDst(dest);
434 }
436 {
437 Targets.emplace();
438 Targets->SetDst(dest);
439 }
441 {
442 Targets.emplace(std::move(targets));
443 }
444
445 Optional<SpellCastTargets> Targets; // empty optional used to signal error state
446};
447
449{
451 CastSpellExtraArgs(bool triggered) : TriggerFlags(triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE) {}
452 CastSpellExtraArgs(TriggerCastFlags trigger) : TriggerFlags(trigger) {}
453 CastSpellExtraArgs(Item* item) : TriggerFlags(TRIGGERED_FULL_MASK), CastItem(item) {}
454 CastSpellExtraArgs(Spell const* triggeringSpell) : TriggerFlags(TRIGGERED_FULL_MASK) { SetTriggeringSpell(triggeringSpell); }
455 CastSpellExtraArgs(AuraEffect const* eff) : TriggerFlags(TRIGGERED_FULL_MASK) { SetTriggeringAura(eff); }
456 CastSpellExtraArgs(Difficulty castDifficulty) : CastDifficulty(castDifficulty) {}
457 CastSpellExtraArgs(SpellValueMod mod, int32 val) { SpellValueOverrides.AddMod(mod, val); }
458
461
464
466
467 CastSpellExtraArgs& SetTriggerFlags(TriggerCastFlags flag) { TriggerFlags = flag; return *this; }
468 CastSpellExtraArgs& SetCastItem(Item* item) { CastItem = item; return *this; }
469 CastSpellExtraArgs& SetTriggeringSpell(Spell const* triggeringSpell);
470 CastSpellExtraArgs& SetTriggeringAura(AuraEffect const* triggeringAura);
471 CastSpellExtraArgs& SetOriginalCaster(ObjectGuid const& guid) { OriginalCaster = guid; return *this; }
472 CastSpellExtraArgs& SetCastDifficulty(Difficulty castDifficulty) { CastDifficulty = castDifficulty; return *this; }
473 CastSpellExtraArgs& SetOriginalCastId(ObjectGuid const& castId) { OriginalCastId = castId; return *this; }
474 CastSpellExtraArgs& AddSpellMod(SpellValueMod mod, int32 val) { SpellValueOverrides.AddMod(mod, val); return *this; }
475 CastSpellExtraArgs& AddSpellBP0(int32 val) { return AddSpellMod(SPELLVALUE_BASE_POINT0, val); } // because i don't want to type SPELLVALUE_BASE_POINT0 300 times
476 CastSpellExtraArgs& SetCustomArg(std::any customArg) { CustomArg = std::move(customArg); return *this; }
477
479 Item* CastItem = nullptr;
480 Spell const* TriggeringSpell = nullptr;
481 AuraEffect const* TriggeringAura = nullptr;
483 Difficulty CastDifficulty = Difficulty(0);
486 struct
487 {
488 friend struct CastSpellExtraArgs;
489 friend class WorldObject;
490
491 private:
492 void AddMod(SpellValueMod mod, int32 val) { data.push_back({ mod, val }); }
493
494 auto begin() const { return data.cbegin(); }
495 auto end() const { return data.cend(); }
496
497 std::vector<std::pair<SpellValueMod, int32>> data;
498 } SpellValueOverrides;
499 std::any CustomArg;
500};
501
503{
506
507 operator UF::SpellCastVisual() const;
509};
510
511class ProcFlagsInit : public FlagsArray<int32, 2>
512{
514
515public:
516 constexpr ProcFlagsInit(ProcFlags procFlags = {}, ProcFlags2 procFlags2 = {})
517 {
518 _storage[0] = int32(procFlags);
519 _storage[1] = int32(procFlags2);
520 }
521
522 constexpr ProcFlagsInit& operator|=(ProcFlags procFlags)
523 {
524 _storage[0] |= int32(procFlags);
525 return *this;
526 }
527
528 constexpr ProcFlagsInit& operator|=(ProcFlags2 procFlags2)
529 {
530 _storage[1] |= int32(procFlags2);
531 return *this;
532 }
533
534 using Base::operator&;
535
536 constexpr ProcFlags operator&(ProcFlags procFlags) const
537 {
538 return static_cast<ProcFlags>(_storage[0] & procFlags);
539 }
540
541 constexpr ProcFlags2 operator&(ProcFlags2 procFlags2) const
542 {
543 return static_cast<ProcFlags2>(_storage[1] & procFlags2);
544 }
545
546 using Base::operator=;
547
548 constexpr ProcFlagsInit& operator=(Base const& right)
549 {
550 _storage[0] = right[0];
551 _storage[1] = right[1];
552 return *this;
553 }
554};
555
556#endif
Difficulty
Definition: DBCEnums.h:873
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
Spells
Definition: PlayerAI.cpp:32
#define MAPID_INVALID
Definition: Position.h:176
Targets
Anim
SpellInterruptFlags
Definition: SpellDefines.h:58
DEFINE_ENUM_FLAG(SpellInterruptFlags)
SpellAuraInterruptFlags2
Definition: SpellDefines.h:117
SpellModOp
Definition: SpellDefines.h:149
@ PeriodicHealingAndDamage
@ AreaTriggerMaxSummons
@ CritDamageAndHealing
SpellCastTargetFlags
Definition: SpellDefines.h:278
@ TARGET_FLAG_TRADE_ITEM
Definition: SpellDefines.h:292
@ TARGET_FLAG_GAMEOBJECT
Definition: SpellDefines.h:291
@ TARGET_FLAG_STRING
Definition: SpellDefines.h:293
@ TARGET_FLAG_NONE
Definition: SpellDefines.h:279
@ TARGET_FLAG_UNIT_RAID
Definition: SpellDefines.h:282
@ TARGET_FLAG_UNIT_ENEMY
Definition: SpellDefines.h:287
@ TARGET_FLAG_GLYPH_SLOT
Definition: SpellDefines.h:297
@ TARGET_FLAG_CORPSE_ALLY
Definition: SpellDefines.h:295
@ TARGET_FLAG_ITEM
Definition: SpellDefines.h:284
@ TARGET_FLAG_UNIT_MINIPET
Definition: SpellDefines.h:296
@ TARGET_FLAG_UNIT_PASSENGER
Definition: SpellDefines.h:300
@ TARGET_FLAG_GAMEOBJECT_ITEM
Definition: SpellDefines.h:294
@ TARGET_FLAG_DEST_LOCATION
Definition: SpellDefines.h:286
@ TARGET_FLAG_UNK4000000
Definition: SpellDefines.h:303
@ TARGET_FLAG_UNIT_ALLY
Definition: SpellDefines.h:288
@ TARGET_FLAG_SOURCE_LOCATION
Definition: SpellDefines.h:285
@ TARGET_FLAG_ITEM_MASK
Definition: SpellDefines.h:311
@ TARGET_FLAG_UNK1000000
Definition: SpellDefines.h:302
@ TARGET_FLAG_UNUSED_1
Definition: SpellDefines.h:280
@ TARGET_FLAG_UNK40000000
Definition: SpellDefines.h:305
@ TARGET_FLAG_UNIT
Definition: SpellDefines.h:281
@ TARGET_FLAG_DEST_TARGET
Definition: SpellDefines.h:298
@ TARGET_FLAG_UNK10000000
Definition: SpellDefines.h:304
@ TARGET_FLAG_UNK400000
Definition: SpellDefines.h:301
@ TARGET_FLAG_UNIT_MASK
Definition: SpellDefines.h:307
@ TARGET_FLAG_UNIT_DEAD
Definition: SpellDefines.h:290
@ TARGET_FLAG_CORPSE_ENEMY
Definition: SpellDefines.h:289
@ TARGET_FLAG_CORPSE_MASK
Definition: SpellDefines.h:310
@ TARGET_FLAG_EXTRA_TARGETS
Definition: SpellDefines.h:299
@ TARGET_FLAG_GAMEOBJECT_MASK
Definition: SpellDefines.h:309
@ TARGET_FLAG_UNIT_PARTY
Definition: SpellDefines.h:283
TriggerCastFlags
Definition: SpellDefines.h:245
@ TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT
Will ignore equipped item requirements.
Definition: SpellDefines.h:269
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore power and reagent cost.
Definition: SpellDefines.h:249
@ TRIGGERED_DONT_RESET_PERIODIC_TIMER
Will allow periodic aura timers to keep ticking (instead of resetting)
Definition: SpellDefines.h:264
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore Spell and Category cooldowns.
Definition: SpellDefines.h:248
@ TRIGGERED_CAST_DIRECTLY
In Spell::prepare, will be cast directly without setting containers for executed spell.
Definition: SpellDefines.h:254
@ TRIGGERED_IGNORE_TARGET_CHECK
Will ignore most target checks (mostly DBC target checks)
Definition: SpellDefines.h:270
@ TRIGGERED_IGNORE_CASTER_AURASTATE
Will ignore caster aura states including combat requirements and death state.
Definition: SpellDefines.h:271
@ TRIGGERED_IGNORE_AURA_SCALING
Will ignore aura scaling.
Definition: SpellDefines.h:251
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
Definition: SpellDefines.h:252
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore mounted/on vehicle restrictions.
Definition: SpellDefines.h:260
@ TRIGGERED_IGNORE_SHAPESHIFT
Will ignore shapeshift checks.
Definition: SpellDefines.h:257
@ TRIGGERED_IGNORE_CAST_ITEM
Will not take away cast item or update related achievement criteria.
Definition: SpellDefines.h:250
@ TRIGGERED_IGNORE_GCD
Will ignore GCD.
Definition: SpellDefines.h:247
@ TRIGGERED_DISALLOW_PROC_EVENTS
Disallows proc events from triggered spell (default)
Definition: SpellDefines.h:259
@ TRIGGERED_IGNORE_CASTER_AURAS
Will ignore caster aura restrictions or requirements.
Definition: SpellDefines.h:263
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:265
@ TRIGGERED_NONE
Not triggered.
Definition: SpellDefines.h:246
@ TRIGGERED_FULL_DEBUG_MASK
Definition: SpellDefines.h:272
@ TRIGGERED_IGNORE_SET_FACING
Will not adjust facing to target (if any)
Definition: SpellDefines.h:256
SpellValueMod
Definition: SpellDefines.h:195
@ SPELLVALUE_BASE_POINT24
Definition: SpellDefines.h:220
@ SPELLVALUE_BASE_POINT5
Definition: SpellDefines.h:201
@ SPELLVALUE_BASE_POINT18
Definition: SpellDefines.h:214
@ SPELLVALUE_BASE_POINT6
Definition: SpellDefines.h:202
@ SPELLVALUE_BASE_POINT31
Definition: SpellDefines.h:227
@ SPELLVALUE_BASE_POINT8
Definition: SpellDefines.h:204
@ SPELLVALUE_AURA_STACK
Definition: SpellDefines.h:231
@ SPELLVALUE_BASE_POINT26
Definition: SpellDefines.h:222
@ SPELLVALUE_DURATION_PCT
Definition: SpellDefines.h:233
@ SPELLVALUE_BASE_POINT7
Definition: SpellDefines.h:203
@ SPELLVALUE_BASE_POINT3
Definition: SpellDefines.h:199
@ SPELLVALUE_BASE_POINT30
Definition: SpellDefines.h:226
@ SPELLVALUE_BASE_POINT_END
Definition: SpellDefines.h:228
@ SPELLVALUE_BASE_POINT29
Definition: SpellDefines.h:225
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:197
@ SPELLVALUE_BASE_POINT19
Definition: SpellDefines.h:215
@ SPELLVALUE_BASE_POINT28
Definition: SpellDefines.h:224
@ SPELLVALUE_BASE_POINT14
Definition: SpellDefines.h:210
@ SPELLVALUE_BASE_POINT21
Definition: SpellDefines.h:217
@ SPELLVALUE_BASE_POINT16
Definition: SpellDefines.h:212
@ SPELLVALUE_BASE_POINT27
Definition: SpellDefines.h:223
@ SPELLVALUE_PARENT_SPELL_TARGET_COUNT
Definition: SpellDefines.h:235
@ SPELLVALUE_RADIUS_MOD
Definition: SpellDefines.h:229
@ SPELLVALUE_BASE_POINT20
Definition: SpellDefines.h:216
@ SPELLVALUE_BASE_POINT17
Definition: SpellDefines.h:213
@ SPELLVALUE_BASE_POINT22
Definition: SpellDefines.h:218
@ SPELLVALUE_BASE_POINT11
Definition: SpellDefines.h:207
@ SPELLVALUE_PARENT_SPELL_TARGET_INDEX
Definition: SpellDefines.h:236
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
@ SPELLVALUE_BASE_POINT15
Definition: SpellDefines.h:211
@ SPELLVALUE_BASE_POINT25
Definition: SpellDefines.h:221
@ SPELLVALUE_BASE_POINT4
Definition: SpellDefines.h:200
@ SPELLVALUE_BASE_POINT2
Definition: SpellDefines.h:198
@ SPELLVALUE_BASE_POINT23
Definition: SpellDefines.h:219
@ SPELLVALUE_BASE_POINT13
Definition: SpellDefines.h:209
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:196
@ SPELLVALUE_DURATION
Definition: SpellDefines.h:234
@ SPELLVALUE_BASE_POINT10
Definition: SpellDefines.h:206
@ SPELLVALUE_BASE_POINT9
Definition: SpellDefines.h:205
@ SPELLVALUE_CRIT_CHANCE
Definition: SpellDefines.h:232
@ SPELLVALUE_BASE_POINT12
Definition: SpellDefines.h:208
SpellFacingFlags
Definition: SpellDefines.h:240
@ SPELL_FACING_FLAG_INFRONT
Definition: SpellDefines.h:241
SpellAuraInterruptFlags
Definition: SpellDefines.h:76
ProcFlags
Definition: SpellMgr.h:134
ProcFlags2
Definition: SpellMgr.h:231
Action
Definition: Corpse.h:53
std::array< int32, N > _storage
Definition: FlagsArray.h:113
Definition: Item.h:170
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
constexpr ProcFlags operator&(ProcFlags procFlags) const
Definition: SpellDefines.h:536
constexpr ProcFlagsInit & operator|=(ProcFlags2 procFlags2)
Definition: SpellDefines.h:528
constexpr ProcFlagsInit(ProcFlags procFlags={}, ProcFlags2 procFlags2={})
Definition: SpellDefines.h:516
constexpr ProcFlagsInit & operator|=(ProcFlags procFlags)
Definition: SpellDefines.h:522
constexpr ProcFlagsInit & operator=(Base const &right)
Definition: SpellDefines.h:548
constexpr ProcFlags2 operator&(ProcFlags2 procFlags2) const
Definition: SpellDefines.h:541
void SetPitch(float pitch)
Definition: SpellDefines.h:390
ObjectGuid m_objectTargetGUID
Definition: SpellDefines.h:409
SpellDestination m_dst
Definition: SpellDefines.h:414
bool HasTraj() const
Definition: SpellDefines.h:387
void SetSpeed(float speed)
Definition: SpellDefines.h:392
void SetTargetFlag(SpellCastTargetFlags flag)
Definition: SpellDefines.h:342
void SetTargetMask(uint32 newMask)
Definition: SpellDefines.h:340
std::string m_strTarget
Definition: SpellDefines.h:417
std::string GetTargetString() const
Definition: SpellDefines.h:399
SpellDestination m_src
Definition: SpellDefines.h:413
float GetSpeedZ() const
Definition: SpellDefines.h:396
float GetSpeed() const
Definition: SpellDefines.h:391
ObjectGuid GetItemTargetGUID() const
Definition: SpellDefines.h:359
WorldObject * m_objectTarget
Definition: SpellDefines.h:405
Item * GetItemTarget() const
Definition: SpellDefines.h:360
uint32 GetTargetMask() const
Definition: SpellDefines.h:339
uint32 GetItemTargetEntry() const
Definition: SpellDefines.h:361
ObjectGuid m_itemTargetGUID
Definition: SpellDefines.h:410
float GetSpeedXY() const
Definition: SpellDefines.h:395
float GetDist2d() const
Definition: SpellDefines.h:394
uint32 m_itemTargetEntry
Definition: SpellDefines.h:411
float GetPitch() const
Definition: SpellDefines.h:389
Definition: Spell.h:255
Definition: Unit.h:627
Definition: Object.h:109
void Update(VignetteData &vignette, WorldObject const *owner)
Definition: Vignette.cpp:90
CastSpellExtraArgs(Spell const *triggeringSpell)
Definition: SpellDefines.h:454
CastSpellExtraArgs(CastSpellExtraArgs const &other)
CastSpellExtraArgs(AuraEffect const *eff)
Definition: SpellDefines.h:455
CastSpellExtraArgs & SetCastDifficulty(Difficulty castDifficulty)
Definition: SpellDefines.h:472
CastSpellExtraArgs & SetOriginalCastId(ObjectGuid const &castId)
Definition: SpellDefines.h:473
CastSpellExtraArgs(TriggerCastFlags trigger)
Definition: SpellDefines.h:452
CastSpellExtraArgs(Item *item)
Definition: SpellDefines.h:453
CastSpellExtraArgs(CastSpellExtraArgs &&other) noexcept
CastSpellExtraArgs & SetOriginalCaster(ObjectGuid const &guid)
Definition: SpellDefines.h:471
CastSpellExtraArgs & SetTriggerFlags(TriggerCastFlags flag)
Definition: SpellDefines.h:467
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
CastSpellExtraArgs & SetCustomArg(std::any customArg)
Definition: SpellDefines.h:476
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:474
CastSpellExtraArgs(Difficulty castDifficulty)
Definition: SpellDefines.h:456
CastSpellExtraArgs(bool triggered)
Definition: SpellDefines.h:451
CastSpellExtraArgs & operator=(CastSpellExtraArgs &&other) noexcept
CastSpellExtraArgs & SetCastItem(Item *item)
Definition: SpellDefines.h:468
CastSpellExtraArgs & operator=(CastSpellExtraArgs const &other)
CastSpellExtraArgs(SpellValueMod mod, int32 val)
Definition: SpellDefines.h:457
std::vector< std::pair< SpellValueMod, int32 > > data
Definition: SpellDefines.h:497
Optional< int32 > OriginalCastItemLevel
Definition: SpellDefines.h:485
CastSpellTargetArg(Item *itemTarget)
Definition: SpellDefines.h:425
CastSpellTargetArg(std::nullptr_t)
Definition: SpellDefines.h:423
Optional< SpellCastTargets > Targets
Definition: SpellDefines.h:445
CastSpellTargetArg(Position const &dest)
Definition: SpellDefines.h:430
CastSpellTargetArg(SpellDestination const &dest)
Definition: SpellDefines.h:435
CastSpellTargetArg(SpellCastTargets &&targets)
Definition: SpellDefines.h:440
uint32 ScriptVisualID
Definition: SpellDefines.h:505
uint32 SpellXSpellVisualID
Definition: SpellDefines.h:504
Position _transportOffset
Definition: SpellDefines.h:327
WorldLocation _position
Definition: SpellDefines.h:325
ObjectGuid _transportGUID
Definition: SpellDefines.h:326