40#include <boost/container/small_vector.hpp>
41#include <G3D/g3dmath.h>
115 return static_cast<float>(
M_PI);
117 return static_cast<float>(-
M_PI/2);
119 return static_cast<float>(
M_PI/2);
121 return static_cast<float>(-
M_PI/4);
123 return static_cast<float>(-3*
M_PI/4);
125 return static_cast<float>(3*
M_PI/4);
127 return static_cast<float>(
M_PI/4);
462 return Effect == effectName;
518 return int32(
CalcValue(caster, basePoints, target, variance, castItemId, itemLevel));
528 Unit const* casterUnit =
nullptr;
531 casterUnit = caster->
ToUnit();
539 if (pointsOverride != traitDefinitionEffectPoints->end())
541 float traitBasePoints =
sDB2Manager.GetCurveValueAt((*pointsOverride)->CurveID, trait->Rank);
542 switch ((*pointsOverride)->GetOperationType())
545 value = traitBasePoints;
548 value *= traitBasePoints;
563 float valueVariance =
frand(-delta, delta);
564 value += basePoints * valueVariance;
567 *variance = valueVariance;
578 if (casterUnit && basePointsPerLevel != 0.0)
586 level = std::max(level, 0);
587 value += level * basePointsPerLevel;
597 value += comboDamage * comboPoints;
622 value = std::round(value);
649 value = std::round(value);
669 else if (caster && caster->
IsUnit())
687 uint32 effectiveItemLevel = itemLevel != -1 ?
uint32(itemLevel) : 1u;
716 if (value > 0.0f && value < 1.0f)
720 value = round(value);
735 int32 expansion = -2;
737 expansion = contentTuning->ExpansionID;
742 else if (caster && caster->
IsUnit())
747 value = round(value);
767 return multiplierPercent / 100.0f;
804 if (
Unit const* casterUnit = caster->
ToUnit())
814 radius.
Min = std::max(radius.
Min - 2.0f, 0.0f);
856 return effImplicitTargetMask;
1337 for (
size_t i = 0; i <
_effects.size(); ++i)
1370 Speed = _misc->Speed;
1431 Dispel = _categories->DispelType;
1434 DmgClass = _categories->DefenseType;
1477 Labels.insert(label->LabelID);
1502 Stances =
MAKE_PAIR64(_shapeshift->ShapeshiftMask[0], _shapeshift->ShapeshiftMask[1]);
1510 Width = _target->Width;
1537 for (
size_t i = 0; i <
_effects.size(); ++i)
1559 if (eff.IsEffect(effect))
1568 if (effect.IsAura(aura))
1577 if (effect.IsAreaAuraEffect())
1587 if (effect.IsEffect())
1589 switch (effect.Effect)
1612 if (effect.TargetA.GetTarget() == target || effect.TargetB.GetTarget() == target)
1657 uint32 skill = effect.MiscValue;
1672 uint32 skill = effect.MiscValue;
1690 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1691 if (_spell_idx->second->SkillLine == skillType)
1710 if (effect.IsEffect() && effect.IsTargetingArea())
1746 mask |= effect.GetProvidedTargetMask();
1849 if (!effect.IsEffect())
1863 switch (effect.TargetA.GetCheckType())
2017 return std::popcount(matched[0]) + std::popcount(matched[1]) + std::popcount(matched[2]) + std::popcount(matched[3]);
2086 return spellSpec1 == spellSpec2;
2139 bool actAsShifted =
false;
2146 TC_LOG_ERROR(
"spells",
"GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
2176 for (
uint32 areaId : areaGroupMembers)
2199 mountFlags = areaTable->GetMountFlags();
2212 if (!mapEntry || mapEntry->
IsRaid())
2219 if (!mapEntry || !mapEntry->
IsDungeon())
2232 if (saBounds.first != saBounds.second)
2234 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
2236 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
2307 if (!effect.IsAura())
2310 switch (effect.ApplyAuraName)
2315 if (
uint32 mountType = spellShapeshiftForm->MountTypeID)
2322 uint32 mountType = effect.MiscValueB;
2324 mountType = mountEntry->MountTypeID;
2357 auto getCreatorOrSelf = [](
WorldObject const* obj)
2361 creator = obj->GetGUID();
2365 if (getCreatorOrSelf(caster) != getCreatorOrSelf(target))
2385 if (caster != unitTarget)
2392 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->
ToPlayer()))
2398 if (!targetCreature)
2500 if (
Unit const* unitCaster = caster->
ToUnit())
2502 if (!unitCaster->IsVehicle() && !(unitCaster->GetCharmerOrOwner() == target))
2532 if (instance->GetCombatResurrectionCharges() == 0 && instance->IsEncounterInProgress())
2549 if (
Unit const* unitTarget = target->
ToUnit())
2566 if (unitTarget->IsOnVehicle(unitCaster))
2589 if (shapeShiftFromEntry && (shapeShiftFromEntry->
Flags & 1) == 0)
2603 && (vehicleSeat->
Flags & checkMask) != checkMask)
2656 if (effect.IsEffect() && effect.Mechanic)
2657 mask |=
UI64LIT(1) << effect.Mechanic;
2681 if ((effectMask & (1 << effect.EffectIndex)) && effect.Mechanic)
2682 mask |=
UI64LIT(1) << effect.Mechanic;
2709 return uint32(1 << type);
2826 if (!effect.IsAura())
2828 switch (effect.ApplyAuraName)
2856 switch (firstRankSpellInfo->
Id)
2896 if (
Id == 603 ||
Id == 980 ||
Id == 80240)
2962 if (
Id == 48266 ||
Id == 48263 ||
Id == 48265)
2971 switch (effect.ApplyAuraName)
3031 else if (
Id == 47481)
3034 else if (
Id == 66689)
3037 else if (
Id == 64155)
3040 else if (
Id == 51750)
3043 else if (
Id == 48179)
3202 if (
Id == 200108 ||
Id == 212638)
3401 auto diminishingLimitDurationCompute = [
this]() ->
int32
3488 std::unique_ptr<SpellEffectInfo::ImmunityInfo> workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3492 uint32 schoolImmunityMask = 0;
3493 uint32 applyHarmfulAuraImmunityMask = 0;
3494 uint64 mechanicImmunityMask = 0;
3495 uint32 dispelImmunityMask = 0;
3496 uint32 damageImmunityMask = 0;
3497 uint8 otherImmunityMask = 0;
3498 bool removeEffectsWithMechanic =
false;
3500 int32 miscVal = effect.MiscValue;
3504 switch (effect.ApplyAuraName)
3510 schoolImmunityMask |= creatureImmunities->School.to_ulong();
3511 dispelImmunityMask |= creatureImmunities->DispelType.to_ulong();
3512 mechanicImmunityMask |= creatureImmunities->Mechanic.to_ullong();
3513 otherImmunityMask |= creatureImmunities->Other.AsUnderlyingType();
3514 for (
SpellEffects effectType : creatureImmunities->Effect)
3516 for (
AuraType aura : creatureImmunities->Aura)
3529 removeEffectsWithMechanic =
true;
3541 removeEffectsWithMechanic =
true;
3550 mechanicImmunityMask |=
UI64LIT(1) << miscVal;
3556 removeEffectsWithMechanic =
true;
3572 schoolImmunityMask |=
uint32(miscVal);
3577 applyHarmfulAuraImmunityMask |=
uint32(miscVal);
3582 damageImmunityMask |=
uint32(miscVal);
3587 dispelImmunityMask = 1u << miscVal;
3614 effect._immunityInfo = std::move(workBuffer);
3615 workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3666 if (maxTargetsValueHolderEffect)
3668 SpellInfo const* maxTargetValueHolder =
this;
3669 if (maxTargetsValueHolderSpell)
3672 if (!maxTargetValueHolder)
3673 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} does not exist", *maxTargetsValueHolderSpell);
3674 else if (*maxTargetsValueHolderEffect >= maxTargetValueHolder->
GetEffects().size())
3675 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} does not have effect {}",
3681 if (maxTargets != expectedValue)
3682 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3683 maxTargetValueHolder->
Id,
AsUnderlyingType(*maxTargetsValueHolderEffect), maxTargets, expectedValue);
3687 if (numNonDiminishedTargetsValueHolderEffect)
3689 SpellInfo const* numNonDiminishedTargetsValueHolder =
this;
3690 if (numNonDiminishedTargetsValueHolderSpell)
3691 numNonDiminishedTargetsValueHolder =
sSpellMgr->GetSpellInfo(*numNonDiminishedTargetsValueHolderSpell,
Difficulty);
3693 if (!numNonDiminishedTargetsValueHolder)
3694 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} does not exist", *numNonDiminishedTargetsValueHolderSpell);
3695 else if (*numNonDiminishedTargetsValueHolderEffect >= numNonDiminishedTargetsValueHolder->
GetEffects().size())
3696 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} does not have effect {}",
3697 numNonDiminishedTargetsValueHolder->
Id,
AsUnderlyingType(*numNonDiminishedTargetsValueHolderEffect));
3700 SpellEffectInfo const& valueHolder = numNonDiminishedTargetsValueHolder->
GetEffect(*numNonDiminishedTargetsValueHolderEffect);
3702 if (numNonDiminishedTargets != expectedValue)
3703 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3704 numNonDiminishedTargetsValueHolder->
Id,
AsUnderlyingType(*numNonDiminishedTargetsValueHolderEffect), numNonDiminishedTargets, expectedValue);
3724 if (auraSpellInfo->
Id ==
Id)
3745 if (mechanicImmunity & (
UI64LIT(1) << i))
3754 std::vector<Aura*> aurasToUpdateTargets;
3759 aurasToUpdateTargets.push_back(aura);
3765 for (
Aura* aura : aurasToUpdateTargets)
3766 aura->UpdateTargetMap(aura->GetCaster());
3774 if (dispelImmunity & (1 << i))
3783 if ((dispelMask & dispelImmunity) == dispelMask)
3823 if (!effectInfo.IsEffect())
3832 if ((auraSpellInfo->
SchoolMask & schoolImmunity) != 0)
3836 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellInfo->
Mechanic)) != 0)
3840 if (auraSpellInfo->
Dispel == dispelImmunity)
3843 bool immuneToAllEffects =
true;
3846 if (!auraSpellEffectInfo.IsAura())
3850 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellEffectInfo.Mechanic)) != 0)
3853 if (
AuraType auraName = auraSpellEffectInfo.ApplyAuraName)
3860 if ((auraSpellInfo->
GetSchoolMask() & applyHarmfulAuraImmunityMask) != 0)
3864 immuneToAllEffects =
false;
3867 if (immuneToAllEffects)
3883 if ((auraSpellInfo->
SchoolMask & schoolImmunity) != 0)
3887 if ((auraSpellInfo->
GetSchoolMask() & applyHarmfulAuraImmunityMask) != 0)
3893 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellInfo->
Mechanic)) != 0)
3895 if ((mechanicImmunity & (
UI64LIT(1) << auraEffectInfo.
Mechanic)) != 0)
3900 if (auraSpellInfo->
Dispel == dispelImmunity)
3936 uint64 mechanicImmunityMask = 0;
3947 return mechanicImmunityMask;
4020 return (castTime > 0) ?
uint32(castTime) : 0;
4037 return spellPowerEntry && spellPowerEntry->PowerType == powerType;
4042 return CalcPowerCost(*itr, optionalCost, caster, schoolMask, spell);
4069 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
4074 int32 powerCost = 0;
4094 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type POWER_ALTERNATE_POWER in spell {}",
Id);
4104 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
4126 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unsupported power type POWER_ALTERNATE_POWER in spell {} for optional cost percent",
Id);
4136 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {} for optional cost percent", power->
PowerType,
Id);
4149 bool initiallyNegative = powerCost < 0;
4156 speed = ss->CombatRoundTime;
4166 powerCost += speed / 100;
4176 if (!(aura->GetMiscValue() & schoolMask))
4179 if (!(aura->GetMiscValueB() & (1 << power->
PowerType)))
4182 powerCost += aura->GetAmount();
4189 if (!(schoolCostPct->GetMiscValue() & schoolMask))
4192 if (!(schoolCostPct->GetMiscValueB() & (1 << power->
PowerType)))
4195 powerCost +=
CalculatePct(powerCost, schoolCostPct->GetAmount());
4221 modOwner->ApplySpellMod(
this, *mod, powerCost, spell);
4226 float pctMod = 1.0f;
4227 modOwner->GetSpellModValues(
this, *mod, spell, powerCost, &flatMod, &pctMod);
4228 powerCost =
int32(powerCost * pctMod);
4239 if (spellScaler && casterScaler)
4240 powerCost *= casterScaler->
Scaler / spellScaler->
Scaler;
4245 powerCost = float(powerCost) * (1.0f + unitCaster->
m_unitData->ManaCostMultiplier);
4248 if (initiallyNegative != (powerCost < 0))
4256 std::vector<SpellPowerCost> costs;
4263 auto itr = std::find_if(costs.begin(), costs.end(), [powerType](
SpellPowerCost const& cost)
4265 return cost.Power == powerType;
4267 if (itr != costs.end())
4270 return costs.emplace_back<
SpellPowerCost>({ .Power = powerType, .Amount = 0 });
4279 getOrCreatePowerCost(cost->Power).
Amount += cost->Amount;
4283 SpellPowerCost& cost = getOrCreatePowerCost(optionalCost->Power);
4285 if (remainingPower > 0)
4286 cost.
Amount += std::min(optionalCost->Amount, remainingPower);
4297 float rangedHaste = caster->
m_unitData->ModRangedHaste;
4298 float spellHaste = caster->
m_unitData->ModSpellHaste;
4299 float regenHaste = caster->
m_unitData->ModHasteRegen;
4304 return (1.0f / haste - 1.0f) * mod->
Coeff;
4306 return (1.0f / rangedHaste - 1.0f) * mod->
Coeff;
4308 return (1.0f / spellHaste - 1.0f) * mod->
Coeff;
4310 return (1.0f / regenHaste - 1.0f) * mod->
Coeff;
4312 return (1.0f / std::min(std::min(std::min(haste, rangedHaste), spellHaste), regenHaste) - 1.0f) * mod->
Coeff;
4333 return crit * mod->
Coeff * 0.01f;
4335 return rangedCrit * mod->
Coeff * 0.01f;
4337 return spellCrit * mod->
Coeff * 0.01f;
4339 return std::min(std::min(crit, rangedCrit), spellCrit) * mod->
Coeff * 0.01f;
4349 if (itemLevel == mod->
Param)
4354 if (itemLevelPoints == basePoints)
4357 return ((itemLevelPoints / basePoints) - 1.0f) * mod->
Coeff;
4383 ppm *= 1.0f + mod->Coeff;
4390 ppm *= 1.0f + mod->Coeff;
4396 ppm *= 1.0f + mod->Coeff;
4407 ppm *= 1.0f + mod->Coeff;
4412 if (caster->
HasAura(mod->Param))
4413 ppm *= 1.0f + mod->Coeff;
4474 bool needRankSelection =
false;
4481 !effect.Scaling.Coefficient)
4483 needRankSelection =
true;
4489 if (!needRankSelection)
4492 for (
SpellInfo const* nextSpellInfo =
this; nextSpellInfo !=
nullptr; nextSpellInfo = nextSpellInfo->
GetPrevRankSpell())
4495 if (
uint32(level + 10) >= nextSpellInfo->SpellLevel)
4496 return nextSpellInfo;
4512 if (
Id == spellInfo->
Id)
4531 if (visual->CasterPlayerConditionID)
4544 if (!canUseSpellVisual(*itr))
4548 boost::container::small_vector<SpellXSpellVisualEntry const*, 4> visualCandidates;
4549 visualCandidates.push_back(*itr);
4551 for (
auto itr2 = itr + 1; itr2 != end && (*itr)->Priority == (*itr2)->Priority; ++itr2)
4552 if (canUseSpellVisual(*itr2))
4553 visualCandidates.push_back(*itr2);
4555 if (visualCandidates.size() == 1)
4556 return visualCandidates.front()->ID;
4571 return visual->SpellVisualID;
4579 bool srcSet =
false;
4580 bool dstSet =
false;
4584 if (!effect.IsEffect())
4588 targetMask |= effect.TargetA.GetExplicitTargetMask(srcSet, dstSet);
4589 targetMask |= effect.TargetB.GetExplicitTargetMask(srcSet, dstSet);
4595 uint32 effectTargetMask = effect.GetMissingTargetMask(srcSet, dstSet, targetMask);
4601 targetMask |= effectTargetMask;
4646 visited.insert({ spellInfo, effect.
EffectIndex });
4654 switch (spellInfo->
Id)
4678 switch (spellInfo->
Id)
4717 switch (otherEffect.Effect)
4725 if (otherEffect.EffectIndex != effect.
EffectIndex &&
4734 if (otherEffect.IsAura())
4736 switch (otherEffect.ApplyAuraName)
4864 if (bp < 0 || bpScalePerLevel < 0)
4909 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
4912 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
4915 if (!spellTriggeredEffect.IsEffect())
5058 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
5061 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
5064 if (!spellTriggeredEffect.IsEffect())
5091 switch (effect.ApplyAuraName)
5103 for (
size_t j = effect.EffectIndex + 1; j <
GetEffects().size(); ++j)
5120 effect.ImplicitTargetConditions =
nullptr;
5133 return Labels.contains(labelId);
DB2Storage< RandPropPointsEntry > sRandPropPointsStore("RandPropPoints.db2", &RandPropPointsLoadInfo::Instance)
DB2Storage< SpellCategoryEntry > sSpellCategoryStore("SpellCategory.db2", &SpellCategoryLoadInfo::Instance)
DB2Storage< MapEntry > sMapStore("Map.db2", &MapLoadInfo::Instance)
DB2Storage< SpellXSpellVisualEntry > sSpellXSpellVisualStore("SpellXSpellVisual.db2", &SpellXSpellVisualLoadInfo::Instance)
DB2Storage< SpellRangeEntry > sSpellRangeStore("SpellRange.db2", &SpellRangeLoadInfo::Instance)
DB2Storage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", &SpellShapeshiftFormLoadInfo::Instance)
DB2Storage< SpellDurationEntry > sSpellDurationStore("SpellDuration.db2", &SpellDurationLoadInfo::Instance)
DB2Storage< UnitConditionEntry > sUnitConditionStore("UnitCondition.db2", &UnitConditionLoadInfo::Instance)
DB2Storage< SummonPropertiesEntry > sSummonPropertiesStore("SummonProperties.db2", &SummonPropertiesLoadInfo::Instance)
DB2Storage< SpellRadiusEntry > sSpellRadiusStore("SpellRadius.db2", &SpellRadiusLoadInfo::Instance)
DB2Storage< ContentTuningEntry > sContentTuningStore("ContentTuning.db2", &ContentTuningLoadInfo::Instance)
DB2Storage< ItemSparseEntry > sItemSparseStore("ItemSparse.db2", &ItemSparseLoadInfo::Instance)
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", &AreaTableLoadInfo::Instance)
DB2Storage< SpellProcsPerMinuteEntry > sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", &SpellProcsPerMinuteLoadInfo::Instance)
DB2Storage< SpellCastTimesEntry > sSpellCastTimesStore("SpellCastTimes.db2", &SpellCastTimesLoadInfo::Instance)
@ VEHICLE_SEAT_FLAG_CAN_CAST_MOUNT_SPELL
@ VEHICLE_SEAT_FLAG_CAN_CONTROL
@ VEHICLE_SEAT_FLAG_UNCONTROLLED
@ VEHICLE_SEAT_FLAG_CAN_ATTACK
@ DontFailSpellOnTargetingFailure
@ CanOnlyCastShapeshiftSpells
constexpr std::size_t MAX_POWERS_PER_SPELL
@ CooldownEventOnLeaveCombat
@ SPELL_PPM_MOD_ITEM_LEVEL
@ SPELL_PPM_MOD_BATTLEGROUND
float GetRandomPropertyPoints(uint32 itemLevel, uint32 quality, uint32 inventoryType, uint32 subClass)
#define ITEM_SUBCLASS_MASK_WEAPON_RANGED
#define TC_LOG_ERROR(filterType__, message__,...)
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
@ MOVEMENTFLAG_ADV_FLYING
uint64 MAKE_PAIR64(uint32 l, uint32 h)
std::optional< T > Optional
Optional helper class to wrap optional values within.
float frand(float min, float max)
@ SPELL_ATTR11_SCALES_WITH_ITEM_LEVEL
@ SPELL_ATTR10_USE_SPELL_BASE_LEVEL_FOR_SCALING
@ SPELL_ATTR9_AUTOCAST_OFF_BY_DEFAULT
@ SPELL_ATTR9_TARGET_MUST_BE_GROUNDED
@ SPELL_ATTR9_NO_MOVEMENT_RADIUS_BONUS
@ SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA
@ SPELL_ATTR7_NO_UI_NOT_INTERRUPTIBLE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_POWER_BURN
@ SPELL_EFFECT_ENERGIZE_PCT
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
@ SPELL_EFFECT_SELF_RESURRECT
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY_NONRANDOM
@ SPELL_EFFECT_DURABILITY_DAMAGE
@ SPELL_EFFECT_CREATE_LOOT
@ SPELL_EFFECT_HEALTH_LEECH
@ SPELL_EFFECT_WEAPON_DAMAGE
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
@ SPELL_EFFECT_APPLY_AURA_ON_PET
@ SPELL_EFFECT_DAMAGE_FROM_MAX_HEALTH_PCT
@ SPELL_EFFECT_DISPEL_MECHANIC
@ SPELL_EFFECT_HEAL_MAX_HEALTH
@ SPELL_EFFECT_APPLY_AREA_AURA_PET
@ SPELL_EFFECT_TAMECREATURE
@ SPELL_EFFECT_PICKPOCKET
@ SPELL_EFFECT_HEAL_MECHANICAL
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
@ SPELL_EFFECT_MODIFY_THREAT_PERCENT
@ SPELL_EFFECT_DURABILITY_DAMAGE_PCT
@ SPELL_EFFECT_ENVIRONMENTAL_DAMAGE
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_POWER_DRAIN
@ SPELL_EFFECT_KNOCK_BACK
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
@ SPELL_EFFECT_LEARN_SPELL
@ SPELL_EFFECT_CREATE_RANDOM_ITEM
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
@ SPELL_EFFECT_INTERRUPT_CAST
@ SPELL_EFFECT_APPLY_AREA_AURA_SUMMONS
@ SPELL_EFFECT_SKILL_STEP
@ SPELL_EFFECT_STEAL_BENEFICIAL_BUFF
@ SPELL_EFFECT_APPLY_AURA
@ SPELL_EFFECT_APPLY_AREA_AURA_OWNER
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_ATTR5_EXTRA_INITIAL_PERIOD
@ SPELL_ATTR5_ALLOW_WHILE_STUNNED
@ SPELL_ATTR5_NOT_ON_PLAYER_CONTROLLED_NPC
@ SPELL_ATTR5_ALLOW_WHILE_FLEEING
@ SPELL_ATTR5_NOT_ON_PLAYER
@ SPELL_ATTR5_ALLOW_WHILE_CONFUSED
@ TARGET_DEST_CASTER_RANDOM
@ TARGET_DEST_DEST_RANDOM
@ TARGET_DEST_TARGET_RANDOM
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_FROST
@ SPELL_ATTR2_AUTO_REPEAT
@ SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED_CASTER_FORM
@ SPELL_ATTR2_NO_INITIAL_THREAT
@ SPELL_ATTR2_CANNOT_CAST_ON_TAPPED
@ SPELL_ATTR2_ALLOW_LOW_LEVEL_BUFF
@ SPELL_ATTR2_ALLOW_DEAD_TARGET
@ SPELL_ATTR2_NO_SCHOOL_IMMUNITIES
@ SPELL_ATTR1_IS_SELF_CHANNELLED
@ SPELL_ATTR1_EXCLUDE_CASTER
@ SPELL_ATTR1_USE_ALL_MANA
@ SPELL_ATTR1_IS_CHANNELLED
@ SPELL_ATTR1_AURA_UNIQUE
@ SPELL_ATTR1_NO_AUTOCAST_AI
@ SPELL_ATTR1_IMMUNITY_PURGES_EFFECT
@ SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS
@ SPELL_ATTR1_ONLY_PEACEFUL_TARGETS
@ SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD
@ SPELL_ATTR3_ONLY_PROC_ON_CASTER
@ SPELL_ATTR3_ONLY_ON_GHOSTS
@ SPELL_ATTR3_NOT_ON_AOE_IMMUNE
@ SPELL_ATTR3_DOT_STACKING_RULE
@ SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON
@ SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON
@ SPELL_ATTR3_IGNORE_CASTER_MODIFIERS
@ SPELL_ATTR3_ONLY_ON_PLAYER
@ SPELL_DAMAGE_CLASS_RANGED
@ SPELL_DAMAGE_CLASS_MELEE
@ MECHANIC_INVULNERABILITY
@ SPELL_ATTR0_ON_NEXT_SWING
@ SPELL_ATTR0_NOT_SHAPESHIFTED
@ SPELL_ATTR0_AURA_IS_DEBUFF
@ SPELL_ATTR0_ALLOW_WHILE_MOUNTED
@ SPELL_ATTR0_COOLDOWN_ON_EVENT
@ SPELL_ATTR0_NO_IMMUNITIES
@ SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL
@ SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL
@ SPELL_ATTR0_USES_RANGED_SLOT
@ SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE
@ DIMINISHING_LEVEL_IMMUNE
@ DIMINISHING_LEVEL_TAUNT_IMMUNE
@ SPELL_ATTR12_USE_FLOAT_VALUES_FOR_SCALING_AMOUNTS
@ DIMINISHING_AOE_KNOCKBACK
@ DIMINISHING_INCAPACITATE
@ SPELL_FAILED_TARGET_NOT_PLAYER
@ SPELL_FAILED_TARGET_NO_POCKETS
@ SPELL_FAILED_INCORRECT_AREA
@ SPELL_FAILED_TARGET_IS_PLAYER
@ SPELL_FAILED_NOT_IN_BATTLEGROUND
@ SPELL_FAILED_TARGET_NOT_IN_INSTANCE
@ SPELL_FAILED_CANT_CAST_ON_TAPPED
@ SPELL_FAILED_TARGET_AURASTATE
@ SPELL_FAILED_NOT_IN_RAID_INSTANCE
@ SPELL_FAILED_TARGET_NOT_GROUNDED
@ SPELL_FAILED_BM_OR_INVISGOD
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_ONLY_SHAPESHIFT
@ SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED
@ SPELL_FAILED_TARGETS_DEAD
@ SPELL_FAILED_TARGET_NOT_GHOST
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED
@ SPELL_FAILED_NOT_SHAPESHIFT
@ SPELL_FAILED_TARGET_NO_WEAPONS
@ SPELL_FAILED_REQUIRES_AREA
@ SPELL_FAILED_TARGET_AFFECTING_COMBAT
@ AURA_STATE_DRUID_PERIODIC_HEAL
@ AURA_STATE_RAID_ENCOUNTER
@ AURA_STATE_ROGUE_POISONED
@ SPELLFAMILY_WARLOCK_PET
@ SPELLFAMILY_DEMON_HUNTER
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_ATTR13_DO_NOT_FAIL_IF_NO_TARGET
@ SPELL_ATTR4_ONLY_FLYING_AREAS
@ SPELL_ATTR4_NO_HARMFUL_THREAT
@ SPELL_ATTR4_AURA_IS_BUFF
@ SPELL_ATTR4_WEAPON_SPEED_COST_SCALING
@ SPELL_ATTR8_ENFORCE_IN_COMBAT_RESSURECTION_LIMIT
@ SPELL_ATTR8_USE_TARGETS_LEVEL_FOR_SPELL_SCALING
@ SPELL_ATTR8_ONLY_TARGET_IF_SAME_CREATOR
@ SPELL_ATTR8_ONLY_TARGET_OWN_SUMMONS
@ SPELL_ATTR8_NOT_IN_BATTLEGROUND
@ SPELL_ATTR8_REMOVE_OUTSIDE_DUNGEONS_AND_RAIDS
@ SPELL_ATTR8_ALLOW_TARGETS_HIDDEN_BY_SPAWN_TRACKING
@ SPELL_ATTR8_MASTERY_AFFECTS_POINTS
constexpr uint64 IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK((1<< MECHANIC_CHARM)|(1<< MECHANIC_DISORIENTED)|(1<< MECHANIC_FEAR)|(1<< MECHANIC_ROOT)|(1<< MECHANIC_SLEEP)|(1<< MECHANIC_SNARE)|(1<< MECHANIC_STUN)|(1<< MECHANIC_FREEZE)|(1<< MECHANIC_SILENCE)|(1<< MECHANIC_DISARM)|(1<< MECHANIC_KNOCKOUT)|(1<< MECHANIC_POLYMORPH)|(1<< MECHANIC_BANISH)|(1<< MECHANIC_SHACKLE)|(1<< MECHANIC_TURN)|(1<< MECHANIC_HORROR)|(1<< MECHANIC_DAZE)|(1<< MECHANIC_SAPPED))
@ SPELL_ATTR6_ALLOW_WHILE_RIDING_VEHICLE
@ SPELL_ATTR6_DO_NOT_CHAIN_TO_CROWD_CONTROLLED_TARGETS
@ SPELL_ATTR6_IGNORE_PHASE_SHIFT
@ SPELL_ATTR6_NOT_IN_RAID_INSTANCES
@ SPELL_AURA_PREVENT_RESURRECTION
@ SPELL_AURA_MOD_RECOVERY_RATE_BY_SPELL_LABEL
@ SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS
@ SPELL_AURA_MOD_MAX_HEALTH
@ SPELL_AURA_MOD_CHARGE_RECOVERY_BY_TYPE_MASK
@ SPELL_AURA_DISPEL_IMMUNITY
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_ATTACKSPEED
@ SPELL_AURA_MOD_ATTACK_POWER
@ SPELL_AURA_CHANNEL_DEATH_ITEM
@ SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE
@ SPELL_AURA_MOD_DISARM_RANGED
@ SPELL_AURA_PERIODIC_WEAPON_PERCENT_DAMAGE
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_CASTING_SPEED
@ SPELL_AURA_TRACK_RESOURCES
@ SPELL_AURA_MOD_PARRY_PERCENT
@ SPELL_AURA_MOD_MAX_POWER
@ SPELL_AURA_MOD_MELEE_RANGED_HASTE_NO_REGEN
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_MOD_SPELL_HIT_CHANCE
@ SPELL_AURA_DAMAGE_SHIELD
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_PERIODIC_HEALTH_FUNNEL
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_PERIODIC_MANA_LEECH
@ SPELL_AURA_MOD_POSSESS_PET
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_MOD_MELEE_SLOW_NO_STACK
@ SPELL_AURA_MOD_RESISTANCE
@ SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_MOD_BONUS_ARMOR
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_INCREASE_HEALTH
@ SPELL_AURA_MOD_POWER_REGEN
@ SPELL_AURA_MOD_HEALING_DONE_PERCENT
@ SPELL_AURA_PREVENT_INTERRUPT
@ SPELL_AURA_PREVENTS_FLEEING
@ SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS
@ SPELL_AURA_OBS_MOD_POWER
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE
@ SPELL_AURA_TRACK_STEALTHED
@ SPELL_AURA_MOD_RANGED_SLOW_NO_STACK
@ SPELL_AURA_MOD_MELEE_HASTE
@ SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_MOD_MELEE_RANGED_CASTING_SLOW_NO_STACK
@ SPELL_AURA_MOD_INCREASE_ENERGY
@ SPELL_AURA_SCHOOL_HEAL_ABSORB
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
@ SPELL_AURA_MOD_HIT_CHANCE
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_MOD_HEALTH_REGEN_PERCENT
@ SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_MOD_INCREASE_HEALTH_2
@ SPELL_AURA_MOD_DODGE_PERCENT
@ SPELL_AURA_MOD_INCREASE_SWIM_SPEED
@ SPELL_AURA_MOD_CASTING_SLOW_NO_STACK
@ SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT
@ SPELL_AURA_MOD_DISARM_OFFHAND
@ SPELL_AURA_ADD_TARGET_TRIGGER
@ SPELL_AURA_ALLOW_INTERRUPT_SPELL
@ SPELL_AURA_MOD_HEALING_DONE
@ SPELL_AURA_MOD_RANGED_ATTACK_POWER
@ SPELL_AURA_MOD_HEALING_PCT
@ SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE
@ SPELL_AURA_ALLOW_MOUNT_IN_COMBAT
@ SPELL_AURA_MOD_RANGED_HASTE
@ SPELL_AURA_SCHOOL_IMMUNITY
@ SPELL_AURA_MOD_MELEE_HASTE_NO_REGEN
@ SPELL_AURA_MOD_RANGED_HASTE_NO_REGEN
@ SPELL_AURA_MOUNT_RESTRICTIONS
@ SPELL_AURA_MOD_POWER_COST_SCHOOL
@ SPELL_AURA_MECHANIC_IMMUNITY
@ SPELL_AURA_MOD_ATTACKER_RANGED_HIT_CHANCE
@ SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN
@ SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT
@ SPELL_AURA_MOD_DAMAGE_TAKEN
@ SPELL_AURA_MOD_CRIT_PCT
@ SPELL_AURA_MOD_SPELL_DAMAGE_FROM_CASTER
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_MOD_COOLDOWN
@ SPELL_AURA_MOD_TARGET_RESISTANCE
@ SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS
@ SPELL_AURA_MOD_SPEED_ALWAYS
@ SPELL_AURA_EFFECT_IMMUNITY
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_MOD_RESISTANCE_PCT
@ SPELL_AURA_PERIODIC_ENERGIZE
@ SPELL_AURA_MOD_BASE_RESISTANCE
@ SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
@ SPELL_AURA_MOD_DAMAGE_DONE_CREATURE
@ SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL
@ SPELL_AURA_MOD_ADDITIONAL_POWER_COST
@ SPELL_AURA_PERIODIC_LEECH
@ SPELL_AURA_MOD_LANGUAGE
@ SPELL_AURA_IGNORE_SPELL_CREATURE_TYPE_REQUIREMENTS
@ SPELL_AURA_PROC_TRIGGER_DAMAGE
@ SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE
@ SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT
@ SPELL_AURA_DAMAGE_IMMUNITY
@ SPELL_AURA_MOD_PERCENT_STAT
@ SPELL_AURA_MOD_DAMAGE_DONE
@ SPELL_AURA_TRACK_CREATURES
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
@ SPELL_AURA_STATE_IMMUNITY
@ SPELL_AURA_MOD_UNATTACKABLE
@ SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL
@ SPELL_AURA_MOD_SPELL_SLOW_NO_STACK
@ SPELL_AURA_MOD_DETECT_RANGE
@ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
@ SPELL_AURA_MOD_MELEE_RANGED_HASTE
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_ATTACK_POWER_PCT
@ SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED
@ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
@ SPELL_AURA_MECHANIC_IMMUNITY_MASK
@ SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE
@ SPELL_AURA_SET_VEHICLE_ID
@ DamageCancelsPlayerOnly
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TARGET_FLAG_CORPSE_ALLY
@ TARGET_FLAG_UNIT_MINIPET
@ TARGET_FLAG_UNIT_PASSENGER
@ TARGET_FLAG_GAMEOBJECT_ITEM
@ TARGET_FLAG_DEST_LOCATION
@ TARGET_FLAG_SOURCE_LOCATION
@ TARGET_FLAG_CORPSE_ENEMY
@ TARGET_FLAG_CORPSE_MASK
@ TARGET_FLAG_GAMEOBJECT_MASK
bool _isPositiveTarget(SpellEffectInfo const &effect)
bool _isPositiveEffectImpl(SpellInfo const *spellInfo, SpellEffectInfo const &effect, std::unordered_set< std::pair< SpellInfo const *, SpellEffIndex > > &visited)
float CalcPPMHasteMod(SpellProcsPerMinuteModEntry const *mod, Unit *caster)
float CalcPPMCritMod(SpellProcsPerMinuteModEntry const *mod, Unit *caster)
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
float CalcPPMItemLevelMod(SpellProcsPerMinuteModEntry const *mod, int32 itemLevel)
@ TARGET_CHECK_RAID_CLASS
SpellEffectImplicitTargetTypes
@ EFFECT_IMPLICIT_TARGET_CASTER
@ EFFECT_IMPLICIT_TARGET_NONE
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
SpellTargetSelectionCategories
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_DEFAULT
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_NYI
@ TARGET_SELECT_CATEGORY_LINE
@ TARGET_SELECT_CATEGORY_TRAJ
@ TARGET_SELECT_CATEGORY_CHANNEL
SpellTargetDirectionTypes
@ TARGET_OBJECT_TYPE_UNIT
@ TARGET_OBJECT_TYPE_ITEM
@ TARGET_OBJECT_TYPE_CORPSE
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
@ TARGET_OBJECT_TYPE_NONE
@ TARGET_OBJECT_TYPE_DEST
@ TARGET_OBJECT_TYPE_GOBJ
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
@ SPELL_ATTR0_CU_CAN_TARGET_ANY_PRIVATE_OBJECT
@ SPELL_ATTR0_CU_ALLOW_INFLIGHT_TARGET
@ SPELL_ATTR0_CU_PICKPOCKET
@ SPELL_SPECIFIC_MAGE_ARMOR
@ SPELL_SPECIFIC_MAGE_ARCANE_BRILLANCE
@ SPELL_SPECIFIC_PRIEST_DIVINE_SPIRIT
@ SPELL_SPECIFIC_ELEMENTAL_SHIELD
@ SPELL_SPECIFIC_PRESENCE
@ SPELL_SPECIFIC_WARRIOR_ENRAGE
@ SPELL_SPECIFIC_WARLOCK_ARMOR
@ SPELL_SPECIFIC_MAGE_POLYMORPH
@ SPELL_SPECIFIC_FOOD_AND_DRINK
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
SpellTargetReferenceTypes
@ TARGET_REFERENCE_TYPE_SRC
@ TARGET_REFERENCE_TYPE_TARGET
@ TARGET_REFERENCE_TYPE_LAST
@ TARGET_REFERENCE_TYPE_NONE
@ TARGET_REFERENCE_TYPE_CASTER
@ TARGET_REFERENCE_TYPE_DEST
bool IsPrimaryProfessionSkill(uint32 skill)
bool IsProfessionSkill(uint32 skill)
std::pair< SpellAreaMap::const_iterator, SpellAreaMap::const_iterator > SpellAreaMapBounds
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
@ UNIT_FLAG_PET_IN_COMBAT
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
T CalculatePct(T base, U pct)
SpellInfo const * GetSpellInfo() const
SpellEffectInfo const & GetSpellEffectInfo() const
bool IsAffectingSpell(SpellInfo const *spell) const
int32 GetMiscValue() const
SpellInfo const * GetSpellInfo() const
ObjectGuid const & GetGUID() const
BattlegroundStatus GetStatus() const
static bool IsUnitMeetingCondition(Unit const *unit, Unit const *otherUnit, UnitConditionEntry const *condition)
static bool IsPlayerMeetingCondition(Player const *player, uint32 conditionId)
CreatureDifficulty const * GetCreatureDifficulty() const
static bool IsInArea(uint32 objectAreaId, uint32 areaId)
constexpr bool HasFlag(T flag) const
bool IsFitToSpellRequirements(SpellInfo const *spellInfo) const
bool HaveLootFor(uint32 loot_id) const
bool IsBattlegroundOrArena() const
InstanceMap * ToInstanceMap()
UF::UpdateField< UF::ActivePlayerData, int32(WowCS::EntityFragment::CGObject), TYPEID_ACTIVE_PLAYER > m_activePlayerData
bool InBattleground() const
Battleground * GetBattleground() const
bool IsGameMaster() const
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
bool IsUseEquipedWeapon(bool mainhand) const
static std::array< StaticData, TOTAL_SPELL_EFFECTS > _data
bool IsUnitOwnedAuraEffect() const
float CalcDamageMultiplier(WorldObject *caster, Spell *spell=nullptr) const
bool HasRadius(SpellTargetIndex targetIndex) const
SpellEffectValue CalcValue(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
float CalcValueMultiplier(WorldObject *caster, Spell *spell=nullptr) const
struct SpellEffectInfo::ScalingInfo Scaling
uint32 GetPeriodicTickCount() const
ImmunityInfo const * GetImmunityInfo() const
uint32 GetMissingTargetMask(bool srcSet=false, bool dstSet=false, uint32 mask=0) const
std::unique_ptr< ImmunityInfo > _immunityInfo
bool IsAreaAuraEffect() const
SpellInfo const * _spellInfo
SpellRadiusEntry const * TargetBRadiusEntry
std::shared_ptr< std::vector< Condition > > ImplicitTargetConditions
bool IsTargetingArea() const
SpellRadiusEntry const * TargetARadiusEntry
SpellEffectImplicitTargetTypes GetImplicitTargetType() const
float BonusCoefficientFromAP
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
static constexpr SpellEffectValue MaxValue
SpellRange CalcRadius(WorldObject const *caster=nullptr, SpellTargetIndex targetIndex=SpellTargetIndex::TargetA, Spell *spell=nullptr) const
ExpectedStatType GetScalingExpectedStat() const
SpellTargetObjectTypes GetUsedTargetObjectType() const
SpellEffectValue CalcBaseValue(WorldObject const *caster, Unit const *target, uint32 itemId, int32 itemLevel) const
static constexpr SpellEffectValue MinValue
EnumFlag< SpellEffectAttributes > EffectAttributes
SpellEffIndex EffectIndex
uint32 GetProvidedTargetMask() const
SpellImplicitTargetInfo TargetA
SpellImplicitTargetInfo TargetB
SpellTargetDirectionTypes GetDirectionType() const
SpellTargetCheckTypes GetCheckType() const
static std::array< StaticData, TOTAL_SPELL_TARGETS > _data
SpellTargetReferenceTypes GetReferenceType() const
SpellTargetSelectionCategories GetSelectionCategory() const
SpellImplicitTargetInfo()
SpellTargetObjectTypes GetObjectType() const
float CalcDirectionAngle() const
uint32 GetExplicitTargetMask(bool &srcSet, bool &dstSet) const
Targets GetTarget() const
std::array< SpellPowerEntry const *, MAX_POWERS_PER_SPELL > PowerCosts
bool IsExplicitDiscovery() const
DiminishingLevels GetDiminishingReturnsMaxLevel() const
uint32 RequiresSpellFocus
void _LoadSpellDiminishInfo()
uint32 ActiveIconFileDataId
uint32 GetSpellXSpellVisualId(WorldObject const *caster=nullptr, WorldObject const *viewer=nullptr) const
bool IsRankOf(SpellInfo const *spellInfo) const
std::array< int32, MAX_SPELL_REAGENTS > Reagent
uint64 GetEffectMechanicMask(SpellEffIndex effIndex) const
uint32 ExcludeTargetAuraSpell
bool CanDispelAura(SpellInfo const *auraSpellInfo) const
bool IsAffected(uint32 familyName, flag128 const &familyFlags) const
SpellRange GetMinMaxRange(bool positive=false, WorldObject const *caster=nullptr, Spell *spell=nullptr) const
bool IsAutocastEnabledByDefault() const
bool MeetsFutureSpellPlayerCondition(Player const *player) const
Optional< SpellPowerCost > CalcPowerCost(Powers powerType, bool optionalCost, WorldObject const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
float GetMaxRange(bool positive=false, WorldObject const *caster=nullptr, Spell *spell=nullptr) const
Mechanics GetEffectMechanic(SpellEffIndex effIndex) const
SpellInfo const * GetFirstRankSpell() const
bool IsAutocastable() const
std::unordered_set< uint32 > Labels
uint32 GetCategory() const
SpellCastResult CheckShapeshift(uint32 form) const
float CalcProcPPM(Unit *caster, int32 itemLevel) const
uint64 GetAllEffectsMechanicMask() const
bool IsRequiringDeadTarget() const
uint64 GetMechanicImmunityMask(Unit const *caster) const
EnumFlag< SpellAuraInterruptFlags2 > AuraInterruptFlags2
std::vector< Milliseconds > EmpowerStageThresholds
std::array< int16, MAX_SPELL_REAGENTS > ReagentCount
bool IsAuraExclusiveBySpecificPerCasterWith(SpellInfo const *spellInfo) const
SpellInfo const * GetPrevRankSpell() const
int32 IsAffectedBySpellMod(SpellModifier const *mod) const
bool IsDeathPersistent() const
SpellVisualVector _visuals
bool IsCooldownStartedOnEvent() const
EnumFlag< SpellAuraInterruptFlags > ChannelInterruptFlags
::Difficulty const Difficulty
bool IsAuraExclusiveBySpecificWith(SpellInfo const *spellInfo) const
SpellRangeEntry const * RangeEntry
bool HasAnyAuraInterruptFlag() const
bool IsLootCrafting() const
bool IsUpdatingTemporaryAuraValuesBySpellMod() const
uint32 ShowFutureSpellPlayerConditionID
bool IsStackableOnOneSlotWithDifferentCasters() const
bool HasOnlyDamageEffects() const
uint32 GetDispelMask() const
bool IsHighRankOf(SpellInfo const *spellInfo) const
uint32 CalcCastTime(Spell *spell=nullptr) const
SpellInfo const * GetAuraRankForLevel(uint8 level) const
bool NeedsToBeTriggeredByCaster(SpellInfo const *triggeringSpell) const
SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const *player=nullptr) const
uint32 GetRecoveryTime() const
SpellSpecificType GetSpellSpecific() const
DiminishingReturnsType GetDiminishingReturnsGroupType() const
std::vector< SpellProcsPerMinuteModEntry const * > ProcPPMMods
uint64 GetAllowedMechanicMask() const
bool HasTargetType(::Targets target) const
uint32 ExcludeCasterAuraState
bool IsMultiSlotAura() const
void _UnloadImplicitTargetConditionLists()
float GetMinRange(bool positive=false) const
int32 GetMaxDuration() const
uint32 CooldownAuraSpellId
bool HasInitialAggro() const
std::vector< SpellEffectInfo > _effects
int32 GetDiminishingReturnsLimitDuration() const
struct SpellInfo::ScalingInfo Scaling
DiminishingGroup GetDiminishingReturnsGroupForSpell() const
bool IsAbilityOfSkillType(uint32 skillType) const
SpellCastResult CheckTarget(WorldObject const *caster, WorldObject const *target, bool implicit=true) const
bool CheckTargetCreatureType(Unit const *target) const
bool IsStackableWithRanks() const
bool IsItemFitToSpellRequirements(Item const *item) const
uint32 CategoryRecoveryTime
EnumFlag< SpellInterruptFlags > InterruptFlags
uint32 ExplicitTargetMask
bool IsAllowingDeadTarget() const
void _InitializeSpellPositivity()
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
bool CanSpellEffectProvideImmunityAgainstAuraEffect(SpellEffectInfo const &immunityEffectInfo, SpellInfo const *auraSpellInfo, SpellEffectInfo const &auraEffectInfo) const
bool IsPrimaryProfession() const
std::vector< SpellReagentsCurrencyEntry const * > ReagentsCurrency
void ApplyAllSpellImmunitiesTo(Unit *target, SpellEffectInfo const &spellEffectInfo, bool apply) const
AuraStateType GetAuraState() const
uint32 GetSpellVisual(WorldObject const *caster=nullptr, WorldObject const *viewer=nullptr) const
bool HasAttribute(SpellAttr0 attribute) const
SpellDurationEntry const * DurationEntry
bool IsNextMeleeSwingSpell() const
uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const
bool CanSpellProvideImmunityAgainstAura(SpellInfo const *auraSpellInfo) const
bool HasChannelInterruptFlag(SpellAuraInterruptFlags flag) const
uint32 RequiredExplicitTargetMask
bool IsPassiveStackableWithRanks() const
bool SpellCancelsAuraEffect(AuraEffect const *aurEff) const
bool IsCooldownStartedOnEventAfterCombat() const
uint32 MaxAffectedTargets
int32 GetDuration() const
bool IsAffectedBySpellMods() const
SpellCastResult CheckVehicle(Unit const *caster) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
std::vector< SpellEffectInfo > const & GetEffects() const
int32 EquippedItemSubClassMask
bool IsEmpowerSpell() const
SpellDiminishInfo _diminishInfo
SpellSpecificType _spellSpecific
SpellInfo(SpellNameEntry const *spellName, ::Difficulty difficulty, SpellInfoLoadHelper const &data)
uint32 GetExplicitTargetMask() const
SpellCastResult CheckExplicitTarget(WorldObject const *caster, WorldObject const *target, Item const *itemTarget=nullptr) const
bool HasAreaAuraEffect() const
bool CanPierceImmuneAura(SpellInfo const *auraSpellInfo) const
SpellChainNode const * ChainEntry
AuraType ExcludeTargetAuraType
void _InitializeExplicitTargetMask()
bool IsDifferentRankOf(SpellInfo const *spellInfo) const
LocalizedString const * SpellName
SpellInfo const * GetLastRankSpell() const
bool NeedsExplicitUnitTarget() const
SpellInfo const * GetNextRankSpell() const
SpellCastTimesEntry const * CastTimeEntry
int32 EquippedItemInventoryTypeMask
uint32 ExcludeTargetAuraState
std::bitset< MAX_SPELL_EFFECTS > NegativeEffects
EnumFlag< SpellAuraInterruptFlags2 > ChannelInterruptFlags2
bool IsPrimaryProfessionFirstRank() const
struct SpellInfo::@328 SqrtDamageAndHealingDiminishing
bool HasEffect(SpellEffects effect) const
AuraType ExcludeCasterAuraType
int32 CalcDuration(WorldObject const *caster=nullptr) const
bool IsAffectingArea() const
bool IsProfession() const
bool IsAutoRepeatRangedSpell() const
uint32 TargetCreatureType
bool IsMoveAllowedChannel() const
bool IsRangedWeaponSpell() const
EnumFlag< SpellAuraInterruptFlags > AuraInterruptFlags
uint32 ExcludeCasterAuraSpell
bool HasAura(AuraType aura) const
bool IsTargetingArea() const
uint32 StartRecoveryCategory
bool HasAuraInterruptFlag(SpellAuraInterruptFlags flag) const
bool HasLabel(uint32 labelId) const
bool CanBeInterrupted(WorldObject const *interruptCaster, Unit const *interruptTarget, bool ignoreImmunity=false) const
void _LoadSpellSpecific()
uint64 _allowedMechanicMask
bool IsPositiveEffect(uint8 effIndex) const
bool IsSingleTarget() const
void _LoadSqrtTargetLimit(int32 maxTargets, int32 numNonDiminishedTargets, Optional< uint32 > maxTargetsValueHolderSpell, Optional< SpellEffIndex > maxTargetsValueHolderEffect, Optional< uint32 > numNonDiminishedTargetsValueHolderSpell, Optional< SpellEffIndex > numNonDiminishedTargetsValueHolderEffect)
bool CanBeUsedInCombat(Unit const *caster) const
static CreatureImmunities const * GetCreatureImmunities(int32 creatureImmunitiesId)
static bool CanIncreaseRangeByMovement(Unit const *unit)
WorldObject * GetCaster() const
ObjectGuid GetSummonerGUID() const
Totem(SummonPropertiesEntry const *properties, Unit *owner)
auto find(Key const &value) const
std::pair< iterator, bool > insert(Key const &key)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
Vehicle * GetVehicle() const
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
uint32 GetClassMask() const
ShapeshiftForm GetShapeshiftForm() const
uint64 GetMechanicImmunityMask() const
bool HasUnitFlag(UnitFlags flags) const
uint32 GetBaseAttackTime(WeaponAttackType att) const
TempSummon * ToTempSummon()
uint32 GetVirtualItemId(uint32 slot) const
EnumFlag< SpellOtherImmunity > GetSpellOtherImmunityMask() const
uint64 GetMaxHealth() const
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
float GetTotalAuraModifier(AuraType auraType) const
bool HasAuraType(AuraType auraType) const
ObjectGuid GetCritterGUID() const
void RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const *source=nullptr)
void RemoveAppliedAuras(std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
int32 GetPower(Powers power) const
bool HasUnitState(const uint32 f) const
bool IsInRaidWith(Unit const *unit) const
bool HasUnitMovementFlag(MovementFlags f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void RemoveAurasWithMechanic(uint64 mechanicMaskToRemove, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint32 exceptSpellId=0, bool withEffectMechanics=false)
bool IsControlledByPlayer() const
bool HasBreakableByDamageCrowdControlAura(Unit const *excludeCasterChannel=nullptr) const
uint32 GetCreatureTypeMask() const
bool HasAuraTypeWithAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
uint32 GetCreateMana() const
MountCapabilityEntry const * GetMountCapability(uint32 mountType) const
bool IsInPartyWith(Unit const *unit) const
VehicleSeatEntry const * GetSeatForPassenger(Unit const *passenger) const
Returns information on the seat of specified passenger, represented by the format in VehicleSeat....
bool IsValidAttackTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
bool CanSeeOrDetect(WorldObject const *obj, CanSeeOrDetectExtraArgs const &args={ }) const
Player * GetSpellModOwner() const
bool IsValidAssistTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
SpellEffectValue ApplyEffectModifiers(SpellInfo const *spellInfo, uint8 effIndex, SpellEffectValue value) const
void ModSpellCastTime(SpellInfo const *spellInfo, int32 &castTime, Spell *spell=nullptr) const
Player * GetAffectingPlayer() const
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
std::vector< TraitDefinitionEffectPointsEntry const * > const * GetTraitDefinitionEffectPointModifiers(int32 traitDefinitionId)
auto SelectRandomWeightedContainerElement(C const &container, std::span< double > const &weights) -> decltype(std::ranges::begin(container))
constexpr decltype(auto) EnsureWritableVectorIndex(std::vector< T > &vec, typename std::vector< T >::size_type i)
bool IsBattleground() const
bool IsBattleArena() const
EnumFlag< SpellCategoryFlags > GetFlags() const
int32 DiminishDurationLimit
DiminishingReturnsType DiminishReturnType
DiminishingLevels DiminishMaxLevel
DiminishingGroup DiminishGroup
float ResourceCoefficient
std::array< int32, 2 > EffectMiscValue
float EffectChainAmplitude
float EffectBonusCoefficient
std::array< int16, 2 > ImplicitTarget
float EffectRealPointsPerLevel
std::array< uint32, 2 > EffectRadiusIndex
flag128 EffectSpellClassMask
SpellEffectAttributes GetEffectAttributes() const
float BonusCoefficientFromAP
float EffectPointsPerResource
uint32 ApplyHarmfulAuraImmuneMask
Trinity::Containers::FlatSet< SpellEffects > SpellEffectImmune
ImmunityInfo(ImmunityInfo &&) noexcept=delete
Trinity::Containers::FlatSet< AuraType > AuraTypeImmune
ImmunityInfo(ImmunityInfo const &)=delete
bool RemoveEffectsWithMechanic
uint64 MechanicImmuneMask
float ResourceCoefficient
SpellCastingRequirementsEntry const * CastingRequirements
SpellReagentsEntry const * Reagents
std::vector< SpellXSpellVisualEntry const * > Visuals
SpellTargetRestrictionsEntry const * TargetRestrictions
std::vector< SpellLabelEntry const * > Labels
SpellTotemsEntry const * Totems
SpellAuraRestrictionsEntry const * AuraRestrictions
SpellScalingEntry const * Scaling
std::vector< SpellEmpowerStageEntry const * > EmpowerStages
SpellInterruptsEntry const * Interrupts
SpellCategoriesEntry const * Categories
SpellMiscEntry const * Misc
std::array< SpellPowerEntry const *, MAX_POWERS_PER_SPELL > Powers
SpellEquippedItemsEntry const * EquippedItems
SpellShapeshiftEntry const * Shapeshift
SpellAuraOptionsEntry const * AuraOptions
std::array< SpellEffectEntry const *, MAX_SPELL_EFFECTS > Effects
SpellClassOptionsEntry const * ClassOptions
std::vector< SpellReagentsCurrencyEntry const * > ReagentsCurrency
SpellCooldownsEntry const * Cooldowns
SpellLevelsEntry const * Levels
int32 RequiredAuraSpellID
std::array< float, 2 > RangeMin
std::array< float, 2 > RangeMax
EnumFlag< SpellShapeshiftFormFlags > GetFlags() const
constexpr bool HasRace(uint32 raceId) const