30#include <forward_list>
35#define VISUAL_WAYPOINT 1
36#define WORLD_TRIGGER 12999
37#define SPELL_DAZED 1604
38#define ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE 197886
39#define SPELL_DH_DOUBLE_JUMP 196055
40#define DISPLAYID_HIDDEN_MOUNT 73200
42#define WARMODE_ENLISTED_SPELL_OUTSIDE 269083
44#define MAX_AGGRO_RESET_TIME 10
45#define MAX_AGGRO_RADIUS 45.0f
115 struct SpellEffectExtraData;
132 bool RollDispel()
const;
351#define MAX_COMBAT_RATING 32
441 void ModifyDamage(
int32 amount);
442 void AbsorbDamage(
uint32 amount);
443 void ResistDamage(
uint32 amount);
444 void BlockDamage(
uint32 amount);
477 void AbsorbHeal(
uint32 amount);
489 uint32 GetHitMask()
const;
603#define CURRENT_FIRST_NON_MELEE_SPELL 1
604#define CURRENT_MAX_SPELL 4
609#define REACTIVE_TIMER_START 4000
631#define ATTACK_DISPLAY_DELAY 200
632#define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f
642 typedef std::pair<AuraMap::const_iterator, AuraMap::const_iterator>
AuraMapBounds;
655 typedef std::array<DiminishingReturn, DIMINISHING_MAX>
Diminishing;
662 static std::vector<AuraEffect*> CopyAuraEffectList(
AuraEffectList const& list);
667 void AIUpdateTick(
uint32 diff);
669 void ScheduleAIChange();
670 void PushAI(
UnitAI* newAI);
673 void SetAI(
UnitAI* newAI);
676 UnitAI* GetScheduledChangeAI();
677 bool HasScheduledAIChange()
const;
680 void AddToWorld()
override;
681 void RemoveFromWorld()
override;
683 void CleanupBeforeRemoveFromMap(
bool finalCleanup);
684 void CleanupsBeforeDelete(
bool finalCleanup =
true)
override;
688 void IncrDiminishing(
SpellInfo const* auraSpellInfo);
691 void ClearDiminishings();
693 virtual void Update(
uint32 time)
override;
695 void Heartbeat()
override;
696 void TriggerAuraHeartbeat();
702 bool haveOffhandWeapon()
const;
709 bool IsWithinCombatRange(
Unit const* obj,
float dist2compare)
const;
711 bool IsWithinMeleeRangeAt(
Position const& pos,
Unit const* obj)
const;
712 float GetMeleeRange(
Unit const* target)
const;
714 bool IsWithinBoundaryRadius(
const Unit* obj)
const;
717 void _addAttacker(
Unit* pAttacker);
718 void _removeAttacker(
Unit* pAttacker);
719 Unit* getAttackerForHelper()
const;
721 void CastStop(
uint32 except_spellid = 0);
723 void RemoveAllAttackers();
725 bool isAttackingPlayer()
const;
734 void ValidateAttackersAndOwnTarget();
735 void CombatStop(
bool includingCast =
false,
bool mutualPvP =
true,
bool (*unitFilter)(
Unit const* otherUnit) =
nullptr);
736 void CombatStopWithPets(
bool includingCast =
false);
737 void StopAttackFaction(
uint32 faction_id);
739 void SendMeleeAttackStop(
Unit* victim =
nullptr);
740 void SendMeleeAttackStart(
Unit* victim);
745 bool CanFreeMove()
const;
760 void SetLevel(
uint8 lvl,
bool sendUpdate =
true);
772 float GetStat(
Stats stat)
const {
return float(m_unitData->Stats[stat]); }
792 bool HealthBelowPct(
float pct)
const {
return GetHealth() < CountPctFromMaxHealth(pct); }
794 bool HealthAbovePct(
float pct)
const {
return GetHealth() > CountPctFromMaxHealth(pct); }
796 float GetHealthPct()
const {
return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; }
800 void SetHealth(
uint64 val);
801 void SetMaxHealth(
uint64 val);
805 void TriggerOnHealthChangeAuras(
uint64 oldVal,
uint64 newVal);
812 void SetPowerType(
Powers power,
bool sendUpdate =
true,
bool onInit =
false);
813 void SetInitialPowerValue(
Powers powerType);
815 Powers CalculateDisplayPowerType()
const;
816 void UpdateDisplayPower();
820 float GetPowerPct(
Powers power)
const {
return GetMaxPower(power) ? 100.f * GetPower(power) / GetMaxPower(power) : 0.0f; }
822 void SetPower(
Powers power,
int32 val,
bool withPowerUpdate =
true);
835 void ApplyAttackTimePercentMod(
WeaponAttackType att,
float val,
bool apply);
836 void ApplyCastTimePercentMod(
float val,
bool apply);
874 bool IsInPartyWith(
Unit const* unit)
const;
875 bool IsInRaidWith(
Unit const* unit)
const;
876 void GetPartyMembers(std::list<Unit*> &units);
877 bool IsContestedGuard()
const;
888 virtual void SetPvP(
bool state);
896 uint32 GetCreatureType()
const;
897 uint32 GetCreatureTypeMask()
const;
898 void UpdateCreatureType();
901 bool IsSitState()
const;
902 bool IsStandState()
const;
910 void SetAnimTier(
AnimTier animTier,
bool notifyClient =
true);
919 void CancelMountAura(
bool force =
false);
921 void UpdateMountCapability();
923 void SendDurabilityLoss(
Player* receiver,
uint32 percent);
924 void PlayOneShotAnimKitId(
uint16 animKitId);
925 void SetAIAnimKitId(
uint16 animKitId);
927 void SetMovementAnimKitId(
uint16 animKitId);
929 void SetMeleeAnimKitId(
uint16 animKitId);
933 static void DealDamageMods(
Unit const* attacker,
Unit const* victim,
uint32& damage,
uint32* absorb);
935 static void Kill(
Unit* attacker,
Unit* victim,
bool durabilityLoss =
true,
bool skipSettingDeathState =
false);
936 void KillSelf(
bool durabilityLoss =
true,
bool skipSettingDeathState =
false) {
Unit::Kill(
this,
this, durabilityLoss, skipSettingDeathState); }
937 static void DealHeal(
HealInfo& healInfo);
943 void GetProcAurasTriggeredOnEvent(AuraApplicationProcContainer& aurasTriggeringProc, AuraApplicationList* procAuras,
ProcEventInfo& eventInfo);
944 void TriggerAurasProcOnEvent(AuraApplicationList* myProcAuras, AuraApplicationList* targetProcAuras,
948 void TriggerAurasProcOnEvent(
ProcEventInfo& eventInfo, AuraApplicationProcContainer& procAuras);
951 void DoMeleeAttackIfReady();
955 void DealMeleeDamage(
CalcDamageInfo* damageInfo,
bool durabilityLoss);
956 void HandleProcExtraAttackFor(
Unit* victim,
uint32 count);
960 void AddExtraAttacks(
uint32 count);
970 virtual bool CanApplyResilience()
const;
971 static void ApplyResilience(
Unit const* victim,
int32* damage);
973 int32 CalculateAOEAvoidance(
int32 damage,
uint32 schoolMask,
bool npcCaster)
const;
981 float GetUnitMissChance()
const;
983 float GetUnitCriticalChanceTaken(
Unit const* attacker,
WeaponAttackType attackType,
float critDone)
const;
985 float GetMechanicResistChance(
SpellInfo const* spellInfo)
const;
986 bool CanUseAttackType(
uint8 attacktype)
const;
990 float GetWeaponProcChance()
const;
991 float GetPPMProcChance(
uint32 WeaponSpeed,
float PPM,
SpellInfo const* spellProto)
const;
1022 bool IsServiceProvider()
const;
1035 bool IsEngagedBy(
Unit const* who)
const {
return CanHaveThreatList() ? IsThreatenedBy(who) : IsInCombatWith(who); }
1036 void EngageWithTarget(
Unit* who);
1040 void AtTargetAttacked(
Unit* target,
bool canInitialAggro);
1043 void SetImmuneToAll(
bool apply,
bool keepCombat);
1046 void SetImmuneToPC(
bool apply,
bool keepCombat);
1049 void SetImmuneToNPC(
bool apply,
bool keepCombat);
1053 void SetUninteractible(
bool apply);
1056 void SetCannotTurn(
bool apply);
1060 void SetInCombatWith(
Unit* enemy,
bool addSecondUnitSuppressed =
false) {
if (enemy) m_combatManager.SetInCombatWith(enemy, addSecondUnitSuppressed); }
1062 void UpdatePetCombatState();
1065 virtual void SetInteractionAllowedWhileHostile(
bool interactionAllowed);
1068 virtual void SetInteractionAllowedInCombat(
bool interactionAllowed);
1070 virtual void UpdateNearbyPlayersInteractions();
1073 bool IsThreatened()
const;
1081 void SendClearTarget();
1085 bool HasBreakableByDamageAuraType(
AuraType type,
uint32 excludeAura = 0)
const;
1086 bool HasBreakableByDamageCrowdControlAura(
Unit const* excludeCasterChannel =
nullptr)
const;
1092 bool IsPolymorphed()
const;
1095 bool isTargetableForAttack(
bool checkFakeDeath =
true)
const;
1097 bool IsInWater()
const;
1098 bool IsUnderWater()
const;
1099 bool IsOnOceanFloor()
const;
1100 bool isInAccessiblePlaceFor(
Creature const* c)
const;
1102 void SendHealSpellLog(
HealInfo& healInfo,
bool critical =
false);
1103 int32 HealBySpell(
HealInfo& healInfo,
bool critical =
false);
1111 void SendPlaySpellVisual(
Unit* target,
uint32 spellVisualId,
uint8 missReason,
uint8 reflectStatus,
float travelSpeed,
bool speedAsTime =
false,
float launchDelay = 0.0f);
1112 void SendPlaySpellVisual(
Position const& targetPosition,
uint32 spellVisualId,
uint8 missReason,
uint8 reflectStatus,
float travelSpeed,
bool speedAsTime =
false,
float launchDelay = 0.0f);
1113 void SendCancelSpellVisual(
uint32 id);
1116 void SendCancelSpellVisualKit(
uint32 id);
1118 void CancelSpellMissiles(
uint32 spellId,
bool reverseMissile =
false,
bool abortSpell =
false);
1126 void SendSpellDamageResist(
Unit* target,
uint32 spellId);
1127 void SendSpellDamageImmune(
Unit* target,
uint32 spellId,
bool isPeriodic);
1130 void NearTeleportTo(
Position const& pos,
bool casting =
false);
1133 virtual bool UpdatePosition(
float x,
float y,
float z,
float ang,
bool teleport =
false);
1135 virtual bool UpdatePosition(
Position const& pos,
bool teleport =
false);
1136 void UpdateOrientation(
float orientation);
1137 void UpdateHeight(
float newZ);
1139 void SendMoveKnockBack(
Player* player,
float speedXY,
float speedZ,
float vcos,
float vsin);
1142 void MonsterMoveWithSpeed(
float x,
float y,
float z,
float speed,
bool generatePath =
false,
bool forceDestination =
false);
1145 void SetPlayHoverAnim(
bool enable,
bool sendUpdate =
true);
1146 void CalculateHoverHeight();
1152 bool SetWalk(
bool enable);
1153 bool SetDisableGravity(
bool disable,
bool updateAnimTier =
true);
1154 bool SetFall(
bool enable);
1155 bool SetSwim(
bool enable);
1156 bool SetCanFly(
bool enable);
1157 bool SetWaterWalking(
bool enable);
1158 bool SetFeatherFall(
bool enable);
1159 bool SetHover(
bool enable,
bool updateAnimTier =
true);
1160 bool SetCollision(
bool disable);
1161 bool SetStrafingDisabled(
bool disable);
1162 bool SetJumpingDisabled(
bool disable);
1163 bool SetEnableFullSpeedTurning(
bool enable);
1164 bool SetEnableFullSpeedPitching(
bool enable);
1165 bool SetAlwaysAllowPitching(
bool enable);
1166 bool SetCanTransitionBetweenSwimAndFly(
bool enable);
1167 bool SetCanTurnWhileFalling(
bool enable);
1168 bool SetCanDoubleJump(
bool enable);
1169 bool SetDisableInertia(
bool disable);
1170 bool SetCanAdvFly(
bool enable);
1171 bool SetMoveCantSwim(
bool cantSwim);
1172 void SendSetVehicleRecId(
uint32 vehicleId);
1177 bool SetIgnoreMovementForces(
bool ignore);
1178 void UpdateMovementForcesModMagnitude();
1181 void SetFacingTo(
float const ori,
bool force =
true);
1182 void SetFacingToObject(
WorldObject const*
object,
bool force =
true);
1183 void SetFacingToPoint(
Position const& point,
bool force =
true);
1205 Unit* GetDemonCreator()
const;
1206 Player* GetDemonCreatorPlayer()
const;
1215 Player* GetControllingPlayer()
const;
1220 Minion* GetFirstMinion()
const;
1223 void SetMinion(
Minion *minion,
bool apply);
1224 void GetAllMinionsByEntry(std::list<TempSummon*>& Minions,
uint32 entry);
1225 void RemoveAllMinionsByEntry(
uint32 entry);
1226 void SetCharm(
Unit* target,
bool apply);
1227 Unit* GetNextRandomRaidMemberOrPet(
float radius);
1229 void RemoveCharmedBy(
Unit* charmer);
1230 void RestoreFaction();
1233 Unit* GetFirstControlled()
const;
1234 void RemoveAllControlled();
1236 bool IsCharmed()
const {
return !GetCharmerGUID().IsEmpty(); }
1238 bool isPossessedByPlayer()
const;
1239 bool isPossessing()
const;
1240 bool isPossessing(
Unit* u)
const;
1244 void DeleteCharmInfo();
1249 void SetMovedUnit(
Unit* target);
1256 void AddPlayerToVision(
Player* player);
1257 void RemovePlayerFromVision(
Player* player);
1259 void RemoveBindSightAuras();
1260 void RemoveCharmAuras();
1277 void _ApplyAuraEffect(
Aura* aura,
uint8 effIndex);
1279 void _UnapplyAura(AuraApplicationMap::iterator& i,
AuraRemoveMode removeMode);
1281 void _RemoveNoStackAurasDueToAura(
Aura* aura,
bool owned);
1282 void _RegisterAuraEffect(
AuraEffect* aurEff,
bool apply);
1319 void RemoveNotOwnSingleTargetAuras(
bool onPhaseChange =
false);
1320 template <
typename InterruptFlags>
1321 void RemoveAurasWithInterruptFlags(InterruptFlags flag,
SpellInfo const* source =
nullptr);
1325 void RemoveMovementImpairingAuras(
bool withRoot);
1326 void RemoveAurasByShapeShift();
1328 void RemoveAreaAurasDueToLeaveWorld();
1329 void RemoveAllAuras();
1330 void RemoveArenaAuras();
1331 void RemoveAurasOnEvade();
1332 void RemoveAllAurasOnDeath();
1333 void RemoveAllAurasRequiringDeadTarget();
1334 void RemoveAllAurasExceptType(
AuraType type);
1336 void RemoveAllGroupBuffsFromCaster(
ObjectGuid casterGUID);
1339 void _RemoveAllAuraStatMods();
1340 void _ApplyAllAuraStatMods();
1355 AuraApplication* GetAuraApplication(std::function<
bool(
Aura const*)>
const& predicate)
const;
1358 Aura* GetAura(
uint32 spellId, std::function<
bool(
Aura const*)>
const& predicate)
const;
1359 Aura* GetAura(std::function<
bool(
Aura const*)>
const& predicate)
const;
1369 bool HasAura(std::function<
bool(
Aura const*)>
const& predicate)
const;
1370 bool HasAuraType(
AuraType auraType)
const;
1372 bool HasAuraTypeWithMiscvalue(
AuraType auraType,
int32 miscValue)
const;
1373 bool HasAuraTypeWithAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1374 bool HasAuraTypeWithValue(
AuraType auraType,
int32 value)
const;
1375 bool HasAuraTypeWithTriggerSpell(
AuraType auratype,
uint32 triggerSpell)
const;
1376 template <
typename InterruptFlags>
1378 bool HasAuraWithMechanic(
uint64 mechanicMask)
const;
1379 bool HasStrongerAuraWithDR(
SpellInfo const* auraSpellInfo,
Unit* caster)
const;
1385 float GetTotalAuraModifier(
AuraType auraType)
const;
1386 float GetTotalAuraMultiplier(
AuraType auraType)
const;
1387 float GetMaxPositiveAuraModifier(
AuraType auraType)
const;
1388 float GetMaxNegativeAuraModifier(
AuraType auraType)
const;
1390 float GetTotalAuraModifier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1391 float GetTotalAuraMultiplier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1392 float GetMaxPositiveAuraModifier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1393 float GetMaxNegativeAuraModifier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1395 float GetTotalAuraModifierByMiscMask(
AuraType auraType,
uint32 misc_mask)
const;
1396 float GetTotalAuraMultiplierByMiscMask(
AuraType auraType,
uint32 misc_mask)
const;
1397 float GetMaxPositiveAuraModifierByMiscMask(
AuraType auraType,
uint32 misc_mask,
AuraEffect const* except =
nullptr)
const;
1398 float GetMaxNegativeAuraModifierByMiscMask(
AuraType auraType,
uint32 misc_mask)
const;
1400 float GetTotalAuraModifierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1401 float GetTotalAuraMultiplierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1402 float GetMaxPositiveAuraModifierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1403 float GetMaxNegativeAuraModifierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1405 float GetTotalAuraModifierByAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1406 float GetTotalAuraMultiplierByAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1407 float GetMaxPositiveAuraModifierByAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1408 float GetMaxNegativeAuraModifierByAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1410 void InitStatBuffMods();
1411 void UpdateStatBuffMod(
Stats stat);
1412 void UpdateStatBuffModForClient(
Stats stat);
1418 virtual int32 GetCreatePowerValue(
Powers power)
const;
1426 SetUpdateFieldValue(m_values
1435 SetUpdateFieldValue(m_values
1443 void ClearChannelObjects();
1453 void SetCurrentCastSpell(
Spell* pSpell);
1454 void InterruptSpell(
CurrentSpellTypes spellType,
bool withDelayed =
true,
bool withInstant =
true);
1460 bool IsNonMeleeSpellCast(
bool withDelayed,
bool skipChanneled =
false,
bool skipAutorepeat =
false,
bool isAutoshoot =
false,
bool skipInstant =
true)
const;
1464 void InterruptNonMeleeSpells(
bool withDelayed,
uint32 spellid = 0,
bool withInstant =
true);
1468 Spell* FindCurrentSpellBySpellId(
uint32 spell_id)
const;
1469 int32 GetCurrentSpellCastTime(
uint32 spell_id)
const;
1472 std::array<uint32, 5> VisitedSpells = { };
1473 bool AddSpell(
uint32 spellId);
1488 uint32 GetCastSpellXSpellVisualId(
SpellInfo const* spellInfo)
const override;
1491 virtual bool IsMovementPreventedByCasting()
const;
1492 bool CanCastSpellWhileMoving(
SpellInfo const* spellInfo)
const;
1509 bool IsInFeralForm()
const;
1511 bool IsInDisallowedMountForm()
const;
1533 void UpdateUnitMod(
UnitMods unitMod);
1539 void UpdateAllDamageDoneMods();
1542 void UpdateAllDamagePctDoneMods();
1544 float GetTotalStatValue(
Stats stat)
const;
1545 float GetTotalAuraModValue(
UnitMods unitMod)
const;
1552 virtual void UpdateResistances(
uint32 school);
1553 virtual void UpdateAllResistances();
1571 float GetTotalAttackPowerValue(
WeaponAttackType attType,
bool includeWeapon =
true)
const;
1578 bool isInFrontInMap(
Unit const* target,
float distance,
float arc =
float(
M_PI))
const;
1579 bool isInBackInMap(
Unit const* target,
float distance,
float arc =
float(
M_PI))
const;
1582 bool IsVisible()
const;
1583 void SetVisible(
bool x);
1586 virtual void OnPhaseChange();
1587 void UpdateObjectVisibility(
bool forced =
true)
override;
1603 m_interruptMask |=
flags;
1604 m_interruptMask2 |= flags2;
1606 void UpdateInterruptMask();
1609 virtual void RecalculateObjectScale();
1612 virtual void SetDisplayId(
uint32 displayId,
bool setNative =
false);
1615 void RestoreDisplayId(
bool ignorePositiveAurasPreventingMounting =
false);
1623 std::vector<DynamicObject*> GetDynObjects(
uint32 spellId)
const;
1624 void RemoveDynObject(
uint32 spellId);
1625 void RemoveAllDynObjects();
1628 std::vector<GameObject*> GetGameObjects(
uint32 spellId)
const;
1630 void RemoveGameObject(
GameObject* gameObj,
bool del);
1631 void RemoveGameObject(
uint32 spellid,
bool del);
1632 void RemoveAllGameObjects();
1635 void _RegisterAreaTrigger(
AreaTrigger* areaTrigger);
1636 void _UnregisterAreaTrigger(
AreaTrigger* areaTrigger);
1638 std::vector<AreaTrigger*> GetAreaTriggers(
uint32 spellId)
const;
1646 void RemoveAreaTrigger(
uint32 spellId);
1647 void RemoveAreaTrigger(
AuraEffect const* aurEff);
1648 void RemoveAllAreaTriggers(AreaTriggerRemoveReason reason = AreaTriggerRemoveReason::Default);
1654 void ExitAllAreaTriggers();
1657 uint32 BuildAuraStateUpdateForTarget(
Unit const* target)
const;
1659 void UnsummonAllTotems();
1660 bool IsMagnet()
const;
1661 Unit* GetMeleeHitRedirectTarget(
Unit* victim,
SpellInfo const* spellInfo =
nullptr);
1669 float SpellHealingPctDone(
Unit* victim,
SpellInfo const* spellProto)
const;
1674 float SpellAbsorbPctDone(
Unit* victim,
SpellInfo const* spellProto)
const;
1680 bool IsBlockCritical()
const;
1687 bool IsImmunedToSpell(
SpellInfo const* spellInfo,
uint32 effectMask,
WorldObject const* caster,
bool requireImmunityPurgesEffectAttribute =
false)
const;
1688 uint32 GetSchoolImmunityMask()
const;
1689 uint32 GetDamageImmunityMask()
const;
1690 uint64 GetMechanicImmunityMask()
const;
1695 virtual bool IsImmunedToSpellEffect(
SpellInfo const* spellInfo,
SpellEffectInfo const& spellEffectInfo,
WorldObject const* caster,
bool requireImmunityPurgesEffectAttribute =
false)
const;
1702 static void CalcAbsorbResist(
DamageInfo& damageInfo,
Spell* spell =
nullptr);
1703 static void CalcHealAbsorb(
HealInfo& healInfo);
1712 void SetFlightCapabilityID(
int32 flightCapabilityId,
bool clientUpdate);
1721 void RemoveAllFollowers();
1729 void PauseMovement(
uint32 timer = 0,
uint8 slot = 0,
bool forced =
true);
1730 void ResumeMovement(
uint32 timer = 0,
uint8 slot = 0);
1750 bool IsSplineEnabled()
const;
1752 void SetControlled(
bool apply,
UnitState state);
1753 void ApplyControlStatesIfNeeded();
1757 void SendPetTalk(
uint32 pettalk);
1761 void PropagateSpeedChange();
1764 void ClearAllReactives();
1766 void UpdateReactives(
uint32 p_time);
1769 void UpdateAuraForGroup();
1773 void SetCantProc(
bool apply);
1780 bool CreateVehicleKit(
uint32 id,
uint32 creatureEntry,
bool loading =
false);
1781 void RemoveVehicleKit(
bool onRemoveFromWorld =
false);
1786 bool IsOnVehicle(
Unit const* vehicle)
const;
1787 Unit* GetVehicleBase()
const;
1788 Unit* GetVehicleRoot()
const;
1789 Creature* GetVehicleCreatureBase()
const;
1794 void HandleSpellClick(
Unit* clicker,
int8 seatId = -1);
1796 void EnterVehicle(
Unit* base,
int8 seatId = -1);
1797 virtual void ExitVehicle(
Position const* exitPosition =
nullptr);
1798 void ChangeSeat(
int8 seatId,
bool next =
true);
1801 void _ExitVehicle(
Position const* exitPosition =
nullptr);
1808 bool IsFalling()
const;
1810 virtual bool CanSwim()
const;
1818 void OutDebugInfo()
const;
1822 Pet*
ToPet() {
return IsPet() ?
reinterpret_cast<Pet*
>(
this) :
nullptr; }
1823 Pet const*
ToPet()
const {
return IsPet() ?
reinterpret_cast<Pet const*
>(
this) :
nullptr; }
1841 bool IsHighestExclusiveAura(
Aura const* aura,
bool removeOtherAuraApplications =
false);
1847 virtual void TextEmote(std::string_view text,
WorldObject const* target =
nullptr,
bool isBossEmote =
false);
1848 virtual void Whisper(std::string_view text,
Language language,
Player* target,
bool isBossWhisper =
false);
1852 virtual void TextEmote(
uint32 textId,
WorldObject const* target =
nullptr,
bool isBossEmote =
false);
1853 virtual void Whisper(
uint32 textId,
Player* target,
bool isBossWhisper =
false);
1862 float GetCollisionHeight()
const override;
1872 void AddWorldEffect(
int32 worldEffectId);
1873 void RemoveWorldEffect(
int32 worldEffectId);
1874 void ClearWorldEffects();
1877 void SetVignette(
uint32 vignetteId);
1884 explicit Unit (
bool isWorldObject);
1888 void DestroyForPlayer(
Player const* target)
const override;
1889 void ClearValuesChangesMask()
override;
1891 void _UpdateSpells(
uint32 time);
1892 void _DeleteRemovedAuras();
1894 void _UpdateAutoRepeatSpell();
1968 bool IsAlwaysVisibleFor(
WorldObject const* seer)
const override;
1969 bool IsAlwaysDetectableFor(
WorldObject const* seer)
const override;
1971 void DisableSpline();
1977 virtual void AtEnterCombat();
1978 virtual void AtExitCombat();
1989 void UpdateSplineMovement(
uint32 t_diff);
1990 void UpdateSplinePosition();
1991 void SendFlightSplineSyncUpdate();
1992 void InterruptMovementBasedAuras();
2001 void SetFeared(
bool apply);
2002 void SetConfused(
bool apply);
2003 void SetStunned(
bool apply);
2004 void SetRooted(
bool apply);
2020 void UpdateCharmAI();
2021 void RestoreDisabledAI();
std::string GetDebugInfo()
#define NOMINAL_MELEE_RANGE
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_AURA_MOD_INVISIBILITY
@ SPELL_AURA_MOD_ROOT_DISABLE_GRAVITY
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TRIGGERED_NONE
Not triggered.
@ UNIT_FLAG2_INTERACT_WHILE_HOSTILE
@ MOVEMENTFLAG_MASK_MOVING
@ MOVEMENTFLAG_DISABLE_GRAVITY
@ MOVEMENTFLAG_MASK_TURNING
NPCFlags
Non Player Character flags.
@ 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_QUESTGIVER
@ UNIT_NPC_FLAG_INNKEEPER
@ UNIT_NPC_FLAG_FLIGHTMASTER
@ UNIT_NPC_FLAG_PETITIONER
@ UNIT_NPC_FLAG_WILD_BATTLE_PET
@ UNIT_FLAG3_ALLOW_INTERACTION_WHILE_IN_COMBAT
@ UNIT_NPC_FLAG_2_AREA_SPIRIT_HEALER_INDIVIDUAL
@ UNIT_BYTE2_FLAG_FFA_PVP
@ UNIT_BYTE2_FLAG_SANCTUARY
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_UNINTERACTIBLE
@ 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_RESISTANCE_END
@ UNIT_MOD_DAMAGE_MAINHAND
@ UNIT_MOD_ATTACK_POWER_RANGED
TC_GAME_API float playerBaseMoveSpeed[MAX_MOVE_TYPE]
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ UNIT_STATE_ISOLATED_DEPRECATED
@ UNIT_STATE_FOLLOW_FORMATION
@ UNIT_STATE_ATTACK_PLAYER
@ UNIT_STATE_ROAMING_MOVE
@ UNIT_STATE_UNATTACKABLE
@ UNIT_STATE_LOST_CONTROL
@ UNIT_STATE_ALL_STATE_SUPPORTED
@ UNIT_STATE_CANNOT_AUTOATTACK
@ UNIT_STATE_FOLLOW_FORMATION_MOVE
@ UNIT_STATE_FLEEING_MOVE
@ UNIT_STATE_CONFUSED_MOVE
@ UNIT_STATE_IGNORE_PATHFINDING
@ UNIT_STATE_MELEE_ATTACKING
@ UNIT_STATE_ALL_ERASABLE
std::list< Player * > SharedVisionList
@ OFFHAND_CRIT_PERCENTAGE
std::vector< DispelableAura > DispelChargesList
@ CR_VERSATILITY_DAMAGE_TAKEN
@ CR_RESILIENCE_PLAYER_DAMAGE
@ CR_VERSATILITY_HEALING_DONE
@ CR_CORRUPTION_RESISTANCE
@ CR_VERSATILITY_DAMAGE_DONE
@ CR_RESILIENCE_CRIT_TAKEN
ProcFlagsHit createProcHitMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
std::list< Unit * > UnitList
#define REACTIVE_TIMER_START
TC_GAME_API float baseMoveSpeed[MAX_MOVE_TYPE]
T CalculatePct(T base, U pct)
uint32 const m_originalDamage
WeaponAttackType m_attackType
Unit * GetAttacker() const
SpellInfo const *const m_spellInfo
uint32 GetOriginalDamage() const
SpellInfo const * GetSpellInfo() const
DamageEffectType GetDamageType() const
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
SpellSchoolMask const m_schoolMask
DamageEffectType const m_damageType
uint32 GetDispellerSpellId() const
DispelInfo(WorldObject *dispeller, uint32 dispellerSpellId, uint8 chargesRemoved)
WorldObject * GetDispeller() const
void SetRemovedCharges(uint8 amount)
uint8 GetRemovedCharges() const
bool DecrementCharge(uint8 charges)
uint8 GetDispelCharges() const
uint32 GetEffectiveHeal() const
SpellInfo const *const _spellInfo
SpellInfo const * GetSpellInfo() const
uint32 const _originalHeal
uint32 GetOriginalHeal() const
void SetEffectiveHeal(uint32 amount)
SpellSchoolMask GetSchoolMask() const
SpellSchoolMask const _schoolMask
static ObjectGuid const Empty
HealInfo * GetHealInfo() const
Unit * GetActionTarget() const
ProcFlagsSpellType GetSpellTypeMask() const
ProcFlagsSpellType _spellTypeMask
Spell const * GetProcSpell() const
Unit *const _actionTarget
ProcFlagsHit GetHitMask() const
ProcFlagsInit GetTypeMask() const
ProcFlagsSpellPhase GetSpellPhaseMask() const
DamageInfo * GetDamageInfo() const
ProcFlagsSpellPhase _spellPhaseMask
Unit * GetProcTarget() const
Utility class to enable range for loop syntax for multimap.equal_range uses.
Specialized variant of std::shared_ptr that enforces unique ownership and/or std::unique_ptr with std...
Trinity::unique_trackable_ptr companion class, replicating what std::weak_ptr is to std::shared_ptr.
Unit * GetCharmed() const
void ClearUnitState(uint32 f)
void SetExtraUnitMovementFlags2(uint32 f)
uint32 GetChannelSpellId() const
int32 GetContentTuning() const
void SetLastDamagedTargetGuid(ObjectGuid guid)
std::pair< AuraApplicationMap::iterator, AuraApplicationMap::iterator > AuraApplicationMapBoundsNonConst
void SetOverrideDisplayPowerId(uint32 powerDisplayId)
bool IsWithinMeleeRange(Unit const *obj) const
bool m_duringRemoveFromWorld
float GetBoundingRadius() const
Vehicle * GetVehicle() const
EnumFlag< SpellAuraInterruptFlags2 > m_interruptMask2
float GetPosStat(Stats stat) const
bool IsBattleMaster() const
std::list< GameObject * > GameObjectList
bool HasPetFlag(UnitPetFlag flags) const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
void SetSilencedSchoolMask(SpellSchoolMask schoolMask)
std::unique_ptr< SpellHistory > _spellHistory
float GetHealthPct() const
uint32 GetChannelSpellXSpellVisualId() const
float m_baseSpellCritChance
uint32 m_lastSanctuaryTime
void SetCreateStat(Stats stat, float val)
bool HasExtraUnitMovementFlag(uint32 f) const
void SetOffHandWeaponAttackPower(int32 attackPower)
void SetStat(Stats stat, int32 val)
bool HasPvpFlag(UnitPVPStateFlags flags) const
uint64 CountPctFromCurHealth(float pct) const
uint32 GetUnitMovementFlags() const
LiquidTypeEntry const * _lastLiquid
bool IsGuildMaster() const
uint16 GetMovementAnimKitId() const override
AreaTriggerList m_areaTrigger
uint64 CountPctFromMaxHealth(float pct) const
bool IsInteractionAllowedInCombat() const
ObjectGuid GetDemonCreatorGUID() const
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
std::unique_ptr< MotionMaster > i_motionMaster
void SetUnitFlag3(UnitFlags3 flags)
void SetGender(Gender gender)
std::unordered_map< ObjectGuid, uint32 > extraAttacksTargets
std::array< uint32, MAX_REACTIVE > m_reactiveTimer
void AddExtraUnitMovementFlag(uint32 f)
std::shared_ptr< UnitAI > i_AI
bool HasUnitFlag3(UnitFlags3 flags) const
void SetMinionGUID(ObjectGuid guid)
Diminishing m_Diminishing
bool IsTabardDesigner() const
void SetHoverHeight(float hoverHeight)
void ReplaceAllNpcFlags2(NPCFlags2 flags)
std::array< Spell *, CURRENT_MAX_SPELL > m_currentSpells
float GetDisplayScale() const
ThreatManager & GetThreatManager()
void ReplaceAllPvpFlags(UnitPVPStateFlags flags)
virtual float GetArmorMultiplierForTarget(WorldObject const *) const
void SetModRangedHaste(float rangedHaste)
void ApplyModManaCostModifier(SpellSchools school, int32 mod, bool apply)
void ReplaceAllUnitFlags3(UnitFlags3 flags)
void SetInCombatWith(Unit *enemy, bool addSecondUnitSuppressed=false)
void SetLastExtraAttackSpell(uint32 spellId)
virtual void SetCanDualWield(bool value)
std::array< ObjectGuid, MAX_SUMMON_SLOT > m_SummonSlot
void SetArmor(int32 val, int32 bonusVal)
void SetVisFlag(UnitVisFlags flags)
void SetCreateHealth(uint32 val)
uint32 GetClassMask() const
virtual bool UpdateAllStats()=0
uint32 GetLastExtraAttackSpell() const
uint32 GetMountDisplayId() const
std::unique_ptr< CharmInfo > m_charmInfo
ThreatManager const & GetThreatManager() const
void AddExtraUnitMovementFlag2(uint32 f)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Emote GetEmoteState() const
NPCFlags GetNpcFlags() const
void CancelTravelShapeshiftForm(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool force=false)
bool IsAreaSpiritHealer() const
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value)
ObjectGuid GetOwnerGUID() const override
virtual void AtEngage(Unit *)
void SetCosmeticMountDisplayId(uint32 mountDisplayId)
void RemoveNpcFlag2(NPCFlags2 flags)
bool HealthAbovePctHealed(float pct, uint32 heal) const
void RemoveExtraUnitMovementFlag(uint32 f)
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
Spell * GetCurrentSpell(uint32 spellType) const
virtual SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType attackType=BASE_ATTACK) const =0
Unit * GetCharmer() const
std::forward_list< AuraEffect * > AuraEffectList
UnitPetFlag GetPetFlags() const
Trinity::unique_trackable_ptr< Vehicle > m_vehicleKit
std::vector< AreaTrigger * > AreaTriggerList
VisibleAuraContainer m_visibleAuras
uint32 GetCosmeticMountDisplayId() const
UnitPVPStateFlags GetPvpFlags() const
std::forward_list< AuraApplication * > AuraApplicationList
uint32 GetTransformSpell() const
void SetAttackPowerModNeg(int32 attackPowerMod)
bool IsAreaSpiritHealerIndividual() const
uint64 GetRaceMask() const
uint32 _lastExtraAttackSpell
virtual bool CanFly() const =0
void ReplaceAllUnitFlags(UnitFlags flags)
MotionMaster * GetMotionMaster()
AuraApplicationMap const & GetAppliedAuras() const
Powers GetPowerType() const
bool HasUnitFlag(UnitFlags flags) const
std::array< ObjectGuid, MAX_GAMEOBJECT_SLOT > m_ObjectSlot
ObjectGuid GetCharmedGUID() const
void SetCreatedBySpell(int32 spellId)
bool CanDualWield() const
bool CanInstantCast() const
void StartReactiveTimer(ReactiveType reactive)
NPCFlags2 GetNpcFlags2() const
void SetUnitMovementFlags(uint32 f)
bool HasInterruptFlag(SpellAuraInterruptFlags flags) const
void SetModHaste(float haste)
virtual void AtDisengage()
std::unique_ptr< MovementForces > _movementForces
MovementForces const * GetMovementForces() const
void SetChannelSpellId(uint32 channelSpellId)
virtual void SetImmuneToAll(bool apply)
uint32 GetDamageReduction(uint32 damage) const
std::array< float, MAX_STATS > m_floatStatPosBuff
bool IsFullHealth() const
void SetUnitFlag2(UnitFlags2 flags)
bool HasUnitFlag2(UnitFlags2 flags) const
bool IsInSanctuary() const
std::pair< AuraMap::const_iterator, AuraMap::const_iterator > AuraMapBounds
virtual bool IsLoading() const
void ReplaceAllPetFlags(UnitPetFlag flags)
void SetNpcFlag2(NPCFlags2 flags)
float GetNegStat(Stats stat) const
std::vector< DynamicObject * > DynObjectList
void SetDemonCreatorGUID(ObjectGuid guid)
bool HasVisibleAura(AuraApplication *aurApp) const
void SetPetNameTimestamp(uint32 timestamp)
std::array< uint32, MAX_ATTACK > m_baseAttackSpeed
void SetRangedWeaponAttackPower(int32 attackPower)
std::stack< std::shared_ptr< UnitAI > > UnitAIStack
Vignettes::VignetteData const * GetVignette() const
float m_modRangedHitChance
float GetCombatReach() const override
void ReplaceAllVisFlags(UnitVisFlags flags)
float GetAdvFlyingSpeedMax(AdvFlyingRateTypeRange speedType) const
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
void SetBonusResistanceMod(SpellSchools school, int32 val)
void SetRangedAttackPowerModNeg(int32 attackPowerMod)
std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > AuraApplicationMapBounds
void RemoveNpcFlag(NPCFlags flags)
int32 GetFlightCapabilityID() const
uint32 m_removedAurasCount
uint32 m_movementCounter
Incrementing counter used in movement packets.
void SetPetFlag(UnitPetFlag flags)
bool IsSilenced(SpellSchoolMask schoolMask) const
TempSummon * ToTempSummon()
bool IsGravityDisabled() const
bool IsQuestGiver() const
CharmInfo * GetCharmInfo()
bool HasStealthAura() const
void SetBattlePetCompanionExperience(uint32 experience)
void RemoveVisFlag(UnitVisFlags flags)
bool IsInCombatWith(Unit const *who) const
ObjectGuid GetCharmerOrOwnerGUID() const override
void RemoveUnitFlag3(UnitFlags3 flags)
AuraMap::iterator m_auraUpdateIterator
ObjectGuid _lastDamagedTargetGuid
void SetRangedAttackPowerModPos(int32 attackPowerMod)
void SetModHasteRegen(float hasteRegen)
float GetNativeDisplayScale() const
bool HasNpcFlag2(NPCFlags2 flags) const
float GetAdvFlyingSpeedMin(AdvFlyingRateTypeRange speedType) const
AnimTier GetAnimTier() const
std::set< Unit * > ControlList
bool HasInterruptFlag(SpellAuraInterruptFlags2 flags) const
TempSummon const * ToTempSummon() const
Player * GetPlayerMovingMe() const
void SetChannelVisual(SpellCastVisual channelVisual)
virtual bool HasSpell(uint32) const
virtual bool IsAffectedByDiminishingReturns() const
std::pair< AuraStateAurasMap::const_iterator, AuraStateAurasMap::const_iterator > AuraStateAurasMapBounds
void AddUnitState(uint32 f)
ObjectGuid GetCreatorGUID() const override
AreaTriggerList m_insideAreaTriggers
std::multimap< AuraStateType, AuraApplication * > AuraStateAurasMap
ObjectGuid GetLastDamagedTargetGuid() const
void SetBoundingRadius(float boundingRadius)
void SetCreateMana(uint32 val)
bool IsCharmedOwnedByPlayerOrPlayer() const
int32 GetMinPower(Powers power) const
bool IsImmuneToNPC() const
virtual bool CanEnterWater() const =0
Pet const * ToPet() const
Unit * EnsureVictim() const
uint32 getAttackTimer(WeaponAttackType type) const
void SetModSpellHaste(float spellHaste)
bool IsDuringRemoveFromWorld() const
bool m_ControlledByPlayer
void SetMainHandWeaponAttackPower(int32 attackPower)
Unit * GetCharmerOrOwner() const
virtual Gender GetNativeGender() const
bool IsPlayingHoverAnim() const
void SetBattlePetCompanionNameTimestamp(uint32 timestamp)
AuraMap const & GetOwnedAuras() const
void SetInstantCast(bool set)
void SetRangedAttackPowerMultiplier(float attackPowerMult)
virtual void SetImmuneToNPC(bool apply)
void SetCombatReach(float combatReach)
void SetChannelSpellData(uint32 startTimeMs, uint32 durationMs)
void SetEmoteState(Emote emote)
MotionMaster const * GetMotionMaster() const
int32 CountPctFromMaxPower(Powers power, int32 pct) const
bool IsImmuneToAll() const
PositionUpdateInfo _positionUpdateInfo
void SetPvpFlag(UnitPVPStateFlags flags)
AuraApplicationList m_interruptableAuras
void SetResistance(SpellSchools school, int32 val)
Trinity::unique_weak_ptr< Vehicle > GetVehicleKitWeakPtr() const
uint32 GetDisplayId() const
Unit * GetUnitBeingMoved() const
UnitAI * GetTopAI() const
uint32 GetNativeDisplayId() const
virtual void UpdateArmor()=0
uint64 GetMaxHealth() const
void AddUnitMovementFlag(uint32 f)
ThreatManager m_threatManager
uint32 _oldFactionId
faction before charm
std::forward_list< Aura * > AuraList
uint16 GetMeleeAnimKitId() const override
SpellHistory const * GetSpellHistory() const
ObjectGuid GetMinionGUID() const
uint32 GetChannelScriptVisualId() const
float GetHoverOffset() const
virtual float GetDamageMultiplierForTarget(WorldObject const *) const
SharedVisionList const & GetSharedVisionList()
uint16 GetMaxSkillValueForLevel(Unit const *target=nullptr) const
bool HasUnitMovementFlag(uint32 f) const
virtual void UpdateMaxPower(Powers power)=0
uint32 GetFaction() const override
uint32 GetCreateHealth() const
AuraEffectList & GetAuraEffectsByType(AuraType type)
CombatManager const & GetCombatManager() const
AttackerSet const & getAttackers() const
void RemoveUnitFlag2(UnitFlags2 flags)
void RemovePvpFlag(UnitPVPStateFlags flags)
void SetSpellEmpowerStage(int8 stage)
std::multimap< uint32, Aura * > AuraMap
void SetNpcFlag(NPCFlags flags)
std::unique_ptr< Vignettes::VignetteData > m_vignette
bool HealthBelowPctDamaged(float pct, uint32 damage) const
int8 GetSpellEmpowerStage() const
Totem const * ToTotem() const
void AddInterruptMask(SpellAuraInterruptFlags flags, SpellAuraInterruptFlags2 flags2)
void RemovePetFlag(UnitPetFlag flags)
void setAttackTimer(WeaponAttackType type, uint32 time)
virtual bool UpdateStats(Stats stat)=0
bool HasNpcFlag(NPCFlags flags) const
std::array< DiminishingReturn, DIMINISHING_MAX > Diminishing
float m_modMeleeHitChance
virtual bool CheckAttackFitToAuraRequirement(WeaponAttackType, AuraEffect const *) const
ObjectGuid GetCritterGUID() const
void SetNameplateAttachToGUID(ObjectGuid guid)
uint8 GetLevelForTarget(WorldObject const *) const override
void SetFullPower(Powers power)
AuraList const & GetSingleCastAuras() const
bool CanModifyStats() const
Trinity::Containers::FlatSet< AuraApplication *, VisibleAuraSlotCompare > m_visibleAurasToUpdate
virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage) const =0
void SetAttackPower(int32 attackPower)
float GetSpeedRate(UnitMoveType mtype) const
std::set< Unit * > AttackerSet
virtual void SetTarget(ObjectGuid const &)=0
virtual uint32 GetPowerIndex(Powers power) const =0
virtual float GetFollowAngle() const
std::vector< Unit * > UnitVector
uint32 GetExtraUnitMovementFlags() const
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
void SetModTimeRate(float timeRate)
bool HasExtraUnitMovementFlag2(uint32 f) const
void SetBattlePetCompanionGUID(ObjectGuid guid)
float GetCreateStat(Stats stat) const
DeathState getDeathState() const
int32 GetBonusResistanceMod(SpellSchools school) const
uint8 GetEffectiveLevel() const
std::set< AuraApplication *, VisibleAuraSlotCompare > VisibleAuraContainer
bool IsEngagedBy(Unit const *who) const
float GetAdvFlyingSpeed(AdvFlyingRateTypeSingle speedType) const
bool HealthAbovePct(float pct) const
virtual float GetHealthMultiplierForTarget(WorldObject const *) const
bool HealthBelowPct(float pct) const
uint16 _movementAnimKitId
bool HasUnitState(const uint32 f) const
std::unordered_set< AbstractFollower * > m_followingMe
void RemoveExtraUnitMovementFlag2(uint32 f)
std::array< float, MAX_STATS > m_createStats
std::unique_ptr< Movement::MoveSpline > movespline
float GetPowerPct(Powers power) const
void SetCanModifyStats(bool modifyStats)
std::pair< AuraMap::iterator, AuraMap::iterator > AuraMapBoundsNonConst
void RemoveUnitMovementFlag(uint32 f)
std::array< float, ADV_FLYING_MAX_SPEED_TYPE > m_advFlyingSpeed
AuraApplicationMap m_appliedAuras
void SetVehicle(Vehicle *vehicle)
void SetClass(uint8 classId)
virtual float GetNativeObjectScale() const
bool HasInvisibilityAura() const
int32 GetProcChainLength() const
virtual void UpdateMaxHealth()=0
uint16 GetAIAnimKitId() const override
uint32 HasUnitTypeMask(uint32 mask) const
std::array< float, MAX_MOVE_TYPE > m_speed_rate
float GetStat(Stats stat) const
bool IsInteractionAllowedWhileHostile() const
virtual float GetBlockPercent(uint8) const
SpellHistory * GetSpellHistory()
void ReplaceAllUnitFlags2(UnitFlags2 flags)
std::array< float, MAX_ATTACK > m_modAttackSpeedPct
bool IsControlledByPlayer() const
bool IsWildBattlePet() const
ObjectGuid GetCharmerGUID() const
bool IsCombatDisallowed() const
SheathState GetSheath() const
UnitStandStateType GetStandState() const
void SetPetGUID(ObjectGuid guid)
virtual bool HasSpellFocus(Spell const *=nullptr) const
bool HasSharedVision() const
std::vector< std::pair< uint32, AuraApplication * > > AuraApplicationProcContainer
void SetCreatorGUID(ObjectGuid creator)
ObjectGuid LastCharmerGUID
CombatManager & GetCombatManager()
void SetUnitFlag(UnitFlags flags)
void SetExtraUnitMovementFlags(uint32 f)
void SetCritterGUID(ObjectGuid guid)
AuraApplicationMap & GetAppliedAuras()
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
bool IsUninteractible() const
void SetPetNumberForClient(uint32 petNumber)
bool IsSpiritHealer() const
uint32 GetCreateMana() const
std::array< uint32, MAX_ATTACK > m_attackTimer
CombatManager m_combatManager
void SetRangedAttackPower(int32 attackPower)
virtual void SetNativeGender(Gender gender)
AuraStateAurasMap m_auraStateAuras
int32 GetResistance(SpellSchools school) const
AuraList & GetSingleCastAuras()
void AddUnitTypeMask(uint32 mask)
void SetModCastingSpeed(float castingSpeed)
ObjectGuid GetBattlePetCompanionGUID() const
Vehicle * GetVehicleKit() const
virtual void SetImmuneToPC(bool apply)
float m_modSpellHitChance
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
std::vector< AreaTrigger * > const & GetInsideAreaTriggers() const
virtual bool IsEngaged() const
void ReplaceAllNpcFlags(NPCFlags flags)
uint32 GetBattlePetCompanionExperience() const
VisibleAuraContainer const & GetVisibleAuras() const
void SetAttackPowerMultiplier(float attackPowerMult)
void ReplaceAllSilencedSchoolMask(SpellSchoolMask schoolMask)
uint32 GetExtraUnitMovementFlags2() const
uint32 GetWildBattlePetLevel() const
AuraMap & GetOwnedAuras()
bool IsSpiritService() const
std::array< float, MAX_STATS > m_floatStatNegBuff
void SetTransformSpell(uint32 spellid)
bool IsImmuneToPC() const
void ApplyModManaCostMultiplier(float manaCostMultiplier, bool apply)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
SharedVisionList m_sharedVision
EnumFlag< SpellAuraInterruptFlags > m_interruptMask
std::array< AuraEffectList, TOTAL_AURAS > m_modAuras
ObjectGuid GetTarget() const
bool _isWalkingBeforeCharm
Are we walking before we were charmed?
void SetAttackPowerModPos(int32 attackPowerMod)
void SetMountDisplayId(uint32 mountDisplayId)
void SetWildBattlePetLevel(uint32 wildBattlePetLevel)
void SetIsCombatDisallowed(bool apply)
bool IsThreatenedBy(Unit const *who) const
GetCastSpellInfoResult GetCastSpellInfo(SpellInfo const *spellInfo) const
void RemoveUnitFlag(UnitFlags flags)
uint32 GetBattlePetCompanionNameTimestamp() const
Player * m_playerMovingMe
ObjectGuid GetPetGUID() const
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
WeaponAttackType AttackType
ProcFlagsInit ProcAttacker
MeleeHitOutcome HitOutCome
MeleeHitOutcome hitOutCome
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome)
WeaponAttackType attackType
SpellCastVisual SpellVisual
SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _originalDamage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
AuraEffect const * auraEff
UF::SpellCastVisual SpellVisual
UpdateField< int32, 32, 45 > FactionTemplate
UpdateField< int32, 96, 115 > BattlePetCompanionExperience
UpdateField< int32, 96, 102 > RangedWeaponAttackPower
UpdateField< int32, 64, 81 > CreatedBySpell
UpdateField< uint8, 0, 29 > ClassId
UpdateFieldArray< int32, 7, 206, 214 > BonusResistanceMods
UpdateField< int32, 64, 82 > EmoteState
UpdateField< float, 32, 53 > CombatReach
UpdateField< uint32, 128, 131 > SilencedSchoolMask
UpdateField< int32, 64, 83 > BaseMana
UpdateField< uint32, 32, 47 > Flags2
UpdateField< float, 32, 52 > BoundingRadius
UpdateField< uint8, 64, 86 > PvpFlags
UpdateField< int32, 32, 60 > CosmeticMountDisplayID
UpdateField< uint8, 0, 28 > Race
UpdateField< uint8, 0, 31 > Sex
UpdateField< int8, 0, 26 > SpellEmpowerStage
UpdateField< int32, 64, 90 > AttackPowerModPos
UpdateField< int32, 96, 97 > RangedAttackPowerModNeg
UpdateField< float, 96, 109 > HoverHeight
UpdateField< float, 96, 98 > RangedAttackPowerMultiplier
UpdateField< int32, 64, 89 > AttackPower
UpdateField< int32, 64, 95 > RangedAttackPowerModPos
UpdateField< ObjectGuid, 128, 135 > NameplateAttachToGUID
UpdateField< int32, 96, 101 > OffHandWeaponAttackPower
UpdateField< ObjectGuid, 0, 19 > CreatedBy
UpdateField< UF::UnitChannel, 0, 25 > ChannelData
UpdateField< int32, 64, 84 > BaseHealth
UpdateField< uint32, 96, 116 > BattlePetCompanionNameTimestamp
UpdateField< uint8, 64, 68 > VisFlags
UpdateField< float, 96, 107 > ManaCostMultiplier
UpdateField< int32, 96, 114 > WildBattlePetLevel
UpdateField< int32, 32, 59 > MountDisplayID
UpdateField< float, 64, 77 > ModHaste
UpdateField< uint32, 32, 35 > OverrideDisplayPowerID
UpdateField< ObjectGuid, 0, 15 > Summon
UpdateFieldArray< int32, 7, 206, 207 > Resistances
UpdateField< float, 64, 76 > ModSpellHaste
UpdateField< uint8, 64, 87 > PetFlags
UpdateField< uint32, 0, 8 > NpcFlags2
UpdateField< float, 64, 78 > ModRangedHaste
UpdateFieldArray< int32, 7, 206, 221 > ManaCostModifier
UpdateField< float, 64, 80 > ModTimeRate
UpdateFieldArray< int32, 5, 185, 186 > Stats
UpdateField< int32, 64, 91 > AttackPowerModNeg
UpdateField< ObjectGuid, 0, 23 > BattlePetCompanionGUID
UpdateField< float, 64, 92 > AttackPowerMultiplier
UpdateField< ObjectGuid, 0, 16 > Critter
UpdateField< uint32, 64, 71 > PetNameTimestamp
UpdateField< uint32, 32, 48 > Flags3
UpdateField< float, 64, 74 > ModCastingSpeed
UpdateField< float, 64, 79 > ModHasteRegen
UpdateField< uint32, 32, 46 > Flags
UpdateField< int32, 96, 100 > MainHandWeaponAttackPower
UpdateField< ObjectGuid, 0, 20 > DemonCreator
UpdateField< int32, 64, 94 > RangedAttackPower
UpdateField< uint32, 0, 7 > NpcFlags
UpdateField< uint32, 64, 70 > PetNumber
::SpellInfo const * SpellInfo
TriggerCastFlags TriggerFlag