TrinityCore
Loading...
Searching...
No Matches
SpellInfo.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 _SPELLINFO_H
19#define _SPELLINFO_H
20
21#include "SharedDefines.h"
22#include "DB2Structure.h"
23#include "Object.h"
24#include "SpellAuraDefines.h"
25#include "SpellDefines.h"
26#include <bitset>
27
28class AuraEffect;
29class Item;
30class Player;
31class Spell;
32class SpellMgr;
33class SpellInfo;
34class Unit;
35class WorldObject;
36struct Condition;
37struct SpellChainNode;
38struct SpellModifier;
40
52
62
78
91
106
113
114// Spell clasification
141
171
173
175{
176private:
178public:
181
182 bool IsArea() const;
183 SpellTargetSelectionCategories GetSelectionCategory() const;
184 SpellTargetReferenceTypes GetReferenceType() const;
185 SpellTargetObjectTypes GetObjectType() const;
186 SpellTargetCheckTypes GetCheckType() const;
187 SpellTargetDirectionTypes GetDirectionType() const;
188 float CalcDirectionAngle() const;
189
190 Targets GetTarget() const;
191 uint32 GetExplicitTargetMask(bool& srcSet, bool& dstSet) const;
192
193private:
195 {
197 SpellTargetCheckTypes checkType, SpellTargetDirectionTypes directionType) : ObjectType(objectType), ReferenceType(referenceType),
198 SelectionCategory(selectionCategory), SelectionCheckType(checkType), DirectionType(directionType) { }
199
200 SpellTargetObjectTypes ObjectType; // type of object returned by target type
201 SpellTargetReferenceTypes ReferenceType; // defines which object is used as a reference when selecting target
203 SpellTargetCheckTypes SelectionCheckType; // defines selection criteria
204 SpellTargetDirectionTypes DirectionType; // direction for cone and dest targets
205 };
206 static std::array<StaticData, TOTAL_SPELL_TARGETS> _data;
207};
208
210{
211 friend class SpellInfo;
213public:
237 std::shared_ptr<std::vector<Condition>> ImplicitTargetConditions;
239 // SpellScalingEntry
241 {
244 float Variance;
245 float ResourceCoefficient;
246 } Scaling;
247
248 explicit SpellEffectInfo();
249 explicit SpellEffectInfo(SpellInfo const* spellInfo, SpellEffectEntry const& effect);
252 SpellEffectInfo& operator=(SpellEffectInfo const&) = delete;
253 SpellEffectInfo& operator=(SpellEffectInfo&&) noexcept;
255
256 bool IsEffect() const;
257 bool IsEffect(SpellEffectName effectName) const;
258 bool IsAura() const;
259 bool IsAura(AuraType aura) const;
260 bool IsTargetingArea() const;
261 bool IsAreaAuraEffect() const;
262 bool IsUnitOwnedAuraEffect() const;
263
264 uint32 GetPeriodicTickCount() const;
265
266 static constexpr SpellEffectValue MinValue = -2000000000.0;
267 static constexpr SpellEffectValue MaxValue = 2000000000.0;
268
269 int32 CalcValueAsInt(WorldObject const* caster = nullptr, SpellEffectValue const* basePoints = nullptr, Unit const* target = nullptr, float* variance = nullptr, uint32 castItemId = 0, int32 itemLevel = -1) const;
270 SpellEffectValue CalcValue(WorldObject const* caster = nullptr, SpellEffectValue const* basePoints = nullptr, Unit const* target = nullptr, float* variance = nullptr, uint32 castItemId = 0, int32 itemLevel = -1) const;
271 SpellEffectValue CalcBaseValue(WorldObject const* caster, Unit const* target, uint32 itemId, int32 itemLevel) const;
272 float CalcValueMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
273 float CalcDamageMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
274
275 bool HasRadius(SpellTargetIndex targetIndex) const;
276 SpellRange CalcRadius(WorldObject const* caster = nullptr, SpellTargetIndex targetIndex = SpellTargetIndex::TargetA, Spell* spell = nullptr) const;
277
278 uint32 GetProvidedTargetMask() const;
279 uint32 GetMissingTargetMask(bool srcSet = false, bool dstSet = false, uint32 mask = 0) const;
280
281 SpellEffectImplicitTargetTypes GetImplicitTargetType() const;
282 SpellTargetObjectTypes GetUsedTargetObjectType() const;
283 ExpectedStatType GetScalingExpectedStat() const;
284
285 struct ImmunityInfo;
286 ImmunityInfo const* GetImmunityInfo() const { return _immunityInfo.get(); }
287
288private:
290 {
291 StaticData(SpellEffectImplicitTargetTypes implicitTargetType, SpellTargetObjectTypes usedTargetObjectType)
292 : ImplicitTargetType(implicitTargetType), UsedTargetObjectType(usedTargetObjectType) { }
293
294 SpellEffectImplicitTargetTypes ImplicitTargetType; // defines what target can be added to effect target list if there's no valid target type provided for effect
295 SpellTargetObjectTypes UsedTargetObjectType; // defines valid target object type for spell effect
296 };
297 static std::array<StaticData, TOTAL_SPELL_EFFECTS> _data;
298
299 std::unique_ptr<ImmunityInfo> _immunityInfo;
300};
301
302typedef std::vector<SpellXSpellVisualEntry const*> SpellVisualVector;
303typedef std::unordered_map<uint32, SpellVisualVector> SpellVisualMap;
304
305typedef std::vector<AuraEffect*> AuraEffectVector;
306
308
310{
314 int32 DiminishDurationLimit = 0;
315};
316
322
324{
325 friend class SpellMgr;
326
327 public:
328 uint32 const Id = 0;
330 uint32 CategoryId = 0;
331 uint32 Dispel = 0;
332 uint32 Mechanic = 0;
333 uint32 Attributes = 0;
334 uint32 AttributesEx = 0;
335 uint32 AttributesEx2 = 0;
336 uint32 AttributesEx3 = 0;
337 uint32 AttributesEx4 = 0;
338 uint32 AttributesEx5 = 0;
339 uint32 AttributesEx6 = 0;
340 uint32 AttributesEx7 = 0;
341 uint32 AttributesEx8 = 0;
342 uint32 AttributesEx9 = 0;
343 uint32 AttributesEx10 = 0;
344 uint32 AttributesEx11 = 0;
345 uint32 AttributesEx12 = 0;
346 uint32 AttributesEx13 = 0;
347 uint32 AttributesEx14 = 0;
348 uint32 AttributesEx15 = 0;
349 uint32 AttributesEx16 = 0;
350 uint32 AttributesCu = 0;
351 std::bitset<MAX_SPELL_EFFECTS> NegativeEffects;
353 uint64 StancesNot = 0;
355 uint32 TargetCreatureType = 0;
356 uint32 RequiresSpellFocus = 0;
357 uint32 FacingCasterFlags = 0;
358 uint32 CasterAuraState = 0;
359 uint32 TargetAuraState = 0;
360 uint32 ExcludeCasterAuraState = 0;
361 uint32 ExcludeTargetAuraState = 0;
362 uint32 CasterAuraSpell = 0;
363 uint32 TargetAuraSpell = 0;
364 uint32 ExcludeCasterAuraSpell = 0;
365 uint32 ExcludeTargetAuraSpell = 0;
366 AuraType CasterAuraType = SPELL_AURA_NONE;
367 AuraType TargetAuraType = SPELL_AURA_NONE;
368 AuraType ExcludeCasterAuraType = SPELL_AURA_NONE;
369 AuraType ExcludeTargetAuraType = SPELL_AURA_NONE;
370 SpellCastTimesEntry const* CastTimeEntry = nullptr;
371 uint32 RecoveryTime = 0;
372 uint32 CategoryRecoveryTime = 0;
373 uint32 StartRecoveryCategory = 0;
374 uint32 StartRecoveryTime = 0;
375 uint32 CooldownAuraSpellId = 0;
385 float ProcBasePPM = 0.0f;
386 std::vector<SpellProcsPerMinuteModEntry const*> ProcPPMMods;
388 uint32 BaseLevel = 0;
389 uint32 SpellLevel = 0;
390 SpellDurationEntry const* DurationEntry = nullptr;
391 std::array<SpellPowerEntry const*, MAX_POWERS_PER_SPELL> PowerCosts = {};
392 SpellRangeEntry const* RangeEntry = nullptr;
393 float Speed = 0.0f;
394 float LaunchDelay = 0.0f;
395 float MinDuration = 0.0f;
396 uint32 StackAmount = 0;
397 std::array<int32, MAX_SPELL_TOTEMS> Totem = {};
398 std::array<uint16, MAX_SPELL_TOTEMS> TotemCategory = {};
399 std::array<int32, MAX_SPELL_REAGENTS> Reagent = {};
400 std::array<int16, MAX_SPELL_REAGENTS> ReagentCount = {};
401 std::vector<SpellReagentsCurrencyEntry const*> ReagentsCurrency;
402 int32 EquippedItemClass = -1;
403 int32 EquippedItemSubClassMask = 0;
404 int32 EquippedItemInventoryTypeMask = 0;
405 uint32 IconFileDataId = 0;
406 uint32 ActiveIconFileDataId = 0;
407 uint32 ContentTuningId = 0;
408 uint32 ShowFutureSpellPlayerConditionID = 0;
409 LocalizedString const* SpellName = nullptr;
410 float ConeAngle = 0.0f;
411 float Width = 0.0f;
412 uint32 MaxTargetLevel = 0;
413 uint32 MaxAffectedTargets = 0;
414 uint32 SpellFamilyName = 0;
416 uint32 DmgClass = 0;
417 uint32 PreventionType = 0;
418 int32 RequiredAreasID = -1;
419 uint32 SchoolMask = 0;
420 uint32 ChargeCategoryId = 0;
421 std::unordered_set<uint32> Labels;
422 std::vector<Milliseconds> EmpowerStageThresholds;
423
424 // SpellScalingEntry
426 {
427 uint32 MinScalingLevel = 0;
428 uint32 MaxScalingLevel = 0;
429 } Scaling;
430
431 uint32 ExplicitTargetMask = 0;
432 uint32 RequiredExplicitTargetMask = 0;
433 SpellChainNode const* ChainEntry = nullptr;
434 struct
435 {
436 int32 MaxTargets = 0; // The amount of targets after the damage decreases by the Square Root AOE formula
437 int32 NumNonDiminishedTargets = 0; // The amount of targets that still take the full amount before the damage decreases by the Square Root AOE formula
438 } SqrtDamageAndHealingDiminishing;
439
440 explicit SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, SpellInfoLoadHelper const& data);
441 explicit SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, std::vector<SpellEffectEntry> const& effects);
442 SpellInfo(SpellInfo const&) = delete;
443 SpellInfo(SpellInfo&&) = delete;
444 ~SpellInfo();
445
446 SpellInfo& operator=(SpellInfo const&) = delete;
447 SpellInfo& operator=(SpellInfo&&) noexcept = delete;
448
449 uint32 GetCategory() const;
450 bool HasEffect(SpellEffectName effect) const;
451 bool HasAura(AuraType aura) const;
452 bool HasAreaAuraEffect() const;
453 bool HasOnlyDamageEffects() const;
454 bool HasTargetType(::Targets target) const;
455
456 bool HasAttribute(SpellAttr0 attribute) const { return !!(Attributes & attribute); }
457 bool HasAttribute(SpellAttr1 attribute) const { return !!(AttributesEx & attribute); }
458 bool HasAttribute(SpellAttr2 attribute) const { return !!(AttributesEx2 & attribute); }
459 bool HasAttribute(SpellAttr3 attribute) const { return !!(AttributesEx3 & attribute); }
460 bool HasAttribute(SpellAttr4 attribute) const { return !!(AttributesEx4 & attribute); }
461 bool HasAttribute(SpellAttr5 attribute) const { return !!(AttributesEx5 & attribute); }
462 bool HasAttribute(SpellAttr6 attribute) const { return !!(AttributesEx6 & attribute); }
463 bool HasAttribute(SpellAttr7 attribute) const { return !!(AttributesEx7 & attribute); }
464 bool HasAttribute(SpellAttr8 attribute) const { return !!(AttributesEx8 & attribute); }
465 bool HasAttribute(SpellAttr9 attribute) const { return !!(AttributesEx9 & attribute); }
466 bool HasAttribute(SpellAttr10 attribute) const { return !!(AttributesEx10 & attribute); }
467 bool HasAttribute(SpellAttr11 attribute) const { return !!(AttributesEx11 & attribute); }
468 bool HasAttribute(SpellAttr12 attribute) const { return !!(AttributesEx12 & attribute); }
469 bool HasAttribute(SpellAttr13 attribute) const { return !!(AttributesEx13 & attribute); }
470 bool HasAttribute(SpellAttr14 attribute) const { return !!(AttributesEx14 & attribute); }
471 bool HasAttribute(SpellAttr15 attribute) const { return !!(AttributesEx15 & attribute); }
472 bool HasAttribute(SpellAttr16 attribute) const { return !!(AttributesEx16 & attribute); }
473 bool HasAttribute(SpellCustomAttributes customAttribute) const { return !!(AttributesCu & customAttribute); }
474
475 bool CanBeInterrupted(WorldObject const* interruptCaster, Unit const* interruptTarget, bool ignoreImmunity = false) const;
476
477 bool HasAnyAuraInterruptFlag() const;
478 bool HasAuraInterruptFlag(SpellAuraInterruptFlags flag) const { return AuraInterruptFlags.HasFlag(flag); }
479 bool HasAuraInterruptFlag(SpellAuraInterruptFlags2 flag) const { return AuraInterruptFlags2.HasFlag(flag); }
480
481 bool HasChannelInterruptFlag(SpellAuraInterruptFlags flag) const { return ChannelInterruptFlags.HasFlag(flag); }
482 bool HasChannelInterruptFlag(SpellAuraInterruptFlags2 flag) const { return ChannelInterruptFlags2.HasFlag(flag); }
483
484 bool IsExplicitDiscovery() const;
485 bool IsLootCrafting() const;
486 bool IsProfession() const;
487 bool IsPrimaryProfession() const;
488 bool IsPrimaryProfessionFirstRank() const;
489 bool IsAbilityOfSkillType(uint32 skillType) const;
490
491 bool IsAffectingArea() const;
492 bool IsTargetingArea() const;
493 bool NeedsExplicitUnitTarget() const;
494 bool NeedsToBeTriggeredByCaster(SpellInfo const* triggeringSpell) const;
495
496 bool IsPassive() const;
497 bool IsAutocastable() const;
498 bool IsAutocastEnabledByDefault() const;
499 bool IsStackableWithRanks() const;
500 bool IsPassiveStackableWithRanks() const;
501 bool IsMultiSlotAura() const;
502 bool IsStackableOnOneSlotWithDifferentCasters() const;
503 bool IsCooldownStartedOnEvent() const;
504 bool IsDeathPersistent() const;
505 bool IsRequiringDeadTarget() const;
506 bool IsAllowingDeadTarget() const;
507 bool IsGroupBuff() const;
508 bool CanBeUsedInCombat(Unit const* caster) const;
509 bool IsPositive() const;
510 bool IsPositiveEffect(uint8 effIndex) const;
511 bool IsChanneled() const;
512 bool IsMoveAllowedChannel() const;
513 bool IsNextMeleeSwingSpell() const;
514 bool IsRangedWeaponSpell() const;
515 bool IsAutoRepeatRangedSpell() const;
516 bool IsEmpowerSpell() const;
517 bool HasInitialAggro() const;
518 bool HasHitDelay() const;
519
520 WeaponAttackType GetAttackType() const;
521
522 bool IsItemFitToSpellRequirements(Item const* item) const;
523
524 bool IsAffected(uint32 familyName, flag128 const& familyFlags) const;
525
526 bool IsAffectedBySpellMods() const;
527 int32 IsAffectedBySpellMod(SpellModifier const* mod) const;
528 bool IsUpdatingTemporaryAuraValuesBySpellMod() const;
529
530 bool CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const;
531 bool CanDispelAura(SpellInfo const* auraSpellInfo) const;
532
533 bool IsSingleTarget() const;
534 bool IsAuraExclusiveBySpecificWith(SpellInfo const* spellInfo) const;
535 bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const* spellInfo) const;
536
537 SpellCastResult CheckShapeshift(uint32 form) const;
538 SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player = nullptr) const;
539 SpellCastResult CheckTarget(WorldObject const* caster, WorldObject const* target, bool implicit = true) const;
540 SpellCastResult CheckExplicitTarget(WorldObject const* caster, WorldObject const* target, Item const* itemTarget = nullptr) const;
541 SpellCastResult CheckVehicle(Unit const* caster) const;
542 bool CheckTargetCreatureType(Unit const* target) const;
543
544 SpellSchoolMask GetSchoolMask() const;
545 uint64 GetAllEffectsMechanicMask() const;
546 uint64 GetEffectMechanicMask(SpellEffIndex effIndex) const;
547 uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const;
548 Mechanics GetEffectMechanic(SpellEffIndex effIndex) const;
549 uint32 GetDispelMask() const;
550 static uint32 GetDispelMask(DispelType type);
551 uint32 GetExplicitTargetMask() const;
552
553 AuraStateType GetAuraState() const;
554 SpellSpecificType GetSpellSpecific() const;
555
556 float GetMinRange(bool positive = false) const;
557 float GetMaxRange(bool positive = false, WorldObject const* caster = nullptr, Spell* spell = nullptr) const;
558 SpellRange GetMinMaxRange(bool positive = false, WorldObject const* caster = nullptr, Spell* spell = nullptr) const;
559
560 int32 CalcDuration(WorldObject const* caster = nullptr) const;
561 int32 GetDuration() const;
562 int32 GetMaxDuration() const;
563
564 uint32 CalcCastTime(Spell* spell = nullptr) const;
565 uint32 GetRecoveryTime() const;
566
567 Optional<SpellPowerCost> CalcPowerCost(Powers powerType, bool optionalCost, WorldObject const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
568 Optional<SpellPowerCost> CalcPowerCost(SpellPowerEntry const* power, bool optionalCost, WorldObject const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
569 std::vector<SpellPowerCost> CalcPowerCost(WorldObject const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
570
571 float CalcProcPPM(Unit* caster, int32 itemLevel) const;
572
573 bool IsRanked() const;
574 uint8 GetRank() const;
575 SpellInfo const* GetFirstRankSpell() const;
576 SpellInfo const* GetLastRankSpell() const;
577 SpellInfo const* GetNextRankSpell() const;
578 SpellInfo const* GetPrevRankSpell() const;
579 SpellInfo const* GetAuraRankForLevel(uint8 level) const;
580 bool IsRankOf(SpellInfo const* spellInfo) const;
581 bool IsDifferentRankOf(SpellInfo const* spellInfo) const;
582 bool IsHighRankOf(SpellInfo const* spellInfo) const;
583
584 uint32 GetSpellXSpellVisualId(WorldObject const* caster = nullptr, WorldObject const* viewer = nullptr) const;
585 uint32 GetSpellVisual(WorldObject const* caster = nullptr, WorldObject const* viewer = nullptr) const;
586
587 std::vector<SpellEffectInfo> const& GetEffects() const { return _effects; }
588 SpellEffectInfo const& GetEffect(SpellEffIndex index) const { ASSERT(index < _effects.size()); return _effects[index]; }
589
590 // spell diminishing returns
591 DiminishingGroup GetDiminishingReturnsGroupForSpell() const;
592 DiminishingReturnsType GetDiminishingReturnsGroupType() const;
593 DiminishingLevels GetDiminishingReturnsMaxLevel() const;
594 int32 GetDiminishingReturnsLimitDuration() const;
595
596 // spell immunities
597 void ApplyAllSpellImmunitiesTo(Unit* target, SpellEffectInfo const& spellEffectInfo, bool apply) const;
598 bool CanSpellProvideImmunityAgainstAura(SpellInfo const* auraSpellInfo) const;
599 bool CanSpellEffectProvideImmunityAgainstAuraEffect(SpellEffectInfo const& immunityEffectInfo, SpellInfo const* auraSpellInfo, SpellEffectInfo const& auraEffectInfo) const;
600 bool SpellCancelsAuraEffect(AuraEffect const* aurEff) const;
601
602 uint64 GetAllowedMechanicMask() const;
603
604 uint64 GetMechanicImmunityMask(Unit const* caster) const;
605
606 // Player Condition
607 bool MeetsFutureSpellPlayerCondition(Player const* player) const;
608
609 bool HasLabel(uint32 labelId) const;
610
611 private:
612 // loading helpers
613 void _InitializeExplicitTargetMask();
614 void _InitializeSpellPositivity();
615 void _LoadSpellSpecific();
616 void _LoadAuraState();
617 void _LoadSpellDiminishInfo();
618 void _LoadImmunityInfo();
619 void _LoadSqrtTargetLimit(int32 maxTargets, int32 numNonDiminishedTargets,
620 Optional<uint32> maxTargetsValueHolderSpell, Optional<SpellEffIndex> maxTargetsValueHolderEffect,
621 Optional<uint32> numNonDiminishedTargetsValueHolderSpell, Optional<SpellEffIndex> numNonDiminishedTargetsValueHolderEffect);
622
623 // unloading helpers
624 void _UnloadImplicitTargetConditionLists();
625
626 private:
627 std::vector<SpellEffectInfo> _effects;
631
633 uint64 _allowedMechanicMask = 0;
634};
635
636#endif // _SPELLINFO_H
Difficulty
Definition DBCEnums.h:932
@ DIFFICULTY_NONE
Definition DBCEnums.h:933
ExpectedStatType
Definition DBCEnums.h:986
#define TC_GAME_API
Definition Define.h:129
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
#define ASSERT
Definition Errors.h:80
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
SpellAttr11
SpellEffIndex
SpellAttr10
SpellAttr9
SpellAttr7
SpellAttr5
SpellTargetIndex
Targets
SpellSchoolMask
SpellAttr2
SpellAttr1
SpellAttr15
SpellAttr3
SpellEffectName
WeaponAttackType
Mechanics
Powers
SpellAttr0
DiminishingLevels
@ DIMINISHING_LEVEL_IMMUNE
SpellAttr12
SpellAttr14
DiminishingGroup
@ DIMINISHING_NONE
TotemCategory
SpellCastResult
AuraStateType
@ AURA_STATE_NONE
DiminishingReturnsType
@ DRTYPE_NONE
SpellAttr13
DispelType
SpellAttr4
SpellAttr8
SpellAttr16
SpellAttr6
@ SPELL_AURA_NONE
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
SpellAuraInterruptFlags2
SpellAuraInterruptFlags
SpellTargetCheckTypes
Definition SpellInfo.h:80
@ TARGET_CHECK_PASSENGER
Definition SpellInfo.h:88
@ TARGET_CHECK_PARTY
Definition SpellInfo.h:85
@ TARGET_CHECK_ENEMY
Definition SpellInfo.h:83
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:81
@ TARGET_CHECK_SUMMONED
Definition SpellInfo.h:89
@ TARGET_CHECK_ENTRY
Definition SpellInfo.h:82
@ TARGET_CHECK_RAID_CLASS
Definition SpellInfo.h:87
@ TARGET_CHECK_ALLY
Definition SpellInfo.h:84
@ TARGET_CHECK_RAID
Definition SpellInfo.h:86
SpellEffectImplicitTargetTypes
Definition SpellInfo.h:108
@ EFFECT_IMPLICIT_TARGET_CASTER
Definition SpellInfo.h:111
@ EFFECT_IMPLICIT_TARGET_NONE
Definition SpellInfo.h:109
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
Definition SpellInfo.h:110
SpellTargetSelectionCategories
Definition SpellInfo.h:42
@ TARGET_SELECT_CATEGORY_CONE
Definition SpellInfo.h:47
@ TARGET_SELECT_CATEGORY_AREA
Definition SpellInfo.h:48
@ TARGET_SELECT_CATEGORY_DEFAULT
Definition SpellInfo.h:44
@ TARGET_SELECT_CATEGORY_NEARBY
Definition SpellInfo.h:46
@ TARGET_SELECT_CATEGORY_NYI
Definition SpellInfo.h:43
@ TARGET_SELECT_CATEGORY_LINE
Definition SpellInfo.h:50
@ TARGET_SELECT_CATEGORY_TRAJ
Definition SpellInfo.h:49
@ TARGET_SELECT_CATEGORY_CHANNEL
Definition SpellInfo.h:45
SpellTargetDirectionTypes
Definition SpellInfo.h:93
@ TARGET_DIR_FRONT_RIGHT
Definition SpellInfo.h:99
@ TARGET_DIR_NONE
Definition SpellInfo.h:94
@ TARGET_DIR_BACK
Definition SpellInfo.h:96
@ TARGET_DIR_BACK_RIGHT
Definition SpellInfo.h:100
@ TARGET_DIR_RIGHT
Definition SpellInfo.h:97
@ TARGET_DIR_FRONT_LEFT
Definition SpellInfo.h:102
@ TARGET_DIR_FRONT
Definition SpellInfo.h:95
@ TARGET_DIR_LEFT
Definition SpellInfo.h:98
@ TARGET_DIR_ENTRY
Definition SpellInfo.h:104
@ TARGET_DIR_BACK_LEFT
Definition SpellInfo.h:101
@ TARGET_DIR_RANDOM
Definition SpellInfo.h:103
std::unordered_map< uint32, SpellVisualVector > SpellVisualMap
Definition SpellInfo.h:303
SpellTargetObjectTypes
Definition SpellInfo.h:64
@ TARGET_OBJECT_TYPE_UNIT
Definition SpellInfo.h:68
@ TARGET_OBJECT_TYPE_ITEM
Definition SpellInfo.h:72
@ TARGET_OBJECT_TYPE_CORPSE
Definition SpellInfo.h:73
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
Definition SpellInfo.h:69
@ TARGET_OBJECT_TYPE_NONE
Definition SpellInfo.h:65
@ TARGET_OBJECT_TYPE_DEST
Definition SpellInfo.h:67
@ TARGET_OBJECT_TYPE_GOBJ
Definition SpellInfo.h:70
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
Definition SpellInfo.h:76
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
Definition SpellInfo.h:75
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
Definition SpellInfo.h:71
@ TARGET_OBJECT_TYPE_SRC
Definition SpellInfo.h:66
std::vector< AuraEffect * > AuraEffectVector
Definition SpellInfo.h:305
SpellCustomAttributes
Definition SpellInfo.h:143
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF1
Definition SpellInfo.h:157
@ SPELL_ATTR0_CU_IGNORE_ARMOR
Definition SpellInfo.h:159
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
Definition SpellInfo.h:160
@ SPELL_ATTR0_CU_CAN_TARGET_ANY_PRIVATE_OBJECT
Definition SpellInfo.h:169
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
Definition SpellInfo.h:162
@ SPELL_ATTR0_CU_ENCHANT_PROC
Definition SpellInfo.h:144
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
Definition SpellInfo.h:152
@ SPELL_ATTR0_CU_CAN_CRIT
Definition SpellInfo.h:151
@ SPELL_ATTR0_CU_DONT_BREAK_STEALTH
Definition SpellInfo.h:150
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
Definition SpellInfo.h:161
@ SPELL_ATTR0_CU_CONE_BACK
Definition SpellInfo.h:145
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF2
Definition SpellInfo.h:158
@ SPELL_ATTR0_CU_AURA_CANNOT_BE_SAVED
Definition SpellInfo.h:168
@ SPELL_ATTR0_CU_AURA_CC
Definition SpellInfo.h:149
@ SPELL_ATTR0_CU_CHARGE
Definition SpellInfo.h:153
@ SPELL_ATTR0_CU_NEEDS_AMMO_DATA
Definition SpellInfo.h:163
@ SPELL_ATTR0_CU_DEPRECATED_NEGATIVE_EFF0
Definition SpellInfo.h:156
@ SPELL_ATTR0_CU_BINARY_SPELL
Definition SpellInfo.h:164
@ SPELL_ATTR0_CU_SHARE_DAMAGE
Definition SpellInfo.h:147
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
Definition SpellInfo.h:165
@ SPELL_ATTR0_CU_DEPRECATED_ROLLING_PERIODIC
Definition SpellInfo.h:155
@ SPELL_ATTR0_CU_PICKPOCKET
Definition SpellInfo.h:154
@ SPELL_ATTR0_CU_CONE_LINE
Definition SpellInfo.h:146
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
Definition SpellInfo.h:148
@ SPELL_ATTR0_CU_IS_TALENT
Definition SpellInfo.h:167
@ SPELL_ATTR0_CU_DEPRECATED_LIQUID_AURA
Definition SpellInfo.h:166
SpellSpecificType
Definition SpellInfo.h:116
@ SPELL_SPECIFIC_FOOD
Definition SpellInfo.h:128
@ SPELL_SPECIFIC_MAGE_ARMOR
Definition SpellInfo.h:125
@ SPELL_SPECIFIC_NORMAL
Definition SpellInfo.h:117
@ SPELL_SPECIFIC_STING
Definition SpellInfo.h:120
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
Definition SpellInfo.h:134
@ SPELL_SPECIFIC_ASPECT
Definition SpellInfo.h:122
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
Definition SpellInfo.h:136
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
Definition SpellInfo.h:126
@ SPELL_SPECIFIC_BANE
Definition SpellInfo.h:139
@ SPELL_SPECIFIC_PRESENCE
Definition SpellInfo.h:131
@ SPELL_SPECIFIC_CURSE
Definition SpellInfo.h:121
@ SPELL_SPECIFIC_DRINK
Definition SpellInfo.h:129
@ SPELL_SPECIFIC_HAND
Definition SpellInfo.h:137
@ SPELL_SPECIFIC_AURA
Definition SpellInfo.h:119
@ SPELL_SPECIFIC_WARRIOR_ENRAGE
Definition SpellInfo.h:135
@ SPELL_SPECIFIC_WARLOCK_ARMOR
Definition SpellInfo.h:124
@ SPELL_SPECIFIC_SCROLL
Definition SpellInfo.h:133
@ SPELL_SPECIFIC_PHASE
Definition SpellInfo.h:138
@ SPELL_SPECIFIC_MAGE_POLYMORPH
Definition SpellInfo.h:127
@ SPELL_SPECIFIC_TRACKER
Definition SpellInfo.h:123
@ SPELL_SPECIFIC_SEAL
Definition SpellInfo.h:118
@ SPELL_SPECIFIC_FOOD_AND_DRINK
Definition SpellInfo.h:130
@ SPELL_SPECIFIC_CHARM
Definition SpellInfo.h:132
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
Definition SpellInfo.cpp:44
SpellTargetReferenceTypes
Definition SpellInfo.h:54
@ TARGET_REFERENCE_TYPE_SRC
Definition SpellInfo.h:59
@ TARGET_REFERENCE_TYPE_TARGET
Definition SpellInfo.h:57
@ TARGET_REFERENCE_TYPE_LAST
Definition SpellInfo.h:58
@ TARGET_REFERENCE_TYPE_NONE
Definition SpellInfo.h:55
@ TARGET_REFERENCE_TYPE_CASTER
Definition SpellInfo.h:56
@ TARGET_REFERENCE_TYPE_DEST
Definition SpellInfo.h:60
std::vector< SpellXSpellVisualEntry const * > SpellVisualVector
Definition SpellInfo.h:302
constexpr bool HasFlag(T flag) const
Definition EnumFlag.h:106
Definition Item.h:179
float PositionFacing
Definition SpellInfo.h:227
Mechanics Mechanic
Definition SpellInfo.h:226
AuraType ApplyAuraName
Definition SpellInfo.h:216
SpellEffectInfo(SpellEffectInfo &&) noexcept
uint32 TriggerSpell
Definition SpellInfo.h:234
std::unique_ptr< ImmunityInfo > _immunityInfo
Definition SpellInfo.h:299
SpellInfo const * _spellInfo
Definition SpellInfo.h:212
SpellEffectName Effect
Definition SpellInfo.h:215
SpellRadiusEntry const * TargetBRadiusEntry
Definition SpellInfo.h:231
std::shared_ptr< std::vector< Condition > > ImplicitTargetConditions
Definition SpellInfo.h:237
flag128 SpellClassMask
Definition SpellInfo.h:235
SpellRadiusEntry const * TargetARadiusEntry
Definition SpellInfo.h:230
float BonusCoefficientFromAP
Definition SpellInfo.h:236
SpellEffectInfo(SpellEffectInfo const &)=delete
float BonusCoefficient
Definition SpellInfo.h:223
float ChainAmplitude
Definition SpellInfo.h:222
uint32 ApplyAuraPeriod
Definition SpellInfo.h:217
float RealPointsPerLevel
Definition SpellInfo.h:219
EnumFlag< SpellEffectAttributes > EffectAttributes
Definition SpellInfo.h:238
SpellEffIndex EffectIndex
Definition SpellInfo.h:214
SpellImplicitTargetInfo TargetA
Definition SpellInfo.h:228
float PointsPerResource
Definition SpellInfo.h:220
SpellImplicitTargetInfo TargetB
Definition SpellInfo.h:229
bool HasAttribute(SpellAttr8 attribute) const
Definition SpellInfo.h:464
bool HasChannelInterruptFlag(SpellAuraInterruptFlags2 flag) const
Definition SpellInfo.h:482
SpellInfo & operator=(SpellInfo &&) noexcept=delete
bool HasAttribute(SpellAttr9 attribute) const
Definition SpellInfo.h:465
bool HasAttribute(SpellAttr16 attribute) const
Definition SpellInfo.h:472
std::unordered_set< uint32 > Labels
Definition SpellInfo.h:421
bool HasAttribute(SpellAttr2 attribute) const
Definition SpellInfo.h:458
bool HasAttribute(SpellAttr7 attribute) const
Definition SpellInfo.h:463
std::vector< Milliseconds > EmpowerStageThresholds
Definition SpellInfo.h:422
SpellVisualVector _visuals
Definition SpellInfo.h:628
bool HasAttribute(SpellAttr14 attribute) const
Definition SpellInfo.h:470
bool HasAttribute(SpellAttr5 attribute) const
Definition SpellInfo.h:461
bool HasAttribute(SpellAttr13 attribute) const
Definition SpellInfo.h:469
std::vector< SpellProcsPerMinuteModEntry const * > ProcPPMMods
Definition SpellInfo.h:386
std::vector< SpellEffectInfo > _effects
Definition SpellInfo.h:627
SpellInfo(SpellInfo const &)=delete
flag128 SpellFamilyFlags
Definition SpellInfo.h:415
bool HasAttribute(SpellAttr12 attribute) const
Definition SpellInfo.h:468
SpellInfo(SpellInfo &&)=delete
ProcFlagsInit ProcFlags
Definition SpellInfo.h:381
bool HasAuraInterruptFlag(SpellAuraInterruptFlags2 flag) const
Definition SpellInfo.h:479
bool HasAttribute(SpellAttr6 attribute) const
Definition SpellInfo.h:462
std::vector< SpellReagentsCurrencyEntry const * > ReagentsCurrency
Definition SpellInfo.h:401
bool HasAttribute(SpellCustomAttributes customAttribute) const
Definition SpellInfo.h:473
bool HasAttribute(SpellAttr1 attribute) const
Definition SpellInfo.h:457
bool HasChannelInterruptFlag(SpellAuraInterruptFlags flag) const
Definition SpellInfo.h:481
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
std::vector< SpellEffectInfo > const & GetEffects() const
Definition SpellInfo.h:587
SpellDiminishInfo _diminishInfo
Definition SpellInfo.h:632
bool HasAttribute(SpellAttr3 attribute) const
Definition SpellInfo.h:459
bool HasAttribute(SpellAttr15 attribute) const
Definition SpellInfo.h:471
bool HasAttribute(SpellAttr4 attribute) const
Definition SpellInfo.h:460
bool HasAttribute(SpellAttr11 attribute) const
Definition SpellInfo.h:467
std::bitset< MAX_SPELL_EFFECTS > NegativeEffects
Definition SpellInfo.h:351
SpellInfo & operator=(SpellInfo const &)=delete
bool HasAttribute(SpellAttr10 attribute) const
Definition SpellInfo.h:466
bool HasAuraInterruptFlag(SpellAuraInterruptFlags flag) const
Definition SpellInfo.h:478
Definition Spell.h:277
Definition Totem.h:31
Definition Unit.h:635
StaticData(SpellEffectImplicitTargetTypes implicitTargetType, SpellTargetObjectTypes usedTargetObjectType)
Definition SpellInfo.h:291
SpellTargetObjectTypes UsedTargetObjectType
Definition SpellInfo.h:295
SpellEffectImplicitTargetTypes ImplicitTargetType
Definition SpellInfo.h:294
SpellTargetObjectTypes ObjectType
Definition SpellInfo.h:200
SpellTargetCheckTypes SelectionCheckType
Definition SpellInfo.h:203
SpellTargetReferenceTypes ReferenceType
Definition SpellInfo.h:201
SpellTargetSelectionCategories SelectionCategory
Definition SpellInfo.h:202
SpellTargetDirectionTypes DirectionType
Definition SpellInfo.h:204
StaticData(SpellTargetObjectTypes objectType, SpellTargetReferenceTypes referenceType, SpellTargetSelectionCategories selectionCategory, SpellTargetCheckTypes checkType, SpellTargetDirectionTypes directionType)
Definition SpellInfo.h:196