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