124 _aura(aura), _chance(dispelChance), _charges(dispelCharges)
136 : m_attacker(attacker), m_victim(victim), m_damage(damage), m_originalDamage(damage), m_spellInfo(spellInfo), m_schoolMask(schoolMask), m_damageType(damageType), m_attackType(attackType),
137 m_absorb(0), m_resist(0), m_block(0), m_hitMask(
PROC_HIT_NONE)
142 : m_attacker(dmgInfo.Attacker), m_victim(dmgInfo.Target), m_damage(dmgInfo.
Damage), m_originalDamage(dmgInfo.
Damage), m_spellInfo(nullptr), m_schoolMask(
SpellSchoolMask(dmgInfo.DamageSchoolMask)),
143 m_damageType(
DIRECT_DAMAGE), m_attackType(dmgInfo.AttackType), m_absorb(dmgInfo.Absorb), m_resist(dmgInfo.Resist), m_block(dmgInfo.Blocked), m_hitMask(
PROC_HIT_NONE)
184 if (!damageNullified)
188 if (!damageNullified)
195 : m_attacker(spellNonMeleeDamage.attacker), m_victim(spellNonMeleeDamage.target), m_damage(spellNonMeleeDamage.damage), m_originalDamage(spellNonMeleeDamage.originalDamage),
196 m_spellInfo(spellNonMeleeDamage.
Spell), m_schoolMask(
SpellSchoolMask(spellNonMeleeDamage.schoolMask)), m_damageType(damageType),
197 m_attackType(attackType), m_absorb(spellNonMeleeDamage.absorb), m_resist(spellNonMeleeDamage.resist), m_block(spellNonMeleeDamage.blocked), m_hitMask(hitMask)
199 if (spellNonMeleeDamage.
blocked)
201 if (spellNonMeleeDamage.
absorb)
250 : _healer(healer), _target(target), _heal(heal), _originalHeal(heal), _effectiveHeal(0), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask), _hitMask(0)
256 amount = std::min(amount,
GetHeal());
274 _actor(actor), _actionTarget(actionTarget), _procTarget(procTarget),
275 _typeMask(typeMask), _spellTypeMask(spellTypeMask),
276 _spellPhaseMask(spellPhaseMask), _hitMask(hitMask), _spell(spell),
277 _damageInfo(damageInfo), _healInfo(healInfo)
303 : target(_target), attacker(_attacker), castId(_castId),
Spell(_spellInfo), SpellVisual(spellVisual), damage(0), originalDamage(0),
304 schoolMask(_schoolMask), absorb(0), resist(0), periodicLog(false), blocked(0),
HitInfo(0), cleanDamage(0), fullBlock(false), preHitHealth(_target->GetHealth())
309 WorldObject(isWorldObject), m_lastSanctuaryTime(0), LastCharmerGUID(), movespline(
std::make_unique<
Movement::MoveSpline>()),
310 m_ControlledByPlayer(false), m_procDeep(0), m_procChainLength(0), m_transformSpell(0),
312 m_unitMovedByMe(nullptr), m_playerMovingMe(nullptr), m_charmer(nullptr), m_charmed(nullptr),
313 i_motionMaster(
std::make_unique<
MotionMaster>(this)), m_regenTimer(0), m_vehicle(nullptr),
314 m_unitTypeMask(
UNIT_MASK_NONE), m_Diminishing(), m_combatManager(this),
315 m_threatManager(this), m_aiLocked(false), _playHoverAnim(false), _aiAnimKitId(0), _movementAnimKitId(0), _meleeAnimKitId(0),
445 uint32 count = itr->second;
501 return player->GetWeaponForAttack(
OFF_ATTACK,
true) !=
nullptr;
510 init.MoveTo(x, y, z, generatePath, forceDestination);
511 init.SetVelocity(speed);
603 transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.
orientation);
643 float distsq = dx * dx + dy * dy + dz * dz;
646 float maxdist = dist2compare + sizefactor;
648 return distsq < maxdist * maxdist;
659 float distsq = dx*dx + dy*dy + dz*dz;
663 return distsq <= maxdist * maxdist;
679 return IsInDist(obj, objBoundaryRadius);
702 m_interruptMask |= aurApp->GetBase()->GetSpellInfo()->AuraInterruptFlags;
719 if (aura->GetSpellInfo()->SpellFamilyName == familyName && aura->GetSpellInfo()->SpellFamilyFlags & familyFlags)
727 for (AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
728 if ((!excludeAura || excludeAura != (*itr)->GetSpellInfo()->Id) &&
738 excludeAura = currentChanneledSpell->GetSpellInfo()->Id;
765 std::copy(list.begin(), list.end(), std::back_inserter(effects));
771 uint32 damageDone = damage;
772 uint32 damageTaken = damage;
778 uint32 tmpDamage = damageTaken;
782 tmpDamage = victimCreature->CalculateDamageForSparring(attacker, tmpDamage);
785 victimAI->DamageTaken(attacker, tmpDamage, damagetype, spellProto);
787 if (
UnitAI* attackerAI = attacker ? attacker->
GetAI() :
nullptr)
788 attackerAI->DamageDealt(victim, tmpDamage, damagetype);
791 sScriptMgr->OnDamage(attacker, victim, tmpDamage);
794 if (tmpDamage != damageTaken)
799 damageDone = tmpDamage;
801 damageTaken = tmpDamage;
806 if (attacker != victim && damagetype !=
DOT)
810 if (
CreatureAI* controlledAI = cControlled->AI())
811 controlledAI->OwnerAttackedBy(attacker);
839 for (
auto i = vCopyDamageCopy.begin(); i != vCopyDamageCopy.end(); ++i)
842 if (!((*i)->GetBase()->IsAppliedOnTarget(victim->
GetGUID())))
845 if (((*i)->GetMiscValue() & damageSchoolMask) == 0)
848 Unit* shareDamageTarget = (*i)->GetCaster();
849 if (!shareDamageTarget)
851 SpellInfo const* spell = (*i)->GetSpellInfo();
876 bool duel_hasEnded =
false;
877 bool duel_wasMounted =
false;
885 damageTaken = health - 1;
887 duel_hasEnded =
true;
891 damageTaken = health - 1;
897 victimAI->OnHealthDepleted(attacker,
false);
904 if (victimRider && victimRider->
duel && victimRider->
duel->IsMounted)
911 damageTaken = health - 1;
913 duel_wasMounted =
true;
914 duel_hasEnded =
true;
918 if (attacker && attacker != victim)
944 bool skipSettingDeathState =
false;
946 if (health <= damageTaken)
956 DamageInfo damageInfo =
DamageInfo(attacker, victim, damageTaken, spellProto, damageSchoolMask, damagetype,
958 for (
AuraEffect* absorbAurEff : vAbsorbOverkill)
960 Aura* base = absorbAurEff->GetBase();
965 if (!(absorbAurEff->GetMiscValue() & damageInfo.
GetSchoolMask()))
977 bool deathFullyPrevented =
false;
979 absorbAurEff->GetBase()->CallScriptEffectAbsorbHandlers(absorbAurEff, aurApp, damageInfo, currentAbsorb, deathFullyPrevented);
982 currentAbsorb = std::min(currentAbsorb, damageInfo.
GetDamage());
990 if (deathFullyPrevented)
993 skipSettingDeathState =
true;
1003 absorbLog.
Absorbed = currentAbsorb;
1015 durabilityLoss =
false;
1018 Unit::Kill(attacker, victim, durabilityLoss, skipSettingDeathState);
1066 auto isCastInterrupted = [&]()
1080 auto isCastDelayed = [&]()
1094 if (isCastInterrupted())
1096 else if (isCastDelayed())
1101 if (damageTaken && victim->
IsPlayer())
1104 spell->DelayedChannel();
1115 if (duel_wasMounted)
1120 he->
duel->Opponent->CombatStopWithPets(
true);
1148 if (!victim || !victim->
IsAlive())
1171 uint32 crit_bonus = damage;
1175 damage += crit_bonus;
1180 if (critPctDamageMod != 0)
1181 AddPct(damage, critPctDamageMod);
1197 damage -= damageInfo->
blocked;
1232 damageInfo->
damage = damage;
1260 if (!damageInfo->
Spell)
1262 TC_LOG_DEBUG(
"entities.unit",
"Unit::DealSpellDamage has no spell");
1275 damageInfo->
Target = victim;
1342 damageInfo->
Damage = damage;
1420 float reducePercent = 1.f - leveldif * 0.1f;
1443 resilienceReduction = damageInfo->
Damage - resilienceReduction;
1444 damageInfo->
Damage -= resilienceReduction;
1487 float percent60 = 3.0f * percent20;
1488 if (offtime > percent20 && offtime <= percent60)
1490 else if (offtime > percent60)
1492 offtime -= 2.0f * percent20;
1499 float percent60 = 3.0f * percent20;
1500 if (basetime > percent20 && basetime <= percent60)
1502 else if (basetime > percent60)
1504 basetime -= 2.0f * percent20;
1520 float chance = 20.0f;
1529 chance *= attackerMeleeSkill / float(victimDefense) * 0.16f;
1549 for (
AuraEffect const* aurEff : vDamageShieldsCopy)
1551 SpellInfo const* spellInfo = aurEff->GetSpellInfo();
1568 uint32 damage = aurEff->GetAmount();
1569 if (
Unit* caster = aurEff->GetCaster())
1571 damage = caster->SpellDamageBonusDone(
this, spellInfo, damage,
SPELL_DIRECT_DAMAGE, aurEff->GetSpellEffectInfo());
1627 float armor = float(victim->
GetArmor());
1634 int32 armorBypassPct = 0;
1636 for (AuraEffectList::const_iterator i = reductionAuras.begin(); i != reductionAuras.end(); ++i)
1637 if ((*i)->GetCasterGUID() == attacker->
GetGUID())
1638 armorBypassPct += (*i)->GetAmount();
1639 armor =
CalculatePct(armor, 100 - std::min(armorBypassPct, 100));
1649 for (
AuraEffect const* aurEff : resIgnoreAuras)
1652 armor = std::floor(
AddPct(armor, -aurEff->GetAmount()));
1663 float maxArmorPen = 0.f;
1670 maxArmorPen = std::min((armor + maxArmorPen) / 3.f, armor);
1676 if (G3D::fuzzyLe(armor, 0.0f))
1689 if (!(armor + armorConstant))
1692 float mitigation = std::min(armor / (armor + armorConstant), 0.85f);
1693 return uint32(std::max(damage * (1.0f - mitigation), 0.0f));
1707 float discreteResistProbability[11] = { };
1708 if (averageResist <= 0.1f)
1710 discreteResistProbability[0] = 1.0f - 7.5f * averageResist;
1711 discreteResistProbability[1] = 5.0f * averageResist;
1712 discreteResistProbability[2] = 2.5f * averageResist;
1716 for (
uint32 i = 0; i < 11; ++i)
1717 discreteResistProbability[i] = std::max(0.5f - 2.5f * std::fabs(0.1f * i - averageResist), 0.0f);
1721 float probabilitySum = 0.0f;
1724 for (; resistance < 11; ++resistance)
1725 if (roll < (probabilitySum += discreteResistProbability[resistance]))
1728 float damageResisted = damage * resistance / 10.f;
1729 if (damageResisted > 0.0f)
1731 int32 ignoredResistance = 0;
1736 ignoredResistance = std::min<int32>(ignoredResistance, 100);
1737 ApplyPct(damageResisted, 100 - ignoredResistance);
1743 float armorReduction = damage - damageAfterArmor;
1746 damageResisted = std::min(damageResisted, armorReduction);
1750 damageResisted = std::max(damageResisted, 0.f);
1751 return uint32(damageResisted);
1756 float victimResistance = float(victim->
GetResistance(schoolMask));
1763 victimResistance -= float(player->GetSpellPenetrationItemMod());
1765 else if (
Unit const* unitCaster = caster->
ToUnit())
1771 victimResistance = 0.0f;
1775 victimResistance = 0.0f;
1777 victimResistance = std::max(victimResistance, 0.0f);
1784 static uint32 const bossLevel = 83;
1785 static float const bossResistanceConstant = 510.0f;
1787 float resistanceConstant = 0.0f;
1789 if (level == bossLevel)
1790 resistanceConstant = bossResistanceConstant;
1792 resistanceConstant = level * 5.0f;
1794 return victimResistance / (victimResistance + resistanceConstant);
1805 float auraAbsorbMod = 0.f;
1824 for (
auto itr = vSchoolAbsorbCopy.begin(); (itr != vSchoolAbsorbCopy.end()) && (damageInfo.
GetDamage() > 0); ++itr)
1837 if (currentAbsorb < 0)
1845 bool defaultPrevented =
false;
1848 currentAbsorb = tempAbsorb;
1850 if (!defaultPrevented)
1857 tempAbsorb = currentAbsorb;
1882 absorbLog.
Absorbed = currentAbsorb;
1891 for (
auto itr = vManaShieldCopy.begin(); (itr != vManaShieldCopy.end()) && (damageInfo.
GetDamage() > 0); ++itr)
1905 if (currentAbsorb < 0)
1911 uint32 tempAbsorb = currentAbsorb;
1913 bool defaultPrevented =
false;
1916 currentAbsorb = tempAbsorb;
1918 if (!defaultPrevented)
1923 int32 manaReduction = currentAbsorb;
1927 manaReduction =
int32(
float(manaReduction) * manaMultiplier);
1932 currentAbsorb = currentAbsorb ?
int32(
float(currentAbsorb) * (
float(manaTaken) /
float(manaReduction))) : 0;
1936 tempAbsorb = currentAbsorb;
1959 absorbLog.
Absorbed = currentAbsorb;
1972 for (
auto itr = vSplitDamagePctCopy.begin(); itr != vSplitDamagePctCopy.end() && damageInfo.
GetDamage() > 0; ++itr)
1984 Unit* caster = (*itr)->GetCaster();
1990 (*itr)->GetBase()->CallScriptEffectSplitHandlers((*itr), aurApp, damageInfo, splitDamage);
2010 if (victimCreature->ShouldFakeDamageFrom(damageInfo.
GetAttacker()))
2017 log.
damage = splitDamage;
2019 log.
absorb = split_absorb;
2034 for (
auto i = vHealAbsorb.begin(); i != vHealAbsorb.end() && healInfo.
GetHeal() > 0; ++i)
2047 if (currentAbsorb < 0)
2052 bool defaultPrevented =
false;
2055 currentAbsorb = tempAbsorb;
2057 if (!defaultPrevented)
2064 tempAbsorb = currentAbsorb;
2086 absorbLog.
Absorbed = currentAbsorb;
2130 if (!autoAttackError)
2145 attackerPlayer->SetAttackSwingError(autoAttackError);
2151 if (!autoAttackError)
2201 uint32 meleeAttackSpellId = 0;
2204 if (!meleeAttackOverrides.empty())
2205 meleeAttackSpellId = meleeAttackOverrides.front()->GetSpellEffectInfo().TriggerSpell;
2209 auto itr = std::find_if(meleeAttackOverrides.begin(), meleeAttackOverrides.end(), [&](
AuraEffect const* aurEff)
2211 return aurEff->GetSpellEffectInfo().MiscValue != 0;
2213 if (itr != meleeAttackOverrides.end())
2214 meleeAttackSpellId = (*itr)->GetSpellEffectInfo().MiscValue;
2217 if (!meleeAttackSpellId)
2227 if (victimCreature->ShouldFakeDamageFrom(damageInfo.
Attacker))
2240 TC_LOG_DEBUG(
"entities.unit",
"AttackerStateUpdate: {} attacked {} for {} dmg, absorbed {}, blocked {}, resisted {}.",
2245 CastSpell(victim, meleeAttackSpellId,
true);
2272 targetGUID = selection;
2300 int32 sum = 0, tmp = 0;
2316 canParryOrBlock =
false;
2321 if (tmp > 0 && roll < (sum += tmp))
2333 && roll < (sum += tmp))
2338 if (canParryOrBlock)
2342 && roll < (sum += tmp))
2350 attackerLevel + 3 < victimLevel)
2353 tmp = (10 + 10 * (victimLevel - attackerLevel)) * 100;
2354 if (tmp > 0 && roll < (sum += tmp))
2359 if (canParryOrBlock)
2363 && roll < (sum += tmp))
2369 if (tmp > 0 && roll < (sum += tmp))
2374 if (attackerLevel >= victimLevel + 4 &&
2380 tmp = attackerLevel - victimLevel * 1000 - 1500;
2381 if (roll < (sum += tmp))
2383 TC_LOG_DEBUG(
"entities.unit",
"RollMeleeOutcomeAgainst: CRUSHING <{}, {})", sum-tmp, sum);
2394 float minDamage = 0.0f;
2395 float maxDamage = 0.0f;
2397 if (normalized || !addTotalPct)
2402 float minOffhandDamage = 0.0f;
2403 float maxOffhandDamage = 0.0f;
2405 minDamage += minOffhandDamage;
2406 maxDamage += maxOffhandDamage;
2435 minDamage = std::max(0.f, minDamage);
2436 maxDamage = std::max(0.f, maxDamage);
2438 if (minDamage > maxDamage)
2439 std::swap(minDamage, maxDamage);
2474 int32 resistMech = 0;
2477 if (!effect.IsEffect())
2484 if (resistMech < temp)
2489 return std::max(resistMech, 0);
2531 tmp += resist_chance;
2561 tmp += deflect_chance;
2590 if (!aurEff->IsAffectingSpell(spellInfo))
2593 switch (aurEff->GetMiscValue())
2605 TC_LOG_DEBUG(
"entities.unit",
"Spell {} SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state {}", aurEff->GetId(), aurEff->GetMiscValue());
2614 if (dodgeChance < 0)
2617 if (roll < (tmp += dodgeChance))
2625 if (parryChance < 0)
2636 if (blockChance < 0)
2651 float chance = 0.0f;
2652 float levelBonus = 0.0f;
2654 chance = playerVictim->m_activePlayerData->DodgePercentage;
2663 levelBonus = 1.5f * levelDiff;
2667 chance += levelBonus;
2680 return std::max(chance, 0.0f);
2687 float chance = 0.0f;
2688 float levelBonus = 0.0f;
2691 if (playerVictim->CanParry())
2695 tmpitem = playerVictim->GetWeaponForAttack(
OFF_ATTACK,
true);
2698 chance = playerVictim->m_activePlayerData->ParryPercentage;
2709 levelBonus = 1.5f * levelDiff;
2713 chance += levelBonus;
2720 return std::max(chance, 0.0f);
2725 float miss_chance = 5.0f;
2734 float chance = 0.0f;
2735 float levelBonus = 0.0f;
2738 if (playerVictim->CanBlock())
2742 chance = playerVictim->m_activePlayerData->BlockPercentage;
2753 levelBonus = 1.5f * levelDiff;
2757 chance += levelBonus;
2758 return std::max(chance, 0.0f);
2763 float chance = 0.0f;
2769 chance = thisPlayer->m_activePlayerData->CritPercentage;
2772 chance = thisPlayer->m_activePlayerData->OffhandCritPercentage;
2775 chance = thisPlayer->m_activePlayerData->RangedCritPercentage;
2798 float chance = critDone;
2818 return aurEff->
GetCasterGUID() == tempSummon->GetSummonerGUID();
2824 return std::max(chance, 0.0f);
2873 if (i->second->IsExpired())
2882 visibleAura->ClientUpdate();
2890 GameObjectList::iterator itr;
2893 if (!(*itr)->isSpawned())
2896 (*itr)->SetRespawnTime(0);
2915 if (autoRepeatSpellInfo->
Id != 75)
2927 if (autoRepeatSpellInfo->
Id != 75)
3115 return spell->GetCastTime();
3272 AuraEffect const* auraEff = foundAura->GetEffect(spellEffectInfo.EffectIndex);
3278 bp = *(createInfo.
BaseAmount + spellEffectInfo.EffectIndex);
3280 bp =
int32(spellEffectInfo.BasePoints);
3290 if (castItemGUID != foundAura->GetCastItemGUID())
3293 *oldGUID = castItemGUID;
3294 uint32* oldItemId =
const_cast<uint32*
>(&foundAura->m_castItemId);
3296 int32* oldItemLevel =
const_cast<int32*
>(&foundAura->m_castItemLevel);
3328 std::vector<Aura*> aurasSharingLimit;
3331 if (scAura->IsSingleTargetWith(aura))
3332 aurasSharingLimit.push_back(scAura);
3338 while (aurasSharingLimit.size() > maxOtherAuras)
3340 aurasSharingLimit.back()->Remove();
3341 aurasSharingLimit.pop_back();
3357 TC_LOG_ERROR(
"spells",
"Unit::_CreateAuraApplication() called with a removed aura. Check if OnEffectHitTarget() is triggering any spell with apply aura effect (that's not allowed!)\nUnit: {}\nAura: {}",
GetDebugInfo(), aura->
GetDebugInfo());
3375 m_appliedAuras.insert(AuraApplicationMap::value_type(aurId, aurApp));
3416 uint32 aStateMask = (1 << (aState - 1));
3448 player->UpdateVisibleObjectInteractions(
false,
true,
false,
false);
3466 TC_LOG_DEBUG(
"spells",
"Aura {} now is remove mode {}", aura->
GetId(), removeMode);
3484 bool auraStateFound =
false;
3488 bool canBreak =
false;
3490 for (AuraStateAurasMap::iterator itr =
m_auraStateAuras.lower_bound(auraState); itr !=
m_auraStateAuras.upper_bound(auraState) && !(auraStateFound && canBreak);)
3492 if (itr->second == aurApp)
3499 auraStateFound =
true;
3527 if (!auraStateFound)
3532 uint32 aStateMask = (1 << (auraState - 1));
3543 player->UpdateVisibleObjectInteractions(
false,
true,
false,
false);
3559 for (AuraApplicationMap::iterator iter = range.first; iter != range.second;)
3561 if (iter->second == aurApp)
3610 Aura* aura = i->second;
3632 if (((itr->second->GetEffectMask() & reqEffMask) == reqEffMask) && (!casterGUID || itr->second->GetCasterGUID() == casterGUID))
3650 TC_LOG_ERROR(
"spells",
"Unit::RemoveOwnedAura() called with unallowed removeMode AURA_REMOVE_NONE, spellId {}", aura->
GetId());
3657 for (AuraMap::iterator itr = range.first; itr != range.second; ++itr)
3659 if (itr->second == aura)
3672 for (AuraMap::const_iterator itr = range.first; itr != range.second; ++itr)
3674 if (((itr->second->GetEffectMask() & reqEffMask) == reqEffMask)
3675 && (!casterGUID || itr->second->GetCasterGUID() == casterGUID)
3676 && (!itemCasterGUID || itr->second->GetCastItemGUID() == itemCasterGUID)
3677 && (!except || except != itr->second))
3701 for (AuraApplicationMap::iterator iter = range.first; iter != range.second;)
3703 Aura const* aura = iter->second->GetBase();
3738 for (AuraApplicationMap::iterator iter = range.first; iter != range.second;)
3740 if (aurApp == iter->second)
3762 if (check(iter->second))
3775 if (check(iter->second))
3788 if (check(iter->second))
3802 if (check(iter->second))
3814 for (AuraEffectList::iterator iter =
m_modAuras[auraType].begin(); iter !=
m_modAuras[auraType].end();)
3816 Aura* aura = (*iter)->GetBase();
3835 Aura const* aura = iter->second->GetBase();
3850 for (AuraMap::iterator iter = range.first; iter != range.second;)
3852 Aura* aura = iter->second;
3867 for (AuraMap::iterator iter = range.first; iter != range.second;)
3869 Aura* aura = iter->second;
3872 DispelInfo dispelInfo(dispeller, dispellerSpellId, chargesRemoved);
3895 for (AuraMap::iterator iter = range.first; iter != range.second;)
3897 Aura* aura = iter->second;
3903 uint32 recalculateMask = 0;
3913 recalculateMask |= 1 << i;
3931 oldAura->ModCharges(stolenCharges);
3933 oldAura->ModStackAmount(stolenCharges);
3934 oldAura->SetDuration(
int32(dur));
3950 if (newAura->IsSingleTarget())
3952 newAura->UnregisterSingleTarget();
3958 newAura->SetLoadedState(aura->
GetMaxDuration(),
int32(dur), stealCharge ? stolenCharges : aura->
GetCharges(), stolenCharges, recalculateMask, &damage[0]);
3959 newAura->ApplyForTargets();
3980 if (iter->second->GetBase()->GetCastItemGUID() == castItemGuid)
3992 for (AuraEffectList::iterator iter =
m_modAuras[auraType].begin(); iter !=
m_modAuras[auraType].end();)
3994 Aura* aura = (*iter)->GetBase();
3999 if (aura != except && (!casterGUID || aura->
GetCasterGUID() == casterGUID)
4014 SpellInfo const* spell = iter->second->GetBase()->GetSpellInfo();
4035 Aura const* aura = iter->second;
4056 for (AuraList::iterator iter = scAuras.begin(); iter != scAuras.end();)
4062 iter = scAuras.begin();
4069template<
typename InterruptFlag>
4084 if (interruptSource)
4100template <
typename InterruptFlags>
4109 Aura* aura = (*iter)->GetBase();
4112 && (!source || aura->
GetId() != source->
Id)
4125 && spell->GetSpellInfo()->HasChannelInterruptFlag(flag)
4126 && (!source || spell->GetSpellInfo()->
Id != source->
Id)
4140 Aura const* aura = iter->second->GetBase();
4164 std::vector<Aura*> aurasToUpdateTargets;
4168 if (exceptSpellId && aura->
GetId() == exceptSpellId)
4172 if (!(appliedMechanicMask & mechanicMaskToRemove))
4180 aurasToUpdateTargets.push_back(aura);
4184 for (
Aura* aura : aurasToUpdateTargets)
4186 aura->UpdateTargetMap(aura->GetCaster());
4189 if (!aura->IsPassive() && aura->GetOwner() ==
this && !aura->GetApplicationOfTarget(
GetGUID()))
4190 aura->Remove(removeMode);
4199 Aura const* aura = iter->second->GetBase();
4214 Aura* aura = iter->second;
4217 for (Aura::ApplicationMap::const_iterator itr = appMap.begin(); itr!= appMap.end();)
4233 if (iter->second->GetBase()->GetOwner() !=
this)
4248 AuraApplicationMap::iterator aurAppIter;
4252 AuraMap::iterator aurIter;
4256 const int maxIteration = 50;
4258 if (counter >= maxIteration)
4260 std::stringstream sstr;
4261 sstr <<
"Unit::RemoveAllAuras() iterated " << maxIteration <<
" times already but there are still "
4267 sstr <<
"m_appliedAuras:" <<
"\n";
4269 for (std::pair<uint32 const, AuraApplication*>& auraAppPair :
m_appliedAuras)
4270 sstr << auraAppPair.second->GetDebugInfo() <<
"\n";
4275 sstr <<
"m_ownedAuras:" <<
"\n";
4278 sstr << aura->GetDebugInfo() <<
"\n";
4310 auto evadeAuraCheck = [](
Aura const* aura)
4324 auto evadeAuraApplicationCheck = [&evadeAuraCheck](
AuraApplication const* aurApp)
4326 return evadeAuraCheck(aurApp->GetBase());
4339 Aura const* aura = iter->second->GetBase();
4348 Aura* aura = iter->second;
4360 Aura const* aura = iter->second->GetBase();
4369 Aura* aura = iter->second;
4381 Aura const* aura = iter->second->GetBase();
4390 Aura* aura = iter->second;
4402 Aura const* aura = iter->second->GetBase();
4411 Aura* aura = iter->second;
4423 Aura* aura = iter->second;
4436 for (; range.first != range.second; ++range.first)
4438 Aura* aura = range.first->second;
4467 for (AuraApplicationMap::const_iterator itr = range.first; itr != range.second; ++itr)
4469 if (itr->second->HasEffect(effIndex)
4470 && (!caster || itr->second->GetBase()->GetCasterGUID() == caster))
4472 return itr->second->GetBase()->GetEffect(effIndex);
4485 rankSpell =
sSpellMgr->GetNextSpellInChain(rankSpell);
4493 for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
4495 SpellInfo const* spell = (*i)->GetSpellInfo();
4498 if (!casterGUID.
IsEmpty() && (*i)->GetCasterGUID() != casterGUID)
4515 && (!except || except != app))
4527 if (predicate(pair.second))
4536 if (predicate(pair.second->GetBase()))
4544 for (AuraApplicationMap::value_type
const& pair :
m_appliedAuras)
4545 if (predicate(pair.second))
4553 for (AuraApplicationMap::value_type
const& pair :
m_appliedAuras)
4554 if (predicate(pair.second->GetBase()))
4563 return aurApp ? aurApp->
GetBase() :
nullptr;
4569 return aurApp ? aurApp->
GetBase() :
nullptr;
4575 return aurApp ? aurApp->
GetBase() :
nullptr;
4585 rankSpell =
sSpellMgr->GetNextSpellInChain(rankSpell);
4593 return aurApp ? aurApp->
GetBase() :
nullptr;
4599 for (
auto itr = auras.begin(); itr != auras.end(); ++itr)
4601 Aura* aura = itr->second;
4629 dispelList.emplace_back(aura, chance, charges);
4637 for (AuraApplicationMap::const_iterator itr = range.first; itr != range.second; ++itr)
4639 if (itr->second->HasEffect(effIndex)
4640 && (!caster || itr->second->GetBase()->GetCasterGUID() == caster))
4653 for (AuraApplicationMap::const_iterator itr = range.first; itr != range.second; ++itr)
4655 if (itr->second->GetBase()->GetStackAmount() == 0)
4658 count += (
uint32)itr->second->GetBase()->GetStackAmount();
4666 return GetAuraApplication(spellId, casterGUID, itemCasterGUID, reqEffMask) !=
nullptr;
4682 if (caster == eff->GetCasterGUID())
4690 for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
4691 if (miscvalue == (*i)->GetMiscValue())
4699 for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
4700 if ((*i)->IsAffectingSpell(affectedSpell))
4708 for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
4709 if (value == (*i)->GetAmount())
4717 if (aura->GetSpellEffectInfo().TriggerSpell == triggerSpell)
4722template <
typename InterruptFlags>
4729 if (!(*iter)->IsPositive() && (*iter)->GetBase()->GetSpellInfo()->HasAuraInterruptFlag(flag) &&
4730 (!guid || (*iter)->GetBase()->GetCasterGUID() == guid))
4743 SpellInfo const* spellInfo = iter->second->GetBase()->GetSpellInfo();
4748 if (iter->second->HasEffect(spellEffectInfo.EffectIndex) && spellEffectInfo.IsEffect() && spellEffectInfo.Mechanic)
4749 if (mechanicMask & (
UI64LIT(1) << spellEffectInfo.Mechanic))
4762 SpellInfo const* spellInfo = itr->second->GetBase()->GetSpellInfo();
4769 if (newDuration > 0 && newDuration < existingDuration)
4779 for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
4781 if ((*i)->GetMiscValue() == script)
4782 if ((*i)->IsAffectingSpell(spell))
4790 static const AuraType diseaseAuraTypes[] =
4797 for (
AuraType aType : diseaseAuraTypes)
4803 && (*itr)->GetCasterGUID() == casterGUID)
4809 RemoveAura((*itr)->GetId(), (*itr)->GetCasterGUID());
4822 static const AuraType diseaseAuraTypes[] =
4833 for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
4836 if ((*i)->GetCasterGUID() == casterGUID)
4846 if (mTotalAuraList.empty())
4849 std::map<SpellGroup, int32> sameEffectSpellGroup;
4852 for (
AuraEffect const* aurEff : mTotalAuraList)
4854 if (predicate(aurEff))
4858 if (!
sSpellMgr->AddSameEffectStackRuleSpellGroups(aurEff->GetSpellInfo(),
static_cast<uint32>(auraType), aurEff->GetAmount(), sameEffectSpellGroup))
4859 modifier += aurEff->GetAmount();
4864 for (
auto itr = sameEffectSpellGroup.begin(); itr != sameEffectSpellGroup.end(); ++itr)
4865 modifier += itr->second;
4873 if (mTotalAuraList.empty())
4876 std::map<SpellGroup, int32> sameEffectSpellGroup;
4877 float multiplier = 1.0f;
4879 for (
AuraEffect const* aurEff : mTotalAuraList)
4881 if (predicate(aurEff))
4885 if (!
sSpellMgr->AddSameEffectStackRuleSpellGroups(aurEff->GetSpellInfo(),
static_cast<uint32>(auraType), aurEff->GetAmount(), sameEffectSpellGroup))
4886 AddPct(multiplier, aurEff->GetAmount());
4891 for (
auto itr = sameEffectSpellGroup.begin(); itr != sameEffectSpellGroup.end(); ++itr)
4892 AddPct(multiplier, itr->second);
4900 if (mTotalAuraList.empty())
4904 for (
AuraEffect const* aurEff : mTotalAuraList)
4906 if (predicate(aurEff))
4907 modifier = std::max(modifier, aurEff->GetAmount());
4916 if (mTotalAuraList.empty())
4920 for (
AuraEffect const* aurEff : mTotalAuraList)
4922 if (predicate(aurEff))
4923 modifier = std::min(modifier, aurEff->GetAmount());
4973 if (except != aurEff && (aurEff->
GetMiscValue() & miscMask) != 0)
5081 float modPos = 0.0f;
5082 float modNeg = 0.0f;
5083 float factor = 0.0f;
5096 modValue =
static_cast<Guardian*
>(
this)->GetBonusStatFromOwner(stat);
5166 std::vector<DynamicObject*> dynamicobjects =
GetDynObjects(spellId);
5167 return dynamicobjects.empty() ? nullptr : dynamicobjects.front();
5172 std::vector<DynamicObject*> dynamicobjects;
5173 for (DynObjectList::const_iterator i =
m_dynObj.begin(); i !=
m_dynObj.end(); ++i)
5174 if ((*i)->GetSpellId() == spellId)
5175 dynamicobjects.push_back(*i);
5177 return dynamicobjects;
5204 return gameobjects.empty() ? nullptr : gameobjects.front();
5209 std::vector<GameObject*> gameobjects;
5210 for (GameObjectList::const_iterator i =
m_gameObj.begin(); i !=
m_gameObj.end(); ++i)
5211 if ((*i)->GetSpellId() == spellId)
5212 gameobjects.push_back(*i);
5282 GameObjectList::iterator i, next;
5286 if (spellid == 0 || (*i)->GetSpellId() == spellid)
5291 (*i)->SetRespawnTime(0);
5307 GameObjectList::iterator i =
m_gameObj.begin();
5309 (*i)->SetRespawnTime(0);
5332 return areaTriggers.empty() ? nullptr : areaTriggers.front();
5337 std::vector<AreaTrigger*> areaTriggers;
5339 if ((*i)->GetSpellId() == spellId)
5340 areaTriggers.push_back(*i);
5342 return areaTriggers;
5364 if (areaTrigger->GetAuraEffect() == aurEff)
5366 areaTrigger->Remove();
5411 static constexpr int32 ProcChainHardLimit = 10;
5414 TC_LOG_ERROR(
"spells.aura.effect",
"Unit::ProcSkillsAndAuras: Possible infinite proc loop detected, current triggering spell {}", spell->
GetDebugInfo().c_str());
5436 actor->
TriggerAurasProcOnEvent(
nullptr,
nullptr, actionTarget, typeMaskActor, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
5464 data.
Effects.push_back(spellLogEffect);
5483 spellOrDamageImmune.
SpellID = spellId;
5497 packet.
OverDamage = (overkill < 0 ? -1 : overkill);
5524 dmgInfo.
Damage =
Damage - AbsorbDamage - Resist - BlockedAmount;
5527 dmgInfo.
Absorb = AbsorbDamage;
5530 dmgInfo.
Blocked = BlockedAmount;
5546 if (thisPlayer->GetGroup())
5559 switch (new_powertype)
5594 if (!powerTypeAuras.empty())
5596 AuraEffect const* powerTypeAura = powerTypeAuras.front();
5608 displayPower =
Powers(powerDisplay->ActualType);
5614 else if (pet->IsPetGhoul() || pet->IsPetAbomination())
5622 return displayPower;
5672 if (!victim || victim ==
this)
5774 if (
CreatureAI* controlledAI = cControlled->AI())
5775 controlledAI->OwnerAttacked(victim);
5801 creature->SetNoCallAssistance(
false);
5814 for (
Unit* attacker : attackers)
5816 toRemove.push_back(attacker);
5818 for (
Unit* attacker : toRemove)
5837 std::vector<Unit*> attackersToRemove;
5841 for (
Unit* attacker : attackersToRemove)
5860 minion->CombatStop(includingCast);
5869 if ((*itr)->isAttackingPlayer())
5875 if (summon->isAttackingPlayer())
5886 if (!(*iter)->AttackStop())
5888 TC_LOG_ERROR(
"entities.unit",
"WORLD: Unit has an attacker that isn't attacking it!");
5896 uint32 mask = 1 << (flag - 1);
5905 for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
5910 if (!spellInfo || !spellInfo->
IsPassive())
5918 for (PetSpellMap::const_iterator itr = pet->m_spells.begin(); itr != pet->m_spells.end(); ++itr)
5923 if (!spellInfo || !spellInfo->
IsPassive())
5938 for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
5940 SpellInfo const* spellProto = itr->second->GetBase()->GetSpellInfo();
5955 if (itr->second->GetBase()->GetCasterGUID() == target->
GetGUID())
5956 auraStates |= (1 << (itr->first - 1));
5976 for (AuraStateAurasMap::const_iterator itr = range.first; itr != range.second; ++itr)
5977 if (itr->second->GetBase()->GetCasterGUID() ==
Caster->GetGUID())
5983 return (*
m_unitData->AuraState & (1 << (flag - 1))) != 0;
6023 return master->GetControllingPlayer();
6039 TC_LOG_ERROR(
"entities.unit",
"Unit::GetFirstMinion: Minion {} not exist.", pet_guid.
ToString());
6055 TC_LOG_FATAL(
"entities.unit",
"Unit::GetGuardianPet: Guardian {} not exist.", pet_guid.
ToString());
6095 if (oldPet != minion && (oldPet->IsPet() || minion->
IsPet() || oldPet->GetEntry() != minion->
GetEntry()))
6098 if (
Pet* oldPetAsPet = oldPet->
ToPet())
6127 if (
BattlePets::BattlePet const* pet = thisPlayer->GetSession()->GetBattlePetMgr()->GetPet(thisPlayer->GetSummonedBattlePetGUID()))
6133 if (
uint32 display = pet->PacketInfo.DisplayID)
6203 if (
GetGUID() == (*itr)->GetCharmerGUID())
6207 if ((*itr)->GetOwnerGUID() !=
GetGUID())
6210 (*itr)->OutDebugInfo();
6222 if ((*itr)->IsPet())
6347 victimAI->HealReceived(healer, addhealth);
6349 if (
UnitAI* healerAI = healer ? healer->
GetAI() :
nullptr)
6350 healerAI->HealDone(victim, addhealth);
6358 Unit* unit = healer;
6400 for (AuraEffectList::const_iterator i = interceptAuras.begin(); i != interceptAuras.end(); ++i)
6402 if (
Unit* magnet = (*i)->GetBase()->GetCaster())
6443 TC_LOG_ERROR(
"entities.unit",
"Unit {} is trying to release unit {} which is neither charmed nor owned by it",
GetEntry(), target->
GetEntry());
6468 return u->isPossessed();
6475 Player* player =
nullptr;
6499 std::vector<Unit*> nearMembers;
6504 if (
Player* Target = itr->GetSource())
6508 nearMembers.push_back(Target);
6513 nearMembers.push_back(pet);
6516 if (nearMembers.empty())
6519 uint32 randTarget =
urand(0, nearMembers.size()-1);
6520 return nearMembers[randTarget];
6567 if (OldTotem->IsSummon())
6568 OldTotem->ToTempSummon()->UnSummon();
6586 spellHealLog.
Crit = critical;
6606 data.
Type = powertype;
6618 player->InterruptPowerRegen(powerType);
6621 int32 overEnergize = damage - gain;
6628 if (!spellProto || !victim)
6631 int32 DoneTotal = 0;
6632 float DoneTotalMod = 1.0f;
6634 auto callDamageScript = [&](
int32& dmg,
int32& flatMod,
float& pctMod)
6645 callDamageScript(pdamage, DoneTotal, DoneTotalMod);
6646 return int32(std::max(
float(pdamage + DoneTotal) * DoneTotalMod, 0.0f));
6652 return owner->SpellDamageBonusDone(victim, spellProto, pdamage, damagetype, spellEffectInfo, stack, spell, aurEff);
6664 DoneAdvertisedBenefit +=
static_cast<Guardian const*
>(
this)->GetBonusDamage();
6672 ApCoeffMod *= 100.0f;
6674 ApCoeffMod /= 100.0f;
6689 DoneTotal +=
int32(stack * ApCoeffMod * APbonus);
6693 if (DoneAdvertisedBenefit)
6703 DoneTotal +=
int32(DoneAdvertisedBenefit * coeff * stack);
6706 callDamageScript(pdamage, DoneTotal, DoneTotalMod);
6708 float tmpDamage = float(pdamage + DoneTotal) * DoneTotalMod;
6714 return int32(std::max(tmpDamage, 0.0f));
6733 return owner->SpellDamagePctDone(victim, spellProto, damagetype, spellEffectInfo);
6736 float DoneTotalMod = 1.0f;
6746 float maxModDamagePercentSchool = 0.0f;
6751 maxModDamagePercentSchool = std::max(maxModDamagePercentSchool, thisPlayer->m_activePlayerData->ModDamageDonePercent[i]);
6756 DoneTotalMod *= maxModDamagePercentSchool;
6789 if (spellProto->
Id == 228598)
6791 DoneTotalMod *= 3.0f;
6797 AddPct(DoneTotalMod, 30 * count);
6800 if (spellProto->
Id == 198590)
6806 return DoneTotalMod;
6814 float TakenTotalMod = 1.0f;
6829 AddPct(TakenTotalMod, cheatDeath->GetAmount());
6865 if (damagetype ==
DOT)
6875 if (caster && TakenTotalMod < 1.0f)
6877 float damageReduction = 1.0f - TakenTotalMod;
6879 for (
AuraEffect const* aurEff : casterIgnoreResist)
6881 if (!(aurEff->GetMiscValue() & spellProto->
GetSchoolMask()))
6884 AddPct(damageReduction, -aurEff->GetAmount());
6887 TakenTotalMod = 1.0f - damageReduction;
6890 float tmpDamage = pdamage * TakenTotalMod;
6891 return int32(std::max(tmpDamage, 0.0f));
6898 float overrideSP = thisPlayer->m_activePlayerData->OverrideSpellPowerByAPPercent;
6899 if (overrideSP > 0.0f)
6916 for (
AuraEffect const* aurEff : mDamageDoneOfStatPercent)
6918 if ((aurEff->GetMiscValue() & schoolMask) != 0)
6921 Stats const usedStat =
static_cast<Stats>(aurEff->GetMiscValueB());
6928 return DoneAdvertisedBenefit;
6942 float crit_chance = 0.0f;
6948 auto getPhysicalCritChance = [&]
6953 auto getMagicCritChance = [&]
6956 return *thisPlayer->m_activePlayerData->SpellCritPercentage;
6962 crit_chance = std::max(crit_chance, getPhysicalCritChance());
6965 crit_chance = std::max(crit_chance, getMagicCritChance());
6982 return std::max(crit_chance, 0.0f);
6992 float crit_chance = doneChance;
7008 for (
AuraEffect const* aurEff : mOverrideClassScript)
7018 crit_chance *= 1.5f;
7020 crit_chance += eff->GetAmount();
7041 crit_chance -= levelDiff * 1.0f;
7076 return aurEff->
GetCasterGUID() == tempSummon->GetSummonerGUID();
7087 return std::max(crit_chance, 0.0f);
7093 int32 crit_bonus = damage * 2;
7094 float crit_mod = 0.0f;
7100 if (crit_bonus != 0)
7101 AddPct(crit_bonus, crit_mod);
7105 return aurEff->GetCasterGUID() == caster->GetGUID();
7108 crit_bonus -= damage;
7114 crit_bonus += damage;
7123 int32 crit_bonus = damage;
7130 damage += crit_bonus;
7143 return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, spellEffectInfo, stack, spell, aurEff);
7149 int32 DoneTotal = 0;
7155 for (
AuraEffect const* aurEff : mOverrideClassScript)
7178 DoneAdvertisedBenefit +=
static_cast<Guardian const*
>(
this)->GetBonusDamage();
7191 if (DoneAdvertisedBenefit)
7201 DoneTotal +=
int32(DoneAdvertisedBenefit * coeff * stack);
7206 switch (otherSpellEffect.ApplyAuraName)
7225 float heal = float(healamount + DoneTotal) * DoneTotalMod;
7231 return int32(std::max(heal, 0.0f));
7239 return owner->SpellHealingPctDone(victim, spellProto);
7253 float DoneTotalMod = 1.0f;
7258 float maxModDamagePercentSchool = 0.0f;
7261 maxModDamagePercentSchool = std::max(maxModDamagePercentSchool, thisPlayer->m_activePlayerData->ModHealingDonePercent[i]);
7263 DoneTotalMod *= maxModDamagePercentSchool;
7279 if (healingDonePctVsTargetHealth->IsAffectingSpell(spellProto))
7280 AddPct(DoneTotalMod,
CalculatePct(
float(healingDonePctVsTargetHealth->GetAmount()), healthPctDiff));
7282 return DoneTotalMod;
7287 float TakenTotalMod = 1.0f;
7292 AddPct(TakenTotalMod, minval);
7296 AddPct(TakenTotalMod, maxval);
7304 TakenTotalMod *= 1.2f;
7307 if (damagetype ==
DOT)
7312 AddPct(TakenTotalMod, minval_hot);
7316 AddPct(TakenTotalMod, maxval_hot);
7334 float heal = healamount * TakenTotalMod;
7335 return int32(std::max(heal, 0.0f));
7342 float overrideSP = thisPlayer->m_activePlayerData->OverrideSpellPowerByAPPercent;
7343 if (overrideSP > 0.0f)
7366 for (AuraEffectList::const_iterator i = mHealingDoneOfStatPercent.begin(); i != mHealingDoneOfStatPercent.end(); ++i)
7369 Stats usedStat =
Stats((*i)->GetSpellEffectInfo().MiscValue);
7373 return advertisedBenefit;
7383 if ((schoolImmunityMask & schoolMask) == schoolMask)
7388 if ((damageImmunityMask & schoolMask) == schoolMask)
7412 uint32 schoolImmunityMask = 0;
7414 for (
auto itr = schoolList.begin(); itr != schoolList.end(); ++itr)
7416 schoolImmunityMask |= itr->first;
7419 if ((schoolImmunityMask & schoolMask) == schoolMask)
7424 if ((damageImmunityMask & schoolMask) == schoolMask)
7439 if (!requireImmunityPurgesEffectAttribute)
7440 return range.
begin() != range.
end();
7442 return std::any_of(range.
begin(), range.
end(), [](SpellImmuneContainer::value_type
const& entry)
7444 if (SpellInfo const* immunitySourceSpell = sSpellMgr->GetSpellInfo(entry.second, DIFFICULTY_NONE))
7445 if (immunitySourceSpell->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
7454 if (hasImmunity(idList, spellInfo->
Id))
7463 if (hasImmunity(dispelList, dispel))
7471 if (hasImmunity(mechanicList, mechanic))
7475 bool immuneToAllEffects =
true;
7480 if (!spellEffectInfo.IsEffect())
7484 immuneToAllEffects =
false;
7491 if (immuneToAllEffects)
7496 uint32 schoolImmunityMask = 0;
7498 for (
auto itr = schoolList.begin(); itr != schoolList.end(); ++itr)
7500 if ((itr->first & schoolMask) == 0)
7504 if (requireImmunityPurgesEffectAttribute)
7512 schoolImmunityMask |= itr->first;
7514 if ((schoolImmunityMask & schoolMask) == schoolMask)
7525 for (
auto itr = schoolList.begin(); itr != schoolList.end(); ++itr)
7535 for (
auto itr = damageList.begin(); itr != damageList.end(); ++itr)
7545 for (
auto itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
7546 mask |= (
UI64LIT(1) << itr->first);
7555 for (
auto itr = damageList.begin(); itr != damageList.end(); ++itr)
7562 bool requireImmunityPurgesEffectAttribute )
const
7576 if (!requireImmunityPurgesEffectAttribute)
7577 return range.
begin() != range.
end();
7579 return std::any_of(range.
begin(), range.
end(), [](SpellImmuneContainer::value_type
const& entry)
7581 if (SpellInfo const* immunitySourceSpell = sSpellMgr->GetSpellInfo(entry.second, DIFFICULTY_NONE))
7582 if (immunitySourceSpell->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT))
7591 if (hasImmunity(effectList, spellEffectInfo.
Effect))
7597 if (hasImmunity(mechanicList, mechanic))
7606 if (hasImmunity(list, aura))
7614 for (AuraEffectList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
7615 if (((*iter)->GetMiscValue() & spellInfo->
GetSchoolMask()) &&
7626 if (!pVictim || damage == 0)
7632 int32 DoneFlatBenefit = 0;
7665 float DoneTotalMod = 1.0f;
7675 float maxModDamagePercentSchool = 0.0f;
7679 if (schoolMask & (1 << i))
7680 maxModDamagePercentSchool = std::max(maxModDamagePercentSchool, thisPlayer->m_activePlayerData->ModDamageDonePercent[i]);
7685 DoneTotalMod *= maxModDamagePercentSchool;
7693 AddPct(DoneTotalMod, autoAttackDamage->GetAmount());
7717 else if (spellProto && spellProto->
Mechanic)
7725 float damageF = float(damage + DoneFlatBenefit) * DoneTotalMod;
7733 return int32(std::max(damageF, 0.0f));
7741 int32 TakenFlatBenefit = 0;
7751 if ((TakenFlatBenefit < 0) && (pdamage < -TakenFlatBenefit))
7755 float TakenTotalMod = 1.0f;
7791 if (damagetype ==
DOT)
7808 AddPct(TakenTotalMod, cheatDeath->GetAmount());
7824 if (TakenTotalMod < 1.0f)
7828 float damageReduction = 1.0f - TakenTotalMod;
7830 for (
AuraEffect const* aurEff : casterIgnoreResist)
7832 if (!(aurEff->GetMiscValue() & attackSchoolMask))
7835 AddPct(damageReduction, -aurEff->GetAmount());
7838 TakenTotalMod = 1.0f - damageReduction;
7841 float tmpDamage = float(pdamage + TakenFlatBenefit) * TakenTotalMod;
7842 return int32(std::max(tmpDamage, 0.0f));
7852 for (
auto itr = bounds.first; itr != bounds.second;)
7854 if (itr->second == spellId)
7884 return std::floor((WeaponSpeed * PPM) / 600.0f);
7904 player->SendOnCancelExpectedVehicleRideAura();
7947 player->EnablePetControlsOnDismount();
7948 player->ResummonPetTemporaryUnSummonedIfAny();
7949 player->ResummonBattlePetTemporaryUnSummonedIfAny();
7963 uint32 ridingSkill = 5000;
7965 bool isSubmerged =
false;
7966 bool isInWater =
false;
7977 mountFlags = areaTable->GetMountFlags();
7987 if (!mountCapability)
7990 if (ridingSkill < mountCapability->ReqRidingSkill)
8025 if (mountCapability->
ReqMapID != -1 &&
8045 return mountCapability;
8059 aurEff->RecalculateAmount();
8060 if (!aurEff->GetAmount())
8061 aurEff->GetBase()->Remove();
8063 if (!
HasAura(capability->ModSpellAuraID))
8064 CastSpell(
this, capability->ModSpellAuraID, aurEff);
8109 std::list<CombatReference*> toEnd;
8112 toEnd.push_back(pair.second);
8115 toEnd.push_back(pair.second);
8132 std::list<CombatReference*> toEnd;
8135 toEnd.push_back(pair.second);
8138 toEnd.push_back(pair.second);
8191 int64 val = dVal + curHealth;
8200 if (val < maxHealth)
8203 gain = val - curHealth;
8205 else if (curHealth != maxHealth)
8208 gain = maxHealth - curHealth;
8218 player->GetSession()->SendPacket(packet.
Write());
8233 int64 val = dVal + curHealth;
8241 if (val < maxHealth)
8243 else if (curHealth != maxHealth)
8244 gain = maxHealth - curHealth;
8257 uint32 triggerHealthPct = effect->GetAmount();
8258 uint32 triggerSpell = effect->GetSpellEffectInfo().TriggerSpell;
8264 if (newVal < threshold || oldVal > threshold)
8268 if (newVal > threshold || oldVal < threshold)
8292 int32 val = dVal + curPower;
8303 SetPower(power, val, withPowerUpdate);
8304 gain = val - curPower;
8306 else if (curPower != maxPower)
8308 SetPower(power, maxPower, withPowerUpdate);
8309 gain = maxPower - curPower;
8329 if (ownerPlayer->IsGroupVisibleFor(seerPlayer))
8363 int32 main_speed_mod = 0;
8364 float stack_bonus = 1.0f;
8365 float non_stack_bonus = 1.0f;
8405 int32 owner_speed_mod = 0;
8410 main_speed_mod = std::max(main_speed_mod, owner_speed_mod);
8428 TC_LOG_ERROR(
"entities.unit",
"Unit::UpdateSpeed: Unsupported move type ({})", mtype);
8433 float speed = std::max(non_stack_bonus, stack_bonus);
8435 AddPct(speed, main_speed_mod);
8458 if (speed > max_speed)
8468 if (speed < minSpeed)
8480 if (creature->HasUnitTypeMask(
UNIT_MASK_MINION) && !creature->IsInCombat())
8488 if (speed < ownerSpeed || creature->
IsWithinDist3d(followed, 10.0f))
8503 float baseMinSpeed = 1.0f;
8507 float min_speed =
CalculatePct(baseMinSpeed, minSpeedMod);
8508 if (speed < min_speed)
8527 rate = std::max(rate, 0.01f);
8569 playerMover->GetSession()->SendPacket(selfpacket.
Write());
8575 playerMover->SendMessageToSet(packet.
Write(),
false);
8639 zoneScript->OnUnitDeath(
this);
8688 if (!target->
IsEngaged() && !canInitialAggro)
8692 targetOwner->EngageWithTarget(
this);
8696 if (myPlayerOwner && targetPlayerOwner && !(myPlayerOwner->
duel && myPlayerOwner->
duel->Opponent == targetPlayerOwner))
8710 if (minion->IsInCombat())
8724 if (interactionAllowed)
8734 if (interactionAllowed)
8772 if (currentLevel < maxLevel)
8773 diminish.
hitCount = currentLevel + 1;
8788 if (limitDuration > 0 && duration > limitDuration)
8790 Unit const* target = targetOwner ? targetOwner :
this;
8791 WorldObject const* source = casterOwner ? casterOwner : caster;
8794 duration = limitDuration;
8853 duration =
int32(duration * mod);
8854 return (duration != 0);
8864 else if (diminish.
stack)
8869 if (!diminish.
stack)
8901 return (creatureType >= 1) ? (1 << (creatureType - 1)) : 0;
8967 TC_LOG_ERROR(
"entities.unit",
"ERROR in HandleStatFlatModifier(): non-existing UnitMods or wrong UnitModifierType!");
8974 switch (modifierType)
8992 TC_LOG_ERROR(
"entities.unit",
"ERROR in ApplyStatPctModifier(): non-existing UnitMods or wrong UnitModifierType!");
8999 switch (modifierType)
9034 TC_LOG_ERROR(
"entities.unit",
"attempt to access non-existing modifier value from UnitMods!");
9045 TC_LOG_ERROR(
"entities.unit",
"attempt to access non-existing modifier value from UnitMods!");
9109 ABORT_MSG(
"Not implemented UnitMod %u", unitMod);
9215 TC_LOG_ERROR(
"entities.unit",
"attempt to access non-existing UnitMods in GetTotalAuraModValue()!");
9273 float baseValue = value;
9291 ap += std::max<float>(
m_unitData->MainHandWeaponAttackPower,
m_unitData->RangedWeaponAttackPower);
9294 return ap * (1.0f +
m_unitData->RangedAttackPowerMultiplier);
9302 ap += std::max<float>(
m_unitData->MainHandWeaponAttackPower,
m_unitData->RangedWeaponAttackPower);
9311 return ap * (1.0f +
m_unitData->AttackPowerMultiplier);
9339 if (player->GetGroup())
9355 if (maxHealth < val)
9367 if (player->GetGroup())
9372 if (pet->isControlled())
9393 if (pet->isControlled())
9437 packet.
Powers.emplace_back(val, power);
9446 if (player->GetGroup())
9477 if (val < cur_power)
9487 if (effect->GetMiscValue() == power)
9489 uint32 effectAmount = effect->GetAmount();
9490 uint32 triggerSpell = effect->GetSpellEffectInfo().TriggerSpell;
9492 float oldValueCheck = oldVal;
9493 float newValueCheck = newVal;
9498 oldValueCheck =
GetPctOf(oldVal, maxPower);
9499 newValueCheck =
GetPctOf(newVal, maxPower);
9505 if (oldValueCheck >= effect->GetAmount() || newValueCheck < effectAmount)
9509 if (oldValueCheck <= effect->GetAmount() || newValueCheck > effectAmount)
9537 i_AIs.emplace(newAI);
9621 creature->SummonGraveyardTeleporter();
9656 if (owner->m_Controlled.find(
this) != owner->m_Controlled.end())
9658 TC_LOG_FATAL(
"entities.unit",
"Unit {} is in controlled list of {} when removed from world",
GetEntry(), owner->GetEntry());
9716 if (
CreatureAI* charmerAI = creatureCharmer->AI())
9717 newAI = charmerAI->GetAIForCharmedPlayer(
ToPlayer());
9744 ai->OnCharmed(
true);
9782 switch (missCondition)
9835 if (!damageNullified)
9898 if (
uint32 procEffectMask = aurApp->GetBase()->GetProcEffectMask(aurApp, eventInfo, now))
9900 aurApp->GetBase()->PrepareProcToTrigger(aurApp, eventInfo, now);
9901 aurasTriggeringProc.emplace_back(procEffectMask, aurApp);
9909 aurApp->GetBase()->PrepareProcChargeDrop(procEntry, eventInfo);
9910 aurasTriggeringProc.emplace_back(0, aurApp);
9916 aurApp->GetBase()->AddProcCooldown(procEntry, now);
9925 ASSERT(aurApp->GetTarget() ==
this);
9926 processAuraApplication(aurApp);
9933 processAuraApplication(itr->second);
9942 ProcEventInfo myProcEventInfo(
this, actionTarget, actionTarget, typeMaskActor, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
9951 if (modOwner !=
this && spell)
9954 for (
auto itr = modOwner->GetAppliedAuras().begin(); itr != modOwner->GetAppliedAuras().end(); ++itr)
9956 if (spell->
m_appliedMods.count(itr->second->GetBase()) != 0)
9957 modAuras.push_front(itr->second);
9959 modOwner->GetProcAurasTriggeredOnEvent(myAurasTriggeringProc, &modAuras, myProcEventInfo);
9965 ProcEventInfo targetProcEventInfo(
this, actionTarget,
this, typeMaskActionTarget, spellTypeMask, spellPhaseMask, hitMask, spell, damageInfo, healInfo);
9967 if (typeMaskActionTarget && actionTarget)
9972 if (typeMaskActionTarget && actionTarget)
9979 bool const disableProcs = triggeringSpell && triggeringSpell->
IsProcDisabled();
9986 for (
auto const& [procEffectMask, aurApp] : aurasTriggeringProc)
9988 if (aurApp->GetRemoveMode())
9991 aurApp->GetBase()->TriggerProcOnEvent(procEffectMask, aurApp, eventInfo);
10008 petActionFeedback.
SpellID = spellId;
10021 petActionSound.
Action = pettalk;
10070 movementGenerator->Pause(timer);
10082 movementGenerator->Resume(timer);
10154 displayScale = model->DisplayScale;
10177 if (!transforms.empty())
10180 for (
auto i = transforms.begin(); i != transforms.end(); ++i)
10186 if (!ignorePositiveAurasPreventingMounting)
10187 handledAura = (*i);
10190 handledAura = (*i);
10193 if (!aurApp->IsPositive())
10195 handledAura = (*i);
10211 else if (!shapeshiftAura.empty())
10274 std::list<Unit*> targets;
10284 targets.remove(exclude);
10287 for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end();)
10289 if (!
IsWithinLOSInMap(*tIter) || (*tIter)->IsTotem() || (*tIter)->IsSpiritService() || (*tIter)->IsCritter())
10290 targets.erase(tIter++);
10296 if (targets.empty())
10332 var *= (
apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
10381 if (player->GetGroup())
10386 Pet* pet = ((
Pet*)
this);
10491 return !petInfo.has_value();
10494 if (freeActiveSlotItr == petStable.
ActivePets.end())
10504 TC_LOG_ERROR(
"entities.unit",
"Pet::InitStatsForLevel() failed for creature (Entry: {})!", pet->
GetEntry());
10533 TC_LOG_ERROR(
"entities.unit",
"Unit::PlayOneShotAnimKitId using invalid AnimKit ID: {}", animKitId);
10597 if (attacker && !attacker->
IsInMap(victim))
10598 attacker =
nullptr;
10601 Player* player =
nullptr;
10607 bool isRewardAllowed = attacker != victim;
10609 isRewardAllowed = isRewardAllowed && !creature->
GetTapList().empty();
10611 std::vector<Player*> tappers;
10612 if (isRewardAllowed && creature)
10616 tappers.push_back(tapper);
10619 isRewardAllowed =
false;
10624 isRewardAllowed =
false;
10628 if (isRewardAllowed)
10630 std::unordered_set<Group*> groups;
10631 for (
Player* tapper : tappers)
10633 if (
Group* tapperGroup = tapper->GetGroup())
10635 if (groups.insert(tapperGroup).second)
10638 partyKillLog.
Player = player && tapperGroup->IsMember(player->
GetGUID()) ? player->
GetGUID() : tapper->GetGUID();
10640 partyKillLog.
Write();
10642 tapperGroup->BroadcastPacket(partyKillLog.
GetRawPacket(), tapperGroup->GetMemberGroup(tapper->GetGUID()) != 0);
10645 tapperGroup->UpdateLooterGuid(creature,
true);
10651 partyKillLog.
Player = tapper->GetGUID();
10653 tapper->SendDirectMessage(partyKillLog.
Write());
10662 dungeonEncounter = instance->GetBossDungeonEncounter(creature);
10666 if (dungeonEncounter)
10672 else if (!tappers.empty())
10674 Group* group = !groups.empty() ? *groups.begin() :
nullptr;
10692 for (
Group* tapperGroup : groups)
10693 tapperGroup->UpdateLooterGuid(creature);
10698 for (
Player* tapper : tappers)
10702 if (dungeonEncounter)
10718 for (
Player* tapper : tappers)
10720 if (
Quest const* reward =
sObjectMgr->GetQuestTemplate(vignette->Data->RewardQuestID))
10723 if (vignette->Data->VisibleTrackingQuestID)
10724 tapper->SetRewardedQuest(vignette->Data->VisibleTrackingQuestID);
10732 if (attacker && (attacker->
IsPet() || attacker->
IsTotem()))
10743 for (
Player* tapper : tappers)
10744 if (tapper->IsAtGroupRewardDistance(victim))
10745 Unit::ProcSkillsAndAuras(tapper, victim, {
PROC_FLAG_NONE,
PROC_FLAG_2_TARGET_DIES },
PROC_FLAG_NONE,
PROC_SPELL_TYPE_MASK_ALL,
PROC_SPELL_PHASE_NONE,
PROC_HIT_NONE,
nullptr,
nullptr,
nullptr);
10757 if (!skipSettingDeathState)
10766 for (
Player* tapper : tappers)
10768 Pet* pet = tapper->GetPet();
10783 plrVictim->SetPvPDeath(player !=
nullptr);
10790 TC_LOG_DEBUG(
"entities.unit",
"We are dead, losing {} percent durability", loss);
10792 plrVictim->DurabilityLossAll(baseLoss,
false);
10794 plrVictim->SendDurabilityLoss(plrVictim, loss);
10801 if (plrVictim->duel)
10803 plrVictim->duel->Opponent->CombatStopWithPets(
true);
10804 plrVictim->CombatStopWithPets(
true);
10813 if (!creature->
IsPet())
10835 ai->OnHealthDepleted(attacker,
true);
10836 ai->JustDied(attacker);
10841 if (
WorldObject * summoner = summon->GetSummoner())
10843 if (summoner->ToCreature() && summoner->ToCreature()->IsAIEnabled())
10844 summoner->ToCreature()->AI()->SummonedCreatureDies(creature, attacker);
10845 else if (summoner->ToGameObject() && summoner->ToGameObject()->AI())
10846 summoner->ToGameObject()->AI()->SummonedCreatureDies(creature, attacker);
10853 if (player && attacker != victim)
10856 pvp->HandleKill(player, victim);
10859 bf->HandleKill(player, victim);
10876 bg->HandleKillPlayer(playerVictim, player);
10879 bg->HandleKillUnit(victim->
ToCreature(), attacker);
10899 sScriptMgr->OnPVPKill(killerPlr, killedPlr);
10901 sScriptMgr->OnCreatureKill(killerPlr, killedCre);
10906 sScriptMgr->OnPlayerKilledByCreature(killerCre, killed);
11067 playerMover->SendDirectMessage(packet.
Write());
11087 Unit* caster =
nullptr;
11089 if (!fearAuras.empty())
11159 if (
this == charmer)
11234 if (player->isAFK())
11235 player->ToggleAFK();
11237 player->SetClientControl(
this,
false);
11308 ai->OnCharmed(
false);
11396 player->SetClientControl(
this,
true);
11411 charmedAI->OnCharmed(
false);
11449 m_vehicleKit = Trinity::make_unique_trackable<Vehicle>(
this, vehInfo, creatureEntry);
11464 if (!onRemoveFromWorld)
11495 return vehicleRoot;
11568 Group* group =
nullptr;
11578 Player* Target = itr->GetSource();
11584 TagUnitMap.push_back(Target);
11587 if (pet->IsAlive())
11588 TagUnitMap.push_back(pet);
11595 TagUnitMap.push_back(owner);
11597 if ((pet ==
this ||
IsInMap(pet)) && pet->IsAlive())
11598 TagUnitMap.push_back(pet);
11605 return entry->IsContestedGuardFaction();
11643 if (!(effMask & (1 << spellEffectInfo.EffectIndex)))
11647 effMask &= ~(1 << spellEffectInfo.EffectIndex);
11659 aura->ApplyForTargets();
11669 aura =
AddAura(spellId, target);
11716 playSpellVisualKit.
KitType = type;
11717 playSpellVisualKit.
Duration = duration;
11731 bool hasMissile =
false;
11738 if (spell->GetSpellInfo()->Id == spellId)
11740 itr.second->ScheduleAbort();
11754 packet.
Reverse = reverseMissile;
11770 Unit const* target =
nullptr;
11807 missChance += 19.0f;
11810 float resistMissChance = 100.0f;
11815 missChance -= resistMissChance - 100.0f;
11829 return std::max(missChance, 0.f);
11880 speedXY = -speedXY;
11884 float vcos = std::cos(o);
11885 float vsin = std::sin(o);
11893 return player->GetRatingBonusValue(cr);
11897 return owner->GetRatingBonusValue(cr);
11930 if (
Item* artifact = player->GetItemByGuid(artifactAura->GetCastItemGUID()))
11932 if (
ShapeshiftForm(artifactAppearance->OverrideShapeshiftFormID) == form)
11933 return artifactAppearance->OverrideShapeshiftDisplayID;
11937 bool useRandom =
false;
11952 std::vector<uint32> displayIds;
11953 displayIds.reserve(formModelData->Choices->size());
11955 for (std::size_t i = 0; i < formModelData->Choices->size(); ++i)
11962 displayIds.push_back(displayInfo->DisplayID);
11966 if (!displayIds.empty())
11971 if (
uint32 formChoice = player->GetCustomizationChoice(formModelData->OptionID))
11973 auto choiceItr = std::find_if(formModelData->Choices->begin(), formModelData->Choices->end(), [formChoice](
ChrCustomizationChoiceEntry const* choice)
11975 return choice->ID == formChoice;
11978 if (choiceItr != formModelData->Choices->end())
11980 return displayInfo->DisplayID;
12029 bool spellClickHandled =
false;
12033 auto clickBounds =
sObjectMgr->GetSpellClickInfoMapBounds(spellClickEntry);
12034 for (
auto const& clickPair : clickBounds)
12037 if (!clickPair.second.IsFitToRequirements(clicker,
this))
12041 if (!
sConditionMgr->IsObjectMeetingSpellClickConditions(spellClickEntry, clickPair.second.spellId, clicker,
this))
12054 bool valid =
false;
12067 TC_LOG_ERROR(
"sql.sql",
"Spell {} specified in npc_spellclick_spells is not a valid vehicle enter aura!", clickPair.second.spellId);
12076 caster->
CastSpell(target, clickPair.second.spellId, args);
12082 bp[spellEffectInfo.EffectIndex] =
int32(spellEffectInfo.BasePoints);
12110 spellClickHandled =
true;
12188 for (AuraEffectList::const_iterator itr = vehicleAuras.begin(); itr != vehicleAuras.end(); ++itr)
12190 if ((*itr)->GetCasterGUID() !=
GetGUID())
12194 ASSERT(!rideVehicleEffect);
12195 rideVehicleEffect = *itr;
12199 ASSERT(rideVehicleEffect);
12237 TC_LOG_ERROR(
"entities.vehicle",
"RemovePassenger() couldn't remove current unit from vehicle. Debug info: {}",
GetDebugInfo());
12244 if (player && player->
duel && player->
duel->IsMounted)
12257 pos = *exitPosition;
12276 float height = pos.
GetPositionZ() + vehicleCollisionHeight;
12284 init.SetTransportExit();
12352 Unit* broadcastSource =
this;
12360 transportBase->CalculatePassengerOffset(x, y, z, &o);
12366 moveTeleport.
Facing = o;
12368 playerMover->SendDirectMessage(moveTeleport.
Write());
12370 broadcastSource = playerMover;
12381 float tx, ty, tz, to;
12383 transportBase->CalculatePassengerOffset(tx, ty, tz, &to);
12397 TC_LOG_DEBUG(
"entities.unit",
"Unit::UpdatePosition({}, {}, {}) .. bad coordinates!", x, y, z);
12405 bool const relocated = (teleport ||
12438 return (relocated || turn);
12465 float addRage = baseRage;
12492 for (AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();)
12494 if ((*itr)->GetFactionTemplateEntry()->Faction == faction_id)
12496 (*itr)->AttackStop();
12497 itr = attackers.begin();
12503 std::vector<CombatReference*> refsToEnd;
12505 if (pair.second->GetOther(
this)->GetFactionTemplateEntry()->Faction == faction_id)
12506 refsToEnd.push_back(pair.second);
12511 minion->StopAttackFaction(faction_id);
12523 std::ostringstream o;
12524 o <<
"Summon Slot: ";
12531 o <<
"Controlled List: ";
12533 o << (*itr)->GetGUID().ToString() <<
", ";
12537 o <<
"Aura List: ";
12539 o << itr->first <<
", ";
12545 o <<
"Passenger List: ";
12548 o << passenger->GetGUID().ToString() <<
", ";
12569 if (mask & (1 << i) && (!resist || *resist > schoolResistance))
12570 resist = schoolResistance;
12573 return resist.value_or(0);
12603 transport->CalculatePassengerPosition(stayPos.x, stayPos.y, stayPos.z);
12749 playerMover->SendDirectMessage(packet.
Write());
12847 playerMover->SendDirectMessage(packet.
Write());
12873 static OpcodeServer const waterWalkingOpcodeTable[2][2] =
12884 playerMover->SendDirectMessage(packet.
Write());
12911 static OpcodeServer const featherFallOpcodeTable[2][2] =
12922 playerMover->SendDirectMessage(packet.
Write());
12943 float hoverHeight =
m_unitData->HoverHeight;
12975 playerMover->SendDirectMessage(packet.
Write());
13021 static OpcodeServer const collisionOpcodeTable[2][2] =
13032 playerMover->SendDirectMessage(packet.
Write());
13061 static OpcodeServer const swimToFlyTransOpcodeTable[2] =
13072 playerMover->SendDirectMessage(packet.
Write());
13093 static OpcodeServer const canTurnWhileFallingOpcodeTable[2] =
13104 playerMover->SendDirectMessage(packet.
Write());
13135 playerMover->SendDirectMessage(packet.
Write());
13155 static OpcodeServer const disableInertiaOpcodeTable[2] =
13166 playerMover->SendDirectMessage(packet.
Write());
13184 player->SendDirectMessage(moveSetVehicleRec.
Write());
13215 applyMovementForce.
Force = &force;
13216 movingPlayer->SendDirectMessage(applyMovementForce.
Write());
13222 updateApplyMovementForce.
Force = &force;
13240 moveRemoveMovementForce.
ID = id;
13241 movingPlayer->SendDirectMessage(moveRemoveMovementForce.
Write());
13266 static OpcodeServer const ignoreMovementForcesOpcodeTable[2] =
13277 movingPlayer->SendDirectMessage(packet.
Write());
13296 setModMovementForceMagnitude.
Speed = modMagnitude;
13297 movingPlayer->SendDirectMessage(setModMovementForceMagnitude.
Write());
13298 ++movingPlayer->m_movementForceModMagnitudeChanges;
13304 updateModMovementForceMagnitude.
Speed = modMagnitude;
13346 displayScale = model->DisplayScale;
13350 hoverHeight = modelData->HoverHeight * modelData->ModelScale * displayInfo->CreatureModelScale * displayScale;
13376 std::size_t sizePos = data->
wpos();
13387 std::size_t sizePos = data->
wpos();
13405 std::size_t sizePos = data->
wpos();
13411 m_unitData->WriteUpdate(*data, mask,
true,
this, target);
13421 if (requestedObjectMask.IsAnySet())
13426 if (unitMask.IsAnySet())
13430 std::size_t sizePos = buffer.
wpos();
13435 m_objectData->WriteUpdate(buffer, requestedObjectMask,
true,
this, target);
13438 m_unitData->WriteUpdate(buffer, unitMask,
true,
this, target);
13481 for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second ; ++itr)
13486 for (AuraEffectList::const_iterator auraItr = auraEffList.begin(); auraItr != auraEffList.end(); ++auraItr)
13488 if (aurEff != (*auraItr) && (!checkMiscValue || (*auraItr)->GetMiscValue() == miscValue) &&
13489 sSpellMgr->IsSpellMemberOfSpellGroup((*auraItr)->GetSpellInfo()->Id, itr->second))
13492 if (abs(val) < abs((*auraItr)->GetAmount()))
13493 val = (*auraItr)->GetAmount();
13518 for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end();)
13534 if (removeOtherAuraApplications && (!base->
IsArea() || base->
GetOwner() !=
this))
13542 itr = auras.begin();
13593 return m_unitData->VirtualItems[slot].ItemID;
13601 return m_unitData->VirtualItems[slot].ItemAppearanceModID;
13619 TC_LOG_ERROR(
"entities.unit",
"WorldObject::MonsterText: `broadcast_text` (ID: {}) was not found", textId);
13652 TC_LOG_ERROR(
"entities.unit",
"WorldObject::Whisper: `broadcast_text` was not {} found", textId);
13665 clearBossEmotes.
Write();
13675 ref.GetSource()->SendDirectMessage(clearBossEmotes.
GetRawPacket());
13680 auto findMatchingAuraEffectIn = [
this, spellInfo, &triggerFlag](
AuraType type) ->
SpellInfo const*
13684 bool matches = auraEffect->GetMiscValue() ?
uint32(auraEffect->GetMiscValue()) == spellInfo->
Id : auraEffect->IsAffectingSpell(spellInfo);
13712 for (
AuraEffect const* effect : visualOverrides)
13714 if (
uint32(effect->GetMiscValue()) == spellInfo->
Id)
13718 spellInfo = visualSpell;
13776 std::stringstream sstr;
13781 <<
" Class: " << std::to_string(
GetClass()) <<
"\n"
13788 size_t controlledCount = 0;
13792 sstr <<
"\n" <<
"m_Controlled " << controlledCount <<
" : " << controlled->GetGUID().ToString();
13801 name[i] = uf.
Name[i];
#define sCreatureAIRegistry
@ CREATURE_FLAG_EXTRA_NO_BLOCK
@ CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS
@ CREATURE_FLAG_EXTRA_NO_CRIT
@ CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN
@ CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS
@ CREATURE_FLAG_EXTRA_NO_PARRY
@ CREATURE_STATIC_FLAG_UNKILLABLE
DB2Storage< ArtifactAppearanceEntry > sArtifactAppearanceStore("ArtifactAppearance.db2", &ArtifactAppearanceLoadInfo::Instance)
DB2Storage< CreatureModelDataEntry > sCreatureModelDataStore("CreatureModelData.db2", &CreatureModelDataLoadInfo::Instance)
DB2Storage< LiquidTypeEntry > sLiquidTypeStore("LiquidType.db2", &LiquidTypeLoadInfo::Instance)
DB2Storage< AnimKitEntry > sAnimKitStore("AnimKit.db2", &AnimKitLoadInfo::Instance)
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", &ChrClassesLoadInfo::Instance)
DB2Storage< SpellShapeshiftFormEntry > sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", &SpellShapeshiftFormLoadInfo::Instance)
DB2Storage< CreatureDisplayInfoExtraEntry > sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", &CreatureDisplayInfoExtraLoadInfo::Instance)
DB2Storage< EmotesEntry > sEmotesStore("Emotes.db2", &EmotesLoadInfo::Instance)
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
DB2Storage< VignetteEntry > sVignetteStore("Vignette.db2", &VignetteLoadInfo::Instance)
DB2Storage< ChrRacesEntry > sChrRacesStore("ChrRaces.db2", &ChrRacesLoadInfo::Instance)
DB2Storage< PlayerConditionEntry > sPlayerConditionStore("PlayerCondition.db2", &PlayerConditionLoadInfo::Instance)
DB2Storage< ChrCustomizationReqEntry > sChrCustomizationReqStore("ChrCustomizationReq.db2", &ChrCustomizationReqLoadInfo::Instance)
DB2Storage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", &CreatureDisplayInfoLoadInfo::Instance)
DB2Storage< PowerDisplayEntry > sPowerDisplayStore("PowerDisplay.db2", &PowerDisplayLoadInfo::Instance)
DB2Storage< MountCapabilityEntry > sMountCapabilityStore("MountCapability.db2", &MountCapabilityLoadInfo::Instance)
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", &AreaTableLoadInfo::Instance)
DB2Storage< VehicleEntry > sVehicleStore("Vehicle.db2", &VehicleLoadInfo::Instance)
@ CanMountWhileTransformedAsThis
@ AllowUnderwaterSwimmingMounts
@ AllowSurfaceSwimmingMounts
#define MAX_SPELL_EFFECTS
@ MOUNT_CAPABILITY_FLAG_FLYING
@ MOUNT_CAPABIILTY_FLAG_IGNORE_RESTRICTIONS
@ MOUNT_CAPABILITY_FLAG_UNDERWATER
@ MOUNT_CAPABILITY_FLAG_GROUND
@ MOUNT_CAPABILITY_FLAG_FLOAT
@ SummonFromBattlePetJournal
std::chrono::steady_clock::time_point TimePoint
time_point shorthand typedefs
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
#define ASSERT_NODEBUGINFO
#define ASSERT_NOTNULL(pointer)
@ GROUP_UPDATE_FLAG_CUR_HP
@ GROUP_UPDATE_FLAG_POWER_TYPE
@ GROUP_UPDATE_FLAG_MAX_HP
@ GROUP_UPDATE_FLAG_MAX_POWER
@ GROUP_UPDATE_FLAG_AURAS
@ GROUP_UPDATE_FLAG_LEVEL
@ GROUP_UPDATE_FLAG_CUR_POWER
@ GROUP_UPDATE_FLAG_PET_CUR_HP
@ GROUP_UPDATE_FLAG_PET_AURAS
@ GROUP_UPDATE_FLAG_PET_MAX_HP
@ ITEM_MODIFIER_ARTIFACT_APPEARANCE_ID
@ ITEM_SUBCLASS_WEAPON_AXE2
@ ITEM_SUBCLASS_WEAPON_STAFF
@ ITEM_SUBCLASS_WEAPON_MACE
@ ITEM_SUBCLASS_WEAPON_EXOTIC2
@ ITEM_SUBCLASS_WEAPON_WARGLAIVES
@ ITEM_SUBCLASS_WEAPON_FISHING_POLE
@ ITEM_SUBCLASS_WEAPON_MACE2
@ ITEM_SUBCLASS_WEAPON_DAGGER
@ ITEM_SUBCLASS_WEAPON_SWORD
@ ITEM_SUBCLASS_WEAPON_AXE
@ ITEM_SUBCLASS_WEAPON_FIST_WEAPON
@ ITEM_SUBCLASS_WEAPON_EXOTIC
@ ITEM_SUBCLASS_WEAPON_THROWN
@ ITEM_SUBCLASS_WEAPON_SWORD2
@ ITEM_SUBCLASS_WEAPON_POLEARM
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_FATAL(filterType__,...)
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true)
std::unordered_map< ObjectGuid, std::unique_ptr< Loot > > GenerateDungeonEncounterPersonalLoot(uint32 dungeonEncounterId, uint32 lootId, LootStore const &store, LootType type, WorldObject const *lootOwner, uint32 minMoney, uint32 maxMoney, uint16 lootMode, MapDifficultyEntry const *mapDifficulty, std::vector< Player * > const &tappers)
bool IsInvalidMovementSlot(uint8 const slot)
@ MOTION_PRIORITY_HIGHEST
#define DEFAULT_PLAYER_HOVER_HEIGHT
#define DEFAULT_PLAYER_DISPLAY_SCALE
#define NOMINAL_MELEE_RANGE
@ NOTIFY_VISIBILITY_CHANGED
float const DEFAULT_COLLISION_HEIGHT
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ TELE_TO_NOT_LEAVE_COMBAT
@ TELE_TO_NOT_UNSUMMON_PET
@ TELE_TO_NOT_LEAVE_TRANSPORT
std::unordered_map< uint32, PlayerSpell > PlayerSpellMap
#define INVENTORY_SLOT_BAG_0
Trinity::IteratorPair< UF::ChrCustomizationChoice const * > MakeChrCustomizationChoiceRange(Container const &container)
uint32 urand(uint32 min, uint32 max)
bool roll_chance_f(float chance)
bool roll_chance_i(int chance)
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
@ SERVERSIDE_VISIBILITY_GM
@ SERVERSIDE_VISIBILITY_GHOST
@ SPELL_ATTR10_RESET_COOLDOWN_ON_ENCOUNTER_END
#define MAX_POWERS_PER_CLASS
@ SPELL_ATTR7_DONT_CAUSE_SPELL_PUSHBACK
@ SPELL_ATTR7_DISPEL_REMOVES_CHARGES
@ SPELL_ATTR7_NO_ATTACK_PARRY
@ SPELL_ATTR7_DO_NOT_COUNT_FOR_PVP_SCOREBOARD
@ SPELL_ATTR7_NO_ATTACK_MISS
@ SPELL_ATTR7_NO_ATTACK_DODGE
@ SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL
@ SPELL_ATTR5_REMOVE_ENTERING_ARENA
@ NPC_CLICK_CAST_TARGET_CLICKER
@ NPC_CLICK_CAST_ORIG_CASTER_OWNER
@ NPC_CLICK_CAST_CASTER_CLICKER
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_MAGIC
@ SPELL_ATTR2_ALLOW_WHILE_INVISIBLE
@ SPELL_ATTR2_PROC_COOLDOWN_ON_FAILURE
@ SPELL_ATTR2_ALLOW_DEAD_TARGET
@ SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS
@ SPELL_ATTR2_NO_SCHOOL_IMMUNITIES
@ ANIM_MOUNT_SELF_SPECIAL
@ SPELL_ATTR1_ALLOW_WHILE_STEALTHED
@ SPELL_ATTR1_AURA_STAYS_AFTER_COMBAT
@ SPELL_ATTR1_IMMUNITY_PURGES_EFFECT
@ SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS
@ UNIT_DYNFLAG_SPECIALINFO
@ SPELL_ATTR3_TREAT_AS_PERIODIC
@ SPELL_ATTR3_ALLOW_AURA_WHILE_DEAD
@ SPELL_ATTR3_SUPPRESS_TARGET_PROCS
@ SPELL_ATTR3_NO_DURABILITY_LOSS
@ SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON
@ SPELL_ATTR3_SUPPRESS_CASTER_PROCS
@ SPELL_ATTR3_NO_AVOIDANCE
@ SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON
@ SPELL_ATTR3_IGNORE_CASTER_MODIFIERS
@ SPELL_DAMAGE_CLASS_RANGED
@ SPELL_DAMAGE_CLASS_MAGIC
@ SPELL_DAMAGE_CLASS_NONE
@ SPELL_DAMAGE_CLASS_MELEE
@ SPELL_EFFECT_HEALTH_LEECH
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
#define PER_CASTER_AURA_STATE_MASK
@ SPELL_ATTR0_NO_ACTIVE_DEFENSE
@ SPELL_ATTR0_ALLOW_WHILE_MOUNTED
@ SPELL_ATTR0_NO_IMMUNITIES
@ SPELL_ATTR0_PROC_FAILURE_BURNS_CHARGE
@ SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL
@ DIMINISHING_LEVEL_IMMUNE
@ DIMINISHING_LEVEL_TAUNT_IMMUNE
@ DIMINISHING_AOE_KNOCKBACK
@ AURA_STATE_WOUNDED_20_PERCENT
@ AURA_STATE_HEALTHY_75_PERCENT
@ AURA_STATE_WOUNDED_35_PERCENT
@ AURA_STATE_WOUND_HEALTH_35_80
@ AURA_STATE_WOUND_HEALTH_20_80
@ AURA_STATE_WOUNDED_25_PERCENT
#define MAX_GAMEOBJECT_SLOT
@ CHAT_MSG_MONSTER_WHISPER
@ CHAT_MSG_RAID_BOSS_WHISPER
@ CHAT_MSG_RAID_BOSS_EMOTE
@ SPELL_ATTR4_NO_HARMFUL_THREAT
@ SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS
@ SPELL_ATTR4_NO_PARTIAL_IMMUNITY
@ SPELL_ATTR4_REACTIVE_DAMAGE_PROC
@ SPELL_ATTR4_ALLOW_ENTERING_ARENA
@ SPELL_ATTR8_IGNORE_SPELLCAST_OVERRIDE_COST
@ SPELL_ATTR8_NO_ATTACK_BLOCK
@ SPELL_ATTR6_NO_PUSHBACK
@ SPELL_ATTR6_IGNORE_CASTER_DAMAGE_MODIFIERS
@ SPELL_ATTR6_IGNORE_HEALING_MODIFIERS
@ SPELL_ATTR6_ABSORB_CANNOT_BE_IGNORE
@ SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST
AuraTriggerOnHealthChangeDirection
@ AURA_EFFECT_HANDLE_STAT
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT
@ AURA_REMOVE_BY_ENEMY_SPELL
@ AURA_REMOVE_BY_INTERRUPT
@ SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS
@ SPELL_AURA_MOD_SCHOOL_MASK_DAMAGE_FROM_CASTER
@ SPELL_AURA_CLONE_CASTER
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL
@ SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE
@ SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK
@ SPELL_AURA_MOD_PERIODIC_DAMAGE_TAKEN
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED
@ SPELL_AURA_MOD_MOUNTED_FLIGHT_SPEED_ALWAYS
@ SPELL_AURA_MOD_AUTOATTACK_RANGE
@ SPELL_AURA_MOD_PARRY_PERCENT
@ SPELL_AURA_ABILITY_IGNORE_AURASTATE
@ SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE
@ SPELL_AURA_MOD_IGNORE_TARGET_RESIST
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_MOD_DAMAGE_DONE_VERSUS
@ SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT
@ SPELL_AURA_DAMAGE_SHIELD
@ SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES
@ SPELL_AURA_MOD_MELEE_DAMAGE_FROM_CASTER
@ SPELL_AURA_PERIODIC_HEALTH_FUNNEL
@ SPELL_AURA_IGNORE_DUAL_WIELD_HIT_PENALTY
@ SPELL_AURA_MOD_POSSESS_PET
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_MOD_EXPERTISE
@ SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN
@ SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL
@ SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER
@ SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
@ SPELL_AURA_MOD_HEALING_DONE_PERCENT
@ SPELL_AURA_MOD_CRIT_CHANCE_VERSUS_TARGET_HEALTH
@ SPELL_AURA_CAST_WHILE_WALKING_BY_SPELL_LABEL
@ SPELL_AURA_TRIGGER_SPELL_ON_HEALTH_PCT
@ SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS
@ SPELL_AURA_SHARE_DAMAGE_PCT
@ SPELL_AURA_CAST_WHILE_WALKING
@ SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE
@ SPELL_AURA_MOD_HEALING_TAKEN_FROM_CASTER
@ SPELL_AURA_TRIGGER_SPELL_ON_POWER_AMOUNT
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_IGNORE_HIT_DIRECTION
@ SPELL_AURA_IGNORE_COMBAT_RESULT
@ SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_MOD_SPEED_NOT_STACK
@ SPELL_AURA_MOD_HEALING_DONE_PCT_VERSUS_TARGET_HEALTH
@ SPELL_AURA_SCHOOL_HEAL_ABSORB
@ SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED
@ SPELL_AURA_COSMETIC_MOUNTED
@ SPELL_AURA_BYPASS_ARMOR_FOR_CASTER
@ SPELL_AURA_MOD_HIT_CHANCE
@ SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_MOD_ENEMY_DODGE
@ SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_MOD_STUN_DISABLE_GRAVITY
@ SPELL_AURA_MOD_DODGE_PERCENT
@ SPELL_AURA_MOD_INCREASE_SWIM_SPEED
@ SPELL_AURA_SPLIT_DAMAGE_PCT
@ SPELL_AURA_SCHOOL_ABSORB_OVERKILL
@ SPELL_AURA_DEFLECT_SPELLS
@ SPELL_AURA_MOD_CRIT_DAMAGE_BONUS
@ SPELL_AURA_MOD_HEALING_DONE
@ SPELL_AURA_MOD_HEALING_RECEIVED
@ SPELL_AURA_MOD_HEALING_PCT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT
@ SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER_PET
@ SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE
@ SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT
@ SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED
@ SPELL_AURA_MOD_CRITICAL_DAMAGE_TAKEN_FROM_CASTER
@ SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT
@ SPELL_AURA_MOUNT_RESTRICTIONS
@ SPELL_AURA_OVERRIDE_SPELL_VISUAL
@ 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_DAMAGE_DONE_VERSUS_AURASTATE
@ SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS
@ SPELL_AURA_MOD_POWER_GAIN_PCT
@ SPELL_AURA_MOD_CRIT_PCT
@ SPELL_AURA_MOD_MINIMUM_SPEED
@ SPELL_AURA_MOD_BLOCK_CRIT_CHANCE
@ SPELL_AURA_MOD_SPELL_DAMAGE_FROM_CASTER
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE_BY_TARGET_AURA_MECHANIC
@ SPELL_AURA_MOD_POWER_DISPLAY
@ SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER_WITH_ABILITIES
@ SPELL_AURA_MOD_TARGET_RESISTANCE
@ SPELL_AURA_MOD_MINIMUM_SPEED_RATE
@ SPELL_AURA_MOD_SPEED_ALWAYS
@ SPELL_AURA_MOD_ROOT_DISABLE_GRAVITY
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_AURA_MOD_VERSATILITY
@ SPELL_AURA_CAST_WHILE_WALKING_ALL
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_MOD_DAMAGE_DONE_FOR_MECHANIC
@ SPELL_AURA_MOD_COMBAT_RESULT_CHANCE
@ SPELL_AURA_MOD_MOUNTED_SPEED_ALWAYS
@ SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
@ SPELL_AURA_MOD_MOVEMENT_FORCE_MAGNITUDE
@ SPELL_AURA_MOD_DAMAGE_DONE_CREATURE
@ SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL
@ SPELL_AURA_TRIGGER_SPELL_ON_POWER_PCT
@ SPELL_AURA_MOD_DURABILITY_LOSS
@ SPELL_AURA_MOD_DAMAGE_TAKEN_FROM_CASTER_BY_LABEL
@ SPELL_AURA_PERIODIC_LEECH
@ SPELL_AURA_MOD_AUTOATTACK_CRIT_CHANCE
@ SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT
@ SPELL_AURA_MOD_PERCENT_STAT
@ SPELL_AURA_MOD_AUTOATTACK_DAMAGE
@ SPELL_AURA_MOD_DAMAGE_DONE
@ SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT
@ SPELL_AURA_MOD_MECHANIC_RESISTANCE
@ SPELL_AURA_MOD_UNATTACKABLE
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_OVERRIDE_CLASS_SCRIPTS
@ SPELL_AURA_MOD_INCREASE_MOUNTED_SPEED
@ SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED
@ SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS
@ SPELL_AURA_INTERCEPT_MELEE_RANGED_ATTACKS
@ SPELL_AURA_MOD_BLOCK_PERCENT
AuraTriggerOnPowerChangeDirection
@ DamagePushbackPlayerOnly
@ DamageCancelsPlayerOnly
@ StartOfDungeonEncounter
@ PeriodicHealingAndDamage
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore power and reagent cost.
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore mounted/on vehicle restrictions.
@ TRIGGERED_IGNORE_GCD
Will ignore GCD.
@ TRIGGERED_NONE
Not triggered.
std::vector< AuraEffect * > AuraEffectVector
@ SPELL_ATTR0_CU_IGNORE_ARMOR
@ SPELL_ATTR0_CU_ENCHANT_PROC
@ SPELL_ATTR0_CU_CAN_CRIT
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
@ SPELL_ATTR0_CU_BINARY_SPELL
@ SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC
@ SPELL_SPECIFIC_MAGE_POLYMORPH
#define MELEE_BASED_TRIGGER_MASK
std::pair< SpellSpellGroupMap::const_iterator, SpellSpellGroupMap::const_iterator > SpellSpellGroupMapBounds
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT
@ SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST
@ PROC_SPELL_TYPE_MASK_ALL
@ PROC_FLAG_MAIN_HAND_WEAPON_SWING
@ PROC_FLAG_TAKE_MELEE_SWING
@ PROC_FLAG_TAKE_ANY_DAMAGE
@ PROC_FLAG_ENCOUNTER_START
@ PROC_FLAG_DEAL_MELEE_SWING
@ PROC_FLAG_TAKE_HARMFUL_SPELL
@ PROC_FLAG_OFF_HAND_WEAPON_SWING
@ PROC_FLAG_2_TARGET_DIES
@ SPELL_CAST_SOURCE_NORMAL
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
@ UNIT_FLAG2_AI_WILL_ONLY_SWIM_IF_TARGET_SWIMS
@ UNIT_FLAG2_INTERACT_WHILE_HOSTILE
@ UNIT_FLAG2_DISARM_OFFHAND
@ UNIT_FLAG2_DISARM_RANGED
@ HITINFO_SWINGNOHITSOUND
@ UNIT_STAND_STATE_SIT_HIGH_CHAIR
@ UNIT_STAND_STATE_SIT_MEDIUM_CHAIR
@ UNIT_STAND_STATE_SIT_LOW_CHAIR
@ UNIT_STAND_STATE_SIT_CHAIR
@ MOVEMENTFLAG_WATERWALKING
@ MOVEMENTFLAG_MASK_MOVING
@ MOVEMENTFLAG_DISABLE_GRAVITY
@ MOVEMENTFLAG_FALLING_SLOW
@ MOVEMENTFLAG_MASK_MOVING_FLY
@ MOVEMENTFLAG_FALLING_FAR
@ MOVEMENTFLAG_SPLINE_ELEVATION
@ MOVEMENTFLAG_DISABLE_COLLISION
@ MOVEMENTFLAG2_CAN_DOUBLE_JUMP
@ MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS
@ MOVEMENTFLAG2_CAN_TURN_WHILE_FALLING
@ MOVEMENTFLAG2_IGNORE_MOVEMENT_FORCES
#define MAX_DECLINED_NAME_CASES
@ UNIT_NPC_FLAG_TABARDDESIGNER
@ UNIT_NPC_FLAG_SPIRIT_HEALER
@ UNIT_NPC_FLAG_AUCTIONEER
@ UNIT_NPC_FLAG_AREA_SPIRIT_HEALER
@ UNIT_NPC_FLAG_BATTLEMASTER
@ UNIT_NPC_FLAG_INNKEEPER
@ UNIT_NPC_FLAG_SPELLCLICK
@ UNIT_NPC_FLAG_PLAYER_VEHICLE
@ UNIT_NPC_FLAG_FLIGHTMASTER
@ UNIT_NPC_FLAG_PETITIONER
@ UNIT_FLAG3_ALLOW_INTERACTION_WHILE_IN_COMBAT
@ MOVEMENTFLAG3_DISABLE_INERTIA
#define MAX_EQUIPMENT_ITEMS
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_REMOVE_CLIENT_CONTROL
@ UNIT_FLAG_UNINTERACTIBLE
@ UNIT_FLAG_PLAYER_CONTROLLED
@ UNIT_FLAG_PET_IN_COMBAT
float baseMoveSpeed[MAX_MOVE_TYPE]
ProcFlagsHit createProcHitMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
bool IsInterruptFlagIgnoredForSpell(InterruptFlag, Unit const *, SpellInfo const *, SpellInfo const *)
void ApplyPercentModFloatVar(float &var, float val, bool apply)
float playerBaseMoveSpeed[MAX_MOVE_TYPE]
@ BASE_PCT_EXCLUDE_CREATE
std::unordered_multimap< uint32, uint32 > SpellImmuneContainer
@ UNIT_MASK_CONTROLABLE_GUARDIAN
@ UNIT_MOD_DAMAGE_OFFHAND
@ UNIT_MOD_STAT_INTELLECT
@ UNIT_MOD_RESISTANCE_SHADOW
@ UNIT_MOD_RESISTANCE_FROST
@ UNIT_MOD_RESISTANCE_HOLY
@ UNIT_MOD_RESISTANCE_START
@ UNIT_MOD_RESISTANCE_ARCANE
@ UNIT_MOD_ARCANE_CHARGES
@ UNIT_MOD_BURNING_EMBERS
@ UNIT_MOD_RESISTANCE_FIRE
@ UNIT_MOD_RESISTANCE_NATURE
@ UNIT_MOD_ALTERNATE_ENCOUNTER
@ UNIT_MOD_ALTERNATE_QUEST
@ UNIT_MOD_ALTERNATE_MOUNT
@ UNIT_MOD_DAMAGE_MAINHAND
@ UNIT_MOD_ATTACK_POWER_RANGED
#define CURRENT_FIRST_NON_MELEE_SPELL
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ UNIT_STATE_ATTACK_PLAYER
@ UNIT_STATE_UNATTACKABLE
@ UNIT_STATE_LOST_CONTROL
@ UNIT_STATE_CANNOT_AUTOATTACK
@ UNIT_STATE_MELEE_ATTACKING
#define MAX_AGGRO_RESET_TIME
#define ATTACK_DISPLAY_DELAY
std::vector< DispelableAura > DispelChargesList
#define CURRENT_MAX_SPELL
@ CR_VERSATILITY_DAMAGE_TAKEN
@ CR_VERSATILITY_DAMAGE_DONE
#define ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE
float GetPctOf(T value, T max)
T RoundToInterval(T &num, T floor, T ceil)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
T ApplyPct(T &base, U pct)
T CalculatePct(T base, U pct)
@ VEHICLE_SPELL_RIDE_HARDCODED
uint32 GetSpellId() const
void SetRemoveMode(AuraRemoveMode mode)
void _HandleEffect(uint8 effIndex, bool apply)
uint32 GetEffectMask() const
AuraRemoveMode GetRemoveMode() const
bool HasEffect(uint8 effect) const
SpellInfo const * GetSpellInfo() const
AuraType GetAuraType() const
void HandleEffect(AuraApplication *aurApp, uint8 mode, bool apply, AuraEffect const *triggeredBy=nullptr)
bool CanBeRecalculated() const
SpellEffectInfo const & GetSpellEffectInfo() const
bool IsAffectingSpell(SpellInfo const *spell) const
void ChangeAmount(int32 newAmount, bool mark=true, bool onStackOrReapply=false, AuraEffect const *triggeredBy=nullptr)
int32 GetMiscValueB() const
int32 GetMiscValue() const
int32 GetBaseAmount() const
ObjectGuid GetCasterGUID() const
bool HasMoreThanOneEffectForType(AuraType auraType) const
virtual void _UnapplyForTarget(Unit *target, Unit *caster, AuraApplication *auraApp)
void CallScriptEffectCalcCritChanceHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, Unit const *victim, float &critChance)
ObjectGuid GetCastId() const
int32 GetMaxDuration() const
void CallScriptEffectAbsorbHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount, bool &defaultPrevented)
virtual std::string GetDebugInfo() const
void CallScriptDispel(DispelInfo *dispelInfo)
static Aura * TryRefreshStackOrCreate(AuraCreateInfo &createInfo, bool updateEffectMask=true)
ApplicationMap const & GetApplicationMap()
void SetStackAmount(uint8 num)
void CallScriptCalcDamageAndHealingHandlers(AuraEffect const *aurEff, AuraApplication const *aurApp, Unit *victim, int32 &damageOrHealing, int32 &flatMod, float &pctMod)
Unit * GetUnitOwner() const
AuraApplication const * GetApplicationOfTarget(ObjectGuid guid) const
ObjectGuid GetCasterGUID() const
bool HasEffect(uint8 effIndex) const
AuraEffectVector const & GetAuraEffects() const
WorldObject * GetOwner() const
bool ModCharges(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool CanStackWith(Aura const *existingAura) const
int32 CalcDispelChance(Unit const *auraTarget, bool offensive) const
bool IsAppliedOnTarget(ObjectGuid guid) const
int32 GetDuration() const
void UpdateOwner(uint32 diff, WorldObject *owner)
void UnregisterSingleTarget()
bool IsDeathPersistent() const
AuraEffect * GetEffect(uint32 index) const
void SetNeedClientUpdateForTargets() const
void CallScriptEnterLeaveCombatHandlers(AuraApplication const *aurApp, bool isNowInCombat)
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool resetPeriodicTimer=true)
void SetDuration(int32 duration, bool withMods=false)
void CallScriptEffectAfterAbsorbHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount)
void CallScriptEffectManaShieldHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount, bool &defaultPrevented)
AuraObjectType GetType() const
uint8 GetStackAmount() const
SpellInfo const * GetSpellInfo() const
ObjectGuid GetCastItemGUID() const
uint32 GetEffectMask() const
void HandleAuraSpecificMods(AuraApplication const *aurApp, Unit *caster, bool apply, bool onReapply)
Difficulty GetCastDifficulty() const
void SetIsSingleTarget(bool val)
virtual void _ApplyForTarget(Unit *target, Unit *caster, AuraApplication *auraApp)
std::unordered_map< ObjectGuid, AuraApplication * > ApplicationMap
void CallScriptEffectAfterManaShieldHandlers(AuraEffect *aurEff, AuraApplication const *aurApp, DamageInfo &dmgInfo, uint32 &absorbAmount)
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
void CallScriptAfterDispel(DispelInfo *dispelInfo)
void _Remove(AuraRemoveMode removeMode)
bool IsSingleTarget() const
void put(std::size_t pos, T value)
void SuppressPvPCombat(UnitFilter *unitFilter=nullptr)
void EndAllPvECombat(UnitFilter *unitFilter=nullptr)
std::unordered_map< ObjectGuid, PvPCombatReference * > const & GetPvPCombatRefs() const
void Update(uint32 tdiff)
bool HasPvECombat() const
std::unordered_map< ObjectGuid, CombatReference * > const & GetPvECombatRefs() const
void EndAllCombat(UnitFilter *unitFilter=nullptr)
bool HasPvPCombat() const
void EndAllPvPCombat(UnitFilter *unitFilter=nullptr)
static bool IsPlayerMeetingCondition(Player const *player, PlayerConditionEntry const *condition)
virtual void JustUnregisteredDynObject(DynamicObject *)
virtual void JustSummonedGameobject(GameObject *)
virtual void OnSpellClick(Unit *, bool)
virtual void SummonedGameobjectDespawn(GameObject *)
virtual void OnSpellFailed(SpellInfo const *)
virtual void JustUnregisteredAreaTrigger(AreaTrigger *)
virtual void KilledUnit(Unit *)
virtual void JustRegisteredAreaTrigger(AreaTrigger *)
virtual void JustRegisteredDynObject(DynamicObject *)
bool IsTreatedAsRaidUnit() const
CreatureDifficulty const * GetCreatureDifficulty() const
uint16 GetLootMode() const
std::unordered_map< ObjectGuid, std::unique_ptr< Loot > > m_personalLoot
void SetLastDamagedTime(time_t val)
bool IsEvadingAttacks() const
uint8 GetLevelForTarget(WorldObject const *target) const override
void AllLootRemovedFromCorpse()
GuidUnorderedSet const & GetTapList() const
void SetTappedBy(Unit const *unit, bool withGroup=true)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
float GetSpellDamageMod(CreatureClassifications classification) const
CreatureTemplate const * GetCreatureTemplate() const
CreatureGroup * GetFormation()
bool CannotPenetrateWater() const
bool CanEnterWater() const override
void SetDisplayId(uint32 displayId, bool setNative=false) override
void LowerPlayerDamageReq(uint64 unDamage)
bool HasFlag(CreatureStaticFlags flag) const
bool IsFullyLooted() const
void SendAIReaction(AiReaction reactionType)
bool IsInEvadeMode() const
static char const * GetBroadcastTextValue(BroadcastTextEntry const *broadcastText, LocaleConstant locale=DEFAULT_LOCALE, uint8 gender=GENDER_MALE, bool forceGender=false)
static bool IsInArea(uint32 objectAreaId, uint32 areaId)
std::set< MountTypeXCapabilityEntry const *, MountTypeXCapabilityEntryComparator > MountTypeXCapabilitySet
void ResistDamage(uint32 amount)
void AbsorbDamage(uint32 amount)
void ModifyDamage(int32 amount)
Unit * GetAttacker() const
DamageInfo(Unit *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, SpellSchoolMask schoolMask, DamageEffectType damageType, WeaponAttackType attackType)
uint32 GetOriginalDamage() const
SpellInfo const * GetSpellInfo() const
void BlockDamage(uint32 amount)
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
ProcFlagsHit GetHitMask() const
uint8 GetRemovedCharges() const
DispelableAura(Aura *aura, int32 dispelChance, uint8 dispelCharges)
uint32 GetSpellId() const
constexpr bool HasFlag(T flag) const
void KillAllEvents(bool force)
std::multimap< uint64, BasicEvent * > const & GetEvents() const
T_VALUES GetValue(FLAG_TYPE flag) const
void SetValue(FLAG_TYPE flag, T_VALUES value)
ObjectGuid GetOwnerGUID() const override
uint32 GetSpellId() const
void SetOwnerGUID(ObjectGuid owner)
void SetRespawnTime(int32 respawn)
uint32 GetMembersCount() const
ObjectGuid GetLooterGuid() const
GroupReference * GetFirstMember()
bool InitStatsForLevel(uint8 level)
uint32 GetEffectiveHeal() const
SpellInfo const * GetSpellInfo() const
uint32 GetHitMask() const
uint32 GetOriginalHeal() const
void SetEffectiveHeal(uint32 amount)
SpellSchoolMask GetSchoolMask() const
void AbsorbHeal(uint32 amount)
HealInfo(Unit *healer, Unit *target, uint32 heal, SpellInfo const *spellInfo, SpellSchoolMask schoolMask)
ItemTemplate const * GetTemplate() const
bool HaveLootFor(uint32 loot_id) const
void CreatureRelocation(Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail=true)
ZLiquidStatus GetLiquidStatus(PhaseShift const &phaseShift, float x, float y, float z, Optional< map_liquidHeaderTypeFlags > ReqLiquidType={}, LiquidData *data=nullptr, float collisionHeight=2.03128f)
MapDifficultyEntry const * GetMapDifficulty() const
float GetWaterOrGroundLevel(PhaseShift const &phaseShift, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=2.03128f)
BattlegroundMap * ToBattlegroundMap()
Difficulty GetDifficultyID() const
MapEntry const * GetEntry() const
void PlayerRelocation(Player *, float x, float y, float z, float orientation)
void setDeathState(DeathState s) override
bool IsGuardianPet() const
bool HasMovementGenerator(std::function< bool(MovementGenerator const *)> const &filter, MovementSlot slot=MOTION_SLOT_ACTIVE) const
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE)
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
MovementGeneratorType GetCurrentMovementGeneratorType() const
void MoveFleeing(Unit *enemy, Milliseconds time=0ms)
void PropagateSpeedChange()
void MoveKnockbackFrom(Position const &origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
void MoveJumpTo(float angle, float speedXY, float speedZ)
void Remove(MovementGenerator *movement, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveTo(Vector3 const &destination, bool generatePath=true, bool forceDestination=false)
void DisableTransportPathTransformations()
void SetFacing(float angle)
LowType GetCounter() const
static ObjectGuid const Empty
bool IsMOTransport() const
std::string ToString() const
static CreatureModel const * ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=nullptr)
void SetDynamicFlag(uint32 flag)
static Creature * ToCreature(Object *o)
float GetObjectScale() const
static Unit * ToUnit(Object *o)
ObjectGuid const & GetGUID() const
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
bool HasDynamicFlag(uint32 flag) const
void RemoveUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
void BuildValuesUpdateBlockForPlayerWithFlag(UpdateData *data, UF::UpdateFieldFlag flags, Player const *target) const
virtual void DestroyForPlayer(Player *target) const
CreateObjectBits m_updateFlag
void SetUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
virtual void ClearUpdateMask(bool remove)
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
UF::UpdateFieldHolder m_values
ByteBuffer & PrepareValuesUpdateBuffer(UpdateData *data) const
static ObjectGuid GetGUID(Object const *o)
virtual void SetObjectScale(float scale)
void ForceUpdateFieldChange(UF::UpdateFieldSetter< T > const &)
static Player * ToPlayer(Object *o)
void ApplyPercentModUpdateFieldValue(UF::UpdateFieldSetter< T > setter, float percent, bool apply)
Optional< uint32 > GetCurrentActivePetIndex() const
std::array< Optional< PetInfo >, MAX_ACTIVE_PETS > ActivePets
void SetCurrentActivePetIndex(uint32 index)
void FillPetInfo(PetStable::PetInfo *petInfo, Optional< ReactStates > forcedReactState={}) const
void SetGroupUpdateFlag(uint32 flag)
std::string GetDebugInfo() const override
bool CreateBaseAtCreatureInfo(CreatureTemplate const *cinfo, Unit *owner)
bool CreateBaseAtCreature(Creature *creature)
bool isControlled() const
void InitPetCreateSpells()
static void InheritPhaseShift(WorldObject *target, WorldObject const *source)
void StopCastingBindSight() const
bool HaveAtClient(Object const *u) const
void SetClientControl(Unit *target, bool allowMove)
bool IsInSameRaidWith(Player const *p) const
void SendAttackSwingCancelAttack() const
void AddPetToUpdateFields(PetStable::PetInfo const &pet, PetSaveMode slot, PetStableFlags flags)
void SetGroupUpdateFlag(uint32 flag)
void DuelComplete(DuelCompleteType type)
void SendDirectMessage(WorldPacket const *data) const
uint16 GetSkillValue(uint32 skill) const
void SendAutoRepeatCancel(Unit *target)
PetStable & GetOrInitPetStable()
float GetRatingBonusValue(CombatRating cr) const
void CharmSpellInitialize()
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, TeleportToOptions options=TELE_TO_NONE, Optional< uint32 > instanceId={})
void UpdatePvPState(bool onlyFFA=false)
bool InBattleground() const
void DurabilityPointLossForEquipSlot(EquipmentSlots slot)
void PetSpellInitialize()
uint32 GetBaseSpellPowerBonus() const
Returns base spellpower bonus from spellpower stat on items, without spellpower from intellect stat.
void SetFallInformation(uint32 time, float z)
void SendRemoveControlBar() const
WorldSession * GetSession() const
OutdoorPvP * GetOutdoorPvP() const
void CastItemCombatSpell(DamageInfo const &damageInfo)
PlayerSpellMap const & GetSpellMap() const
void UpdateCriteria(CriteriaType type, uint64 miscValue1=0, uint64 miscValue2=0, uint64 miscValue3=0, WorldObject *ref=nullptr)
Battleground * GetBattleground() const
float GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
bool IsGameMaster() const
std::array< uint8, MAX_MOVE_TYPE > m_forced_speed_changes
void PossessSpellInitialize()
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
Group * GetGroup(Optional< uint8 > partyIndex)
std::unique_ptr< DuelInfo > duel
uint8 GetSubGroup() const
void VehicleSpellInitialize()
Team GetEffectiveTeam() const
void SetFactionForRace(uint8 race)
void SetContestedPvP(Player *attackedPlayer=nullptr)
void ResummonPetTemporaryUnSummonedIfAny()
void UpdatePvP(bool state, bool override=false)
bool IsInSameGroupWith(Player const *p) const
ProcEventInfo(Unit *actor, Unit *actionTarget, Unit *procTarget, ProcFlagsInit const &typeMask, ProcFlagsSpellType spellTypeMask, ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
SpellSchoolMask GetSchoolMask() const
Spell const * GetProcSpell() const
SpellInfo const * GetSpellInfo() const
float CalcValueMultiplier(WorldObject *caster, Spell *spell=nullptr) const
float BonusCoefficientFromAP
EnumFlag< SpellEffectAttributes > EffectAttributes
SpellEffIndex EffectIndex
void SendCooldownEvent(SpellInfo const *spellInfo, uint32 itemId=0, Spell *spell=nullptr, bool startCooldown=true)
void ResetCooldowns(Predicate predicate, bool update=false)
void StartCooldown(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool onHold=false, Optional< Duration > forcedCooldown={})
DiminishingLevels GetDiminishingReturnsMaxLevel() const
Mechanics GetEffectMechanic(SpellEffIndex effIndex) const
SpellInfo const * GetFirstRankSpell() const
bool HasEffect(SpellEffectName effect) const
std::unordered_set< uint32 > Labels
uint64 GetAllEffectsMechanicMask() const
bool IsRequiringDeadTarget() const
EnumFlag< SpellAuraInterruptFlags2 > AuraInterruptFlags2
bool IsDeathPersistent() const
bool IsCooldownStartedOnEvent() const
bool HasAnyAuraInterruptFlag() const
bool IsStackableOnOneSlotWithDifferentCasters() const
uint32 GetDispelMask() const
SpellSpecificType GetSpellSpecific() const
DiminishingReturnsType GetDiminishingReturnsGroupType() const
bool IsMultiSlotAura() const
int32 GetMaxDuration() const
int32 GetDiminishingReturnsLimitDuration() const
DiminishingGroup GetDiminishingReturnsGroupForSpell() const
SpellCastResult CheckTarget(WorldObject const *caster, WorldObject const *target, bool implicit=true) const
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
AuraStateType GetAuraState() const
bool HasAttribute(SpellAttr0 attribute) const
uint64 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const
bool IsPassiveStackableWithRanks() const
uint32 MaxAffectedTargets
int32 GetDuration() const
std::vector< SpellEffectInfo > const & GetEffects() const
SpellCastResult CheckExplicitTarget(WorldObject const *caster, WorldObject const *target, Item const *itemTarget=nullptr) const
bool CanPierceImmuneAura(SpellInfo const *auraSpellInfo) const
bool IsRangedWeaponSpell() const
EnumFlag< SpellAuraInterruptFlags > AuraInterruptFlags
bool HasAura(AuraType aura) const
bool HasAuraInterruptFlag(SpellAuraInterruptFlags flag) const
bool HasLabel(uint32 labelId) const
bool IsPositiveEffect(uint8 effIndex) const
bool IsSingleTarget() const
static CreatureImmunities const * GetCreatureImmunities(int32 creatureImmunitiesId)
SpellInfo const * GetSpellInfo() const
void CallScriptCalcDamageHandlers(Unit *victim, int32 &damage, int32 &flatMod, float &pctMod)
bool IsInterruptable() const
void SendChannelUpdate(uint32 time)
static Spell const * ExtractSpellFromEvent(BasicEvent *event)
bool IsProcDisabled() const
int32 GetCastTime() const
std::string GetDebugInfo() const
void CallScriptCalcHealingHandlers(Unit *victim, int32 &healing, int32 &flatMod, float &pctMod)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, SpellCastVisual spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, int32 *param1=nullptr, int32 *param2=nullptr)
int32 GetProcChainLength() const
void CallScriptOnResistAbsorbCalculateHandlers(DamageInfo const &damageInfo, uint32 &resistAmount, int32 &absorbAmount)
CurrentSpellTypes GetCurrentContainer() const
SpellCastResult prepare(SpellCastTargets const &targets, AuraEffect const *triggeredByAura=nullptr)
void SetReferencedFromCurrent(bool yes)
UsedSpellMods m_appliedMods
void CallScriptCalcCritChanceHandlers(Unit const *victim, float &chance)
void finish(SpellCastResult result=SPELL_CAST_OK)
virtual void UnSummon(uint32 msTime=0)
SummonPropertiesEntry const *const m_Properties
void ForwardThreatForAssistingMe(Unit *assistant, float baseAmount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false)
== AFFECT OTHERS' THREAT LISTS ==
bool IsThreatListEmpty(bool includeOffline=false) const
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
uint32 GetSpell(uint8 slot=0) const
virtual ObjectGuid GetTransportGUID() const =0
Utility class to enable range for loop syntax for multimap.equal_range uses.
constexpr end_iterator end() const
constexpr iterator begin() const
Mask const & GetChangesMask() const
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
void ClearChangesMask(UpdateField< T, BlockBit, Bit >(Derived::*field))
bool HasChanged(uint32 index) const
uint32 GetChangedObjectTypeMask() const
virtual void OnCharmed(bool isNew)
float GetUnitMissChance() const
void EnterVehicle(Unit *base, int8 seatId=-1)
void RewardRage(uint32 baseRage)
void SetCannotTurn(bool apply)
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
Unit * GetCharmed() const
void ClearUnitState(uint32 f)
void OutDebugInfo() const
bool IsWithinMeleeRangeAt(Position const &pos, Unit const *obj) const
void RemoveAreaTrigger(uint32 spellId)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
void SetMinion(Minion *minion, bool apply)
std::pair< AuraApplicationMap::iterator, AuraApplicationMap::iterator > AuraApplicationMapBoundsNonConst
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
void CastStop(uint32 except_spellid=0)
bool IsWithinMeleeRange(Unit const *obj) const
void ApplyMovementForce(ObjectGuid id, Position origin, float magnitude, MovementForceType type, Position direction={}, ObjectGuid transportGuid=ObjectGuid::Empty)
void SetImmuneToAll(bool apply, bool keepCombat)
void SetImmuneToPC(bool apply, bool keepCombat)
bool m_duringRemoveFromWorld
float GetBoundingRadius() const
void KnockbackFrom(Position const &origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
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)
Vehicle * GetVehicle() const
EnumFlag< SpellAuraInterruptFlags2 > m_interruptMask2
bool IsWithinBoundaryRadius(const Unit *obj) const
virtual bool IsMovementPreventedByCasting() const
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
virtual void UpdateResistances(uint32 school)
bool HealthAbovePct(int32 pct) const
void RemoveGameObject(GameObject *gameObj, bool del)
bool isTargetableForAttack(bool checkFakeDeath=true) const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
uint32 GetSchoolImmunityMask() const
std::unique_ptr< SpellHistory > _spellHistory
void UpdateAttackTimeField(WeaponAttackType att)
float GetHealthPct() const
float m_baseSpellCritChance
SpellImmuneContainer m_spellImmune[MAX_SPELL_IMMUNITY]
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)
bool HasExtraUnitMovementFlag(uint32 f) const
void AIUpdateTick(uint32 diff)
void JumpTo(float speedXY, float speedZ, float angle, Optional< Position > dest={})
virtual void RecalculateObjectScale()
void SetHealth(uint64 val)
virtual MovementGeneratorType GetDefaultMovementType() const
bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, flag128 familyFlags) const
void SetFacingToPoint(Position const &point, bool force=true)
uint32 GetUnitMovementFlags() const
LiquidTypeEntry const * _lastLiquid
static uint32 SpellCriticalHealingBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
void _UpdateAutoRepeatSpell()
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
void SendMoveKnockBack(Player *player, float speedXY, float speedZ, float vcos, float vsin)
float GetTotalAuraModValue(UnitMods unitMod) const
AreaTriggerList m_areaTrigger
bool IsInteractionAllowedInCombat() const
int32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, int32 healamount, DamageEffectType damagetype) const
void RemoveAllControlled()
ObjectGuid GetDemonCreatorGUID() const
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
void RemoveAurasByShapeShift()
float GetTotalStatValue(Stats stat) const
void SetPlayHoverAnim(bool enable, bool sendUpdate=true)
std::unique_ptr< MotionMaster > i_motionMaster
void SetUnitFlag3(UnitFlags3 flags)
void SetGender(Gender gender)
float GetUnitCriticalChanceTaken(Unit const *attacker, WeaponAttackType attackType, float critDone) const
bool IsContestedGuard() const
std::unordered_map< ObjectGuid, uint32 > extraAttacksTargets
void UpdateUnitMod(UnitMods unitMod)
void UpdateDamagePctDoneMods(WeaponAttackType attackType)
float GetSpeed(UnitMoveType mtype) const
bool SetFall(bool enable)
void _UnregisterDynObject(DynamicObject *dynObj)
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void UpdateObjectVisibility(bool forced=true) override
int64 ModifyHealth(int64 val)
std::array< uint32, MAX_REACTIVE > m_reactiveTimer
void AddExtraUnitMovementFlag(uint32 f)
std::shared_ptr< UnitAI > i_AI
uint32 GetCastSpellXSpellVisualId(SpellInfo const *spellInfo) const override
void SetCurrentCastSpell(Spell *pSpell)
void TriggerOnHealthChangeAuras(uint64 oldVal, uint64 newVal)
void SetMinionGUID(ObjectGuid guid)
float SpellDamagePctDone(Unit *victim, SpellInfo const *spellProto, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo) const
void RestoreDisplayId(bool ignorePositiveAurasPreventingMounting=false)
Diminishing m_Diminishing
void SetHoverHeight(float hoverHeight)
void BuildValuesUpdateForPlayerWithMask(UpdateData *data, UF::ObjectData::Mask const &requestedObjectMask, UF::UnitData::Mask const &requestedUnitMask, Player const *target) const
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
void FinishSpell(CurrentSpellTypes spellType, SpellCastResult result=SPELL_CAST_OK)
void EnergizeBySpell(Unit *victim, SpellInfo const *spellInfo, int32 damage, Powers powerType)
void UpdateHeight(float newZ)
Only server-side height update, does not broadcast to client.
std::array< Spell *, CURRENT_MAX_SPELL > m_currentSpells
void _RemoveNoStackAurasDueToAura(Aura *aura, bool owned)
virtual void OnPhaseChange()
void SetConfused(bool apply)
void _UpdateSpells(uint32 time)
ThreatManager & GetThreatManager()
void ReplaceAllPvpFlags(UnitPVPStateFlags flags)
void AddToWorld() override
virtual float GetArmorMultiplierForTarget(WorldObject const *) const
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, SpellInfo const *spellProto) const
virtual void AtExitCombat()
void _UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode)
bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const
void SetInCombatWith(Unit *enemy, bool addSecondUnitSuppressed=false)
virtual void Say(std::string_view text, Language language, WorldObject const *target=nullptr)
void PropagateSpeedChange()
-------—End of Pet responses methods-------—
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=nullptr) const
void DelayOwnedAuras(uint32 spellId, ObjectGuid caster, int32 delaytime)
void SetControlled(bool apply, UnitState state)
UF::UpdateField< UF::UnitData, 0, TYPEID_UNIT > m_unitData
SpellSchools GetSpellSchoolByAuraGroup(UnitMods unitMod) const
void SetStunned(bool apply)
std::array< ObjectGuid, MAX_SUMMON_SLOT > m_SummonSlot
Stats GetStatByAuraGroup(UnitMods unitMod) const
void HandleSpellClick(Unit *clicker, int8 seatId=-1)
bool CanUseAttackType(uint8 attacktype) const
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Player * GetDemonCreatorPlayer() const
void _RegisterAreaTrigger(AreaTrigger *areaTrigger)
bool HasAuraTypeWithCaster(AuraType auraType, ObjectGuid caster) const
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
uint32 GetMountDisplayId() const
void UpdateAllDamageDoneMods()
void RemoveVisibleAura(AuraApplication *aurApp)
int64 GetHealthGain(int64 dVal)
Creature * GetVehicleCreatureBase() const
std::unique_ptr< CharmInfo > m_charmInfo
void UpdateDisplayPower()
float GetCollisionHeight() const override
void AddExtraUnitMovementFlag2(uint32 f)
void RemoveAllGameObjects()
static void DealHeal(HealInfo &healInfo)
bool isPossessedByPlayer() const
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void _RegisterDynObject(DynamicObject *dynObj)
void UpdateSpeed(UnitMoveType mtype)
static void DealDamageMods(Unit const *attacker, Unit const *victim, uint32 &damage, uint32 *absorb)
bool IsPolymorphed() const
bool IsAreaSpiritHealer() const
void PlayOneShotAnimKitId(uint16 animKitId)
float m_weaponDamage[MAX_ATTACK][2]
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
virtual void SetPvP(bool state)
ObjectGuid GetOwnerGUID() const override
uint64 GetMechanicImmunityMask() const
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
bool isInBackInMap(Unit const *target, float distance, float arc=float(M_PI)) const
float GetCombatRatingReduction(CombatRating cr) const
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, ObjectGuid casterGUID, WorldObject *dispeller, uint8 chargesRemoved=1)
void RemoveExtraUnitMovementFlag(uint32 f)
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
static void CalcHealAbsorb(HealInfo &healInfo)
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=BASE_ATTACK, bool crit=false, bool blocked=false, Spell *spell=nullptr)
virtual SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType attackType=BASE_ATTACK) const =0
Unit * GetVehicleRoot() const
void SetCantProc(bool apply)
Unit * GetCharmer() const
void SetSpeed(UnitMoveType mtype, float newValue)
Aura * GetOwnedAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, Aura *except=nullptr) const
void SetStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float val)
Unit * getAttackerForHelper() const
std::forward_list< AuraEffect * > AuraEffectList
float GetUnitParryChance(WeaponAttackType attType, Unit const *victim) const
void SetPower(Powers power, int32 val, bool withPowerUpdate=true)
void TriggerOnPowerChangeAuras(Powers power, int32 oldVal, int32 newVal)
void SendMeleeAttackStart(Unit *victim)
Pet * CreateTamedPetFrom(Creature *creatureTarget, uint32 spell_id=0)
Trinity::unique_trackable_ptr< Vehicle > m_vehicleKit
bool IsInDisallowedMountForm() const
void ApplyStatPctModifier(UnitMods unitMod, UnitModifierPctType modifierType, float amount)
bool IsImmunedToSpell(SpellInfo const *spellInfo, WorldObject const *caster, bool requireImmunityPurgesEffectAttribute=false) const
VisibleAuraContainer m_visibleAuras
UnitPVPStateFlags GetPvpFlags() const
virtual void UpdateDamageDoneMods(WeaponAttackType attackType, int32 skipEnchantSlot=-1)
void _removeAttacker(Unit *pAttacker)
void SendAttackStateUpdate(CalcDamageInfo *damageInfo)
AuraApplication * GetAuraApplicationOfRankedSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraApplication *except=nullptr) const
std::forward_list< AuraApplication * > AuraApplicationList
uint32 GetTransformSpell() const
void RemoveAllAurasExceptType(AuraType type)
void DealSpellDamage(SpellNonMeleeDamage const *damageInfo, bool durabilityLoss)
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct) const
uint32 _lastExtraAttackSpell
void SetAnimTier(AnimTier animTier, bool notifyClient=true)
static void CalcAbsorbResist(DamageInfo &damageInfo, Spell *spell=nullptr)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
virtual bool CanFly() const =0
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack)
Unit * GetVehicleBase() const
bool haveOffhandWeapon() const
MotionMaster * GetMotionMaster()
bool SetFeatherFall(bool enable)
Powers GetPowerType() const
bool HasUnitFlag(UnitFlags flags) const
static uint32 CalcArmorReducedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=MAX_ATTACK, uint8 attackerLevel=0)
void _addAttacker(Unit *pAttacker)
void ProcSkillsAndReactives(bool isVictim, Unit *procTarget, ProcFlagsInit const &typeMask, ProcFlagsHit hitMask, WeaponAttackType attType)
std::array< ObjectGuid, MAX_GAMEOBJECT_SLOT > m_ObjectSlot
void SetCharm(Unit *target, bool apply)
void SetMovedUnit(Unit *target)
ObjectGuid GetCharmedGUID() const
void SetCreatedBySpell(int32 spellId)
bool SetHover(bool enable, bool updateAnimTier=true)
bool CanDualWield() const
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
void UpdateInterruptMask()
void StartReactiveTimer(ReactiveType reactive)
void IncrDiminishing(SpellInfo const *auraSpellInfo)
void CleanupsBeforeDelete(bool finalCleanup=true) override
void SetFacingToObject(WorldObject const *object, bool force=true)
void ResumeMovement(uint32 timer=0, uint8 slot=0)
Aura * AddAura(uint32 spellId, Unit *target)
bool HasInterruptFlag(SpellAuraInterruptFlags flags) const
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
bool isAttackingPlayer() const
void AtEndOfEncounter(EncounterType type)
virtual void AtEnterCombat()
uint32 GetBaseAttackTime(WeaponAttackType att) const
std::unique_ptr< MovementForces > _movementForces
int32 GetMaxNegativeAuraModifier(AuraType auraType) const
void UpdateSplineMovement(uint32 t_diff)
uint32 GetDamageReduction(uint32 damage) const
std::array< float, MAX_STATS > m_floatStatPosBuff
void SetUnitFlag2(UnitFlags2 flags)
bool HasUnitFlag2(UnitFlags2 flags) const
std::string GetDebugInfo() const override
std::pair< AuraMap::const_iterator, AuraMap::const_iterator > AuraMapBounds
virtual bool IsLoading() const
uint32 BuildAuraStateUpdateForTarget(Unit const *target) const
bool isInFrontInMap(Unit const *target, float distance, float arc=float(M_PI)) const
float m_auraFlatModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_FLAT_END]
void SetImmuneToNPC(bool apply, bool keepCombat)
void PauseMovement(uint32 timer=0, uint8 slot=0, bool forced=true)
void SetPetNameTimestamp(uint32 timestamp)
bool IsSplineEnabled() const
std::array< uint32, MAX_ATTACK > m_baseAttackSpeed
void RemoveAllAurasRequiringDeadTarget()
void UpdateAuraForGroup()
Vignettes::VignetteData const * GetVignette() const
void UpdateReactives(uint32 p_time)
int32 MeleeDamageBonusDone(Unit *pVictim, int32 damage, WeaponAttackType attType, DamageEffectType damagetype, SpellInfo const *spellProto=nullptr, Mechanics mechanic=MECHANIC_NONE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, Spell *spell=nullptr, AuraEffect const *aurEff=nullptr)
virtual bool CanApplyResilience() const
AuraEffect * IsScriptOverriden(SpellInfo const *spell, int32 script) const
float m_modRangedHitChance
float GetCombatReach() const override
void AtTargetAttacked(Unit *target, bool canInitialAggro)
static uint32 CalcSpellResistedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const *spellInfo)
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
void SetBonusResistanceMod(SpellSchools school, int32 val)
int32 GetMaxPower(Powers power) const
std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > AuraApplicationMapBounds
int32 GetMaxNegativeAuraModifierByMiscMask(AuraType auraType, uint32 misc_mask) const
void RemoveAllAreaTriggers()
int32 HealBySpell(HealInfo &healInfo, bool critical=false)
void AddPlayerToVision(Player *player)
void RemoveNpcFlag(NPCFlags flags)
void SendHealSpellLog(HealInfo &healInfo, bool critical=false)
int32 GetMaxPositiveAuraModifier(AuraType auraType) const
GameObject * GetGameObject(uint32 spellId) const
void _ExitVehicle(Position const *exitPosition=nullptr)
uint32 m_removedAurasCount
void RemoveAllAurasOnDeath()
uint32 m_movementCounter
Incrementing counter used in movement packets.
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
bool IsStandState() const
TempSummon * ToTempSummon()
bool IsGravityDisabled() const
CharmInfo * GetCharmInfo()
void AtStartOfEncounter(EncounterType type)
bool SetCanTransitionBetweenSwimAndFly(bool enable)
bool SetDisableInertia(bool disable)
bool IsInCombatWith(Unit const *who) const
ObjectGuid GetCharmerOrOwnerGUID() const override
int32 GetMechanicResistChance(SpellInfo const *spellInfo) const
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
TimeTracker m_splineSyncTimer
void RemoveUnitFlag3(UnitFlags3 flags)
AuraMap::iterator m_auraUpdateIterator
Unit * GetMeleeHitRedirectTarget(Unit *victim, SpellInfo const *spellInfo=nullptr)
void DestroyForPlayer(Player *target) const override
ObjectGuid _lastDamagedTargetGuid
float SpellCritChanceDone(Spell *spell, AuraEffect const *aurEff, SpellSchoolMask schoolMask, WeaponAttackType attackType=BASE_ATTACK) const
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
void CancelSpellMissiles(uint32 spellId, bool reverseMissile=false, bool abortSpell=false)
void RemoveAurasWithAttribute(uint32 flags)
void RemoveAllFollowers()
virtual void SetInteractionAllowedWhileHostile(bool interactionAllowed)
void UpdateMountCapability()
void _DeleteRemovedAuras()
Player * GetPlayerMovingMe() const
void _ApplyAura(AuraApplication *aurApp, uint32 effMask)
void SetUninteractible(bool apply)
Unit * GetNextRandomRaidMemberOrPet(float radius)
void SetBaseAttackTime(WeaponAttackType att, uint32 val)
virtual bool HasSpell(uint32) const
virtual bool IsAffectedByDiminishingReturns() const
std::pair< AuraStateAurasMap::const_iterator, AuraStateAurasMap::const_iterator > AuraStateAurasMapBounds
int32 GetTotalAuraModifierByMiscMask(AuraType auraType, uint32 misc_mask) const
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)
void SetSheath(SheathState sheathed)
bool IsOnVehicle(Unit const *vehicle) const
void SendSpellDamageResist(Unit *target, uint32 spellId)
bool isInAccessiblePlaceFor(Creature const *c) const
bool IsCharmedOwnedByPlayerOrPlayer() const
int32 GetMinPower(Powers power) const
virtual void SetInteractionAllowedInCombat(bool interactionAllowed)
Unit * EnsureVictim() const
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
uint32 getAttackTimer(WeaponAttackType type) const
bool IsDuringRemoveFromWorld() const
void SendPlaySpellVisual(Unit *target, uint32 spellVisualId, uint16 missReason, uint16 reflectStatus, float travelSpeed, bool speedAsTime=false, float launchDelay=0.0f)
bool m_ControlledByPlayer
void SetFeared(bool apply)
Unit * GetCharmerOrOwner() const
uint32 GetDiseasesByCaster(ObjectGuid casterGUID, bool remove=false)
void RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid)
virtual void UpdateDamagePhysical(WeaponAttackType attType)
bool IsPlayingHoverAnim() const
void _ApplyAllAuraStatMods()
void SetBattlePetCompanionNameTimestamp(uint32 timestamp)
uint32 GetCreatureType() const
void AddGameObject(GameObject *gameObj)
void InterruptMovementBasedAuras()
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, WorldObject const *caster, bool requireImmunityPurgesEffectAttribute=false) const
int32 GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const *aurEff, AuraType auraType, bool checkMiscValue=false, int32 miscValue=0) const
bool HasNegativeAuraWithInterruptFlag(InterruptFlags flag, ObjectGuid guid=ObjectGuid::Empty) const
bool IsThreatened() const
void SendSetVehicleRecId(uint32 vehicleId)
bool SetSwim(bool enable)
void BuildValuesUpdateWithFlag(ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const override
void SetEmoteState(Emote emote)
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auraType, uint32 misc_mask, AuraEffect const *except=nullptr) const
PositionUpdateInfo _positionUpdateInfo
void SetPvpFlag(UnitPVPStateFlags flags)
virtual void UpdateNearbyPlayersInteractions()
AuraApplicationList m_interruptableAuras
void SetResistance(SpellSchools school, int32 val)
float GetTotalAuraMultiplierByMiscValue(AuraType auraType, int32 misc_value) const
uint32 GetDisplayId() const
void SendCancelSpellVisualKit(uint32 id)
uint32 GetVirtualItemId(uint32 slot) const
static float CalculateAverageResistReduction(WorldObject const *caster, SpellSchoolMask schoolMask, Unit const *victim, SpellInfo const *spellInfo=nullptr)
void SendSpellDamageImmune(Unit *target, uint32 spellId, bool isPeriodic)
void ModifyAuraState(AuraStateType flag, bool apply)
Unit * GetUnitBeingMoved() const
EnumFlag< SpellOtherImmunity > GetSpellOtherImmunityMask() const
uint32 GetAuraCount(uint32 spellId) const
UnitAI * GetTopAI() const
void HandleProcExtraAttackFor(Unit *victim, uint32 count)
bool isPossessing() const
uint32 GetNativeDisplayId() const
float SpellCritChanceTaken(Unit const *caster, Spell *spell, AuraEffect const *aurEff, SpellSchoolMask schoolMask, float doneChance, WeaponAttackType attackType=BASE_ATTACK) const
void RemoveAllGroupBuffsFromCaster(ObjectGuid casterGUID)
virtual void UpdateArmor()=0
bool HealthBelowPct(int32 pct) const
uint64 GetMaxHealth() const
void ApplyControlStatesIfNeeded()
void SetRooted(bool apply, bool packetOnly=false)
void AddUnitMovementFlag(uint32 f)
void BuildValuesCreate(ByteBuffer *data, Player const *target) const override
ThreatManager m_threatManager
uint32 _oldFactionId
faction before charm
bool Attack(Unit *victim, bool meleeAttack)
int32 CalculateAOEAvoidance(int32 damage, uint32 schoolMask, bool npcCaster) const
float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const
std::forward_list< Aura * > AuraList
float GetTotalAuraMultiplierByAffectMask(AuraType auraType, SpellInfo const *affectedSpell) 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
ObjectGuid GetMinionGUID() const
bool SetCanFly(bool enable)
virtual float GetDamageMultiplierForTarget(WorldObject const *) const
bool SetCollision(bool disable)
uint16 GetMaxSkillValueForLevel(Unit const *target=nullptr) const
bool HasUnitMovementFlag(uint32 f) const
virtual void UpdateMaxPower(Powers power)=0
void _AddAura(UnitAura *aura, Unit *caster)
TransportBase * GetDirectTransport() const
Returns the transport this unit is on directly (if on vehicle and transport, return vehicle)
uint32 GetFaction() const override
virtual void TextEmote(std::string_view text, WorldObject const *target=nullptr, bool isBossEmote=false)
void RemoveDynObject(uint32 spellId)
void SendCancelSpellVisual(uint32 id)
void SendEnergizeSpellLog(Unit *victim, uint32 spellId, int32 damage, int32 overEnergize, Powers powerType)
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
void GetDispellableAuraList(WorldObject const *caster, uint32 dispelMask, DispelChargesList &dispelList, bool isReflect=false) const
AttackerSet const & getAttackers() const
void RemoveUnitFlag2(UnitFlags2 flags)
void RemovePvpFlag(UnitPVPStateFlags flags)
void SetAI(UnitAI *newAI)
AuraEffect * GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
bool SetCanTurnWhileFalling(bool enable)
std::multimap< uint32, Aura * > AuraMap
void SendPetTalk(uint32 pettalk)
bool HasAuraType(AuraType auraType) const
std::unique_ptr< Vignettes::VignetteData > m_vignette
void RemoveOwnedAuras(std::function< bool(Aura const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool SetWalk(bool enable)
float GetUnitBlockChance(WeaponAttackType attType, Unit const *victim) const
bool HasStrongerAuraWithDR(SpellInfo const *auraSpellInfo, Unit *caster) const
void EngageWithTarget(Unit *who)
void AddInterruptMask(SpellAuraInterruptFlags flags, SpellAuraInterruptFlags2 flags2)
void NearTeleportTo(Position const &pos, bool casting=false)
void CalculateMeleeDamage(Unit *victim, CalcDamageInfo *damageInfo, WeaponAttackType attackType=BASE_ATTACK)
SpellMissInfo MeleeSpellHitResult(Unit *victim, SpellInfo const *spellInfo) const override
void setAttackTimer(WeaponAttackType type, uint32 time)
virtual bool UpdateStats(Stats stat)=0
void RemoveAllDynObjects()
bool HasNpcFlag(NPCFlags flags) const
void GetAllMinionsByEntry(std::list< TempSummon * > &Minions, uint32 entry)
float m_modMeleeHitChance
virtual bool CheckAttackFitToAuraRequirement(WeaponAttackType, AuraEffect const *) const
void _RemoveAllAuraStatMods()
ObjectGuid GetCritterGUID() const
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint16 num=1)
uint8 GetLevelForTarget(WorldObject const *) const override
int32 GetTotalAuraModifier(AuraType auraType) const
void SetFullPower(Powers power)
void RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const *source=nullptr)
void SetMovementAnimKitId(uint16 animKitId)
void ClearUpdateMask(bool remove) override
void StopAttackFaction(uint32 faction_id)
bool HasScheduledAIChange() const
void RemoveAreaAurasDueToLeaveWorld()
float GetAPMultiplier(WeaponAttackType attType, bool normalized) const
bool CanModifyStats() const
float GetUnitCriticalChanceDone(WeaponAttackType attackType) const
void RemoveCharmedBy(Unit *charmer)
void RemoveMovementForce(ObjectGuid id)
Trinity::Containers::FlatSet< AuraApplication *, VisibleAuraSlotCompare > m_visibleAurasToUpdate
virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage) const =0
bool IsDisallowedMountForm(uint32 spellId, ShapeshiftForm form, uint32 displayId) const
void SetMaxHealth(uint64 val)
float GetSpeedRate(UnitMoveType mtype) const
void SendPetAIReaction(ObjectGuid guid)
std::set< Unit * > AttackerSet
virtual void SetTarget(ObjectGuid const &)=0
void RemoveAppliedAuras(std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
virtual uint32 GetPowerIndex(Powers power) const =0
void CleanupBeforeRemoveFromMap(bool finalCleanup)
void SetPowerType(Powers power, bool sendUpdate=true)
void UpdateStatBuffModForClient(Stats stat)
void UpdatePetCombatState()
std::vector< Unit * > UnitVector
uint32 GetExtraUnitMovementFlags() const
int32 GetPower(Powers power) const
int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask) const
uint64 CountPctFromMaxHealth(int32 pct) const
float GetTotalAttackPowerValue(WeaponAttackType attType, bool includeWeapon=true) const
bool HasExtraUnitMovementFlag2(uint32 f) const
void UpdateOrientation(float orientation)
Only server-side orientation update, does not broadcast to client.
bool IsUnderWater() const
void SetBattlePetCompanionGUID(ObjectGuid guid)
void SetSpeedRate(UnitMoveType mtype, float rate)
void AddExtraAttacks(uint32 count)
void RemovePlayerFromVision(Player *player)
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
float GetCreateStat(Stats stat) const
bool IsHighestExclusiveAura(Aura const *aura, bool removeOtherAuraApplications=false)
void GetProcAurasTriggeredOnEvent(AuraApplicationProcContainer &aurasTriggeringProc, AuraApplicationList *procAuras, ProcEventInfo &eventInfo)
void UpdateSplinePosition()
void SetOwnerGUID(ObjectGuid owner)
DeathState getDeathState() const
bool SetIgnoreMovementForces(bool ignore)
virtual SpellInfo const * GetCastSpellInfo(SpellInfo const *spellInfo, TriggerCastFlags &triggerFlag) const
Unit * GetFirstControlled() const
float GetTotalAuraMultiplierByMiscMask(AuraType auraType, uint32 misc_mask) const
void SetFacingTo(float const ori, bool force=true)
ObjectGuid GetTransGUID() const override
void ApplyCastTimePercentMod(float val, bool apply)
int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
std::vector< DynamicObject * > GetDynObjects(uint32 spellId) const
virtual float GetHealthMultiplierForTarget(WorldObject const *) const
void DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
uint16 _movementAnimKitId
bool CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading=false)
bool HasUnitState(const uint32 f) const
std::unordered_set< AbstractFollower * > m_followingMe
virtual void Update(uint32 time) override
bool IsInRaidWith(Unit const *unit) const
AuraApplication * _CreateAuraApplication(Aura *aura, uint32 effMask)
void _UnregisterAreaTrigger(AreaTrigger *areaTrigger)
int32 SpellDamageBonusTaken(Unit *caster, SpellInfo const *spellProto, int32 pdamage, DamageEffectType damagetype) const
void RemoveExtraUnitMovementFlag2(uint32 f)
std::array< float, MAX_STATS > m_createStats
void ProcessPositionDataChanged(PositionFullTerrainStatus const &data) override
bool IsInFeralForm() const
DynamicObject * GetDynObject(uint32 spellId) const
void SetLevel(uint8 lvl, bool sendUpdate=true)
std::unique_ptr< Movement::MoveSpline > movespline
static uint32 SpellCriticalDamageBonus(Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit *victim)
void CalculateHoverHeight()
std::pair< AuraMap::iterator, AuraMap::iterator > AuraMapBoundsNonConst
void RemoveUnitMovementFlag(uint32 f)
static std::vector< AuraEffect * > CopyAuraEffectList(AuraEffectList const &list)
void RemoveBindSightAuras()
void SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const
AuraApplicationMap m_appliedAuras
CharmInfo * InitCharmInfo()
void RemoveAllAttackers()
void SetClass(uint8 classId)
virtual bool CanSwim() const
virtual float GetNativeObjectScale() const
uint32 GetDoTsByCaster(ObjectGuid casterGUID) const
void BuildValuesUpdate(ByteBuffer *data, Player const *target) const override
void RemoveFromWorld() override
void SendPetActionFeedback(PetActionFeedback msg, uint32 spellId)
-------—Pet responses methods--------------—
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false)
bool IsOnOceanFloor() const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Powers CalculateDisplayPowerType() const
virtual void UpdateMaxHealth()=0
uint32 HasUnitTypeMask(uint32 mask) const
std::array< float, MAX_MOVE_TYPE > m_speed_rate
float GetFlatModifierValue(UnitMods unitMod, UnitModifierFlatType modifierType) const
void _RegisterAuraEffect(AuraEffect *aurEff, bool apply)
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
void _EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const *aurApp=nullptr)
float GetMeleeRange(Unit const *target) const
void DoMeleeAttackIfReady()
float GetStat(Stats stat) const
void SendMeleeAttackStop(Unit *victim=nullptr)
void RemoveAurasWithMechanic(uint64 mechanicMaskToRemove, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint32 exceptSpellId=0, bool withEffectMechanics=false)
void SendDurabilityLoss(Player *receiver, uint32 percent)
int32 GetTotalAuraModifierByMiscValue(AuraType auraType, int32 misc_value) const
virtual float GetBlockPercent(uint8) const
SpellHistory * GetSpellHistory()
std::array< float, MAX_ATTACK > m_modAttackSpeedPct
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
bool IsControlledByPlayer() const
void SetVisibleAura(AuraApplication *aurApp)
DiminishingLevels GetDiminishing(DiminishingGroup group) const
ObjectGuid GetCharmerGUID() const
bool HasAuraWithMechanic(uint64 mechanicMask) const
Minion * GetFirstMinion() const
UnitStandStateType GetStandState() const
float SpellHealingPctDone(Unit *victim, SpellInfo const *spellProto) const
UnitAI * GetScheduledChangeAI()
bool HasAuraTypeWithValue(AuraType auraType, int32 value) const
bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura=0) const
bool SetCharmedBy(Unit *charmer, CharmType type, AuraApplication const *aurApp=nullptr)
bool IsAlwaysVisibleFor(WorldObject const *seer) const override
void SetPetGUID(ObjectGuid guid)
bool SetWaterWalking(bool enable)
void TriggerAurasProcOnEvent(AuraApplicationList *myProcAuras, AuraApplicationList *targetProcAuras, Unit *actionTarget, ProcFlagsInit const &typeMaskActor, ProcFlagsInit const &typeMaskActionTarget, ProcFlagsSpellType spellTypeMask, ProcFlagsSpellPhase spellPhaseMask, ProcFlagsHit hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
void SetMaxPower(Powers power, int32 val)
std::vector< std::pair< uint32, AuraApplication * > > AuraApplicationProcContainer
void SendTeleportPacket(Position const &pos)
virtual void setDeathState(DeathState s)
void SetCreatorGUID(ObjectGuid creator)
void GetPartyMembers(std::list< Unit * > &units)
void RemoveVehicleKit(bool onRemoveFromWorld=false)
ObjectGuid LastCharmerGUID
uint32 GetCombatRatingDamageReduction(CombatRating cr, float rate, float cap, uint32 damage) const
UF::UpdateFieldFlag GetUpdateFieldFlagsFor(Player const *target) const override
float GetUnitDodgeChance(WeaponAttackType attType, Unit const *victim) const
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=nullptr)
int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
void HandleStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float amount, bool apply)
CombatManager & GetCombatManager()
void SetUnitFlag(UnitFlags flags)
MeleeHitOutcome RollMeleeOutcomeAgainst(Unit const *victim, WeaponAttackType attType) const
void UpdateMovementForcesModMagnitude()
uint32 GetCreatureTypeMask() const
bool InitTamedPet(Pet *pet, uint8 level, uint32 spell_id)
bool HasAuraTypeWithTriggerSpell(AuraType auratype, uint32 triggerSpell) const
bool HasAuraTypeWithAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
void SetCritterGUID(ObjectGuid guid)
AuraApplicationMap & GetAppliedAuras()
void ClearBossEmotes(Optional< uint32 > zoneId={}, Player const *target=nullptr) const
Clears boss emotes frame.
void RemoveMovementImpairingAuras(bool withRoot)
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
void SetVignette(uint32 vignetteId)
int32 GetTotalAuraModifierByAffectMask(AuraType auraType, SpellInfo const *affectedSpell) const
bool ApplyDiminishingToDuration(SpellInfo const *auraSpellInfo, int32 &duration, WorldObject *caster, DiminishingLevels previousLevel) const
bool IsUninteractible() const
std::vector< AreaTrigger * > GetAreaTriggers(uint32 spellId) const
virtual void ProcessTerrainStatusUpdate(ZLiquidStatus oldLiquidStatus, Optional< LiquidData > const &newLiquidData)
std::vector< GameObject * > GetGameObjects(uint32 spellId) const
std::array< uint32, MAX_ATTACK > m_attackTimer
bool IsServiceProvider() const
MountCapabilityEntry const * GetMountCapability(uint32 mountType) const
CombatManager m_combatManager
void ChangeSeat(int8 seatId, bool next=true)
void SetInFront(WorldObject const *target)
void ApplyDiminishingAura(DiminishingGroup group, bool apply)
AuraStateAurasMap m_auraStateAuras
int32 GetResistance(SpellSchools school) const
AuraList & GetSingleCastAuras()
bool IsAlwaysDetectableFor(WorldObject const *seer) const override
AuraApplication * GetAuraApplication(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraApplication *except=nullptr) const
Vehicle * GetVehicleKit() const
bool CanCastSpellWhileMoving(SpellInfo const *spellInfo) const
void PushAI(UnitAI *newAI)
float m_modSpellHitChance
void ValidateAttackersAndOwnTarget()
Guardian * GetGuardianPet() const
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Aura * GetAuraOfRankedSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
virtual void Talk(std::string_view text, ChatMsg msgType, Language language, float textRange, WorldObject const *target)
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)
virtual bool IsEngaged() const
void RemoveAurasWithFamily(SpellFamilyNames family, flag128 const &familyFlag, ObjectGuid casterGUID)
void _ApplyAuraEffect(Aura *aura, uint8 effIndex)
void RemoveAllMinionsByEntry(uint32 entry)
AuraMap & GetOwnedAuras()
void UpdateAllDamagePctDoneMods()
int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
virtual void Whisper(std::string_view text, Language language, Player *target, bool isBossWhisper=false)
std::array< float, MAX_STATS > m_floatStatNegBuff
int32 GetCurrentSpellCastTime(uint32 spell_id) const
float MeleeSpellMissChance(Unit const *victim, WeaponAttackType attType, SpellInfo const *spellInfo) const override
void RemoveAurasOnEvade()
bool IsHighestExclusiveAuraEffect(SpellInfo const *spellInfo, AuraType auraType, int32 effectAmount, uint32 auraEffectMask, bool removeOtherAuraApplications=false)
void SetStatFlatModifier(UnitMods unitMod, UnitModifierFlatType modifierType, float val)
void SetShapeshiftForm(ShapeshiftForm form)
float GetUnitCriticalChanceAgainst(WeaponAttackType attackType, Unit const *victim) const
bool IsInPartyWith(Unit const *unit) const
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)
SharedVisionList m_sharedVision
void SetMeleeAnimKitId(uint16 animKitId)
EnumFlag< SpellAuraInterruptFlags > m_interruptMask
std::array< AuraEffectList, TOTAL_AURAS > m_modAuras
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
ObjectGuid GetTarget() const
bool _isWalkingBeforeCharm
Are we walking before we were charmed?
void SetMountDisplayId(uint32 mountDisplayId)
void RemoveNotOwnSingleTargetAuras(bool onPhaseChange=false)
virtual void SetDisplayId(uint32 displayId, bool setNative=false)
void SetWildBattlePetLevel(uint32 wildBattlePetLevel)
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true)
uint32 GetModelForForm(ShapeshiftForm form, uint32 spellId) const
void RemoveUnitFlag(UnitFlags flags)
void SetAIAnimKitId(uint16 animKitId)
void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath=false, bool forceDestination=false)
uint16 GetVirtualItemAppearanceMod(uint32 slot) const
Unit * GetDemonCreator() const
Player * m_playerMovingMe
void RemoveAurasDueToSpellBySteal(uint32 spellId, ObjectGuid casterGUID, WorldObject *stealer, int32 stolenCharges=1)
AreaTrigger * GetAreaTrigger(uint32 spellId) const
uint32 GetDamageImmunityMask() const
Player * GetControllingPlayer() const
float GetWeaponProcChance() const
Aura * _TryStackingOrRefreshingExistingAura(AuraCreateInfo &createInfo)
ObjectGuid GetPetGUID() const
void UpdateStatBuffMod(Stats stat)
virtual void ExitVehicle(Position const *exitPosition=nullptr)
float m_auraPctModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_PCT_END]
void CombatStopWithPets(bool includingCast=false)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
bool BuildPacket(WorldPacket *packet)
uint32 GetBlock(uint32 index) const
Vehicle * RemovePassenger(WorldObject *passenger) override
Removes the passenger from the vehicle.
uint32 GetCreatureEntry() const
void Uninstall()
Removes all passengers and sets status to STATUS_UNINSTALLING. No new passengers can be added to the ...
void RelocatePassengers()
Relocate passengers. Must be called after m_base::Relocate.
SeatMap Seats
The collection of all seats on the vehicle. Including vacant ones.
std::string GetDebugInfo() const
SeatMap::const_iterator GetNextEmptySeat(int8 seatId, bool next) const
Gets the next empty seat based on current seat.
VehicleSeatAddon const * GetSeatAddonForSeatOfPassenger(Unit const *passenger) const
Gets the vehicle seat addon data for the seat of a passenger.
Milliseconds GetDespawnDelay()
void InstallAllAccessories(bool evading)
bool AddVehiclePassenger(Unit *unit, int8 seatId=-1)
constexpr uint32 GetMapId() const
int8 GetTransSeat() const
bool InSamePhase(PhaseShift const &phaseShift) const
bool IsWithinDist3d(float x, float y, float z, float dist) const
virtual void SendMessageToSet(WorldPacket const *data, bool self) const
ZLiquidStatus GetLiquidStatus() const
void UpdateAllowedPositionZ(float x, float y, float &z, float *groundZ=nullptr) const
void AddToWorld() override
virtual bool IsAlwaysVisibleFor(WorldObject const *seer) const
Unit * GetCharmerOrOwner() const
void RemoveFromWorld() override
InstanceScript * GetInstanceScript() const
virtual uint8 GetLevelForTarget(WorldObject const *) const
void SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
Unit * GetCharmerOrOwnerOrSelf() const
void SendCombatLogMessage(WorldPackets::CombatLog::CombatLogServerPacket *combatLog) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
std::string GetDebugInfo() const override
bool IsValidAttackTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
virtual bool IsAlwaysDetectableFor(WorldObject const *seer) const
bool IsHostileTo(WorldObject const *target) const
PhaseShift & GetPhaseShift()
ZoneScript * GetZoneScript() const
TransportBase * GetTransport() const
void setActive(bool isActiveObject)
std::string const & GetName() const
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
virtual void ProcessPositionDataChanged(PositionFullTerrainStatus const &data)
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
Player * GetSpellModOwner() const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
void SetIsStoredInWorldObjectGridContainer(bool apply)
void AddToNotify(uint16 f)
float GetVisibilityRange() const
virtual uint32 GetCastSpellXSpellVisualId(SpellInfo const *spellInfo) const
SpellMissInfo SpellHitResult(Unit *victim, SpellInfo const *spellInfo, bool canReflect=false) const
float GetDistance(WorldObject const *obj) const
MovementInfo m_movementInfo
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
bool IsFriendlyTo(WorldObject const *target) const
bool IsInMap(WorldObject const *obj) const
virtual void Update(uint32 diff)
FactionTemplateEntry const * GetFactionTemplateEntry() const
virtual void UpdateObjectVisibility(bool forced=true)
virtual void CleanupsBeforeDelete(bool finalCleanup=true)
WorldPacket const * Write() override
void Initialize(ChatMsg chatType, Language language, WorldObject const *sender, WorldObject const *receiver, std::string_view message, uint32 achievementId=0, std::string_view channelName="", LocaleConstant locale=DEFAULT_LOCALE, std::string_view addonPrefix="")
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< int32 > SpellVisualKitIDs
Spells::ContentTuningParams ContentTuning
Optional< SubDamage > SubDmg
Spells::SpellCastLogData LogData
WorldPacket const * Write() override
WorldPacket const * Write() override
Spells::SpellCastVisual Visual
Optional< Spells::ContentTuningParams > ContentTuning
WorldPacket const * Write() override
std::vector< SpellLogEffect > Effects
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< PowerUpdatePower > Powers
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
MovementForce const * Force
WorldPacket const * Write() override
TaggedPosition< Position::XY > Direction
WorldPacket const * Write() override
MoveKnockBackSpeeds Speeds
WorldPacket const * Write() override
WorldPacket const * Write() override
uint32 SequenceIndex
Unit movement packet index, incremented each time.
WorldPacket const * Write() override
uint32 SequenceIndex
Unit movement packet index, incremented each time.
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
TaggedPosition< Position::XYZ > Pos
Optional< ObjectGuid > TransportGUID
MovementForce const * Force
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
::MovementForces::Container const * MovementForces
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * GetRawPacket() const
WorldPacket const * Write() override
WorldPacket const * Write() override
::PetActionFeedback Response
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
TaggedPosition< Position::XYZ > TargetPosition
WorldPacket const * Write() override
WorldPacket const * Write() override
LocaleConstant GetSessionDbLocaleIndex() const
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
@ SMSG_MOVE_SPLINE_SET_PITCH_RATE
@ SMSG_MOVE_SPLINE_SET_SWIM_SPEED
@ SMSG_MOVE_SET_FLIGHT_SPEED
@ SMSG_MOVE_SPLINE_SET_FLYING
@ SMSG_MOVE_SET_FLIGHT_BACK_SPEED
@ SMSG_MOVE_DISABLE_COLLISION
@ SMSG_MOVE_UPDATE_PITCH_RATE
@ SMSG_MOVE_SPLINE_SET_WALK_SPEED
@ SMSG_MOVE_ENABLE_DOUBLE_JUMP
@ SMSG_MOVE_SPLINE_SET_RUN_MODE
@ SMSG_MOVE_DISABLE_GRAVITY
@ SMSG_MOVE_SPLINE_SET_SWIM_BACK_SPEED
@ SMSG_MOVE_SPLINE_DISABLE_COLLISION
@ SMSG_MOVE_ENABLE_TRANSITION_BETWEEN_SWIM_AND_FLY
@ SMSG_MOVE_SPLINE_UNROOT
@ SMSG_MOVE_SET_RUN_BACK_SPEED
@ SMSG_MOVE_SPLINE_SET_HOVER
@ SMSG_MOVE_SPLINE_SET_WATER_WALK
@ SMSG_MOVE_SPLINE_SET_NORMAL_FALL
@ SMSG_MOVE_ENABLE_INERTIA
@ SMSG_MOVE_SPLINE_SET_TURN_RATE
@ SMSG_MOVE_SET_NORMAL_FALL
@ SMSG_MOVE_SPLINE_UNSET_HOVER
@ SMSG_MOVE_UPDATE_FLIGHT_SPEED
@ SMSG_MOVE_SET_PITCH_RATE
@ SMSG_MOVE_SPLINE_SET_LAND_WALK
@ SMSG_MOVE_UPDATE_FLIGHT_BACK_SPEED
@ SMSG_MOVE_UPDATE_WALK_SPEED
@ SMSG_MOVE_SET_CAN_TURN_WHILE_FALLING
@ SMSG_MOVE_SPLINE_DISABLE_GRAVITY
@ SMSG_MOVE_ENABLE_COLLISION
@ SMSG_MOVE_SET_IGNORE_MOVEMENT_FORCES
@ SMSG_MOVE_UNSET_IGNORE_MOVEMENT_FORCES
@ SMSG_MOVE_UPDATE_SWIM_SPEED
@ SMSG_MOVE_ENABLE_GRAVITY
@ SMSG_MOVE_UPDATE_MOD_MOVEMENT_FORCE_MAGNITUDE
@ SMSG_MOVE_UNSET_HOVERING
@ SMSG_MOVE_UPDATE_TURN_RATE
@ SMSG_MOVE_SPLINE_SET_RUN_BACK_SPEED
@ SMSG_MOVE_SET_TURN_RATE
@ SMSG_MOVE_SET_WATER_WALK
@ SMSG_MOVE_SET_SWIM_SPEED
@ SMSG_MOVE_UPDATE_RUN_SPEED
@ SMSG_MOVE_SET_WALK_SPEED
@ SMSG_MOVE_SET_MOD_MOVEMENT_FORCE_MAGNITUDE
@ SMSG_MOVE_SPLINE_ENABLE_GRAVITY
@ SMSG_MOVE_SPLINE_SET_RUN_SPEED
@ SMSG_MOVE_DISABLE_INERTIA
@ SMSG_MOVE_SPLINE_SET_FLIGHT_BACK_SPEED
@ SMSG_MOVE_UPDATE_SWIM_BACK_SPEED
@ SMSG_MOVE_DISABLE_DOUBLE_JUMP
@ SMSG_MOVE_UNSET_CAN_FLY
@ SMSG_MOVE_SPLINE_UNSET_FLYING
@ SMSG_MOVE_SPLINE_SET_FLIGHT_SPEED
@ SMSG_MOVE_SPLINE_STOP_SWIM
@ SMSG_MOVE_SPLINE_START_SWIM
@ SMSG_MOVE_UPDATE_RUN_BACK_SPEED
@ SMSG_MOVE_SET_SWIM_BACK_SPEED
@ SMSG_MOVE_UNSET_CAN_TURN_WHILE_FALLING
@ SMSG_MOVE_SET_RUN_SPEED
@ SMSG_MOVE_DISABLE_TRANSITION_BETWEEN_SWIM_AND_FLY
@ SMSG_MOVE_SPLINE_ENABLE_COLLISION
@ SMSG_MOVE_SET_LAND_WALK
@ SMSG_MOVE_SPLINE_SET_FEATHER_FALL
@ SMSG_MOVE_SPLINE_SET_WALK_MODE
@ SMSG_MOVE_SET_FEATHER_FALL
@ CONFIG_CREATURE_FAMILY_FLEE_DELAY
@ CONFIG_DURABILITY_LOSS_IN_PVP
@ RATE_DURABILITY_LOSS_DAMAGE
@ RATE_DURABILITY_LOSS_ON_DEATH
@ CONFIG_LISTEN_RANGE_YELL
@ CONFIG_LISTEN_RANGE_SAY
@ CONFIG_LISTEN_RANGE_TEXTEMOTE
TimePoint Now()
Current chrono steady_clock time point.
ItemContext GetContextForPlayer(MapDifficultyEntry const *mapDifficulty, Player const *player)
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Pet * GetPet(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreatureOrPetOrVehicle(WorldObject const &, ObjectGuid const &)
std::list< T, Alloc >::iterator RemoveUnique(std::list< T, Alloc > &list, T const &value)
auto MapEqualRange(M &map, typename M::key_type const &key)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
bool IsValidMapCoord(float c)
std::unique_ptr< VignetteData > Create(VignetteEntry const *vignetteData, WorldObject const *owner)
void Update(VignetteData &vignette, WorldObject const *owner)
void Remove(VignetteData &vignette, WorldObject const *owner)
TC_PROTO_API ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions, ::google::protobuf::internal::MessageTypeTraits< ::bgs::protocol::FieldRestriction >, 11, false > valid
AuraCreateInfo & SetBaseAmount(int32 const *bp)
AuraCreateInfo & SetCaster(Unit *caster)
AuraCreateInfo & SetCasterGUID(ObjectGuid const &guid)
uint32 GetAuraEffectMask() const
SpellInfo const * GetSpellInfo() const
WeaponAttackType AttackType
ProcFlagsInit ProcAttacker
MeleeHitOutcome HitOutCome
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
void SetIsCommandFollow(bool val)
void InitPossessCreateSpells()
void SetIsAtStay(bool val)
void SetPetNumber(uint32 petnumber, bool statwindow)
void SetIsFollowing(bool val)
void SetIsReturning(bool val)
void InitCharmCreateSpells()
void GetStayPosition(float &x, float &y, float &z)
void SetIsCommandAttack(bool val)
EnumFlag< ChrRacesFlag > GetFlags() const
WeaponAttackType attackType
int32 ExtendedDisplayInfoID
EnumFlag< CreatureModelDataFlags > GetFlags() const
InventoryType GetInventoryType() const
uint32 GetSubClass() const
void NotifyLootList(Map const *map) const
void generateMoneyLoot(uint32 minAmount, uint32 maxAmount)
void SetDungeonEncounterId(uint32 dungeonEncounterId)
bool FillLoot(uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT, ItemContext context=ItemContext::NONE)
int16 CosmeticParentMapID
TaggedPosition< Position::XYZ > Origin
TaggedPosition< Position::XYZ > Direction
void SetFallTime(uint32 fallTime)
void RemoveMovementFlag(uint32 flag)
struct MovementInfo::TransportInfo transport
bool HasMovementFlag(uint32 flag) const
Optional< LiquidData > liquidInfo
constexpr void SetOrientation(float orientation)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
float GetExactDist2d(const float x, const float y) const
float GetRelativeAngle(float x, float y) const
std::string ToString() const
constexpr Position(float x=0, float y=0, float z=0, float o=0)
bool HasInArc(float arcangle, Position const *pos, float border=2.0f) const
float GetAbsoluteAngle(float x, float y) const
constexpr void GetPosition(float &x, float &y) const
constexpr void Relocate(float x, float y)
constexpr Position GetPosition() const
constexpr bool IsInDist(float x, float y, float z, float dist) const
void RelocateOffset(Position const &offset)
constexpr float GetOrientation() const
constexpr float GetPositionZ() const
SpellNonMeleeDamage(Unit *_attacker, Unit *_target, SpellInfo const *_spellInfo, SpellCastVisual spellVisual, uint32 _schoolMask, ObjectGuid _castId=ObjectGuid::Empty)
SpellCastVisual SpellVisual
AuraEffect const * auraEff
EnumFlag< SpellShapeshiftFormFlags > GetFlags() const
EnumFlag< SummonPropertiesFlags > GetFlags() const
UpdateFieldArray< std::string, 5, 0, 1 > Name
UpdateField< uint8, 64, 82 > SheatheState
UpdateField< uint8, 32, 62 > StandState
UpdateField< float, 32, 55 > NativeXDisplayScale
UpdateField< float, 64, 73 > ModSpellHaste
UpdateField< int64, 32, 33 > MaxHealth
UpdateField< float, 64, 71 > ModCastingSpeed
UpdateFieldArray< uint32, 2, 127, 128 > NpcFlags
UpdateField< int32, 0, 5 > DisplayID
UpdateField< ObjectGuid, 0, 14 > CharmedBy
UpdateField< float, 64, 74 > ModHaste
UpdateField< float, 32, 51 > DisplayScale
UpdateField< int32, 32, 34 > Level
UpdateField< uint8, 0, 29 > DisplayPower
UpdateFieldArray< int32, 4, 178, 187 > StatNegBuff
UpdateField< ObjectGuid, 0, 11 > Charm
UpdateFieldArray< int32, 4, 178, 183 > StatPosBuff
UpdateField< uint8, 64, 85 > ShapeshiftForm
UpdateField< uint8, 64, 66 > AnimTier
UpdateFieldArray< uint32, 2, 175, 176 > AttackRoundBaseTime
UpdateField< uint32, 32, 47 > AuraState
UpdateField< float, 64, 75 > ModRangedHaste
UpdateField< float, 64, 76 > ModHasteRegen
UpdateFieldArray< int32, 10, 130, 131 > Power
UpdateField< int32, 32, 54 > NativeDisplayID
UpdateFieldArray< UF::VisibleItem, 3, 171, 172 > VirtualItems
UpdateField< ObjectGuid, 0, 15 > SummonedBy
UpdateField< int64, 0, 31 > Health
UpdateFieldArray< int32, 10, 130, 141 > MaxPower
UpdateField< uint32, 32, 48 > RangedAttackRoundBaseTime
UpdateField< uint16, 0, 4 > ItemAppearanceModID
UpdateField< uint16, 0, 5 > ItemVisual
UpdateField< int32, 0, 1 > ItemID
UF::ObjectData::Base ObjectMask
void operator()(Player const *player) const
UF::UnitData::Base UnitMask
bool operator()(AuraApplication *left, AuraApplication *right) const
VehicleExitParameters ExitParameter
int32 AbsorbedOrAmplitude
Optional< Spells::ContentTuningParams > ContentTuning
bool GenerateDataForUnits(T *attacker, U *target)
void Initialize(Unit const *unit)