20#define WORLD_TRIGGER 12999
110#define MAX_SPELLMOD 36
155#define BASE_MINDAMAGE 1.0f
156#define BASE_MAXDAMAGE 2.0f
157#define BASE_ATTACK_TIME 2000
250#define MAX_SHEATH_STATE 3
272#define CREATURE_MAX_SPELLS 8
273#define MAX_SPELL_CHARM 4
274#define MAX_SPELL_VEHICLE 6
275#define MAX_SPELL_POSSESS 8
276#define MAX_SPELL_CONTROL_BAR 10
278#define MAX_AGGRO_RESET_TIME 10
279#define MAX_AGGRO_RADIUS 45.0f
566#define MAX_MOVE_TYPE 9
610#define MAX_COMBAT_RATING 27
954 amount = std::min(amount,
GetHeal());
1098#define MAX_DECLINED_NAME_CASES 5
1114#define CURRENT_FIRST_NON_MELEE_SPELL 1
1115#define CURRENT_MAX_SPELL 4
1171#define UNIT_ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF)
1172#define UNIT_ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 24)
1173#define MAKE_UNIT_ACTION_BUTTON(A, T) (uint32(A) | (uint32(T) << 24))
1233#define MAX_UNIT_ACTION_BAR_INDEX (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START)
1273 PetActionBar[index].SetActionAndType(spellOrAction, type);
1329#define REACTIVE_TIMER_START 4000
1338#define MAX_REACTIVE 3
1339#define SUMMON_SLOT_PET 0
1340#define SUMMON_SLOT_TOTEM 1
1341#define MAX_TOTEM_SLOT 5
1342#define SUMMON_SLOT_MINIPET 5
1343#define SUMMON_SLOT_QUEST 6
1344#define MAX_SUMMON_SLOT 7
1346#define MAX_GAMEOBJECT_SLOT 4
1361#define ATTACK_DISPLAY_DELAY 200
1362#define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f
1373 typedef std::pair<AuraMap::const_iterator, AuraMap::const_iterator>
AuraMapBounds;
1452 void GetRandomContactPoint(
const Unit* target,
float& x,
float& y,
float& z,
float distance2dMin,
float distance2dMax)
const;
1763 void Kill(
Unit* victim,
bool durabilityLoss =
true);
1984 void NearTeleportTo(
float x,
float y,
float z,
float orientation,
bool casting =
false);
1986 virtual bool UpdatePosition(
float x,
float y,
float z,
float ang,
bool teleport =
false);
1993 void KnockbackFrom(
float x,
float y,
float speedXY,
float speedZ);
1994 void JumpTo(
float speedXY,
float speedZ,
bool forward =
true);
1997 void MonsterMoveWithSpeed(
float x,
float y,
float z,
float speed,
bool generatePath =
false,
bool forceDestination =
false);
2018 bool SetHover(
bool enable,
bool packetOnly =
false);
2357 bool IsNonMeleeSpellCasted(
bool withDelayed,
bool skipChanneled =
false,
bool skipAutorepeat =
false,
bool isAutoshoot =
false,
bool skipInstant =
true)
const;
2790 return static_cast<float>(
M_PI / 2);
2805 if (
IsPet())
return reinterpret_cast<Pet*
>(
this);
else return NULL;
2809 if (
IsPet())
return reinterpret_cast<Pet const*
>(
this);
else return NULL;
2814 if (
IsTotem())
return reinterpret_cast<Totem*
>(
this);
else return NULL;
2818 if (
IsTotem())
return reinterpret_cast<Totem const*
>(
this);
else return NULL;
2863 explicit Unit(
bool isWorldObject);
2964 void SetRooted(
bool apply,
bool packetOnly =
false);
#define MAX_SPELL_EFFECTS
#define NOMINAL_MELEE_RANGE
bool IS_PLAYER_GUID(uint64 guid)
#define MAX_SPELL_IMMUNITY
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_AURA_MOD_INVISIBILITY
float baseMoveSpeed[MAX_MOVE_TYPE]
float playerBaseMoveSpeed[MAX_MOVE_TYPE]
SpellChannelInterruptFlags
@ CHANNEL_INTERRUPT_FLAG_INTERRUPT
NPCFlags
Non Player Character flags.
@ UNIT_NPC_FLAG_WILDPET_CAPTURABLE
@ UNIT_NPC_FLAG_VENDOR_AMMO
@ UNIT_NPC_FLAG_TABARDDESIGNER
@ UNIT_NPC_FLAG_AUCTIONEER
@ UNIT_NPC_FLAG_VENDOR_POISON
@ UNIT_NPC_FLAG_GUILD_BANKER
@ UNIT_NPC_FLAG_STABLEMASTER
@ UNIT_NPC_FLAG_VENDOR_REAGENT
@ UNIT_NPC_FLAG_BATTLEMASTER
@ UNIT_NPC_FLAG_VENDOR_FOOD
@ UNIT_NPC_FLAG_QUESTGIVER
@ UNIT_NPC_FLAG_INNKEEPER
@ UNIT_NPC_FLAG_SPELLCLICK
@ UNIT_NPC_FLAG_TRANSMOGRIFIER
@ UNIT_NPC_FLAG_PLAYER_VEHICLE
@ UNIT_NPC_FLAG_FLIGHTMASTER
@ UNIT_NPC_FLAG_TRAINER_CLASS
@ UNIT_NPC_FLAG_VAULTKEEPER
@ UNIT_NPC_FLAG_TRAINER_PROFESSION
@ UNIT_NPC_FLAG_PETITIONER
@ UNIT_NPC_FLAG_SPIRITGUIDE
@ UNIT_NPC_FLAG_SPIRITHEALER
@ AURA_INTERRUPT_FLAG_TAKE_DAMAGE
@ AURA_INTERRUPT_FLAG_SPELL_ATTACK
@ AURA_INTERRUPT_FLAG_TELEPORTED
@ AURA_INTERRUPT_FLAG_CAST
@ AURA_INTERRUPT_FLAG_NOT_SHEATHED
@ AURA_INTERRUPT_FLAG_UNK21
@ AURA_INTERRUPT_FLAG_NOT_VICTIM
@ AURA_INTERRUPT_FLAG_DIRECT_DAMAGE
@ AURA_INTERRUPT_FLAG_UNK14
@ AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION
@ AURA_INTERRUPT_FLAG_USE
@ AURA_INTERRUPT_FLAG_TALK
@ AURA_INTERRUPT_FLAG_HITBYSPELL
@ AURA_INTERRUPT_FLAG_MOVE
@ AURA_INTERRUPT_FLAG_TURNING
@ AURA_INTERRUPT_FLAG_JUMP
@ AURA_INTERRUPT_FLAG_NOT_ABOVEWATER
@ AURA_INTERRUPT_FLAG_NOT_SEATED
@ AURA_INTERRUPT_FLAG_NOT_UNDERWATER
@ AURA_INTERRUPT_FLAG_MELEE_ATTACK
@ AURA_INTERRUPT_FLAG_TRANSFORM
@ AURA_INTERRUPT_FLAG_UNK16
@ AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT
@ AURA_INTERRUPT_FLAG_CHANGE_MAP
@ AURA_INTERRUPT_FLAG_MOUNT
@ AURA_INTERRUPT_FLAG_LANDING
@ AURA_INTERRUPT_FLAG_NOT_MOUNTED
@ MOVEMENTFLAG_MASK_PLAYER_ONLY
@ MOVEMENTFLAG_DESCENDING
@ MOVEMENTFLAG_MASK_CREATURE_ALLOWED
@ MOVEMENTFLAG_PITCH_DOWN
@ MOVEMENTFLAG_PENDING_STRAFE_STOP
@ MOVEMENTFLAG_PENDING_STOP
@ MOVEMENTFLAG_PENDING_STRAFE_LEFT
@ MOVEMENTFLAG_STRAFE_LEFT
@ MOVEMENTFLAG_WATERWALKING
@ MOVEMENTFLAG_MASK_MOVING
@ MOVEMENTFLAG_DISABLE_GRAVITY
@ MOVEMENTFLAG_PENDING_BACKWARD
@ MOVEMENTFLAG_FALLING_SLOW
@ MOVEMENTFLAG_PENDING_STRAFE_RIGHT
@ MOVEMENTFLAG_MASK_TURNING
@ MOVEMENTFLAG_MASK_MOVING_FLY
@ MOVEMENTFLAG_STRAFE_RIGHT
@ MOVEMENTFLAG_FALLING_FAR
@ MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE
Movement flags that have change status opcodes associated for players.
@ MOVEMENTFLAG_PENDING_FORWARD
@ MOVEMENTFLAG_SPLINE_ELEVATION
@ MOVEMENTFLAG_PENDING_ROOT
@ MOVEMENTFLAG_DISABLE_COLLISION
@ UNIT_MASK_CONTROLABLE_GUARDIAN
UnitActionBarEntry CharmSpellInfo
#define MAX_UNIT_ACTION_BAR_INDEX
#define UNIT_ACTION_BUTTON_ACTION(X)
@ SPELLMOD_CHANCE_OF_SUCCESS
@ SPELLMOD_CRIT_DAMAGE_BONUS
@ SPELLMOD_NOT_LOSE_CASTING_TIME
@ SPELLMOD_CRITICAL_CHANCE
@ SPELLMOD_CRIT_DAMAGE_BONUS_2
@ SPELLMOD_BONUS_MULTIPLIER
@ SPELLMOD_SPELL_COST_REFUND_ON_FAIL
@ SPELLMOD_VALUE_MULTIPLIER
@ SPELLMOD_DAMAGE_MULTIPLIER
@ SPELLMOD_GLOBAL_COOLDOWN
@ SPELLMOD_PROC_PER_MINUTE
@ SPELLMOD_ACTIVATION_TIME
@ SPELLMOD_RESIST_MISS_CHANCE
@ SPELLMOD_RESIST_DISPEL_CHANCE
@ UNIT_MOD_DAMAGE_OFFHAND
@ UNIT_MOD_STAT_INTELLECT
@ UNIT_MOD_RESISTANCE_SHADOW
@ UNIT_MOD_RESISTANCE_FROST
@ UNIT_MOD_RESISTANCE_HOLY
@ UNIT_MOD_ALTERNATE_POWER
@ 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_RESISTANCE_END
@ UNIT_MOD_DAMAGE_MAINHAND
@ UNIT_MOD_ATTACK_POWER_RANGED
@ HITINFO_SWINGNOHITSOUND
@ ACTION_BAR_INDEX_PET_SPELL_START
@ ACTION_BAR_INDEX_PET_SPELL_END
@ UNIT_BYTE1_FLAG_ALWAYS_STAND
UNORDERED_MAP< uint32, GlobalCooldown > GlobalCooldownList
std::list< Player * > SharedVisionList
@ UNIT_STAND_STATE_SIT_HIGH_CHAIR
@ UNIT_STAND_STATE_SUBMERGED
@ UNIT_STAND_STATE_SIT_MEDIUM_CHAIR
@ UNIT_STAND_STATE_SIT_LOW_CHAIR
@ UNIT_STAND_STATE_SIT_CHAIR
@ UNIT_STAND_FLAGS_UNTRACKABLE
#define MAX_DECLINED_NAME_CASES
@ OFFHAND_CRIT_PERCENTAGE
@ AURA_REMOVE_BY_ENEMY_SPELL
@ TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore Spell and Category cooldowns.
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore GCD.
@ TRIGGERED_CAST_DIRECTLY
Will ignore combo point requirement.
@ TRIGGERED_IGNORE_TARGET_CHECK
Will ignore equipped item requirements.
@ TRIGGERED_IGNORE_CASTER_AURASTATE
Will ignore shapeshift checks.
@ TRIGGERED_IGNORE_AURA_SCALING
Will not take away cast item or update related achievement criteria.
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will ignore aura scaling.
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore caster aura states including combat requirements and death state.
@ TRIGGERED_IGNORE_SHAPESHIFT
Will not adjust facing to target (if any).
@ TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS
In Spell::prepare, will be cast directly without setting containers for executed spell.
@ TRIGGERED_IGNORE_CAST_ITEM
Will ignore power and reagent cost.
@ TRIGGERED_IGNORE_COMBO_POINTS
Will not check if a current cast is in progress.
@ TRIGGERED_IGNORE_GCD
Not triggered.
@ TRIGGERED_DISALLOW_PROC_EVENTS
Will ignore caster aura restrictions or requirements.
@ TRIGGERED_IGNORE_CASTER_AURAS
Will ignore mounted/on vehicle restrictions.
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Disallows proc events from triggered spell (default).
@ TRIGGERED_IGNORE_SET_FACING
Will ignore interruptible aura's at cast.
#define MAKE_UNIT_ACTION_BUTTON(A, T)
#define CURRENT_MAX_SPELL
@ CR_RESILIENCE_CRIT_TAKEN
@ CR_WEAPON_SKILL_OFFHAND
@ CR_WEAPON_SKILL_MAINHAND
@ CR_RESILIENCE_PLAYER_DAMAGE_TAKEN
#define UNIT_ACTION_BUTTON_TYPE(X)
@ FORM_SPIRITOFREDEMPTION
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ SPELL_INTERRUPT_FLAG_UNK3
@ SPELL_INTERRUPT_FLAG_ABORT_ON_DMG
@ SPELL_INTERRUPT_FLAG_PUSH_BACK
@ SPELL_INTERRUPT_FLAG_INTERRUPT
@ SPELL_INTERRUPT_FLAG_MOVEMENT
std::list< Unit * > UnitList
#define REACTIVE_TIMER_START
std::list< std::pair< Aura *, uint8 > > DispelChargesList
@ SPELL_FACING_FLAG_INFRONT
@ MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS
@ MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING
@ MOVEMENTFLAG2_INTERPOLATED_PITCHING
@ MOVEMENTFLAG2_INTERPOLATED_MOVEMENT
@ MOVEMENTFLAG2_NO_STRAFE
@ MOVEMENTFLAG2_INTERPOLATED_TURNING
@ MOVEMENTFLAG2_FULL_SPEED_PITCHING
@ MOVEMENTFLAG2_FULL_SPEED_TURNING
@ MOVEMENTFLAG2_NO_JUMPING
#define MAX_GAMEOBJECT_SLOT
@ UNIT_BYTE2_FLAG_FFA_PVP
@ UNIT_BYTE2_FLAG_SANCTUARY
@ UNIT_STATE_ATTACK_PLAYER
@ UNIT_STATE_ROAMING_MOVE
@ UNIT_STATE_UNATTACKABLE
@ UNIT_STATE_LOST_CONTROL
@ UNIT_STATE_CANNOT_AUTOATTACK
@ UNIT_STATE_FLEEING_MOVE
@ UNIT_STATE_CONFUSED_MOVE
@ UNIT_STATE_IGNORE_PATHFINDING
@ UNIT_STATE_MELEE_ATTACKING
@ SUMMON_TYPE_LIGHTSPRING
@ SUMMON_TYPE_TOTEM_EARTH
@ SUMMON_TYPE_TOTEM_WATER
@ SUMMON_TYPE_STATUE_JADE
std::list< SpellImmune > SpellImmuneList
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_DISABLE_POWERS
@ UNIT_FLAG_SERVER_CONTROLLED
@ UNIT_FLAG_PVP_ATTACKABLE
@ UNIT_FLAG_NOT_SELECTABLE
@ UNIT_FLAG_NOT_ATTACKABLE_1
@ UNIT_FLAG_PLAYER_CONTROLLED
@ UNIT_FLAG_PET_IN_COMBAT
uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
@ UNIT_FLAG2_MIRROR_IMAGE
@ UNIT_FLAG2_ALLOW_ENEMY_INTERACT
@ UNIT_FLAG2_DISABLE_TURN
@ UNIT_FLAG2_PLAY_DEATH_ANIM
@ UNIT_FLAG2_IGNORE_REPUTATION
@ UNIT_FLAG2_PREVENT_SPELL_CLICK
@ UNIT_FLAG2_RESTRICT_PARTY_INTERACTION
@ UNIT_FLAG2_DISABLE_PRED_STATS
@ UNIT_FLAG2_COMPREHEND_LANG
@ UNIT_FLAG2_FORCE_MOVEMENT
@ UNIT_FLAG2_ALLOW_CHEAT_SPELLS
@ UNIT_FLAG2_REGENERATE_POWER
@ UNIT_FLAG2_INSTANTLY_APPEAR_MODEL
@ UNIT_FLAG2_DISARM_OFFHAND
@ UNIT_FLAG2_DISARM_RANGED
@ UNIT_FIELD_ATTACK_ROUND_BASE_TIME
@ UNIT_FIELD_NATIVE_DISPLAY_ID
@ UNIT_FIELD_STAT_POS_BUFF
@ UNIT_FIELD_SHAPESHIFT_FORM
@ UNIT_FIELD_MOUNT_DISPLAY_ID
@ UNIT_FIELD_FACTION_TEMPLATE
@ UNIT_FIELD_COMBAT_REACH
@ UNIT_FIELD_DISPLAY_POWER
@ UNIT_FIELD_STAT_NEG_BUFF
@ PLAYER_FIELD_VIRTUAL_PLAYER_REALM
T CalculatePct(T base, U pct)
std::vector< CustomSpellValueMod > StorageType
void AddSpellMod(SpellValueMod mod, int32 value)
const_iterator end() const
std::pair< SpellValueMod, int32 > CustomSpellValueMod
StorageType::const_iterator const_iterator
const_iterator begin() const
void ResistDamage(uint32 amount)
void AbsorbDamage(uint32 amount)
void ModifyDamage(int32 amount)
WeaponAttackType m_attackType
Unit * GetAttacker() const
SpellInfo const *const m_spellInfo
SpellInfo const * GetSpellInfo() const
void BlockDamage(uint32 amount)
DamageEffectType GetDamageType() const
WeaponAttackType GetAttackType() const
SpellSchoolMask GetSchoolMask() const
DamageInfo(Unit *_attacker, Unit *_victim, uint32 _damage, SpellInfo const *_spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType)
SpellSchoolMask const m_schoolMask
DamageEffectType const m_damageType
uint32 GetDispellerSpellId() const
Unit * GetDispeller() const
void SetRemovedCharges(uint8 amount)
uint8 GetRemovedCharges() const
DispelInfo(Unit *dispeller, uint32 dispellerSpellId, uint8 chargesRemoved)
bool HasGlobalCooldown(SpellInfo const *spellInfo) const
GlobalCooldownList m_GlobalCooldowns
void AddGlobalCooldown(SpellInfo const *spellInfo, uint32 gcd)
void CancelGlobalCooldown(SpellInfo const *spellInfo)
void AbsorbHeal(uint32 amount)
void propagateSpeedChange()
uint8 GetByteValue(uint16 index, uint8 offset) const
void SetByteValue(uint16 index, uint8 offset, uint8 value)
uint32 GetUInt32Value(uint16 index) const
float GetFloatValue(uint16 index) const
uint64 GetUInt64Value(uint16 index) const
void SetFloatValue(uint16 index, float value)
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
bool HasFlag(uint16 index, uint32 flag) const
bool HasByteFlag(uint16 index, uint8 offset, uint8 flag) const
void SetUInt32Value(uint16 index, uint32 value)
void SetStatInt32Value(uint16 index, int32 value)
void SetUInt64Value(uint16 index, uint64 value)
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
uint32 GetHitMask() const
HealInfo * GetHealInfo() const
SpellSchoolMask GetSchoolMask() const
Unit * GetActionTarget() const
uint32 GetSpellTypeMask() const
ProcEventInfo(Unit *actor, Unit *actionTarget, Unit *procTarget, uint32 typeMask, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
uint32 GetTypeMask() const
Unit *const _actionTarget
SpellInfo const * GetSpellInfo() const
uint32 GetSpellPhaseMask() const
DamageInfo * GetDamageInfo() const
Unit * GetProcTarget() const
bool operator()(const Unit *a, const Unit *b) const
HealthPctOrderPred(bool ascending=true)
bool operator()(const Unit *a, const Unit *b) const
PowerPctOrderPred(Powers power, bool ascending=true)
bool HasAuraTypeWithAffectMask(AuraType auratype, SpellInfo const *affectedSpell) const
void EnterVehicle(Unit *base, int8 seatId=-1)
int32 ModifyHealth(int32 val)
void ApplyResilience(Unit const *victim, int32 *damage, bool isCrit) const
uint32 m_reactiveTimer[MAX_REACTIVE]
void ClearUnitState(uint32 f)
AuraApplication * GetAuraApplicationOfRankedSpell(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0, AuraApplication *except=NULL) const
void OutDebugInfo() const
void _EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const *aurApp=NULL)
void SetMinion(Minion *minion, bool apply)
std::pair< AuraApplicationMap::iterator, AuraApplicationMap::iterator > AuraApplicationMapBoundsNonConst
void CastStop(uint32 except_spellid=0)
bool _IsValidAssistTarget(Unit const *target, SpellInfo const *bySpell) const
bool m_duringRemoveFromWorld
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Vehicle * GetVehicle() const
bool HandleAuraRaidProcFromChargeWithValue(AuraEffect *triggeredByAura)
float GetPosStat(Stats stat) const
Aura * _TryStackingOrRefreshingExistingAura(SpellInfo const *newAura, uint32 effMask, Unit *caster, int32 *baseAmount=NULL, Item *castItem=NULL, uint64 casterGUID=0)
bool IsBattleMaster() const
std::list< GameObject * > GameObjectList
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
Spell * m_currentSpells[CURRENT_MAX_SPELL]
float GetHealthPct() const
uint32 m_lastSanctuaryTime
uint32 GetMechanicImmunityMask() const
virtual void UpdateDamagePhysical(WeaponAttackType attType)=0
DiminishingLevels GetDiminishing(DiminishingGroup group)
void SetCreateStat(Stats stat, float val)
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=NULL, Unit const *Caster=NULL) const
void SetStat(Stats stat, int32 val)
void _RemoveNoStackAurasDueToAura(Aura *aura)
int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, const AuraEffect *except=NULL) const
void setFaction(uint32 faction)
void ApplyResistanceBuffModsPercentMod(SpellSchools school, bool positive, float val, bool apply)
void GetRandomContactPoint(const Unit *target, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const
uint32 SpellCriticalDamageBonus(SpellInfo const *spellProto, uint32 damage, Unit *victim)
void SetResistanceBuffMods(SpellSchools school, bool positive, float val)
uint32 GetUnitMovementFlags() const
LiquidTypeEntry const * _lastLiquid
bool HasAuraTypeWithValue(AuraType auratype, int32 value) const
bool IsGuildMaster() const
uint32 getVirtualRealm() const
bool HasAuraTypeWithCaster(AuraType auratype, uint64 caster) const
void RemovePetAura(PetAura const *petSpell)
AuraApplication * GetVisibleAura(uint8 slot) const
void _UpdateAutoRepeatSpell()
int32 CalculateSpellDamage(Unit const *target, SpellInfo const *spellProto, uint8 effect_index, int32 const *basePoints=NULL) const
void SendMoveKnockBack(Player *player, float speedXY, float speedZ, float vcos, float vsin)
void IncrDiminishing(DiminishingGroup group)
float GetTotalAuraModValue(UnitMods unitMod) const
Unit * SelectNearbyTarget(Unit *exclude=NULL, float dist=NOMINAL_MELEE_RANGE) const
void SetFacingTo(float ori)
void Kill(Unit *victim, bool durabilityLoss=true)
void RemoveAllControlled()
bool CanHaveThreatList() const
uint64 GetCharmGUID() const
float GetTotalStatValue(Stats stat) const
uint32 GetCombatTimer() const
void CombatStop(bool includingCast=false)
void TrackGameObject(GameObject *gameObj)
void ClearPhases(bool update=false)
void PlayOneShotAnimKit(uint32 id)
void RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode=AURA_REMOVE_BY_DEFAULT, uint32 except=0)
virtual void SetTarget(uint64)=0
void SendMeleeAttackStop(Unit *victim=NULL)
ReputationRank GetReactionTo(Unit const *target) const
bool IsContestedGuard() const
bool IsValidAttackTarget(Unit const *target) const
bool isSpellBlocked(Unit *victim, SpellInfo const *spellProto, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK)
float GetSpeed(UnitMoveType mtype) const
uint64 GetCreatorGUID() const
bool SetFall(bool enable)
void _UnregisterDynObject(DynamicObject *dynObj)
uint32 GetMovementCounter() const
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void UpdateObjectVisibility(bool forced=true) override
uint32 getFaction() const
void AddInterruptMask(uint32 mask)
uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex=0) const
bool HasVisionObscured(Unit const *target) const
Diminishing m_Diminishing
void SetContestedPvP(Player *attackedPlayer=NULL)
bool IsTabardDesigner() const
void SendClearThreatListOpcode(ObjectGuid UnitGUID)
void UpdateHeight(float newZ)
Only server-side height update, does not broadcast to client.
bool IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
void RemoveComboPointHolder(uint32 lowguid)
ComboPointHolderSet m_ComboPointHolders
void SetConfused(bool apply)
void _UpdateSpells(uint32 time)
Unit * GetCharmerOrOwnerOrSelf() const
void SetAnimTier(AnimTier tier)
void AddToWorld() override
bool SetPhased(uint32 id, bool update, bool apply) OVERRIDE
FactionTemplateEntry const * GetFactionTemplateEntry() const
void _UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode)
SpellMissInfo MeleeSpellHitResult(Unit *victim, SpellInfo const *spellInfo)
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster=0) const
void SetControlled(bool apply, UnitState state)
SpellSchools GetSpellSchoolByAuraGroup(UnitMods unitMod) const
SpellMissInfo MagicSpellHitResult(Unit *victim, SpellInfo const *spellInfo)
void SetStunned(bool apply)
uint32 GetModelForForm(ShapeshiftForm form) const
Stats GetStatByAuraGroup(UnitMods unitMod) const
bool HasNegativeAuraWithAttribute(uint32 flag, uint64 guid=0) const
float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END]
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void SetCreateHealth(uint32 val)
std::list< Aura * > AuraList
uint32 GetResistance(SpellSchools school) const
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
void AddPetAura(PetAura const *petSpell)
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer)
float m_modAttackSpeedPct[3]
void SetPower(Powers power, int32 val)
void SendPetActionFeedback(uint8 msg) const
-------—Pet responses methods--------------—
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
virtual bool UpdateAllStats()=0
Player * GetSpellModOwner() const
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellInfo const *affectedSpell) const
void SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
Creature * GetVehicleCreatureBase() const
void RemoveVehicleKit(bool remove=false)
uint32 m_overrideAutoattackRange
void RemoveAllGameObjects()
uint64 GetCharmerOrOwnerGUID() const
bool isPossessedByPlayer() const
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void ApplyStatBuffMod(Stats stat, float val, bool apply)
float GetSpellMinRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
bool HealthAbovePctHealed(int32 pct, uint32 heal) const
void _RegisterDynObject(DynamicObject *dynObj)
bool isInFrontInMap(Unit const *target, float distance, float arc=M_PI) const
bool IsPolymorphed() const
float GetUnitDodgeChance() const
bool HandleDummyAuraProc(Unit *victim, uint32 damage, AuraEffect *triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
ShapeshiftForm GetShapeshiftForm() const
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value)
float ApplyTotalThreatModifier(float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL)
void WriteMovementInfo(WorldPacket &data, Movement::ExtraMovementStatusElement *extras=NULL)
virtual bool isBeingLoaded() const
void RemoveNotOwnSingleTargetAuras(uint32 newPhase=0, bool phaseid=false)
float CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const
float GetCombatRatingReduction(CombatRating cr) const
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
bool isSpellCrit(Unit *victim, SpellInfo const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK) const
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
void HandleProcExtraAttackFor(Unit *victim)
void SetCreatorGUID(uint64 creator)
Spell * GetCurrentSpell(uint32 spellType) const
bool HandleAuraProc(Unit *victim, uint32 damage, Aura *triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool *handled)
std::set< PetAura const * > PetAuraSet
void SetCantProc(bool apply)
uint32 SpellCriticalHealingBonus(SpellInfo const *spellProto, uint32 damage, Unit *victim)
Unit * GetCharmer() const
void GetAttackableUnitListInRange(std::list< Unit * > &list, float fMaxSearchRange) const
float GetPositionZMinusOffset() const
Unit * getAttackerForHelper() const
uint32 SpellHealingBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack=1) const
void SendMeleeAttackStart(Unit *victim)
Pet * CreateTamedPetFrom(Creature *creatureTarget, uint32 spell_id=0)
bool IsHostileToPlayers() const
Aura * GetAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
bool IsInDisallowedMountForm() const
void SendSpellDamageImmune(Unit *target, uint32 spellId)
void DealDamageMods(Unit *victim, uint32 &damage, uint32 *absorb)
float m_weaponDamage[uint8(WeaponAttackType::MAX_ATTACK)][2]
void _removeAttacker(Unit *pAttacker)
void SendAttackStateUpdate(CalcDamageInfo *damageInfo)
void RemoveAllAurasExceptType(AuraType type)
void GetProcAurasTriggeredOnEvent(AuraApplicationList &aurasTriggeringProc, AuraApplicationList *procAuras, ProcEventInfo eventInfo)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
DynamicObject * GetDynObject(uint32 spellId)
int32 CalcSpellDuration(SpellInfo const *spellProto)
virtual bool CanFly() const =0
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack)
Unit * GetVehicleBase() const
bool haveOffhandWeapon() const
MotionMaster * GetMotionMaster()
AuraApplicationMap const & GetAppliedAuras() const
uint64 GetPetGUID() const
uint32 MeleeDamageBonusTaken(Unit *attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const *spellProto=NULL)
void _addAttacker(Unit *pAttacker)
void SetInCombatState(bool PvP, Unit *enemy=NULL)
void RemoveVisibleAura(uint8 slot)
void SetCharm(Unit *target, bool apply)
void SendTeleportPacket(Position &pos)
MeleeHitOutcome RollMeleeOutcomeAgainst(const Unit *victim, WeaponAttackType attType) const
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=NULL, uint8 effIndex=MAX_SPELL_EFFECTS)
void SendHealSpellLog(ObjectGuid CasterGUID, ObjectGuid TargetGUID, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical=false)
float ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, Unit *caster, DiminishingLevels Level, int32 limitduration)
uint8 getLevelForTarget(WorldObject const *) const override
bool SetCharmedBy(Unit *charmer, CharmType type, AuraApplication const *aurApp=NULL)
uint64 m_SummonSlot[MAX_SUMMON_SLOT]
float GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_value) const
bool CanDualWield() const
void UpdateInterruptMask()
void StartReactiveTimer(ReactiveType reactive)
void SetLastDamagedTime(time_t val)
void SetUnitMovementFlags(uint32 f)
void CleanupsBeforeDelete(bool finalCleanup=true) override
uint32 GetMaxHealth() const
Aura * AddAura(uint32 spellId, Unit *target)
void TauntApply(Unit *victim)
void SetExtraUnitMovementFlags(uint16 f)
bool isAttackingPlayer() const
uint64 m_ObjectSlot[MAX_GAMEOBJECT_SLOT]
virtual void UpdateResistances(uint32 school)=0
void SetFacingToObject(WorldObject *object)
void RemoveAurasDueToItemSpell(uint32 spellId, uint64 castItemGuid)
void UpdateSplineMovement(uint32 t_diff)
bool IsLevitating() const
void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
uint32 GetDamageReduction(uint32 damage) const
bool IsFullHealth() const
void CombatStart(Unit *target, bool initialAggro=true)
uint32 CalcArmorReducedDamage(Unit *victim, const uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=WeaponAttackType::MAX_ATTACK)
std::pair< AuraMap::const_iterator, AuraMap::const_iterator > AuraMapBounds
bool HandleOverrideClassScriptAuraProc(Unit *victim, uint32 damage, AuraEffect *triggeredByAura, SpellInfo const *procSpell, uint32 cooldown)
int32 ModSpellDuration(SpellInfo const *spellProto, Unit const *target, int32 duration, bool positive, uint32 effectMask)
float GetNegStat(Stats stat) const
float m_createStats[MAX_STATS]
bool HasAuraWithMechanic(uint32 mechanicMask) const
float ApplyEffectModifiers(SpellInfo const *spellProto, uint8 effect_index, float value) const
bool HandleProcTriggerSpell(Unit *victim, uint32 damage, AuraEffect *triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
bool IsSplineEnabled() const
int32 GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const
void RemoveAllAurasRequiringDeadTarget()
void UpdateReactives(uint32 p_time)
AuraEffect * GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID=0) const
AuraEffect * IsScriptOverriden(SpellInfo const *spell, int32 script) const
float m_modRangedHitChance
bool IsOnVehicle(const Unit *vehicle) const
void ApplyStatPercentBuffMod(Stats stat, float val, bool apply)
void SetClass(uint8 newClass)
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellInfo const *affectedSpell) const
int32 GetMaxPower(Powers power) const
void StopMoving()
-------—End of Pet responses methods-------—
std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > AuraApplicationMapBounds
uint32 GetUnitMeleeSkill(Unit const *target=NULL) const
void AddPlayerToVision(Player *player)
uint64 GetMinionGUID() const
GameObject * GetGameObject(uint32 spellId) const
bool IsWithinCombatRange(const Unit *obj, float dist2compare) const
void ProcDamageAndSpellFor(bool isVictim, Unit *target, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const *procSpell, uint32 damage, SpellInfo const *procAura=NULL)
uint32 m_removedAurasCount
void RemoveAllAurasOnDeath()
uint32 m_movementCounter
Incrementing counter used in movement packets.
void SetHealth(uint32 val)
bool IsStandState() const
TempSummon * ToTempSummon()
bool IsQuestGiver() const
CharmInfo * GetCharmInfo()
virtual uint32 GetBlockPercent() const
bool HasStealthAura() const
void AddComboPointHolder(uint32 lowguid)
int32 GetMechanicResistChance(SpellInfo const *spellInfo) const
void DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
AuraMap::iterator m_auraUpdateIterator
std::list< AuraApplication * > AuraApplicationList
std::map< uint8, AuraApplication * > VisibleAuraMap
void RemoveAurasWithAttribute(uint32 flags)
uint16 GetMaxSkillValueForLevel(Unit const *target=NULL) const
bool IsTriggeredAtSpellProcEvent(Unit *victim, Aura *aura, SpellInfo const *procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *&spellProcEvent)
bool m_AutoRepeatFirstCast
std::set< Unit * > ControlList
TempSummon const * ToTempSummon() const
void TauntFadeOut(Unit *taunter)
void _DeleteRemovedAuras()
bool HandleAuraRaidProcFromCharge(AuraEffect *triggeredByAura)
void _ApplyAura(AuraApplication *aurApp, uint32 effMask)
int32 ModifyPower(Powers power, int32 val)
Unit * GetNextRandomRaidMemberOrPet(float radius)
Powers GetPowerTypeByAuraGroup(UnitMods unitMod) const
int32 HealBySpell(Unit *victim, SpellInfo const *spellInfo, uint32 addHealth, bool critical=false)
bool IsNeutralToAll() const
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
uint64 GetCharmerGUID() const
virtual bool HasSpell(uint32) const
std::pair< AuraStateAurasMap::const_iterator, AuraStateAurasMap::const_iterator > AuraStateAurasMapBounds
float GetUnitMissChance(WeaponAttackType attType) const
void AddUnitState(uint32 f)
uint32 GetCritDamageReduction(uint32 damage) const
void ClearComboPointHolders()
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
std::multimap< AuraStateType, AuraApplication * > AuraStateAurasMap
void SetCreateMana(uint32 val)
void RemoveExtraUnitMovementFlag(uint16 f)
void SendSpellDamageResist(Unit *target, uint32 spellId)
bool isInAccessiblePlaceFor(Creature const *c) const
uint32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack=1) const
bool IsCharmedOwnedByPlayerOrPlayer() const
int32 GetMinPower(Powers power) const
Pet const * ToPet() const
int32 DealHeal(Unit *victim, uint32 addhealth)
bool _IsValidAttackTarget(Unit const *target, SpellInfo const *bySpell, WorldObject const *obj=NULL) const
uint32 getAttackTimer(WeaponAttackType type) const
virtual void SetSheath(SheathState sheathed)
uint32 BuildAuraStateUpdateForTarget(Unit *target) const
bool IsDuringRemoveFromWorld() const
Unit * GetRedirectThreatTarget()
float GetSpellMaxRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
void _ExitVehicle(Position const *exitPosition=NULL)
ThreatManager m_ThreatManager
bool m_ControlledByPlayer
void SetFeared(bool apply)
Unit * GetCharmerOrOwner() const
Unit * GetMeleeHitRedirectTarget(Unit *victim, SpellInfo const *spellInfo=NULL)
MotionMaster i_motionMaster
uint32 GetRedirectThreatPercent() const
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
void _ApplyAllAuraStatMods()
bool CanUseAttackType(WeaponAttackType attacktype) const
void propagateSpeedChange()
-------—End of Pet responses methods-------—
bool SetHover(bool enable, bool packetOnly=false)
uint32 GetCreatureType() const
void SetOwnerGUID(uint64 owner)
float GetMeleeReach() const
AuraMap const & GetOwnedAuras() const
void AddGameObject(GameObject *gameObj)
bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply)
void SetCurrentCastedSpell(Spell *pSpell)
void SendSetVehicleRecId(uint32 vehicleId)
bool SetSwim(bool enable)
virtual bool IsImmunedToSpell(SpellInfo const *spellInfo) const
bool isAttackReady(WeaponAttackType type=WeaponAttackType::BASE_ATTACK) const
float GetCombatReach() const
uint32 CountPctFromCurHealth(int32 pct) const
void CalcAbsorbResist(Unit *victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32 *absorb, uint32 *resist, SpellInfo const *spellInfo=NULL)
int32 CountPctFromMaxPower(Powers power, int32 pct) const
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
int32 GetHealthGain(int32 dVal)
void EnergizeBySpell(Unit *victim, uint32 SpellID, int32 Damage, Powers powertype)
void RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID)
AuraApplicationList m_interruptableAuras
void SetResistance(SpellSchools school, int32 val)
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY]
uint32 GetDisplayId() const
uint32 DealDamage(Unit *victim, uint32 damage, CleanDamage const *cleanDamage=NULL, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=NULL, bool durabilityLoss=true)
void ModifyAuraState(AuraStateType flag, bool apply)
static Creature * GetCreature(WorldObject &object, uint64 guid)
bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const
uint32 GetAuraCount(uint32 spellId) const
bool isInBackInMap(Unit const *target, float distance, float arc=M_PI) const
void SetCritterGUID(uint64 guid)
bool isPossessing() const
uint32 GetNativeDisplayId() const
bool IsBMAuctioner() const
uint64 GetTransGUID() const override
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct)
virtual void UpdateArmor()=0
bool HealthBelowPct(int32 pct) const
void SetRooted(bool apply, bool packetOnly=false)
void AddUnitMovementFlag(uint32 f)
float GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) const
bool Attack(Unit *victim, bool meleeAttack)
float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const
void UpdateAuraForGroup(uint8 slot)
int32 SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask) const
void JumpTo(float speedXY, float speedZ, bool forward=true)
void RemoveStandFlags(uint8 flags)
bool SetCanFly(bool enable)
HostileRefManager m_HostileRefManager
void CalcHealAbsorb(Unit *victim, SpellInfo const *spellInfo, uint32 &healAmount, uint32 &absorb)
SharedVisionList const & GetSharedVisionList()
void SendRemoveFromThreatListOpcode(HostileReference *pHostileReference)
int32 m_baseSpellCritChance
bool HasUnitMovementFlag(uint32 f) const
void AddExtraUnitMovementFlag(uint16 f)
uint32 CalcSpellResistance(Unit *victim, SpellSchoolMask schoolMask, SpellInfo const *spellInfo) const
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
virtual void UpdateMaxPower(Powers power)=0
void _AddAura(UnitAura *aura, Unit *caster)
void SendPetTalk(uint32 pettalk) const
virtual bool IsInWater() const
TransportBase * GetDirectTransport() const
Returns the transport this unit is on directly (if on vehicle and transport, return vehicle).
void addFollower(FollowerReference *pRef)
void RewardRage(uint32 baseRage, bool attacker)
uint32 GetCreateHealth() const
uint32 GetModelForTotem(uint32 totemType) const
void SetGender(uint8 gender)
void SetAutoattackOverrideRange(uint32 range)
void RemoveDynObject(uint32 spellId)
void SetAutoattackOverrideSpell(SpellInfo const *spellInfo)
uint32 getRaceMask() const
AttackerSet const & getAttackers() const
void SetAI(UnitAI *newAI)
uint32 GetPowerIndex(uint32 powerType) const
bool SetFeatherFall(bool enable, bool packetOnly=false)
float GetTotalAuraMultiplier(AuraType auratype) const
std::multimap< uint32, Aura * > AuraMap
bool HasAuraType(AuraType auraType) const
static Unit * GetUnit(WorldObject &object, uint64 guid)
bool SetWalk(bool enable)
void removeHatedBy(HostileReference *)
int32 GetMaxPositiveAuraModifier(AuraType auratype) const
void SetVisibleAura(uint8 slot, AuraApplication *aur)
Totem const * ToTotem() const
void setAttackTimer(WeaponAttackType type, uint32 time)
virtual bool UpdateStats(Stats stat)=0
void SetNativeDisplayId(uint32 modelId)
void SetRedirectThreat(uint64 guid, uint32 pct)
void RemoveAllDynObjects()
uint32 MeleeDamageBonusDone(Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto=NULL)
float m_modMeleeHitChance
void _RemoveAllAuraStatMods()
void SetPhaseMask(uint32 newPhaseMask, bool update) override
uint32 GetAttackTime(WeaponAttackType att) const
uint32 SpellDamageBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack=1) const
time_t GetLastDamagedTime() const
void setTransForm(uint32 spellid)
uint16 GetExtraUnitMovementFlags() const
Unit * GetMagicHitRedirectTarget(Unit *victim, SpellInfo const *spellInfo)
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove=false)
void StopAttackFaction(uint32 faction_id)
uint32 GetCastingTimeForBonus(SpellInfo const *spellProto, DamageEffectType damagetype, uint32 CastingTime) const
bool IsWithinMeleeRange(const Unit *obj, float dist=MELEE_RANGE) const
void RemoveAreaAurasDueToLeaveWorld()
AuraList const & GetSingleCastAuras() const
VisibleAuraMap const * GetVisibleAuras()
bool CanModifyStats() const
uint16 HasExtraUnitMovementFlag(uint16 f) const
void RemoveCharmedBy(Unit *charmer)
HostileRefManager & getHostileRefManager()
int32 ModifyPowerPct(Powers power, float pct, bool apply=true)
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID=0) const
float GetSpeedRate(UnitMoveType mtype) const
virtual void SetDisplayId(uint32 modelId)
std::set< Unit * > AttackerSet
void SendMissileCancel(uint32 spellId, bool cancel=true)
virtual float GetFollowAngle() const
void CleanupBeforeRemoveFromMap(bool finalCleanup)
uint8 getStandState() const
int32 GetPower(Powers power) const
std::list< DiminishingReturn > Diminishing
RedirectThreatInfo _redirectThreadInfo
int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask) const
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log)
float GetAPMultiplier(WeaponAttackType attType, bool normalized)
void UpdateOrientation(float orientation)
Only server-side orientation update, does not broadcast to client.
virtual bool IsUnderWater() const
float GetUnitBlockChance() const
void RemovePlayerFromVision(Player *player)
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
std::set< uint32 > ComboPointHolderSet
float GetCreateStat(Stats stat) const
void UpdateSplinePosition()
DeathState getDeathState() const
Unit * GetFirstControlled() const
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
void ApplyCastTimePercentMod(float val, bool apply)
void DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
void ModifyRedirectThreat(int32 amount)
void DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
void SetCharmerGUID(uint64 owner)
bool CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading=false)
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const
AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0, AuraApplication *except=NULL) const
bool HasUnitState(const uint32 f) const
void SetModifierValue(UnitMods unitMod, UnitModifierType modifierType, float value)
Player * GetAffectingPlayer() const
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
TimeTrackerSmall m_movesplineTimer
void FinishSpell(CurrentSpellTypes spellType, bool ok=true)
void resetAttackTimer(WeaponAttackType type=WeaponAttackType::BASE_ATTACK)
bool IsInRaidWith(Unit const *unit) const
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
AuraApplication * _CreateAuraApplication(Aura *aura, uint32 effMask)
uint32 getClassMask() const
bool IsInFeralForm() const
int32 GetCreatePowers(Powers power) const
std::unique_ptr< Movement::MoveSpline > movespline
static ReputationRank GetFactionReactionTo(FactionTemplateEntry const *factionTemplateEntry, Unit const *target)
void SetCanModifyStats(bool modifyStats)
bool IsFriendlyTo(Unit const *unit) const
std::pair< AuraMap::iterator, AuraMap::iterator > AuraMapBoundsNonConst
void RemoveUnitMovementFlag(uint32 f)
uint32 GetMountID() const
void RemoveBindSightAuras()
ThreatManager & getThreatManager()
int32 GetMaxNegativeAuraModifier(AuraType auratype) const
AuraApplicationMap m_appliedAuras
int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
CharmInfo * InitCharmInfo()
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit *dispeller, uint8 chargesRemoved=1)
void SetVehicle(Vehicle *vehicle)
void RemoveAllAttackers()
bool HasInvisibilityAura() const
void addHatedBy(HostileReference *pHostileReference)
void RemoveFromWorld() override
void SendPlaySpellVisual(uint32 SpellVisualId, float x, float y, float z, float orientation, uint8 SpeedTime, uint16 MissReason, uint16 ReflectStatus)
uint32 SpellDamageBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack=1) const
void ResetRedirectThreat()
uint32 m_attackTimer[uint8(WeaponAttackType::MAX_ATTACK)]
void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK, bool crit=false)
bool InitTamedPet(Pet *pet, uint8 level, uint32 spell_id) const
virtual void UpdateMaxHealth()=0
uint32 HasUnitTypeMask(uint32 mask) const
void _RegisterAuraEffect(AuraEffect *aurEff, bool apply)
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
uint32 CountPctFromMaxHealth(int32 pct) const
float GetResistanceBuffMods(SpellSchools school, bool positive) const
SpellInfo const * m_overrideAutoattackSpellInfo
float GetStat(Stats stat) const
void SendEnergizeSpellLog(Unit *victim, uint32 spellID, int32 damage, Powers powertype)
void UpdateSpeed(UnitMoveType mtype, bool forced)
void SendDurabilityLoss(Player *receiver, uint32 percent)
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=WeaponAttackType::BASE_ATTACK, bool extra=false)
uint64 GetOwnerGUID() const
bool IsControlledByPlayer() const
float GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const
void HandleEmoteCommand(uint32 anim_id)
void removeFollower(FollowerReference *)
int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellInfo const *affectedSpell) const
virtual SpellSchoolMask GetMeleeDamageSchoolMask() const
Minion * GetFirstMinion() const
SheathState GetSheath() const
bool HandleSpellClick(Unit *clicker, int8 seatId=-1)
bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura=0) const
bool IsAlwaysVisibleFor(WorldObject const *seer) const override
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
AuraEffect * GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
uint32 getTransForm() const
void SetMaxPower(Powers power, int32 val)
float GetUnitParryChance() const
bool HasSharedVision() const
bool SetDisableGravity(bool disable, bool packetOnly=false)
Powers getPowerType() const
virtual void setDeathState(DeathState s)
void SetMaxHealth(uint32 val)
void GetPartyMembers(std::list< Unit * > &units)
FollowerRefManager m_FollowingRefManager
uint32 GetCombatRatingDamageReduction(CombatRating cr, float rate, float cap, uint32 damage) const
friend class VehicleJoinEvent
int32 GetTotalAuraModifier(AuraType auratype) const
void SendChangeCurrentVictimOpcode(HostileReference *pHostileReference)
uint32 GetCreatureTypeMask() const
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=NULL) const
AuraApplicationMap & GetAppliedAuras()
std::list< AuraEffect * > AuraEffectList
int32 GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const
void SetAttackTime(WeaponAttackType att, uint32 val)
void SetMinionGUID(uint64 guid)
void GetDispellableAuraList(Unit *caster, uint32 dispelMask, DispelChargesList &dispelList)
bool IsSpiritHealer() const
VisibleAuraMap m_visibleAuras
uint32 GetCreateMana() const
uint32 SpellNonMeleeDamageLog(Unit *victim, uint32 spellID, uint32 damage)
bool IsServiceProvider() const
MountCapabilityEntry const * GetMountCapability(uint32 mountType) const
void ChangeSeat(int8 seatId, bool next=true)
void SetInFront(WorldObject const *target)
void ApplyDiminishingAura(DiminishingGroup group, bool apply)
void ApplySpellDispelImmunity(const SpellInfo *spellProto, DispelType type, bool apply)
int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellInfo const *affectedSpell) const
AuraStateAurasMap m_auraStateAuras
const MotionMaster * GetMotionMaster() const
static Player * GetPlayer(WorldObject &object, uint64 guid)
float m_speed_rate[MAX_MOVE_TYPE]
int32 SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask) const
void setPowerType(Powers power)
AuraList & GetSingleCastAuras()
void SetFieldPowerType(uint32 powerType)
float MeleeSpellMissChance(Unit const *victim, WeaponAttackType attType, uint32 spellId) const
bool IsAlwaysDetectableFor(WorldObject const *seer) const override
bool IsValidAssistTarget(Unit const *target) const
void AddUnitTypeMask(uint32 mask)
void SetCanDualWield(bool value)
Vehicle * GetVehicleKit() const
void SendPlaySpellVisualKit(uint32 SpellVisualId, uint32 Duration, int32 Type)
float m_modSpellHitChance
void TriggerAurasProcOnEvent(CalcDamageInfo &damageInfo)
Guardian * GetGuardianPet() const
uint64 GetCritterGUID() const
void SendThreatListUpdate()
std::list< DynamicObject * > DynObjectList
bool IsHostileTo(Unit const *unit) const
void ExitVehicle(Position const *exitPosition=NULL)
AuraEffectList m_modAuras[TOTAL_AURAS]
void SetStandState(uint8 state)
void _ApplyAuraEffect(Aura *aura, uint8 effIndex)
uint32 GetInterruptMask() const
void RemoveAllMinionsByEntry(uint32 entry)
AuraMap & GetOwnedAuras()
int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
bool IsSpiritService() const
Aura * GetAuraOfRankedSpell(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
virtual void UpdateUnderwaterState(Map *m, float x, float y, float z)
virtual void ProhibitSpellSchool(SpellSchoolMask, uint32)
void KnockbackFrom(float x, float y, float speedXY, float speedZ)
int32 GetCurrentSpellCastTime(uint32 spell_id) const
bool HandleAuraProcOnPowerAmount(Unit *victim, uint32 damage, AuraEffect *triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
uint64 GetCharmerOrOwnerOrOwnGUID() const
float CalculateLevelPenalty(SpellInfo const *spellProto) const
void SetShapeshiftForm(ShapeshiftForm form)
void GetAllMinionsByEntry(std::list< Creature * > &Minions, uint32 entry)
bool IsInPartyWith(Unit const *unit) const
void Update(uint32 time) OVERRIDE
void ProcDamageAndSpell(Unit *victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType=WeaponAttackType::BASE_ATTACK, SpellInfo const *procSpell=NULL, SpellInfo const *procAura=NULL)
SharedVisionList m_sharedVision
void SetInCombatWith(Unit *enemy)
bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const
void SendPetAIReaction(ObjectGuid UnitGUID) const
void SetStandFlags(uint8 flags)
void ApplyResistanceBuffModsMod(SpellSchools school, bool positive, float val, bool apply)
void RemoveMovementImpairingAuras()
bool _isWalkingBeforeCharm
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo *spellProto) const
void ModSpellCastTime(SpellInfo const *spellProto, int32 &castTime, Spell *spell=NULL)
Aura * GetOwnedAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0, Aura *except=NULL) const
void SetPetGUID(uint64 guid)
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true)
float GetTotalAttackPowerValue(WeaponAttackType attType) const
float m_threatModifier[MAX_SPELL_SCHOOL]
void BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, Player *target) const override
void CalculateMeleeDamage(Unit *victim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK)
bool SetWaterWalking(bool enable, bool packetOnly=false)
void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath=false, bool forceDestination=false)
bool HasNegativeAuraWithInterruptFlag(uint32 flag, uint64 guid=0) const
uint32 GetDoTsByCaster(uint64 casterGUID) const
bool IsSpiritGuide() const
float GetWeaponProcChance() const
float GetUnitCriticalChance(WeaponAttackType attackType, const Unit *victim) const
void CombatStopWithPets(bool includingCast=false)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
SpellMissInfo SpellHitResult(Unit *victim, SpellInfo const *spellInfo, bool canReflect=false)
WorldObject(bool isWorldObject)
MovementInfo m_movementInfo
MeleeHitOutcome hitOutCome
WeaponAttackType attackType
bool IsCommandAttack() const
void SetIsCommandFollow(bool val)
void BuildActionBar(WorldPacket *data) const
uint32 GetPetNumber() const
void LoadPetActionBar(const std::string &data)
GlobalCooldownMgr & GetGlobalCooldownMgr()
void SetActionBar(uint8 index, uint32 spellOrAction, ActiveStates type)
bool AddSpellToActionBar(SpellInfo const *spellInfo, ActiveStates newstate=ACT_DECIDE, uint8 preferredSlot=0)
void InitPossessCreateSpells()
void SetIsAtStay(bool val)
CharmSpellInfo * GetCharmSpell(uint8 index)
void SetPetNumber(uint32 petnumber, bool statwindow)
void SetIsFollowing(bool val)
CommandStates GetCommandState() const
UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX]
void SetIsReturning(bool val)
void InitCharmCreateSpells()
bool RemoveSpellFromActionBar(uint32 spell_id)
CommandStates _CommandState
void GetStayPosition(float &x, float &y, float &z) const
UnitActionBarEntry const * GetActionBarEntry(uint8 index) const
void SetSpellAutocast(SpellInfo const *spellInfo, bool state)
bool HasCommandState(CommandStates state) const
ReactStates _oldReactState
GlobalCooldownMgr m_GlobalCooldownMgr
void ToggleCreatureAutocast(SpellInfo const *spellInfo, bool apply)
void SetCommandState(CommandStates st)
void InitEmptyActionBar(bool withAttack=true)
void SetIsCommandAttack(bool val)
bool IsCommandFollow() const
CharmSpellInfo _charmspells[4]
MeleeHitOutcome hitOutCome
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome)
WeaponAttackType attackType
uint32 nameLength[MAX_DECLINED_NAME_CASES]
std::string name[MAX_DECLINED_NAME_CASES]
DiminishingReturn(DiminishingGroup group, uint32 t, uint32 count)
GlobalCooldown(uint32 _dur=0, uint32 _time=0)
uint64 GetTargetGUID() const
void Set(uint64 guid, uint32 pct)
uint32 GetThreatPct() const
void ModifyThreatPct(int32 amount)
SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, uint32 _schoolMask)
SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, uint32 _power, float _multiplier, bool _critical)
AuraEffect const * auraEff
ActiveStates GetType() const
void SetActionAndType(uint32 action, ActiveStates type)
bool IsActionBarForSpell() const
void SetType(ActiveStates type)
void SetAction(uint32 action)