39#include <G3D/g3dmath.h>
112 return static_cast<float>(
M_PI);
114 return static_cast<float>(-
M_PI/2);
116 return static_cast<float>(
M_PI/2);
118 return static_cast<float>(-
M_PI/4);
120 return static_cast<float>(-3*
M_PI/4);
122 return static_cast<float>(3*
M_PI/4);
124 return static_cast<float>(
M_PI/4);
458 return Effect == effectName;
500 double value = bp ? *bp : basePoints;
503 Unit const* casterUnit =
nullptr;
505 casterUnit = caster->
ToUnit();
510 double valueVariance =
frand(-delta, delta);
511 value += double(basePoints) * valueVariance;
514 *variance = valueVariance;
525 if (casterUnit && basePointsPerLevel != 0.0)
535 value += level * basePointsPerLevel;
545 value += comboDamage * comboPoints;
551 return int32(round(value));
561 else if (caster && caster->
IsUnit())
579 uint32 effectiveItemLevel = itemLevel != -1 ?
uint32(itemLevel) : 1u;
611 if (value > 0.0f && value < 1.0f)
614 return int32(round(value));
627 int32 expansion = -2;
629 expansion = contentTuning->ExpansionID;
634 else if (caster && caster->
IsUnit())
640 return int32(round(value));
657 return multiplierPercent / 100.0f;
697 else if (radius == 0.0f)
702 if (
Unit const* casterUnit = caster->
ToUnit())
705 radius = std::min(radius, entry->
RadiusMax);
742 bounds->first = std::max(bounds->first - 2.0f, 0.0f);
743 bounds->second += 2.0f;
777 return effImplicitTargetMask;
1240 for (
size_t i = 0; i <
_effects.size(); ++i)
1272 Speed = _misc->Speed;
1333 Dispel = _categories->DispelType;
1336 DmgClass = _categories->DefenseType;
1404 Stances =
MAKE_PAIR64(_shapeshift->ShapeshiftMask[0], _shapeshift->ShapeshiftMask[1]);
1412 Width = _target->Width;
1439 for (
size_t i = 0; i <
_effects.size(); ++i)
1461 if (eff.IsEffect(effect))
1470 if (effect.IsAura(aura))
1479 if (effect.IsAreaAuraEffect())
1489 if (effect.IsEffect())
1491 switch (effect.Effect)
1514 if (effect.TargetA.GetTarget() == target || effect.TargetB.GetTarget() == target)
1559 uint32 skill = effect.MiscValue;
1574 uint32 skill = effect.MiscValue;
1592 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1593 if (_spell_idx->second->SkillLine == skillType)
1612 if (effect.IsEffect() && effect.IsTargetingArea())
1648 mask |= effect.GetProvidedTargetMask();
1747 if (!effect.IsEffect())
1761 switch (effect.TargetA.GetCheckType())
1974 return spellSpec1 == spellSpec2;
2027 bool actAsShifted =
false;
2034 TC_LOG_ERROR(
"spells",
"GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
2064 for (
uint32 areaId : areaGroupMembers)
2087 mountFlags = areaTable->GetMountFlags();
2100 if (!mapEntry || mapEntry->
IsRaid())
2107 if (!mapEntry || !mapEntry->
IsDungeon())
2120 if (saBounds.first != saBounds.second)
2122 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
2124 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
2195 if (!effect.IsAura())
2198 switch (effect.ApplyAuraName)
2203 if (
uint32 mountType = spellShapeshiftForm->MountTypeID)
2210 uint32 mountType = effect.MiscValueB;
2212 mountType = mountEntry->MountTypeID;
2239 auto getCreatorOrSelf = [](
WorldObject const* obj)
2243 creator = obj->GetGUID();
2247 if (getCreatorOrSelf(caster) != getCreatorOrSelf(target))
2267 if (caster != unitTarget)
2274 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->
ToPlayer()))
2280 if (!targetCreature)
2383 if (
Unit const* unitCaster = caster->
ToUnit())
2385 if (!unitCaster->IsVehicle() && !(unitCaster->GetCharmerOrOwner() == target))
2415 if (instance->GetCombatResurrectionCharges() == 0 && instance->IsEncounterInProgress())
2432 if (
Unit const* unitTarget = target->
ToUnit())
2449 if (unitTarget->IsOnVehicle(unitCaster))
2472 if (shapeShiftFromEntry && (shapeShiftFromEntry->
Flags & 1) == 0)
2486 && (vehicleSeat->
Flags & checkMask) != checkMask)
2539 if (effect.IsEffect() && effect.Mechanic)
2540 mask |=
UI64LIT(1) << effect.Mechanic;
2564 if ((effectMask & (1 << effect.EffectIndex)) && effect.Mechanic)
2565 mask |=
UI64LIT(1) << effect.Mechanic;
2592 return uint32(1 << type);
2709 if (!effect.IsAura())
2711 switch (effect.ApplyAuraName)
2739 switch (firstRankSpellInfo->
Id)
2779 if (
Id == 603 ||
Id == 980 ||
Id == 80240)
2845 if (
Id == 48266 ||
Id == 48263 ||
Id == 48265)
2854 switch (effect.ApplyAuraName)
2914 else if (
Id == 47481)
2917 else if (
Id == 66689)
2920 else if (
Id == 64155)
2923 else if (
Id == 51750)
2926 else if (
Id == 48179)
3085 if (
Id == 200108 ||
Id == 212638)
3284 auto diminishingLimitDurationCompute = [
this]() ->
int32
3371 std::unique_ptr<SpellEffectInfo::ImmunityInfo> workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3375 uint32 schoolImmunityMask = 0;
3376 uint32 applyHarmfulAuraImmunityMask = 0;
3377 uint64 mechanicImmunityMask = 0;
3378 uint32 dispelImmunityMask = 0;
3379 uint32 damageImmunityMask = 0;
3380 uint8 otherImmunityMask = 0;
3382 int32 miscVal = effect.MiscValue;
3386 switch (effect.ApplyAuraName)
3392 schoolImmunityMask |= creatureImmunities->School.to_ulong();
3393 dispelImmunityMask |= creatureImmunities->DispelType.to_ulong();
3394 mechanicImmunityMask |= creatureImmunities->Mechanic.to_ullong();
3395 otherImmunityMask |= creatureImmunities->Other.AsUnderlyingType();
3398 for (
AuraType aura : creatureImmunities->Aura)
3430 mechanicImmunityMask |=
UI64LIT(1) << miscVal;
3447 schoolImmunityMask |=
uint32(miscVal);
3452 applyHarmfulAuraImmunityMask |=
uint32(miscVal);
3457 damageImmunityMask |=
uint32(miscVal);
3462 dispelImmunityMask = 1u << miscVal;
3488 effect._immunityInfo = std::move(workBuffer);
3489 workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3540 if (maxTargetsValueHolderEffect)
3542 SpellInfo const* maxTargetValueHolder =
this;
3543 if (maxTargetsValueHolderSpell)
3546 if (!maxTargetValueHolder)
3547 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} does not exist", maxTargetsValueHolderSpell);
3548 else if (maxTargetsValueHolderEffect >= maxTargetValueHolder->
GetEffects().size())
3549 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} does not have effect {}",
3555 if (maxTargets != expectedValue)
3556 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3557 maxTargetValueHolder->
Id,
AsUnderlyingType(*maxTargetsValueHolderEffect), maxTargets, expectedValue);
3561 if (numNonDiminishedTargetsValueHolderEffect)
3563 SpellInfo const* numNonDiminishedTargetsValueHolder =
this;
3564 if (numNonDiminishedTargetsValueHolderSpell)
3565 numNonDiminishedTargetsValueHolder =
sSpellMgr->GetSpellInfo(*numNonDiminishedTargetsValueHolderSpell,
Difficulty);
3567 if (!numNonDiminishedTargetsValueHolder)
3568 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} does not exist", maxTargetsValueHolderSpell);
3569 else if (numNonDiminishedTargetsValueHolderEffect >= numNonDiminishedTargetsValueHolder->
GetEffects().size())
3570 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} does not have effect {}",
3571 numNonDiminishedTargetsValueHolder->
Id,
AsUnderlyingType(*maxTargetsValueHolderEffect));
3574 SpellEffectInfo const& valueHolder = numNonDiminishedTargetsValueHolder->
GetEffect(*numNonDiminishedTargetsValueHolderEffect);
3576 if (numNonDiminishedTargets != expectedValue)
3577 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3578 numNonDiminishedTargetsValueHolder->
Id,
AsUnderlyingType(*numNonDiminishedTargetsValueHolderEffect), numNonDiminishedTargets, expectedValue);
3598 if (auraSpellInfo->
Id ==
Id)
3609 if (existingAuraCaster && existingAuraCaster->
IsFriendlyTo(target))
3623 if (mechanicImmunity & (
UI64LIT(1) << i))
3632 std::vector<Aura*> aurasToUpdateTargets;
3637 aurasToUpdateTargets.push_back(aura);
3643 for (
Aura* aura : aurasToUpdateTargets)
3644 aura->UpdateTargetMap(aura->GetCaster());
3652 if (dispelImmunity & (1 << i))
3661 if ((dispelMask & dispelImmunity) == dispelMask)
3701 if (!effectInfo.IsEffect())
3710 if ((auraSpellInfo->
SchoolMask & schoolImmunity) != 0)
3714 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellInfo->
Mechanic)) != 0)
3718 if (auraSpellInfo->
Dispel == dispelImmunity)
3721 bool immuneToAllEffects =
true;
3724 if (!auraSpellEffectInfo.IsAura())
3728 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellEffectInfo.Mechanic)) != 0)
3731 if (
AuraType auraName = auraSpellEffectInfo.ApplyAuraName)
3738 if ((auraSpellInfo->
GetSchoolMask() & applyHarmfulAuraImmunityMask) != 0)
3742 immuneToAllEffects =
false;
3745 if (immuneToAllEffects)
3761 if ((auraSpellInfo->
SchoolMask & schoolImmunity) != 0)
3765 if ((auraSpellInfo->
GetSchoolMask() & applyHarmfulAuraImmunityMask) != 0)
3771 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellInfo->
Mechanic)) != 0)
3773 if ((mechanicImmunity & (
UI64LIT(1) << auraEffectInfo.
Mechanic)) != 0)
3778 if (auraSpellInfo->
Dispel == dispelImmunity)
3814 uint64 mechanicImmunityMask = 0;
3825 return mechanicImmunityMask;
3887 return (castTime > 0) ?
uint32(castTime) : 0;
3899 switch (effect.ApplyAuraName)
3916 if (effect.ApplyAuraPeriod > 0 && DotDuration > 0)
3918 totalTicks =
static_cast<uint32>(DotDuration) / effect.ApplyAuraPeriod;
3946 return spellPowerEntry && spellPowerEntry->PowerType == powerType;
3951 return CalcPowerCost(*itr, optionalCost, caster, schoolMask, spell);
3978 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
3983 int32 powerCost = 0;
4003 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type POWER_ALTERNATE_POWER in spell {}",
Id);
4013 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
4035 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unsupported power type POWER_ALTERNATE_POWER in spell {} for optional cost percent",
Id);
4045 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {} for optional cost percent", power->
PowerType,
Id);
4058 bool initiallyNegative = powerCost < 0;
4065 speed = ss->CombatRoundTime;
4075 powerCost += speed / 100;
4085 if (!(aura->GetMiscValue() & schoolMask))
4088 if (!(aura->GetMiscValueB() & (1 << power->
PowerType)))
4091 powerCost += aura->GetAmount();
4098 if (!(schoolCostPct->GetMiscValue() & schoolMask))
4101 if (!(schoolCostPct->GetMiscValueB() & (1 << power->
PowerType)))
4104 powerCost +=
CalculatePct(powerCost, schoolCostPct->GetAmount());
4130 modOwner->ApplySpellMod(
this, *mod, powerCost, spell);
4135 float pctMod = 1.0f;
4136 modOwner->GetSpellModValues(
this, *mod, spell, powerCost, &flatMod, &pctMod);
4137 powerCost =
int32(powerCost * pctMod);
4148 if (spellScaler && casterScaler)
4149 powerCost *= casterScaler->
Scaler / spellScaler->
Scaler;
4154 powerCost = float(powerCost) * (1.0f + unitCaster->
m_unitData->ManaCostMultiplier);
4157 if (initiallyNegative != (powerCost < 0))
4165 std::vector<SpellPowerCost> costs;
4172 auto itr = std::find_if(costs.begin(), costs.end(), [powerType](
SpellPowerCost const& cost)
4174 return cost.Power == powerType;
4176 if (itr != costs.end())
4179 return costs.emplace_back<
SpellPowerCost>({ .Power = powerType, .Amount = 0 });
4188 getOrCreatePowerCost(cost->Power).
Amount += cost->Amount;
4192 SpellPowerCost& cost = getOrCreatePowerCost(optionalCost->Power);
4194 if (remainingPower > 0)
4195 cost.
Amount += std::min(optionalCost->Amount, remainingPower);
4206 float rangedHaste = caster->
m_unitData->ModRangedHaste;
4207 float spellHaste = caster->
m_unitData->ModSpellHaste;
4208 float regenHaste = caster->
m_unitData->ModHasteRegen;
4213 return (1.0f / haste - 1.0f) * mod->
Coeff;
4215 return (1.0f / rangedHaste - 1.0f) * mod->
Coeff;
4217 return (1.0f / spellHaste - 1.0f) * mod->
Coeff;
4219 return (1.0f / regenHaste - 1.0f) * mod->
Coeff;
4221 return (1.0f / std::min(std::min(std::min(haste, rangedHaste), spellHaste), regenHaste) - 1.0f) * mod->
Coeff;
4242 return crit * mod->
Coeff * 0.01f;
4244 return rangedCrit * mod->
Coeff * 0.01f;
4246 return spellCrit * mod->
Coeff * 0.01f;
4248 return std::min(std::min(crit, rangedCrit), spellCrit) * mod->
Coeff * 0.01f;
4258 if (itemLevel == mod->
Param)
4263 if (itemLevelPoints == basePoints)
4266 return ((itemLevelPoints / basePoints) - 1.0f) * mod->
Coeff;
4292 ppm *= 1.0f + mod->Coeff;
4299 ppm *= 1.0f + mod->Coeff;
4305 ppm *= 1.0f + mod->Coeff;
4316 ppm *= 1.0f + mod->Coeff;
4377 bool needRankSelection =
false;
4384 !effect.Scaling.Coefficient)
4386 needRankSelection =
true;
4392 if (!needRankSelection)
4395 for (
SpellInfo const* nextSpellInfo =
this; nextSpellInfo !=
nullptr; nextSpellInfo = nextSpellInfo->
GetPrevRankSpell())
4398 if (
uint32(level + 10) >= nextSpellInfo->SpellLevel)
4399 return nextSpellInfo;
4415 if (
Id == spellInfo->
Id)
4434 if (visual->CasterPlayerConditionID)
4455 return visual->SpellVisualID;
4463 bool srcSet =
false;
4464 bool dstSet =
false;
4468 if (!effect.IsEffect())
4472 targetMask |= effect.TargetA.GetExplicitTargetMask(srcSet, dstSet);
4473 targetMask |= effect.TargetB.GetExplicitTargetMask(srcSet, dstSet);
4480 uint32 effectTargetMask = effect.GetMissingTargetMask(srcSet, dstSet, targetMask);
4486 targetMask |= effectTargetMask;
4531 visited.insert({ spellInfo, effect.
EffectIndex });
4539 switch (spellInfo->
Id)
4563 switch (spellInfo->
Id)
4602 switch (otherEffect.Effect)
4610 if (otherEffect.EffectIndex != effect.
EffectIndex &&
4619 if (otherEffect.IsAura())
4621 switch (otherEffect.ApplyAuraName)
4744 if (bp < 0 || bpScalePerLevel < 0)
4788 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
4791 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
4794 if (!spellTriggeredEffect.IsEffect())
4937 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
4940 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
4943 if (!spellTriggeredEffect.IsEffect())
4970 switch (effect.ApplyAuraName)
4982 for (
size_t j = effect.EffectIndex + 1; j <
GetEffects().
size(); ++j)
4999 effect.ImplicitTargetConditions =
nullptr;
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
@ SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT
@ SPELL_PPM_MOD_ITEM_LEVEL
@ SPELL_PPM_MOD_BATTLEGROUND
TC_GAME_API 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)
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)
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
@ 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_COOLDOWN_IGNORES_RANGED_WEAPON
@ SPELL_ATTR9_NO_MOVEMENT_RADIUS_BONUS
@ SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA
@ SPELL_ATTR7_NO_UI_NOT_INTERRUPTIBLE
@ 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
@ 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
@ 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
@ 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
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_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_TRACK_RESOURCES
@ SPELL_AURA_MOD_PARRY_PERCENT
@ SPELL_AURA_MOD_MAX_POWER
@ 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_RESISTANCE
@ SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_MOD_BONUS_ARMOR
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_HASTE_SPELLS
@ 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_MELEE_HASTE
@ SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS
@ 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_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_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_CHARGE_COOLDOWN
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_MOD_COOLDOWN
@ SPELL_AURA_MOD_SPEED_SLOW_ALL
@ 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_DETECT_RANGE
@ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
@ SPELL_AURA_MOD_MELEE_RANGED_HASTE
@ SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK
@ 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_SET_VEHICLE_ID
@ DamageCancelsPlayerOnly
@ 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_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
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
@ MOVEMENTFLAG3_ADV_FLYING
@ 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
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()
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static Corpse * ToCorpse(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
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
int32 CalcValue(WorldObject const *caster=nullptr, int32 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
ImmunityInfo const * GetImmunityInfo() const
uint32 GetMissingTargetMask(bool srcSet=false, bool dstSet=false, uint32 mask=0) const
std::unique_ptr< ImmunityInfo > _immunityInfo
float CalcRadius(WorldObject *caster=nullptr, SpellTargetIndex targetIndex=SpellTargetIndex::TargetA, Spell *spell=nullptr) const
Optional< std::pair< float, float > > CalcRadiusBounds(WorldObject *caster, SpellTargetIndex targetIndex, Spell *spell) const
bool IsAreaAuraEffect() const
SpellInfo const * _spellInfo
int32 CalcBaseValue(WorldObject const *caster, Unit const *target, uint32 itemId, int32 itemLevel) const
SpellRadiusEntry const * TargetBRadiusEntry
std::shared_ptr< std::vector< Condition > > ImplicitTargetConditions
bool IsTargetingArea() const
SpellRadiusEntry const * TargetARadiusEntry
SpellEffectImplicitTargetTypes GetImplicitTargetType() const
float BonusCoefficientFromAP
ExpectedStatType GetScalingExpectedStat() const
SpellTargetObjectTypes GetUsedTargetObjectType() const
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
uint32 GetMaxTicks() 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
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
Mechanics GetEffectMechanic(SpellEffIndex effIndex) const
SpellInfo const * GetFirstRankSpell() const
bool IsAutocastable() const
float GetMaxRange(bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
bool HasEffect(SpellEffectName effect) 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
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
bool IsAffectedBySpellMod(SpellModifier const *mod) 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
struct SpellInfo::@327 SqrtDamageAndHealingDiminishing
bool CanSpellProvideImmunityAgainstAura(SpellInfo const *auraSpellInfo) const
bool HasChannelInterruptFlag(SpellAuraInterruptFlags flag) const
uint32 RequiredExplicitTargetMask
bool IsPassiveStackableWithRanks() const
bool SpellCancelsAuraEffect(AuraEffect const *aurEff) 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
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
uint64 GetRaceMask() 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 HasUnitMovementFlag(uint32 f) const
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
bool HasAuraType(AuraType auraType) const
ObjectGuid GetCritterGUID() const
int32 GetTotalAuraModifier(AuraType auraType) 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 HasExtraUnitMovementFlag2(uint32 f) const
bool HasUnitState(const uint32 f) const
bool IsInRaidWith(Unit const *unit) 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
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, bool implicitDetect=false, bool distanceCheck=false, bool checkAlert=false) const
Player * GetSpellModOwner() const
bool IsValidAssistTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
double ApplyEffectModifiers(SpellInfo const *spellInfo, uint8 effIndex, double value) const
void ModSpellCastTime(SpellInfo const *spellInfo, int32 &castTime, Spell *spell=nullptr) const
bool IsFriendlyTo(WorldObject const *target) const
Player * GetAffectingPlayer() const
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
constexpr decltype(auto) EnsureWritableVectorIndex(std::vector< T > &vec, typename std::vector< T >::size_type i)
constexpr std::size_t size()
bool IsBattleground() const
bool IsBattleArena() 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
ImmunityInfo(ImmunityInfo &&) noexcept=delete
Trinity::Containers::FlatSet< AuraType > AuraTypeImmune
ImmunityInfo(ImmunityInfo const &)=delete
uint64 MechanicImmuneMask
Trinity::Containers::FlatSet< SpellEffectName > SpellEffectImmune
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
uint32 ScalesFromItemLevel
int32 RequiredAuraSpellID
std::array< float, 2 > RangeMin
std::array< float, 2 > RangeMax
EnumFlag< SpellShapeshiftFormFlags > GetFlags() const