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)
705 radius = std::min(radius, entry->
RadiusMax);
740 return effImplicitTargetMask;
1177 for (
size_t i = 0; i <
_effects.size(); ++i)
1208 Speed = _misc->Speed;
1269 Dispel = _categories->DispelType;
1272 DmgClass = _categories->DefenseType;
1337 Stances =
MAKE_PAIR64(_shapeshift->ShapeshiftMask[0], _shapeshift->ShapeshiftMask[1]);
1345 Width = _target->Width;
1372 for (
size_t i = 0; i <
_effects.size(); ++i)
1394 if (eff.IsEffect(effect))
1403 if (effect.IsAura(aura))
1412 if (effect.IsAreaAuraEffect())
1422 if (effect.IsEffect())
1424 switch (effect.Effect)
1447 if (effect.TargetA.GetTarget() == target || effect.TargetB.GetTarget() == target)
1492 uint32 skill = effect.MiscValue;
1507 uint32 skill = effect.MiscValue;
1525 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
1526 if (_spell_idx->second->SkillLine ==
int32(skillType))
1545 if (effect.IsEffect() && effect.IsTargetingArea())
1581 mask |= effect.GetProvidedTargetMask();
1675 if (!effect.IsEffect())
1689 switch (effect.TargetA.GetCheckType())
1911 return spellSpec1 == spellSpec2;
1965 bool actAsShifted =
false;
1972 TC_LOG_ERROR(
"spells",
"GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
2002 for (
uint32 areaId : areaGroupMembers)
2025 mountFlags = areaTable->GetMountFlags();
2032 uint32 mapToCheck = map_id;
2034 mapToCheck = mapEntry->CosmeticParentMapID;
2036 if ((mapToCheck == 1116 || mapToCheck == 1464) && !player->
HasSpell(191645))
2038 else if (mapToCheck == 1220 && !player->
HasSpell(233368))
2040 else if ((mapToCheck == 1642 || mapToCheck == 1643) && !player->
HasSpell(278833))
2049 if (!mapEntry || mapEntry->
IsRaid())
2056 if (!mapEntry || !mapEntry->
IsDungeon())
2069 if (saBounds.first != saBounds.second)
2071 for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
2073 if (itr->second.IsFitToRequirements(player, zone_id, area_id))
2144 if (!effect.IsAura())
2147 switch (effect.ApplyAuraName)
2152 if (
uint32 mountType = spellShapeshiftForm->MountTypeID)
2159 uint32 mountType = effect.MiscValueB;
2161 mountType = mountEntry->MountTypeID;
2188 auto getCreatorOrSelf = [](
WorldObject const* obj)
2192 creator = obj->GetGUID();
2196 if (getCreatorOrSelf(caster) != getCreatorOrSelf(target))
2216 if (caster != unitTarget)
2223 if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->
ToPlayer()))
2229 if (!targetCreature)
2327 if (
Unit const* unitCaster = caster->
ToUnit())
2329 if (!unitCaster->IsVehicle() && !(unitCaster->GetCharmerOrOwner() == target))
2353 if (instance->GetCombatResurrectionCharges() == 0 && instance->IsEncounterInProgress())
2370 if (
Unit const* unitTarget = target->
ToUnit())
2387 if (unitTarget->IsOnVehicle(unitCaster))
2410 if (shapeShiftFromEntry && (shapeShiftFromEntry->
Flags & 1) == 0)
2424 && (vehicleSeat->
Flags & checkMask) != checkMask)
2477 if (effect.IsEffect() && effect.Mechanic)
2478 mask |=
UI64LIT(1) << effect.Mechanic;
2502 if ((effectMask & (1 << effect.EffectIndex)) && effect.Mechanic)
2503 mask |=
UI64LIT(1) << effect.Mechanic;
2530 return uint32(1 << type);
2644 if (!effect.IsAura())
2646 switch (effect.ApplyAuraName)
2674 switch (firstRankSpellInfo->
Id)
2714 if (
Id == 603 ||
Id == 980 ||
Id == 80240)
2784 if (
Id == 48266 ||
Id == 48263 ||
Id == 48265)
2793 switch (effect.ApplyAuraName)
2853 else if (
Id == 47481)
2856 else if (
Id == 66689)
2859 else if (
Id == 64155)
2862 else if (
Id == 51750)
2865 else if (
Id == 48179)
3024 if (
Id == 200108 ||
Id == 212638)
3223 auto diminishingLimitDurationCompute = [
this]() ->
int32
3310 std::unique_ptr<SpellEffectInfo::ImmunityInfo> workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3314 uint32 schoolImmunityMask = 0;
3315 uint32 applyHarmfulAuraImmunityMask = 0;
3316 uint64 mechanicImmunityMask = 0;
3317 uint32 dispelImmunityMask = 0;
3318 uint32 damageImmunityMask = 0;
3319 uint8 otherImmunityMask = 0;
3321 int32 miscVal = effect.MiscValue;
3325 switch (effect.ApplyAuraName)
3331 schoolImmunityMask |= creatureImmunities->School.to_ulong();
3332 dispelImmunityMask |= creatureImmunities->DispelType.to_ulong();
3333 mechanicImmunityMask |= creatureImmunities->Mechanic.to_ullong();
3334 otherImmunityMask |= creatureImmunities->Other.AsUnderlyingType();
3337 for (
AuraType aura : creatureImmunities->Aura)
3369 mechanicImmunityMask |=
UI64LIT(1) << miscVal;
3386 schoolImmunityMask |=
uint32(miscVal);
3391 applyHarmfulAuraImmunityMask |=
uint32(miscVal);
3396 damageImmunityMask |=
uint32(miscVal);
3401 dispelImmunityMask = 1u << miscVal;
3427 effect._immunityInfo = std::move(workBuffer);
3428 workBuffer = std::make_unique<SpellEffectInfo::ImmunityInfo>();
3478 if (maxTargetsEffectValueHolder)
3484 if (maxTargets != expectedValue)
3485 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3489 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(maxTargets): Spell {} does not have effect {}",
Id,
AsUnderlyingType(*maxTargetsEffectValueHolder));
3492 if (numNonDiminishedTargetsEffectValueHolder)
3494 if (numNonDiminishedTargetsEffectValueHolder <
GetEffects().
size())
3498 if (numNonDiminishedTargets != expectedValue)
3499 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} has different value in effect {} than expected, recheck target caps (expected {}, got {})",
3500 Id,
AsUnderlyingType(*numNonDiminishedTargetsEffectValueHolder), numNonDiminishedTargets, expectedValue);
3503 TC_LOG_ERROR(
"spells",
"SpellInfo::_LoadSqrtTargetLimit(numNonDiminishedTargets): Spell {} does not have effect {}",
Id,
AsUnderlyingType(*numNonDiminishedTargetsEffectValueHolder));
3522 return ((auraSpellInfo->
GetSchoolMask() & schoolImmunity) != 0 &&
3526 auraSpellInfo->
Id !=
Id);
3537 if (mechanicImmunity & (
UI64LIT(1) << i))
3546 std::vector<Aura*> aurasToUpdateTargets;
3551 aurasToUpdateTargets.push_back(aura);
3557 for (
Aura* aura : aurasToUpdateTargets)
3558 aura->UpdateTargetMap(aura->GetCaster());
3566 if (dispelImmunity & (1 << i))
3575 if ((dispelMask & dispelImmunity) == dispelMask)
3616 if (!effectInfo.IsEffect())
3626 if ((auraSpellInfo->
SchoolMask & schoolImmunity) != 0)
3631 if ((mechanicImmunity & (
UI64LIT(1) << auraSpellInfo->
Mechanic)) != 0)
3635 if (auraSpellInfo->
Dispel == dispelImmunity)
3638 bool immuneToAllEffects =
true;
3641 if (!auraSpellEffectInfo.IsEffect())
3647 immuneToAllEffects =
false;
3651 if (
uint32 mechanic = auraSpellEffectInfo.Mechanic)
3655 immuneToAllEffects =
false;
3662 if (
AuraType auraName = auraSpellEffectInfo.ApplyAuraName)
3664 bool isImmuneToAuraEffectApply =
false;
3667 isImmuneToAuraEffectApply =
true;
3672 if ((auraSpellInfo->
GetSchoolMask() & applyHarmfulAuraImmunityMask) != 0)
3673 isImmuneToAuraEffectApply =
true;
3676 if (!isImmuneToAuraEffectApply)
3678 immuneToAllEffects =
false;
3685 if (immuneToAllEffects)
3706 uint32 const miscValue =
static_cast<uint32>(effect.MiscValue);
3707 switch (effect.ApplyAuraName)
3747 uint64 mechanicImmunityMask = 0;
3758 return mechanicImmunityMask;
3820 return (castTime > 0) ?
uint32(castTime) : 0;
3832 switch (effect.ApplyAuraName)
3849 if (effect.ApplyAuraPeriod > 0 && DotDuration > 0)
3851 totalTicks =
static_cast<uint32>(DotDuration) / effect.ApplyAuraPeriod;
3879 return spellPowerEntry && spellPowerEntry->PowerType == powerType;
3884 return CalcPowerCost(*itr, optionalCost, caster, schoolMask, spell);
3911 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
3916 int32 powerCost = 0;
3936 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type POWER_ALTERNATE_POWER in spell {}",
Id);
3946 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {}", power->
PowerType,
Id);
3968 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unsupported power type POWER_ALTERNATE_POWER in spell {} for optional cost percent",
Id);
3978 TC_LOG_ERROR(
"spells",
"SpellInfo::CalcPowerCost: Unknown power type '{}' in spell {} for optional cost percent", power->
PowerType,
Id);
3991 bool initiallyNegative = powerCost < 0;
3998 speed = ss->CombatRoundTime;
4008 powerCost += speed / 100;
4018 if (!(aura->GetMiscValue() & schoolMask))
4021 if (!(aura->GetMiscValueB() & (1 << power->
PowerType)))
4024 powerCost += aura->GetAmount();
4031 if (!(schoolCostPct->GetMiscValue() & schoolMask))
4034 if (!(schoolCostPct->GetMiscValueB() & (1 << power->
PowerType)))
4037 powerCost +=
CalculatePct(powerCost, schoolCostPct->GetAmount());
4063 modOwner->ApplySpellMod(
this, *mod, powerCost, spell);
4068 float pctMod = 1.0f;
4069 modOwner->GetSpellModValues(
this, *mod, spell, powerCost, &flatMod, &pctMod);
4070 powerCost =
int32(powerCost * pctMod);
4081 if (spellScaler && casterScaler)
4082 powerCost *= casterScaler->
Scaler / spellScaler->
Scaler;
4087 powerCost = float(powerCost) * (1.0f + unitCaster->
m_unitData->ManaCostMultiplier);
4090 if (initiallyNegative != (powerCost < 0))
4098 std::vector<SpellPowerCost> costs;
4105 auto itr = std::find_if(costs.begin(), costs.end(), [powerType](
SpellPowerCost const& cost)
4107 return cost.Power == powerType;
4109 if (itr != costs.end())
4112 return costs.emplace_back<
SpellPowerCost>({ .Power = powerType, .Amount = 0 });
4121 getOrCreatePowerCost(cost->Power).
Amount += cost->Amount;
4125 SpellPowerCost& cost = getOrCreatePowerCost(optionalCost->Power);
4127 if (remainingPower > 0)
4128 cost.
Amount += std::min(optionalCost->Amount, remainingPower);
4139 float rangedHaste = caster->
m_unitData->ModRangedHaste;
4140 float spellHaste = caster->
m_unitData->ModSpellHaste;
4141 float regenHaste = caster->
m_unitData->ModHasteRegen;
4146 return (1.0f / haste - 1.0f) * mod->
Coeff;
4148 return (1.0f / rangedHaste - 1.0f) * mod->
Coeff;
4150 return (1.0f / spellHaste - 1.0f) * mod->
Coeff;
4152 return (1.0f / regenHaste - 1.0f) * mod->
Coeff;
4154 return (1.0f / std::min(std::min(std::min(haste, rangedHaste), spellHaste), regenHaste) - 1.0f) * mod->
Coeff;
4175 return crit * mod->
Coeff * 0.01f;
4177 return rangedCrit * mod->
Coeff * 0.01f;
4179 return spellCrit * mod->
Coeff * 0.01f;
4181 return std::min(std::min(crit, rangedCrit), spellCrit) * mod->
Coeff * 0.01f;
4191 if (itemLevel == mod->
Param)
4196 if (itemLevelPoints == basePoints)
4199 return ((itemLevelPoints / basePoints) - 1.0f) * mod->
Coeff;
4225 ppm *= 1.0f + mod->Coeff;
4232 ppm *= 1.0f + mod->Coeff;
4238 ppm *= 1.0f + mod->Coeff;
4249 ppm *= 1.0f + mod->Coeff;
4310 bool needRankSelection =
false;
4317 !effect.Scaling.Coefficient)
4319 needRankSelection =
true;
4325 if (!needRankSelection)
4328 for (
SpellInfo const* nextSpellInfo =
this; nextSpellInfo !=
nullptr; nextSpellInfo = nextSpellInfo->
GetPrevRankSpell())
4331 if (
uint32(level + 10) >= nextSpellInfo->SpellLevel)
4332 return nextSpellInfo;
4348 if (
Id == spellInfo->
Id)
4388 return visual->SpellVisualID;
4396 bool srcSet =
false;
4397 bool dstSet =
false;
4402 if (!effect.IsEffect())
4405 targetMask |= effect.TargetA.GetExplicitTargetMask(srcSet, dstSet);
4406 targetMask |= effect.TargetB.GetExplicitTargetMask(srcSet, dstSet);
4413 uint32 effectTargetMask = effect.GetMissingTargetMask(srcSet, dstSet, targetMask);
4419 targetMask |= effectTargetMask;
4457 visited.insert({ spellInfo, effect.
EffectIndex });
4465 switch (spellInfo->
Id)
4489 switch (spellInfo->
Id)
4528 switch (otherEffect.Effect)
4536 if (otherEffect.EffectIndex != effect.
EffectIndex &&
4545 if (otherEffect.IsAura())
4547 switch (otherEffect.ApplyAuraName)
4670 if (bp < 0 || bpScalePerLevel < 0)
4714 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
4717 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
4720 if (!spellTriggeredEffect.IsEffect())
4863 for (
SpellEffectInfo const& spellTriggeredEffect : spellTriggeredProto->GetEffects())
4866 if (visited.count({ spellTriggeredProto, spellTriggeredEffect.EffectIndex }) > 0)
4869 if (!spellTriggeredEffect.IsEffect())
4896 switch (effect.ApplyAuraName)
4908 for (
size_t j = effect.EffectIndex + 1; j <
GetEffects().
size(); ++j)
4925 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< PlayerConditionEntry > sPlayerConditionStore("PlayerCondition.db2", &PlayerConditionLoadInfo::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
@ 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__,...)
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_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_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_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_WARLOCK_CORRUPTION
@ 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
@ UNIT_FLAG_PET_IN_COMBAT
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
T CalculatePct(T base, U pct)
SpellInfo const * GetSpellInfo() const
AuraType GetAuraType() const
SpellEffectInfo const & GetSpellEffectInfo() const
bool IsAffectingSpell(SpellInfo const *spell) const
int32 GetMiscValue() const
SpellInfo const * GetSpellInfo() const
BattlegroundStatus GetStatus() const
static bool IsPlayerMeetingCondition(Player const *player, PlayerConditionEntry const *condition)
static bool IsUnitMeetingCondition(Unit const *unit, Unit const *otherUnit, UnitConditionEntry const *condition)
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)
bool InBattleground() const
Battleground * GetBattleground() const
bool IsGameMaster() const
UF::UpdateField< UF::ActivePlayerData, 0, TYPEID_ACTIVE_PLAYER > m_activePlayerData
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
bool IsUseEquipedWeapon(bool mainhand) const
bool HasSpell(uint32 spell) const override
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
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
float CalcRadius(WorldObject *caster=nullptr, SpellTargetIndex targetIndex=SpellTargetIndex::TargetA, Spell *=nullptr) const
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
struct SpellInfo::@337 SqrtDamageAndHealingDiminishing
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 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::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
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 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
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
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 _LoadSqrtTargetLimit(int32 maxTargets, int32 numNonDiminishedTargets, Optional< SpellEffIndex > maxTargetsEffectValueHolder, Optional< SpellEffIndex > numNonDiminishedTargetsEffectValueHolder)
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
bool CanBeUsedInCombat(Unit const *caster) const
static CreatureImmunities const * GetCreatureImmunities(int32 creatureImmunitiesId)
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
UF::UpdateField< UF::UnitData, 0, TYPEID_UNIT > m_unitData
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 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)
int32 GetPower(Powers power) 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
Player * GetAffectingPlayer() const
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
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
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