53#include <G3D/g3dmath.h>
742_amount(), _periodicTimer(0), _period(0), _ticksDone(0),
743m_canBeRecalculated(true), m_isPeriodic(false)
757template <
typename Container>
762 for (
auto appIter = targetMap.begin(); appIter != targetMap.end(); ++appIter)
765 targetContainer.push_back(appIter->second->GetTarget());
769template <
typename Container>
773 for (
auto appIter = targetMap.begin(); appIter != targetMap.end(); ++appIter)
776 applicationContainer.push_back(appIter->second);
804 if (!caster || !unitOwner)
817 mountType = mountEntry->MountTypeID;
820 amount = mountCapability->ID;
837 amount = std::accumulate(std::begin(periodicAuras), std::end(periodicAuras), amount, [&](
SpellEffectValue val,
AuraEffect const* aurEff)
865 amount = std::round(amount);
889 return caster->
SpellDamageBonusDone(target, spellInfo, amount,
DOT, spellEffectInfo, stackAmountForBonuses,
nullptr, aurEff);
891 return caster->
SpellHealingBonusDone(target, spellInfo, amount,
DOT, spellEffectInfo, stackAmountForBonuses,
nullptr, aurEff);
911 if (maxDuration <= 0)
932 float totalTicks = float(maxDuration) / period;
936 return totalTicks *
CalculateEstimatedAmount(caster, target, spellInfo, spellEffectInfo, amount, stack,
nullptr).value_or(amount);
955 if (resetPeriodicTimer)
1070 bool isValid =
true;
1097 uint8 handleMask = 0;
1100 if (onStackOrReapply)
1106 std::vector<AuraApplication*> effectApplications;
1111 aurApp->GetTarget()->_RegisterAuraEffect(
this,
false);
1129 aurApp->GetTarget()->_RegisterAuraEffect(
this,
true);
1158 bool prevented =
false;
1198 if (
GetBase()->IsUsingCharges())
1233 Aura* aura = aurApp->GetBase();
1240 if (recalculateEffectIndex)
1243 if (aurEff != triggeredBy)
1244 aurEff->RecalculateAmount(triggeredBy);
1248 if (aurEff != triggeredBy)
1249 aurEff->RecalculateAmount(triggeredBy);
1272 std::vector<AuraApplication*> effectApplications;
1317 if (channelGuid != caster->
GetGUID())
1384 if (!damageInfo || !damageInfo->
GetDamage())
1445 if (lastExtraAttackSpell == triggerSpellId)
1546 else if (target->
HasAura(126745))
1571 target->
CastSpell(target, spellId,
this);
1574 target->
CastSpell(target, spellId2,
this);
1577 target->
CastSpell(target, spellId3,
this);
1580 target->
CastSpell(target, spellId4,
this);
1587 for (
auto itr = sp_list.begin(); itr != sp_list.end(); ++itr)
1592 if (itr->first == spellId || itr->first == spellId2 || itr->first == spellId3 || itr->first == spellId4)
1600 target->
CastSpell(target, itr->first,
this);
1628 for (
auto itr = tAuras.begin(); itr != tAuras.end();)
1634 if (itr->second->GetBase()->IsRemovedOnShapeLost(target) && !(itr->second->GetBase()->GetSpellInfo()->Stances & newStance))
1833 for (Unit::AuraEffectList::const_iterator i = amoreAuras.begin(); i != amoreAuras.end(); ++i)
1995 if (prevForm != form)
2001 if (!transformSpellInfo || !
GetSpellInfo()->IsPositive())
2032 target->
CastSpell(target, 37316, dummy);
2037 target->
CastSpell(target, 37325, dummy);
2050 playerTarget->InitDataForForm();
2059 aurEff->RecalculateAmount();
2249 TC_LOG_ERROR(
"spells.aura.effect",
"Auras: unknown creature id = {} (only need its modelid) From Spell Aura Transform in Spell ID = {}",
GetMiscValue(),
GetId());
2300 sObjectMgr->GetCreatureModelRandomGender(&model, ci);
2327 if (!caster || caster == target)
2355 auto isAffectedByFeignDeath = [](
Unit const* attacker)
2361 std::vector<Unit*> targets;
2365 for (
Unit* unit : targets)
2370 if (!isAffectedByFeignDeath(unit))
2374 if (
Spell* currentSpell = unit->GetCurrentSpell(i))
2375 if (currentSpell->m_targets.GetUnitTargetGUID() == target->
GetGUID())
2376 unit->InterruptSpell(i,
false);
2380 if (isAffectedByFeignDeath(ref->GetOwner()))
2381 ref->ScaleThreat(0.0f);
2387 targetPlayer->SendAttackSwingCancelAttack();
2390 target->
CombatStop(
false,
false, isAffectedByFeignDeath);
2417 creature->InitializeReactState();
2444 targetPlayer->SendAttackSwingCancelAttack();
2460 bool(*flagChangeFunc)(
Unit* u) =
nullptr;
2496 if (!flagChangeFunc(target))
2526 if (spell->m_spellInfo->PreventionType & preventionType)
2547 int32 silencedSchoolMask = 0;
2549 silencedSchoolMask |= auraEffect->GetMiscValue();
2552 silencedSchoolMask |= auraEffect->GetMiscValue();
2778 std::copy_if(mountDisplays->begin(), mountDisplays->end(), std::back_inserter(usableDisplays), [target](
MountXDisplayEntry const* mountDisplay)
2780 if (Player* playerTarget = target->ToPlayer())
2781 return ConditionMgr::IsPlayerMeetingCondition(playerTarget, mountDisplay->PlayerConditionID);
2786 if (!usableDisplays.empty())
2799 [&](
int32 equipmentSpell) {
return playerTarget->HasSpell(equipmentSpell); },
2802 playerTarget->CastSpell(playerTarget, mountEquipmentItr->BuffSpell,
this);
2809 vehicleId = creatureInfo->VehicleId;
2814 sObjectMgr->GetCreatureModelRandomGender(&model, creatureInfo);
2824 target->
Mount(displayId, vehicleId, creatureEntry);
2833 target->
CastSpell(target, mountCapability->ModSpellAuraID,
this);
3096 if (caster && caster->
IsAlive())
3372 if (!caster || caster == target)
3389 if (
GetId() == 53111)
3807 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
3838 TC_LOG_ERROR(
"spells.aura.effect",
"WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
3916 player->UpdateHealingDonePercentMod();
3928 bool zeroHealth = !target->
IsAlive();
3934 zeroHealth = (target->
GetHealth() == 0);
4015 TC_LOG_ERROR(
"spells",
"WARNING: Misc Value for SPELL_AURA_MOD_STAT_BONUS_PCT not valid");
4057 target->UpdateHealingDonePercentMod();
4058 target->UpdateVersatilityDamageDone();
4205 change = (oldPower + change) - target->
GetPower(powerType);
4350 change = (oldPower + change) - target->
GetPower(powerType);
4377 target->
CastSpell(target, triggerSpell,
this);
4516 for (
AuraEffect const* aurEff : castingSpeedNotStack)
4518 if (aurEff !=
this && aurEff->GetAmount() >= 1000)
4533 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
4553 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
4598 if (std::abs(spellGroupVal) >= std::abs(
GetAmount()))
4867 pet->UpdateAttackPowerAndDamage();
4890 thisPlayer->SetModDamageDonePercent(i, amount);
4986 for (Unit::AuraEffectList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
4987 mask |= (*i)->GetSpellEffectInfo().SpellClassMask;
5121 if (
GetId() == 61777)
5148 if (apply && caster)
5168 if (apply && caster)
5188 target->
SetEntry(apply ? 17654 : 17326);
5205 case 57819: FactionID = 1106;
break;
5206 case 57820: FactionID = 1098;
break;
5207 case 57821: FactionID = 1090;
break;
5208 case 57822: FactionID = 1091;
break;
5312 uint32 noSpaceForCount = 0;
5319 count -= noSpaceForCount;
5326 plCaster->
SendNewItem(newitem, count,
true,
true);
5465 if (!triggeredSpellInfo)
5480 caster->
CastSpell(target, triggeredSpellId, args);
5485 target->
RemoveAura(triggeredSpellId, casterGUID);
5492 if (
Aura* triggeredAura = target->
GetAura(triggeredSpellId, casterGUID))
5515 if (powerAmountPct < effectAmount)
5519 if (powerAmountPct > effectAmount)
5526 target->
CastSpell(target, triggerSpell,
this);
5543 if (powerAmount < effectAmount)
5547 if (powerAmount > effectAmount)
5554 target->
CastSpell(target, triggerSpell,
this);
5622 if (
uint32 spellId = overrideSpells->Spells[i])
5630 if (
uint32 spellId = overrideSpells->Spells[i])
5672 if (
uint32 originalVehicleId = creature->GetCreatureTemplate()->VehicleId)
5673 creature->CreateVehicleKit(originalVehicleId, creature->GetEntry());
5721 if (triggerSpellId == 0)
5723 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5729 if (
Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(
m_spellInfo) ? caster : target)
5733 .TriggeringAura =
this
5735 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} Trigger {}",
GetId(), triggeredSpellInfo->Id);
5739 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5745 if (triggerSpellId == 0)
5747 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
5753 if (
Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(
m_spellInfo) ? caster : target)
5757 for (std::size_t i = 0; i < triggeredSpellInfo->GetEffects().size(); ++i)
5759 triggerCaster->CastSpell(target, triggerSpellId, args);
5760 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} Trigger {}",
GetId(), triggeredSpellInfo->Id);
5764 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
5792 sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);
5849 damage = damageReducedArmor;
5869 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} attacked {} for {} dmg inflicted by {} absorb is {}",
5933 damage = damageReducedArmor;
5952 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} health leech of {} for {} dmg inflicted by {} abs is {}",
5981 if (!caster || !caster->
IsAlive())
6021 damage =
int32(damage * gainMultiplier);
6059 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} heal of {} for {} health inflicted by {}",
6082 if (
GetBase()->GetCastItemGUID().IsEmpty())
6106 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} power leech of {} for {} dmg inflicted by {}",
6115 int32 gainAmount =
int32(drainedAmount * gainMultiplier);
6116 int32 gainedAmount = 0;
6119 gainedAmount = caster->
ModifyPower(powerType, gainAmount);
6130 manaFeedVal = aurEff->GetAmount();
6132 if (manaFeedVal > 0)
6172 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} energize {} for {} dmg inflicted by {}",
6205 TC_LOG_DEBUG(
"spells.aura.effect",
"PeriodicTick: {} energize {} for {} dmg inflicted by {}",
6265 if (!caster || !
GetBase()->CanPeriodicTickCrit())
6273 return std::max(0.0f, critChance);
6280 if (damageLeft <= 0)
6291 triggerTarget = eventInfo.
GetActor();
6294 if (triggerSpellId == 0)
6296 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
6302 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell {} from aura {} proc", triggeredSpellInfo->Id,
GetId());
6308 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
6316 triggerTarget = eventInfo.
GetActor();
6319 if (triggerSpellId == 0)
6321 TC_LOG_WARN(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellAuraProc: Spell {} [EffectIndex: {}] does not have triggered spell.",
GetId(),
GetEffIndex());
6331 triggerCaster->
CastSpell(triggerTarget, triggerSpellId, args);
6332 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell {} with value {} from aura {} proc", triggeredSpellInfo->Id,
GetAmount(),
GetId());
6335 TC_LOG_ERROR(
"spells.aura.effect.nospell",
"AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Spell {} has non-existent spell {} in EffectTriggered[{}] and is therefore not triggered.",
GetId(), triggerSpellId,
GetEffIndex());
6353 TC_LOG_DEBUG(
"spells.aura.effect",
"AuraEffect::HandleProcTriggerDamageAuraProc: Triggering {} spell damage from aura {} proc", damage,
GetId());
6397 float amount = std::transform_reduce(gravityAuras.begin(), gravityAuras.end(), 1.0f, std::multiplies(),
6398 [](
AuraEffect const* aurEff) { return aurEff->GetAmount(); });
6423 float rate = 100.0f / (std::max<float>(
GetAmount(), -99.0f) + 100.0f);
6436 float rate = 100.0f / (std::max<float>(
GetAmount(), -99.0f) + 100.0f);
6450 float rate = 100.0f / (std::max<float>(
GetAmount(), -99.0f) + 100.0f);
6545 caster->RemoveAreaTrigger(
this);
6557 target->TogglePvpTalents(
true);
6559 target->TogglePvpTalents(
false);
6570 if (!triggerSpellInfo)
6578 target->
CastSpell(target, triggerSpellInfo->
Id, args);
6583 std::vector<uint32> summonedEntries;
6586 if (
uint32 summonEntry = spellEffect.MiscValue)
6587 summonedEntries.push_back(summonEntry);
6591 for (
uint32 summonEntry : summonedEntries)
6593 std::list<Creature*> nearbyEntries;
6595 for (
auto creature : nearbyEntries)
6597 if (creature->GetOwnerGUID() == target->
GetGUID())
6599 creature->DespawnOrUnsummon();
6604 if (tempSummon->GetSummonerGUID() == target->
GetGUID())
6606 tempSummon->DespawnOrUnsummon();
6668 droppedFlag->
SetOwnerGUID(gameObjectCaster->GetGUID());
6681 if (!battlegroundMap)
6700 TC_LOG_WARN(
"spell.auras",
"Unknown aura effect {} handled by HandleBattlegroundPlayerPosition.",
GetAuraType());
6761 int32 mountCapabilityFlags = 0;
6763 mountCapabilityFlags |= otherAura->GetMiscValue();
6774 std::vector<Aura*> suppressedAuras;
6776 if (appliedAura.second->GetSpellInfo()->HasLabel(
GetMiscValue()))
6777 suppressedAuras.push_back(appliedAura.second);
6780 for (
Aura* aura : suppressedAuras)
6781 aura->ApplyForTargets();
6797 if (!gameobjectTemplate)
6799 TC_LOG_WARN(
"spells.aura.effect",
"AuraEffect::HanldeAuraActAsControlZone: Spell {} [EffectIndex: {}] does not have an existing gameobject template.",
GetId(),
GetEffIndex());
6805 TC_LOG_WARN(
"spells.aura.effect",
"AuraEffect::HanldeAuraActAsControlZone: Spell {} [EffectIndex: {}] has a gameobject template ({}) that is not a control zone.",
GetId(),
GetEffIndex(), gameobjectTemplate->
entry);
6811 TC_LOG_WARN(
"spell.aura.effect",
"AuraEffect::HanldeAuraActAsControlZone: Spell {} [EffectIndex: {}] has a gameobject template ({}) that has a display id. Only invisible gameobjects are supported.",
GetId(),
GetEffIndex(), gameobjectTemplate->
entry);
@ PLAYER_POSITION_ICON_ALLIANCE_FLAG
@ PLAYER_POSITION_ICON_HORDE_FLAG
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
DB2Storage< OverrideSpellDataEntry > sOverrideSpellDataStore("OverrideSpellData.db2", &OverrideSpellDataLoadInfo::Instance)
DB2Storage< UnitPowerBarEntry > sUnitPowerBarStore("UnitPowerBar.db2", &UnitPowerBarLoadInfo::Instance)
DB2Storage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", &SpellShapeshiftFormLoadInfo::Instance)
DB2Storage< MountEquipmentEntry > sMountEquipmentStore("MountEquipment.db2", &MountEquipmentLoadInfo::Instance)
DB2Storage< ChrSpecializationEntry > sChrSpecializationStore("ChrSpecialization.db2", &ChrSpecializationLoadInfo::Instance)
DB2Storage< PowerDisplayEntry > sPowerDisplayStore("PowerDisplay.db2", &PowerDisplayLoadInfo::Instance)
DB2Storage< MountCapabilityEntry > sMountCapabilityStore("MountCapability.db2", &MountCapabilityLoadInfo::Instance)
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", &AreaTableLoadInfo::Instance)
#define MAX_SHAPESHIFT_SPELLS
#define MAX_OVERRIDE_SPELL
@ MountEquipmentEffectsSuppressed
std::chrono::seconds Seconds
Seconds shorthand typedef.
#define ASSERT_NOTNULL(pointer)
#define TC_LOG_DEBUG(filterType__, message__,...)
#define TC_LOG_ERROR(filterType__, message__,...)
#define TC_LOG_WARN(filterType__, message__,...)
@ GO_SUMMON_TIMED_DESPAWN
@ GO_SUMMON_TIMED_OR_CORPSE_DESPAWN
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ EQUIPMENT_SLOT_MAINHAND
std::vector< ItemPosCount > ItemPosCountVec
@ PLAYER_FIELD_BYTE2_STEALTH
@ PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW
std::unordered_map< uint32, PlayerSpell > PlayerSpellMap
constexpr uint8 INVENTORY_SLOT_BAG_0
@ PLAYER_LOCAL_FLAG_CAN_USE_OBJECTS_MOUNTED
@ PLAYER_LOCAL_FLAG_TRACK_STEALTHED
@ PLAYER_LOCAL_FLAG_RELEASE_TIMER
bool roll_chance(float chance, PseudoRandomDistributionState &state)
@ SERVERSIDE_VISIBILITY_GHOST
@ SPELL_ATTR10_ROLLING_PERIODIC
#define MAX_POWERS_PER_CLASS
@ SPELL_ATTR7_TREAT_AS_NPC_AOE
@ SPELL_EFFECT_ADD_EXTRA_ATTACKS
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
#define CLASSMASK_WAND_USERS
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_PREVENTION_TYPE_NO_ACTIONS
@ SPELL_PREVENTION_TYPE_PACIFY
@ GAMEOBJECT_TYPE_CONTROL_ZONE
@ GAMEOBJECT_TYPE_FLAGSTAND
@ GAMEOBJECT_TYPE_NEW_FLAG
@ SPELL_ATTR5_EXTRA_INITIAL_PERIOD
@ SPELL_ATTR5_TREAT_AS_AREA_EFFECT
@ SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_SPELL
@ SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE
@ SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL
@ SPELL_ATTR1_IMMUNITY_PURGES_EFFECT
@ UNIT_DYNFLAG_SPECIALINFO
@ UNIT_DYNFLAG_TRACK_UNIT
#define PET_SPEC_OVERRIDE_CLASS_INDEX
@ SPELL_ATTR0_DO_NOT_DISPLAY_SPELLBOOK_AURA_ICON_COMBAT_LOG
@ SPELL_FAILED_INTERRUPTED
@ AURA_STATE_ARENA_PREPARATION
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS
@ SPELL_ATTR4_NO_HELPFUL_THREAT
@ SPELL_ATTR8_AURA_POINTS_ON_CLIENT
@ SPELL_ATTR8_MELEE_HASTE_AFFECTS_PERIODIC
@ SPELL_ATTR8_TARGET_PROCS_ON_CASTER
AuraTriggerOnHealthChangeDirection
@ AURA_EFFECT_HANDLE_STAT
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ AURA_EFFECT_HANDLE_SKILL
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT
@ SPELL_AURA_MOD_SCHOOL_MASK_DAMAGE_FROM_CASTER
@ SPELL_AURA_MOD_ADV_FLYING_LIFT_COEF
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_DISARM_RANGED
@ SPELL_AURA_PERIODIC_WEAPON_PERCENT_DAMAGE
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_CASTING_SPEED
@ SPELL_AURA_MOD_ADV_FLYING_ADD_IMPULSE_MAX_SPEED
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_DAMAGE_SHIELD
@ SPELL_AURA_MOD_ADV_FLYING_MAX_VEL
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_PERIODIC_HEALTH_FUNNEL
@ SPELL_AURA_SHOW_CONFIRMATION_PROMPT_WITH_DIFFICULTY
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_PERIODIC_MANA_LEECH
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_NO_ACTIONS
@ SPELL_AURA_MOD_ADV_FLYING_PITCHING_RATE_DOWN
@ SPELL_AURA_OBS_MOD_POWER
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_MOD_STEALTH_DETECT
@ SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
@ SPELL_AURA_MOD_INVISIBILITY
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_DISABLE_GRAVITY
@ SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_MOD_STUN_DISABLE_GRAVITY
@ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT2
@ SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT
@ SPELL_AURA_MOD_DISARM_OFFHAND
@ SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_DETECT_AMORE
@ SPELL_AURA_SCHOOL_IMMUNITY
@ SPELL_AURA_MOD_POWER_COST_SCHOOL
@ SPELL_AURA_MECHANIC_IMMUNITY
@ SPELL_AURA_MOD_BASE_MANA_PCT
@ SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT
@ SPELL_AURA_MOD_SPELL_DAMAGE_FROM_CASTER
@ SPELL_AURA_MOD_OVERRIDE_ZONE_PVP_TYPE
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_MOD_ROOT_DISABLE_GRAVITY
@ SPELL_AURA_MOD_MAX_POWER_PCT
@ SPELL_AURA_MOD_VERSATILITY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_MOD_RESISTANCE_PCT
@ SPELL_AURA_BATTLEGROUND_PLAYER_POSITION_FACTIONAL
@ SPELL_AURA_PERIODIC_ENERGIZE
@ SPELL_AURA_MOD_INVISIBILITY_DETECT
@ SPELL_AURA_MOD_BASE_RESISTANCE_PCT
@ SPELL_AURA_MOD_ADV_FLYING_AIR_FRICTION
@ SPELL_AURA_MOD_ADV_FLYING_OVER_MAX_DECELERATION
@ SPELL_AURA_PERIODIC_LEECH
@ SPELL_AURA_PROC_TRIGGER_DAMAGE
@ SPELL_AURA_DAMAGE_IMMUNITY
@ SPELL_AURA_MOD_PERCENT_STAT
@ SPELL_AURA_MOD_ADV_FLYING_BANKING_RATE
@ SPELL_AURA_REFLECT_SPELLS_SCHOOL
@ SPELL_AURA_MOD_ADV_FLYING_PITCHING_RATE_UP
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_MECHANIC_RESISTANCE
@ SPELL_AURA_MOD_BASE_HEALTH_PCT
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL_FROM_CLIENT
@ SPELL_AURA_NO_REAGENT_USE
@ SPELL_AURA_MOD_UNATTACKABLE
@ SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL
@ SPELL_AURA_ALLOW_USING_GAMEOBJECTS_WHILE_MOUNTED
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_BATTLEGROUND_PLAYER_POSITION
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_SKILL_TALENT
@ SPELL_AURA_PHASE_ALWAYS_VISIBLE
@ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
@ SPELL_AURA_MOD_MELEE_RANGED_CASTING_HASTE
@ FORM_SPIRIT_OF_REDEMPTION
AuraTriggerOnPowerChangeDirection
NonDefaultConstructible< pAuraEffectHandler > AuraEffectHandler[TOTAL_AURAS]
static void InterruptSpellsWithPreventionTypeOnAuraApply(Unit *target, SpellPreventionType preventionType)
static void HandleAuraDisableGravity(Unit *target, bool apply)
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ TRIGGERED_IGNORE_POWER_COST
Will ignore power and reagent cost.
@ TRIGGERED_IGNORE_REAGENT_COST
Will ignore reagent cost.
@ SPELL_ATTR0_CU_CAN_CRIT
@ PROC_SPELL_TYPE_NO_DMG_HEAL
@ PROC_FLAG_TAKE_HARMFUL_PERIODIC
@ PROC_FLAG_TAKE_ANY_DAMAGE
@ TAKEN_HIT_PROC_FLAG_MASK
@ PROC_FLAG_DEAL_HARMFUL_PERIODIC
@ PROC_FLAG_DEAL_HELPFUL_PERIODIC
@ PROC_FLAG_TAKE_HELPFUL_PERIODIC
@ UNIT_FLAG2_MIRROR_IMAGE
@ UNIT_FLAG2_COMPREHEND_LANG
@ UNIT_FLAG2_FORCE_MOVEMENT
@ UNIT_FLAG2_ALLOW_CHANGING_TALENTS
@ UNIT_FLAG2_DISARM_OFFHAND
@ UNIT_FLAG2_DISARM_RANGED
@ ADV_FLYING_OVER_MAX_DECELERATION
@ ADV_FLYING_LIFT_COEFFICIENT
@ ADV_FLYING_ADD_IMPULSE_MAX_SPEED
@ ADV_FLYING_AIR_FRICTION
@ ADV_FLYING_PITCHING_RATE_DOWN
@ ADV_FLYING_PITCHING_RATE_UP
@ ADV_FLYING_BANKING_RATE
@ UNIT_FLAG3_ALTERNATIVE_DEFAULT_LANGUAGE
@ UNIT_VIS_FLAGS_UNTRACKABLE
@ UNIT_VIS_FLAGS_STEALTHED
@ UNIT_VIS_FLAGS_INVISIBLE
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NON_ATTACKABLE_2
@ UNIT_FLAG_PLAYER_CONTROLLED
ProcFlagsHit createProcHitMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
@ UNIT_MOD_RESISTANCE_START
#define MAX_COMBAT_RATING
#define CURRENT_MAX_SPELL
#define DISPLAYID_HIDDEN_MOUNT
#define SPELL_DH_DOUBLE_JUMP
float GetPctOf(T value, T max)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
T CalculatePct(T base, U pct)
static AreaTrigger * CreateAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Position const &pos, int32 duration, Unit *caster, Unit *target, SpellCastVisual spellVisual={ 0, 0 }, SpellInfo const *spellInfo=nullptr, Spell *spell=nullptr, AuraEffect const *aurEff=nullptr)
AuraRemoveMode GetRemoveMode() const
void HandleAuraModDecreaseSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRangedHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModBlockPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePreventFleeing(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModShapeshift(AuraApplication const *aurApp, uint8 mode, bool apply) const
void GetApplicationList(Container &applicationContainer) const
void ChangeAmount(SpellEffectValue newAmount, bool mark=true, bool onStackOrReapply=false, AuraEffect const *triggeredBy=nullptr)
void HandleModRecoveryRateBySpellLabel(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleEnableAltPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModArmorPctFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModStun(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModHealingDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDispelImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModChargeRecoveryRate(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicPowerBurnAuraTick(Unit *target, Unit *caster) const
void HandleModMovementForceMagnitude(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellInfo const * GetSpellInfo() const
AuraType GetAuraType() const
SpellEffIndex GetEffIndex() const
void HandleTriggerSpellOnExpire(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDamagePercentDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModEffectImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModThreat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraPvpTalents(AuraApplication const *auraApp, uint8 mode, bool apply) const
void HandleAuraEmpathy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleEffect(AuraApplication *aurApp, uint8 mode, bool apply, AuraEffect const *triggeredBy=nullptr)
void HandleAuraCloneCaster(AuraApplication const *aurApp, uint8 mode, bool apply) const
void Update(uint32 diff, Unit *caster)
void HandleAuraFeatherFall(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleOverrideAttackPowerBySpellPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicManaLeechAuraTick(Unit *target, Unit *caster) const
void HandleNULL(AuraApplication const *, uint8, bool) const
void HandleModMeleeRangedHasteNoRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellModifier * m_spellmod
void HandleModFear(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModFaction(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRangedAttackPowerPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeRangedCastingSlowNoStack(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellEffectInfo const & GetSpellEffectInfo() const
void HandleObsModPowerAuraTick(Unit *target, Unit *caster) const
void HandleAuraSetVehicle(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraActAsControlZone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRequiredMountCapabilityFlags(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRootAndDisableGravity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseHealthPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleDetectAmore(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicHealthFunnelAuraTick(Unit *target, Unit *caster) const
void HandleAuraPreventRegeneratePower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRangedAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRangedHasteNoRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPossessPet(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleForceReaction(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDodgePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicHealAurasTick(Unit *target, Unit *caster) const
void HandleModCastingSlowNoStack(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleSetVignette(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModBonusArmorPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDmgImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDamageDone(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModAttackPowerPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleSpiritOfRedemption(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModAdvFlying(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTaunt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModManaRegenPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseMountedSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseHealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void SetAmount(SpellEffectValue amount)
void HandleArenaPreparation(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSchoolImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleUnused(AuraApplication const *, uint8, bool) const
void HandlePeriodicEnergizeAuraTick(Unit *target, Unit *caster) const
void HandleSetCantSwim(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModInvisibilityDetect(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleLinkedSummon(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetAmountAsInt() const
void HandlePeriodicTriggerSpellAuraTick(Unit *target, Unit *caster) const
void HandleNoImmediateEffect(AuraApplication const *, uint8, bool) const
void HandleAuraModMinimumSpeedRate(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModWeaponCritPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModTotalThreat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRating(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraIncreaseBaseHealthPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleCosmeticMounted(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleMountRestrictions(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraMounted(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModNoActions(AuraApplication const *aurApp, uint8 mode, bool apply) const
uint32 GetRemainingTicks() const
void HandleConvertCritToParry(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraControlVehicle(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModBaseResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleShapeshiftBoosts(Unit *target, bool apply) const
void HandleModGravity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePreventResurrection(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMechanicImmunityMask(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleTriggerSpellOnPowerAmount(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRangedSlowNoStack(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraAllowFlight(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModPowerDisplay(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerCost(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSkill(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModFakeInebriation(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePlayScene(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicHealthLeechAuraTick(Unit *target, Unit *caster) const
void HandleModMeleeRangedHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModStunAndDisableGravity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModFixate(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModMaxPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRatingPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
Optional< SpellEffectValue > GetEstimatedAmount() const
bool IsAffectingSpell(SpellInfo const *spell) const
static Optional< SpellEffectValue > CalculateEstimatedAmount(Unit const *caster, Unit *target, SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, SpellEffectValue amount, uint8 stack, AuraEffect const *aurEff)
void HandleAuraGhost(AuraApplication const *aurApp, uint8 mode, bool apply) const
void ApplySpellMod(Unit *target, bool apply, AuraEffect const *triggeredBy=nullptr)
void HandleModPercentStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProcTriggerSpellWithValueAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleModOverrideZonePVPType(AuraApplication const *aurApp, uint8 mode, bool apply) const
void CalculatePeriodic(Unit *caster, bool resetPeriodicTimer=true, bool load=false)
Optional< SpellEffectValue > _estimatedAmount
void HandleAuraModStateImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetMiscValueB() const
void HandleAuraModExpertise(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraTransform(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModDisarm(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModOffhandDamagePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
static SpellEffectValue CalculateEstimatedfTotalPeriodicAmount(Unit const *caster, Unit *target, SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, SpellEffectValue amount, uint8 stack)
void HandleModSpellCategoryCooldown(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicDamageAurasTick(Unit *target, Unit *caster) const
void HandleAuraTrackStealthed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModUnattackable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModBonusArmor(AuraApplication const *aurApp, uint8 mode, bool apply) const
void SendTickImmune(Unit *target, Unit *caster) const
void HandleNoReagentUseAura(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleComprehendLanguage(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleOverrideSpellPowerByAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleOverridePetSpecs(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleCharmConvert(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModWaterBreathing(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseSwimSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModCastingSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseMaxHealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAllowUsingGameobjectsWhileMounted(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleLearnSpell(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStatBonusPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealthLevel(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTargetResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
int32 GetMiscValue() const
void GetTargetList(Container &targetContainer) const
void HandleModConfuse(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModTotalPercentStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellEffectInfo const & m_effectInfo
SpellEffectValue const m_baseAmount
void HandleDisableInertia(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealthDetect(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellCritChance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModHealingDonePct(AuraApplication const *aurApp, uint8 mode, bool apply) const
uint32 GetTotalTicks() const
void HandleShowConfirmationPrompt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModScale(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModOverridePowerDisplay(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseBaseManaPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleChannelDeathItem(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseEnergy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleTriggerSpellOnHealthPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRoot(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraAllowTalentSwapping(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModStalked(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraDummy(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleFeignDeath(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleBattlegroundPlayerPosition(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleSuppressItemPassiveEffectBySpellLabel(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleIgnoreMovementForces(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellEffectValue CalculateAmount(Unit *caster)
void HandleTriggerSpellOnPowerPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePhaseAlwaysVisible(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModRecoveryRate(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModParryPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProcTriggerDamageAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleModSpellDamagePercentFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModAdvFlyingSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleShieldBlockValue(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModCharm(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellInfo const *const m_spellInfo
void HandleAuraModAttackPower(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeSlowNoStack(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeRangedCastingHaste(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModSilence(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellSlowNoStack(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleForceBreathBar(AuraApplication const *aurApp, uint8 mode, bool apply) const
void ResetPeriodic(bool resetPeriodicTimer=false)
void HandleAuraModBaseResistancePCT(AuraApplication const *aurApp, uint8 mode, bool apply) const
SpellEffectValue GetAmount() const
void HandleShieldBlockValuePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleCreateAreaTrigger(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellHealingPercentFromStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModSpellHitChance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraCanTurnWhileFalling(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleBreakableCCAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
ObjectGuid GetCasterGUID() const
void HandleAuraModStat(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraDisableGravity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMeleeHasteNoRegen(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleForceMoveForward(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModRegenInterrupt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraUntrackable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModResistance(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModManaCostPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleWaterBreathing(AuraApplication const *aurApp, uint8 mode, bool apply) const
bool CheckEffectProc(AuraApplication *aurApp, ProcEventInfo &eventInfo) const
void HandleAuraModUseNormalSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
float GetCritChanceFor(Unit const *caster, Unit const *target) const
void HandleModResistancePercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModVersatilityByPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
float CalcPeriodicCritChance(Unit const *caster) const
void HandleAuraModPacifyAndSilence(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePhase(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModMechanicImmunity(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraOpenStable(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModStealth(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraForceWeather(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraHover(AuraApplication const *aurApp, uint8 mode, bool apply) const
AuraEffect(Aura *base, SpellEffectInfo const &spellEfffectInfo, SpellEffectValue const *baseAmount, Unit *caster)
void HandleSetFFAPvP(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleBindSight(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModMaxPowerPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseFlightSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModAlternativeDefaultLanguage(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPowerRegenPCT(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModAttackSpeed(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModPacify(AuraApplication const *aurApp, uint8 mode, bool apply) const
void PeriodicTick(AuraApplication *aurApp, Unit *caster) const
void HandleStoreTeleportReturnPoint(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraOverrideSpells(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraWaterWalk(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraTrackCreatures(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePeriodicTriggerSpellWithValueAuraTick(Unit *target, Unit *caster) const
void HandleAuraModCritPct(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraLinked(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleProcTriggerSpellAuraProc(AuraApplication *aurApp, ProcEventInfo &eventInfo)
void HandleMastery(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleAuraModIncreaseEnergyPercent(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModDetaunt(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandlePhaseGroup(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModInvisibility(AuraApplication const *aurApp, uint8 mode, bool apply) const
void HandleModPossess(AuraApplication const *aurApp, uint8 mode, bool apply) const
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
ObjectGuid GetCastId() const
int32 GetMaxDuration() const
ApplicationMap const & GetApplicationMap()
void SetStackAmount(uint8 num)
int32 GetCastItemLevel() const
void CallScriptEffectCalcSpellModHandlers(AuraEffect const *aurEff, SpellModifier *&spellMod)
Trinity::IteratorPair< DBStorageIterator< AuraEffect * > > GetAuraEffects()
AuraApplication const * GetApplicationOfTarget(ObjectGuid guid) const
bool CallScriptEffectRemoveHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
bool CallScriptEffectPeriodicHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp)
ObjectGuid GetCasterGUID() const
WorldObject * GetOwner() const
void CallScriptAfterEffectProcHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
int32 GetDuration() const
void CallScriptEffectCalcAmountHandlers(AuraEffect const *aurEff, SpellEffectValue &amount, bool &canBeRecalculated)
uint32 GetCastItemId() const
AuraEffect * GetEffect(uint32 index) const
void CallScriptAfterEffectApplyHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void SetCharges(uint8 charges)
bool CallScriptEffectApplyHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void CallScriptAfterEffectRemoveHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, AuraEffectHandleModes mode)
void SetNeedClientUpdateForTargets() const
int32 CalcMaxDuration() const
SpellInfo const *const m_spellInfo
AuraObjectType GetType() const
uint8 GetStackAmount() const
SpellInfo const * GetSpellInfo() const
bool CallScriptEffectProcHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
void CallScriptEffectCalcPeriodicHandlers(AuraEffect const *aurEff, bool &isPeriodic, int32 &litude)
static bool EffectTypeNeedsSendingAmount(AuraType type)
Difficulty GetCastDifficulty() const
bool CallScriptCheckEffectProcHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, ProcEventInfo &eventInfo)
void CallScriptEffectUpdatePeriodicHandlers(AuraEffect *aurEff)
std::unordered_map< ObjectGuid, AuraApplication * > ApplicationMap
ObjectGuid const & GetGUID() const
Battleground * GetBG() const
void RemovePlayerPosition(ObjectGuid guid)
void AddPlayerPosition(WorldPackets::Battleground::BattlegroundPlayerPosition const &position)
bool IsIgnoringFeignDeath() const
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool isTappedBy(Player const *player) const
uint8 GetCurrentEquipmentId() const
std::vector< MountXDisplayEntry const * > MountXDisplayContainer
ProcFlagsHit GetHitMask() const
constexpr bool HasFlag(T flag) const
bool HasFlag(FLAG_TYPE flag) const
void AddFlag(FLAG_TYPE flag)
void DelFlag(FLAG_TYPE flag)
void AddValue(FLAG_TYPE flag, T_VALUES value)
void SetValue(FLAG_TYPE flag, T_VALUES value)
uint32 GetEffectiveHeal() const
void SendZoneWeather(uint32 zoneId, Player *player) const
bool IsBattleground() const
BattlegroundMap * ToBattlegroundMap()
GameObject * GetGameObject(ObjectGuid const &guid)
Difficulty GetDifficultyID() const
bool Instanceable() const
float GetVisibilityRange() const
float GetFollowAngle() const override
void MoveFall(uint32 id=0, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveFollow(Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
static ObjectGuid const Empty
std::string ToString() const
static CreatureModel const * ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=nullptr)
void SetDynamicFlag(uint32 flag)
void RemoveDynamicFlag(uint32 flag)
void SetEntry(uint32 entry)
uint16 GetSpecialization() const
void SetSpecialization(uint16 spec)
void Remove(PetSaveMode mode, bool returnreagent=false)
static void AddPhase(WorldObject *object, uint32 phaseId, bool updateVisibility)
static void AddPhaseGroup(WorldObject *object, uint32 phaseGroupId, bool updateVisibility)
static void RemovePhaseGroup(WorldObject *object, uint32 phaseGroupId, bool updateVisibility)
static void RemovePhase(WorldObject *object, uint32 phaseId, bool updateVisibility)
static void SetAlwaysVisible(WorldObject *object, bool apply, bool updateVisibility)
void ApplyModOverrideSpellPowerByAPPercent(float mod, bool apply)
void UpdateParryPercentage()
void SendEquipError(InventoryResult msg, Item const *item1=nullptr, Item const *item2=nullptr, uint32 itemId=0) const
void ApplyModFakeDrunkValue(int32 mod, bool apply)
void RemoveSpellCategoryCooldownMod(int32 spellCategoryId, int32 mod)
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 itemId, bool update, ItemRandomBonusListId randomBonusListId=0, GuidSet const &allowedLooters=GuidSet(), ItemContext context=ItemContext::NONE, std::vector< int32 > const *bonusListIDs=nullptr, bool addToCollection=true)
void SetPlayerFlag(PlayerFlags flags)
void UpdateDodgePercentage()
void ApplyModTargetResistance(int32 mod, bool apply)
void SetPlayerLocalFlag(PlayerLocalFlags flags)
void RemovePlayerFlag(PlayerFlags flags)
void LeaveBattleground(bool teleportToEntryPoint=true, bool withoutDeserterDebuff=false)
void UpdateWeaponDependentAuras(WeaponAttackType attackType)
void ApplyRatingMod(CombatRating cr, int32 value, bool apply)
void SendDirectMessage(WorldPacket const *data) const
void UpdatePowerRegen(Powers power)
void AddTemporarySpell(uint32 spellId)
void ApplySpellMod(SpellInfo const *spellInfo, SpellModOp op, T &basevalue, Spell *spell=nullptr) const
void SetNoRegentCostMask(flag128 mask)
void UpdatePvPState(bool onlyFFA=false)
void UpdateBlockPercentage()
void _ApplyWeaponDamage(uint8 slot, Item *item, bool apply)
bool InBattleground() const
void UpdateArmor() override
void PetSpellInitialize()
void SetFallInformation(uint32 time, float z)
void RemovePlayerLocalFlag(PlayerLocalFlags flags)
void setRegenTimerCount(uint32 time)
void SetStableMaster(ObjectGuid stableMaster)
void RemoveTemporarySpell(uint32 spellId)
void ApplyItemDependentAuras(Item *item, bool apply)
void ReplaceAllRequiredMountCapabilityFlags(uint8 flags)
WorldSession * GetSession() const
void UpdateSpellHitChances()
void LearnSpell(uint32 spell_id, bool dependent, int32 fromSkill=0, bool suppressMessaging=false, Optional< PlayerSpellTrait > trait={})
Item * GetItemByPos(uint16 pos) const
void UpdateExpertise(WeaponAttackType attType)
void SetViewpoint(WorldObject *target, bool apply)
void SendNewItem(Item *item, uint32 quantity, bool pushed, bool created, bool broadcast=false, uint32 dungeonEncounterId=0)
PlayerSpellMap const & GetSpellMap() const
void AddSpellCategoryCooldownMod(int32 spellCategoryId, int32 mod)
void RemoveTrackCreatureFlag(uint32 flags)
void ApplyModOverrideAPBySpellPowerPercent(float mod, bool apply)
void ApplyModTargetPhysicalResistance(int32 mod, bool apply)
void SetBaseModPctValue(BaseModGroup modGroup, float val)
void UpdateAllWeaponDependentCritAuras()
void UpdateLiquidMirrorTimerValuesOnAura()
void SetChampioningFaction(uint32 faction)
void UpdateSpellDamageAndHealingBonus()
bool IsGameMaster() const
void SetOverrideZonePVPType(ZonePVPTypeOverride type)
void AddStoredAuraTeleportLocation(uint32 spellId)
void ModifySkillBonus(uint32 skillid, int32 val, bool talent)
static WeaponAttackType GetAttackBySlot(uint8 slot, InventoryType inventoryType)
void SendOnCancelExpectedVehicleRideAura() const
void ApplyBaseModPctValue(BaseModGroup modGroup, float pct)
void UpdateHostileAreaState(AreaTableEntry const *area)
void RemoveSpell(uint32 spell_id, bool disabled=false, bool learn_low_rank=true, bool suppressMessaging=false)
void SetTrackCreatureFlag(uint32 flags)
void SetOverrideSpellsId(int32 overrideSpellsId)
void UpdateRating(CombatRating cr)
ReputationRank GetReputationRank(uint32 faction_id) const
void RemovePetAura(PetAura const *petSpell)
bool isHonorOrXPTarget(Unit const *victim) const
void UpdateInvisibilityDrunkDetect()
Team GetEffectiveTeam() const
void AddSpellMod(SpellModifier *mod, bool apply)
void UpdateSpellCritChance()
void SetRequiredMountCapabilityFlag(uint8 flag)
void SendMovementSetCollisionHeight(float height, WorldPackets::Movement::UpdateCollisionHeightReason reason)
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
void UpdateAttackPowerAndDamage(bool ranged=false) override
ReputationMgr & GetReputationMgr()
void RemoveStoredAuraTeleportLocation(uint32 spellId)
void AddPetAura(PetAura const *petSpell)
Unit * GetActionTarget() const
Spell const * GetProcSpell() const
SpellInfo const * GetSpellInfo() const
ProcFlagsInit GetTypeMask() const
DamageInfo * GetDamageInfo() const
void ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply)
void CancelSceneBySceneId(uint32 sceneId)
Optional< uint32 > GetInstanceIdBySceneId(uint32 sceneId) const
void OnSceneComplete(uint32 sceneInstanceID)
uint32 PlayScene(uint32 sceneId, Position const *position=nullptr)
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
static constexpr SpellEffectValue MaxValue
static constexpr SpellEffectValue MinValue
EnumFlag< SpellEffectAttributes > EffectAttributes
void UpdateCooldownRecoveryRate(Predicate &&predicate, float modChange, bool apply)
void UpdateChargeRecoveryRate(uint32 chargeCategoryId, float modChange, bool apply)
bool IsAffected(uint32 familyName, flag128 const &familyFlags) const
uint64 GetAllEffectsMechanicMask() const
int32 IsAffectedBySpellMod(SpellModifier const *mod) const
::Difficulty const Difficulty
bool NeedsToBeTriggeredByCaster(SpellInfo const *triggeringSpell) const
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
void ApplyAllSpellImmunitiesTo(Unit *target, SpellEffectInfo const &spellEffectInfo, bool apply) const
bool HasAttribute(SpellAttr0 attribute) const
bool IsAffectedBySpellMods() const
std::vector< SpellEffectInfo > const & GetEffects() const
bool HasLabel(uint32 labelId) const
int32 GetCastTime() const
std::vector< SpellPowerCost > const & GetPowerCost() const
void EvaluateSuppressed(bool canExpire=false)
void ForwardThreatForAssistingMe(Unit *assistant, float baseAmount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false)
== AFFECT OTHERS' THREAT LISTS ==
void UpdateMySpellSchoolModifiers()
auto const & GetThreatenedByMeList() const
void FixateTarget(Unit *target)
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
void UpdateMyTempModifiers()
bool SetCanDoubleJump(bool enable)
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true)
float GetPctModifierValue(UnitMods unitMod, UnitModifierPctType modifierType) const
void ClearUnitState(uint32 f)
void SetFlightCapabilityID(int32 flightCapabilityId, bool clientUpdate)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
void SetOverrideDisplayPowerId(uint32 powerDisplayId)
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
int32 SpellDamageBonusDone(Unit *victim, SpellInfo const *spellProto, int32 pdamage, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, uint32 stack=1, Spell *spell=nullptr, AuraEffect const *aurEff=nullptr) const
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
int32 SpellAbsorbBonusTaken(Unit *caster, SpellInfo const *spellProto, int32 absorbamount) const
void RemoveGameObject(GameObject *gameObj, bool del)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
void SetSilencedSchoolMask(SpellSchoolMask schoolMask)
float GetHealthPct() const
float m_baseSpellCritChance
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool(*unitFilter)(Unit const *otherUnit)=nullptr)
int32 MeleeDamageBonusTaken(Unit *attacker, int32 pdamage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo const *spellProto=nullptr, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL)
virtual void RecalculateObjectScale()
void SetHealth(uint64 val)
void HandleAttackPowerModifier(AttackPowerModIndex index, AttackPowerModType modifierType, float amount, bool apply)
bool SetCanAdvFly(bool enable)
static uint32 SpellCriticalHealingBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
uint64 CountPctFromMaxHealth(float pct) const
int32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, int32 healamount, DamageEffectType damagetype) const
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
void RemoveAurasByShapeShift()
void SetUnitFlag3(UnitFlags3 flags)
void UpdateDamagePctDoneMods(WeaponAttackType attackType)
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void UpdateObjectVisibility(bool forced=true) override
int64 ModifyHealth(int64 val)
void RestoreDisplayId(bool ignorePositiveAurasPreventingMounting=false)
void SetGravityModifier(float gravityModifier)
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
void FinishSpell(CurrentSpellTypes spellType, SpellCastResult result=SPELL_CAST_OK)
ThreatManager & GetThreatManager()
void ApplyModManaCostModifier(SpellSchools school, int32 mod, bool apply)
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
virtual ClassPowerTypes GetPowerTypes() const =0
void SetControlled(bool apply, UnitState state)
void ApplySpellHastePercentMod(float val, bool apply)
void SetVisFlag(UnitVisFlags flags)
bool CanUseAttackType(uint8 attacktype) const
uint32 GetClassMask() const
bool HasAuraTypeWithCaster(AuraType auraType, ObjectGuid caster) const
uint32 GetLastExtraAttackSpell() const
uint32 GetMountDisplayId() const
void UpdateAllDamageDoneMods()
void UpdateDisplayPower()
float GetCollisionHeight() const override
static void DealHeal(HealInfo &healInfo)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void UpdateSpeed(UnitMoveType mtype)
static void DealDamageMods(Unit const *attacker, Unit const *victim, uint32 &damage, uint32 *absorb)
bool IsPolymorphed() const
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
SpellEffectValue GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const *aurEff, AuraType auraType, bool checkMiscValue=false, int32 miscValue=0) const
void SetCosmeticMountDisplayId(uint32 mountDisplayId)
static void CalcHealAbsorb(HealInfo &healInfo)
void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=BASE_ATTACK, bool crit=false, bool blocked=false, Spell *spell=nullptr)
void SetStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float val)
std::forward_list< AuraEffect * > AuraEffectList
void UpdateAdvFlyingSpeed(AdvFlyingRateTypeSingle speedType, bool clientUpdate)
void ApplyStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float amount)
uint32 GetTransformSpell() const
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct) const
static void CalcAbsorbResist(DamageInfo &damageInfo, Spell *spell=nullptr)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
bool SetFeatherFall(bool enable)
Powers GetPowerType() const
static uint32 CalcArmorReducedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=MAX_ATTACK, uint8 attackerLevel=0)
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, SpellCastResult result=SPELL_FAILED_INTERRUPTED, Optional< SpellCastResult > resultOther={}, ObjectGuid const &interrupter=ObjectGuid::Empty)
bool SetHover(bool enable, bool updateAnimTier=true)
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
bool IsFullHealth() const
void SetUnitFlag2(UnitFlags2 flags)
void ApplyHasteRegenPercentMod(float val, bool apply)
virtual bool CanApplyResilience() const
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
int32 GetMaxPower(Powers power) const
int32 HealBySpell(HealInfo &healInfo, bool critical=false)
void _ExitVehicle(Position const *exitPosition=nullptr)
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
bool IsStandState() const
TempSummon * ToTempSummon()
bool IsGravityDisabled() const
CharmInfo * GetCharmInfo()
bool SetCanTransitionBetweenSwimAndFly(bool enable)
bool SetDisableInertia(bool disable)
void RemoveVisFlag(UnitVisFlags flags)
void RemoveUnitFlag3(UnitFlags3 flags)
float SpellCritChanceDone(Spell *spell, AuraEffect const *aurEff, SpellSchoolMask schoolMask, WeaponAttackType attackType=BASE_ATTACK) const
void UpdateMountCapability()
void AddUnitState(uint32 f)
static void ApplyResilience(Unit const *victim, int32 *damage)
float GetTotalAuraMultiplier(AuraType auraType) const
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
int32 GetMinPower(Powers power) const
virtual void UpdateDamagePhysical(WeaponAttackType attType)
virtual Gender GetNativeGender() const
bool SetMoveCantSwim(bool cantSwim)
uint32 GetCreatureType() const
void SetInstantCast(bool set)
uint32 GetDisplayId() const
void SendSpellDamageImmune(Unit *target, uint32 spellId, bool isPeriodic)
void ModifyAuraState(AuraStateType flag, bool apply)
uint32 GetNativeDisplayId() const
float SpellCritChanceTaken(Unit const *caster, Spell *spell, AuraEffect const *aurEff, SpellSchoolMask schoolMask, float doneChance, WeaponAttackType attackType=BASE_ATTACK) const
virtual void UpdateArmor()=0
uint64 GetMaxHealth() const
int32 CalculateAOEAvoidance(int32 damage, uint32 schoolMask, bool npcCaster) const
bool HasAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid caster=ObjectGuid::Empty) const
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool SetCanFly(bool enable)
void RemoveUnitFlag2(UnitFlags2 flags)
bool SetCanTurnWhileFalling(bool enable)
bool HasAuraType(AuraType auraType) const
virtual bool UpdateStats(Stats stat)=0
void RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const *source=nullptr)
void StopAttackFaction(uint32 faction_id)
void RemoveCharmedBy(Unit *charmer)
float GetMaxNegativeAuraModifier(AuraType auraType) const
virtual uint32 GetPowerIndex(Powers power) const =0
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
int32 GetPower(Powers power) const
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
bool IsImmunedToAuraPeriodicTick(WorldObject const *caster, AuraEffect const *auraEffect) const
void SetOwnerGUID(ObjectGuid owner)
DeathState getDeathState() const
bool SetIgnoreMovementForces(bool ignore)
float GetTotalAuraMultiplierByMiscMask(AuraType auraType, uint32 misc_mask) const
void ApplyCastTimePercentMod(float val, bool apply)
bool HealthAbovePct(float pct) const
bool HealthBelowPct(float pct) const
bool CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading=false)
int32 SpellDamageBonusTaken(Unit *caster, SpellInfo const *spellProto, int32 pdamage, DamageEffectType damagetype) const
bool IsInFeralForm() const
static uint32 SpellCriticalDamageBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void _RegisterAuraEffect(AuraEffect *aurEff, bool apply)
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
void _EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const *aurApp=nullptr)
int32 SpellAbsorbBonusDone(Unit *victim, SpellInfo const *spellProto, int32 absorbamount, SpellEffectInfo const &spellEffectInfo, uint32 stack=1, AuraEffect const *aurEff=nullptr) const
int32 MeleeDamageBonusDone(Unit *pVictim, int32 damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo const *spellProto=nullptr, SpellEffectInfo const *spellEffectInfo=nullptr, Mechanics mechanic=MECHANIC_NONE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, Spell *spell=nullptr, AuraEffect const *aurEff=nullptr)
SpellHistory * GetSpellHistory()
bool IsControlledByPlayer() const
bool SetCharmedBy(Unit *charmer, CharmType type, AuraApplication const *aurApp=nullptr)
bool SetWaterWalking(bool enable)
void SetMaxPower(Powers power, int32 val)
virtual void setDeathState(DeathState s)
void RemoveVehicleKit(bool onRemoveFromWorld=false)
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=nullptr)
void HandleStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float amount, bool apply)
void SetUnitFlag(UnitFlags flags)
void UpdateMovementForcesModMagnitude()
AuraApplicationMap & GetAppliedAuras()
void SetVignette(uint32 vignetteId)
MountCapabilityEntry const * GetMountCapability(uint32 mountType) const
void SetInFront(WorldObject const *target)
Vehicle * GetVehicleKit() const
float m_modSpellHitChance
Guardian * GetGuardianPet() const
static void ProcSkillsAndAuras(Unit *actor, Unit *actionTarget, ProcFlagsInit const &typeMaskActor, ProcFlagsInit const &typeMaskActionTarget, ProcFlagsSpellType spellTypeMask, ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
void ReplaceAllSilencedSchoolMask(SpellSchoolMask schoolMask)
AuraMap & GetOwnedAuras()
void UpdateAllDamagePctDoneMods()
void SetTransformSpell(uint32 spellid)
void ApplyModManaCostMultiplier(float manaCostMultiplier, bool apply)
void SetShapeshiftForm(ShapeshiftForm form)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
int32 SpellHealingBonusDone(Unit *victim, SpellInfo const *spellProto, int32 healamount, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, uint32 stack=1, Spell *spell=nullptr, AuraEffect const *aurEff=nullptr) const
void SetMountDisplayId(uint32 mountDisplayId)
virtual void SetDisplayId(uint32 displayId, bool setNative=false)
uint32 GetModelForForm(ShapeshiftForm form, uint32 spellId) const
void RemoveUnitFlag(UnitFlags flags)
void UpdateStatBuffMod(Stats stat)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Vehicle * RemovePassenger(WorldObject *passenger) override
Removes the passenger from the vehicle.
void RemovePendingEventsForPassenger(Unit *passenger)
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
ZoneScript * FindZoneScript() const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
FlaggedValuesArray32< int32, uint64, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibility
FlaggedValuesArray32< int32, uint64, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibilityDetect
SpellMissInfo SpellHitResult(Unit *victim, SpellInfo const *spellInfo, bool canReflect, bool canImmune) const
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
void PlayDistanceSound(uint32 soundId, Player const *target=nullptr) const
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealthDetect
void UpdatePositionData()
Player * GetSpellModOwner() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPES > m_stealth
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibilityDetect
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
void ModSpellDurationTime(SpellInfo const *spellInfo, int32 &durationTime, Spell *spell=nullptr) const
bool isLogingOut() const
Is the user engaged in a log out process?
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius)
bool HasCommandState(CommandStates state) const
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
constexpr float GetPositionZ() const
static QuaternionData fromOrientation(float orientation)
std::array< uint32, MAX_SHAPESHIFT_SPELLS > PresetSpellID
EnumFlag< SpellShapeshiftFormFlags > GetFlags() const
TaggedPosition< Position::XY > Pos