33#define VISUAL_WAYPOINT 1
34#define WORLD_TRIGGER 12999
36#define MAX_SPELL_CHARM 4
37#define MAX_SPELL_VEHICLE 6
38#define MAX_SPELL_POSSESS 8
39#define MAX_SPELL_CONTROL_BAR 10
41#define MAX_AGGRO_RESET_TIME 10
42#define MAX_AGGRO_RADIUS 45.0f
115 bool RollDispel()
const;
363#define MAX_COMBAT_RATING 25
467 void ModifyDamage(
int32 amount);
468 void AbsorbDamage(
uint32 amount);
469 void ResistDamage(
uint32 amount);
470 void BlockDamage(
uint32 amount);
483 uint32 GetHitMask()
const;
501 void AbsorbHeal(
uint32 amount);
512 uint32 GetHitMask()
const;
581 : target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask),
582 absorb(0), resist(0), periodicLog(false), unused(false), blocked(0),
HitInfo(0), cleanDamage(0), fullBlock(false)
626#define CURRENT_FIRST_NON_MELEE_SPELL 1
627#define CURRENT_MAX_SPELL 4
629#define UNIT_ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF)
630#define UNIT_ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 24)
631#define MAKE_UNIT_ACTION_BUTTON(A, T) (uint32(A) | (uint32(T) << 24))
684#define MAX_UNIT_ACTION_BAR_INDEX (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START)
693 void SetPetNumber(
uint32 petnumber,
bool statwindow);
699 void InitPossessCreateSpells();
700 void InitCharmCreateSpells();
701 void InitPetActionBar();
702 void InitEmptyActionBar(
bool withAttack =
true);
706 bool RemoveSpellFromActionBar(
uint32 spell_id);
707 void LoadPetActionBar(
const std::string& data);
709 void SetSpellAutocast(
SpellInfo const* spellInfo,
bool state);
712 PetActionBar[index].SetActionAndType(spellOrAction, type);
716 void ToggleCreatureAutocast(
SpellInfo const* spellInfo,
bool apply);
720 void SetIsCommandAttack(
bool val);
721 bool IsCommandAttack();
722 void SetIsCommandFollow(
bool val);
723 bool IsCommandFollow();
724 void SetIsAtStay(
bool val);
726 void SetIsFollowing(
bool val);
728 void SetIsReturning(
bool val);
730 void SaveStayPosition();
731 void GetStayPosition(
float &x,
float &y,
float &z);
755#define REACTIVE_TIMER_START 4000
779#define ATTACK_DISPLAY_DELAY 200
780#define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f
791 typedef std::pair<AuraMap::const_iterator, AuraMap::const_iterator>
AuraMapBounds;
804 typedef std::array<DiminishingReturn, DIMINISHING_MAX>
Diminishing;
813 void AIUpdateTick(
uint32 diff);
815 void ScheduleAIChange();
816 void PushAI(
UnitAI* newAI);
819 void SetAI(
UnitAI* newAI);
822 UnitAI* GetScheduledChangeAI();
823 bool HasScheduledAIChange()
const;
826 void AddToWorld()
override;
827 void RemoveFromWorld()
override;
829 void CleanupBeforeRemoveFromMap(
bool finalCleanup);
830 void CleanupsBeforeDelete(
bool finalCleanup =
true)
override;
837 void IncrDiminishing(
SpellInfo const* auraSpellInfo,
bool triggered);
840 void ClearDiminishings();
842 virtual void Update(
uint32 time)
override;
844 void Heartbeat()
override;
850 bool haveOffhandWeapon()
const;
857 bool IsWithinCombatRange(
Unit const* obj,
float dist2compare)
const;
859 bool IsWithinMeleeRangeAt(
Position const& pos,
Unit const* obj)
const;
860 float GetMeleeRange(
Unit const* target)
const;
864 void _addAttacker(
Unit* pAttacker);
865 void _removeAttacker(
Unit* pAttacker);
866 Unit* getAttackerForHelper()
const;
867 bool Attack(
Unit* victim,
bool meleeAttack);
868 void CastStop(
uint32 except_spellid = 0);
870 void RemoveAllAttackers();
872 bool isAttackingPlayer()
const;
881 void ValidateAttackersAndOwnTarget();
882 void CombatStop(
bool includingCast =
false,
bool mutualPvP =
true);
883 void CombatStopWithPets(
bool includingCast =
false);
884 void StopAttackFaction(
uint32 faction_id);
886 void SendMeleeAttackStop(
Unit const* victim =
nullptr)
const;
887 void SendMeleeAttackStart(
Unit* victim);
892 bool CanFreeMove()
const;
905 void SetLevel(
uint8 lvl,
bool sendUpdate =
true);
935 float GetHealthPct()
const {
return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; }
939 void SetHealth(
uint32 val);
940 void SetMaxHealth(
uint32 val);
946 void SetPowerType(
Powers power,
bool sendUpdate =
true);
947 void UpdateDisplayPower();
951 float GetPowerPct(
Powers power)
const {
return GetMaxPower(power) ? 100.f * GetPower(power) / GetMaxPower(power) : 0.0f; }
953 void SetPower(
Powers power,
uint32 val,
bool withPowerUpdate =
true,
bool force =
false);
961 void ApplyAttackTimePercentMod(
WeaponAttackType att,
float val,
bool apply);
962 void ApplyCastTimePercentMod(
float val,
bool apply);
990 bool IsInPartyWith(
Unit const* unit)
const;
991 bool IsInRaidWith(
Unit const* unit)
const;
992 void GetPartyMembers(std::list<Unit*> &units);
993 bool IsContestedGuard()
const;
1004 virtual void SetPvP(
bool state);
1012 uint32 GetCreatureType()
const;
1013 uint32 GetCreatureTypeMask()
const;
1016 bool IsSitState()
const;
1017 bool IsStandState()
const;
1025 void SetAnimTier(
AnimTier animTier);
1034 static void DealDamageMods(
Unit const* victim,
uint32& damage,
uint32* absorb);
1036 static void Kill(
Unit* attacker,
Unit* victim,
bool durabilityLoss =
true);
1038 static void DealHeal(
HealInfo& healInfo);
1040 static void ProcSkillsAndAuras(
Unit* actor,
Unit* actionTarget,
uint32 typeMaskActor,
uint32 typeMaskActionTarget,
1044 void GetProcAurasTriggeredOnEvent(AuraApplicationProcContainer& aurasTriggeringProc, AuraApplicationList* procAuras,
ProcEventInfo& eventInfo);
1045 void TriggerAurasProcOnEvent(
Unit* actionTarget,
uint32 typeMaskActor,
uint32 typeMaskActionTarget,
1048 void TriggerAurasProcOnEvent(
ProcEventInfo& eventInfo, AuraApplicationProcContainer& procAuras);
1050 void HandleEmoteCommand(
Emote emoteId);
1054 void DealMeleeDamage(
CalcDamageInfo* damageInfo,
bool durabilityLoss);
1055 void HandleProcExtraAttackFor(
Unit* victim,
uint32 count);
1059 void AddExtraAttacks(
uint32 count);
1081 virtual bool CanApplyResilience()
const;
1082 static void ApplyResilience(
Unit const* victim,
float* crit,
int32* damage,
bool isCrit,
CombatRating type);
1092 float GetUnitMissChance()
const;
1094 float GetUnitCriticalChanceTaken(
Unit const* attacker,
WeaponAttackType attackType,
float critDone)
const;
1097 bool CanUseAttackType(
uint8 attacktype)
const;
1101 uint32 GetDefenseSkillValue(
Unit const* target =
nullptr)
const;
1104 float GetWeaponProcChance()
const;
1105 float GetPPMProcChance(
uint32 WeaponSpeed,
float PPM,
SpellInfo const* spellProto)
const;
1129 bool IsServiceProvider()
const;
1141 bool IsEngagedBy(
Unit const* who)
const {
return CanHaveThreatList() ? IsThreatenedBy(who) : IsInCombatWith(who); }
1142 void EngageWithTarget(
Unit* who);
1146 void AtTargetAttacked(
Unit* target,
bool canInitialAggro);
1149 void SetImmuneToAll(
bool apply,
bool keepCombat);
1152 void SetImmuneToPC(
bool apply,
bool keepCombat);
1155 void SetImmuneToNPC(
bool apply,
bool keepCombat);
1160 void SetInCombatWith(
Unit* enemy,
bool addSecondUnitSuppressed =
false) {
if (enemy) m_combatManager.SetInCombatWith(enemy, addSecondUnitSuppressed); }
1162 void UpdatePetCombatState();
1164 bool IsThreatened()
const;
1172 void SendClearTarget();
1174 bool HasAuraTypeWithFamilyFlags(
AuraType auraType,
uint32 familyName,
flag96 familyFlags)
const;
1176 bool HasBreakableByDamageAuraType(
AuraType type,
uint32 excludeAura = 0)
const;
1177 bool HasBreakableByDamageCrowdControlAura(
Unit* excludeCasterChannel =
nullptr)
const;
1183 bool IsPolymorphed()
const;
1186 bool isTargetableForAttack(
bool checkFakeDeath =
true)
const;
1188 bool IsInWater()
const;
1189 bool IsUnderWater()
const;
1190 bool isInAccessiblePlaceFor(
Creature const* c)
const;
1192 void SendHealSpellLog(
HealInfo& healInfo,
bool critical =
false);
1193 int32 HealBySpell(
HealInfo& healInfo,
bool critical =
false);
1202 void SendPlaySpellVisualKit(
uint32 id,
uint32 type)
const;
1210 void SendSpellDamageResist(
Unit* target,
uint32 spellId);
1211 void SendSpellDamageImmune(
Unit* target,
uint32 spellId);
1213 void NearTeleportTo(
Position const& pos,
bool casting =
false);
1215 void SendTeleportPacket(
Position const& pos,
bool teleportingTransport =
false);
1216 virtual bool UpdatePosition(
float x,
float y,
float z,
float ang,
bool teleport =
false);
1218 virtual bool UpdatePosition(
Position const& pos,
bool teleport =
false);
1219 void UpdateOrientation(
float orientation);
1220 void UpdateHeight(
float newZ);
1222 void SendMoveKnockBack(
Player* player,
float speedXY,
float speedZ,
float vcos,
float vsin);
1223 void KnockbackFrom(
float x,
float y,
float speedXY,
float speedZ);
1224 void JumpTo(
float speedXY,
float speedZ,
bool forward =
true,
Optional<Position> dest = {});
1225 void JumpTo(
WorldObject* obj,
float speedZ,
bool withOrientation =
false);
1227 void MonsterMoveWithSpeed(
float x,
float y,
float z,
float speed,
bool generatePath =
false,
bool forceDestination =
false);
1234 bool SetWalk(
bool enable);
1235 bool SetDisableGravity(
bool disable,
bool updateAnimTier =
true);
1236 bool SetFall(
bool enable);
1237 bool SetSwim(
bool enable);
1238 bool SetCanFly(
bool enable,
bool packetOnly =
false);
1239 bool SetWaterWalking(
bool enable);
1240 bool SetFeatherFall(
bool enable);
1241 bool SetHover(
bool enable,
bool updateAnimTier =
true);
1244 void SetFacingTo(
float ori,
bool force =
true,
uint32 movementId =
EVENT_FACE);
1250 bool IsGhouled()
const;
1272 Player* GetControllingPlayer()
const;
1277 Minion* GetFirstMinion()
const;
1280 void SetMinion(
Minion *minion,
bool apply);
1281 void GetAllMinionsByEntry(std::list<TempSummon*>& Minions,
uint32 entry);
1282 void RemoveAllMinionsByEntry(
uint32 entry);
1283 void SetCharm(
Unit* target,
bool apply);
1284 Unit* GetNextRandomRaidMemberOrPet(
float radius);
1286 void RemoveCharmedBy(
Unit* charmer);
1287 void RestoreFaction();
1290 Unit* GetFirstControlled()
const;
1291 void RemoveAllControlled();
1293 bool IsCharmed()
const {
return !GetCharmerGUID().IsEmpty(); }
1296 bool isPossessedByPlayer()
const;
1297 bool isPossessing()
const;
1298 bool isPossessing(
Unit* u)
const;
1302 void DeleteCharmInfo();
1308 Unit* GetCharmerOrSelf()
const;
1319 void AddPlayerToVision(
Player* player);
1320 void RemovePlayerFromVision(
Player* player);
1322 void RemoveBindSightAuras();
1323 void RemoveCharmAuras();
1333 void _ApplyAuraEffect(
Aura* aura,
uint8 effIndex);
1335 void _UnapplyAura(AuraApplicationMap::iterator& i,
AuraRemoveMode removeMode);
1337 void _RemoveNoStackAurasDueToAura(
Aura* aura,
bool owned);
1338 void _RegisterAuraEffect(
AuraEffect* aurEff,
bool apply);
1375 void RemoveNotOwnSingleTargetAuras(
uint32 newPhase = 0x0);
1376 void RemoveAurasWithInterruptFlags(
uint32 flag,
uint32 except = 0);
1380 void RemoveMovementImpairingAuras(
bool withRoot);
1381 void RemoveAurasByShapeShift();
1383 void RemoveAreaAurasDueToLeaveWorld();
1384 void RemoveAllAuras();
1385 void RemoveArenaAuras();
1386 void RemoveAurasOnEvade();
1387 void RemoveAllAurasOnDeath();
1388 void RemoveAllAurasRequiringDeadTarget();
1389 void RemoveAllAurasExceptType(
AuraType type);
1391 void RemoveAllGroupBuffsFromCaster(
ObjectGuid casterGUID);
1394 void _RemoveAllAuraStatMods();
1395 void _ApplyAllAuraStatMods();
1419 bool HasAuraType(
AuraType auraType)
const;
1421 bool HasAuraTypeWithMiscvalue(
AuraType auraType,
int32 miscValue)
const;
1422 bool HasAuraTypeWithAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1423 bool HasAuraTypeWithValue(
AuraType auraType,
int32 value)
const;
1424 bool HasAuraTypeWithTriggerSpell(
AuraType auratype,
uint32 triggerSpell)
const;
1426 bool HasAuraWithMechanic(
uint32 mechanicMask)
const;
1427 bool HasStrongerAuraWithDR(
SpellInfo const* auraSpellInfo,
Unit* caster,
bool triggered)
const;
1434 float GetTotalAuraMultiplier(
AuraType auraType)
const;
1439 float GetTotalAuraMultiplier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1440 int32 GetMaxPositiveAuraModifier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1441 int32 GetMaxNegativeAuraModifier(
AuraType auraType, std::function<
bool(
AuraEffect const*)>
const& predicate)
const;
1444 float GetTotalAuraMultiplierByMiscMask(
AuraType auraType,
uint32 misc_mask)
const;
1449 float GetTotalAuraMultiplierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1450 int32 GetMaxPositiveAuraModifierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1451 int32 GetMaxNegativeAuraModifierByMiscValue(
AuraType auraType,
int32 misc_value)
const;
1454 float GetTotalAuraMultiplierByAffectMask(
AuraType auraType,
SpellInfo const* affectedSpell)
const;
1459 void InitStatBuffMods();
1460 void UpdateStatBuffMod(
Stats stat);
1476 void SetCurrentCastSpell(
Spell* pSpell);
1483 bool IsNonMeleeSpellCast(
bool withDelayed,
bool skipChanneled =
false,
bool skipAutorepeat =
false,
bool isAutoshoot =
false,
bool skipInstant =
true)
const;
1487 void InterruptNonMeleeSpells(
bool withDelayed,
uint32 spellid = 0,
bool withInstant =
true);
1491 Spell* FindCurrentSpellBySpellId(
uint32 spell_id)
const;
1492 int32 GetCurrentSpellCastTime(
uint32 spell_id)
const;
1495 virtual bool IsMovementPreventedByCasting()
const;
1506 bool IsInFeralForm()
const;
1508 bool IsInDisallowedMountForm()
const;
1528 void UpdateUnitMod(
UnitMods unitMod);
1537 void UpdateAllDamageDoneMods();
1540 void UpdateAllDamagePctDoneMods();
1542 float GetTotalStatValue(
Stats stat)
const;
1543 float GetTotalAuraModValue(
UnitMods unitMod)
const;
1552 virtual void UpdateAllResistances();
1573 bool isInFrontInMap(
Unit const* target,
float distance,
float arc =
float(
M_PI))
const;
1574 bool isInBackInMap(
Unit const* target,
float distance,
float arc =
float(
M_PI))
const;
1577 bool IsVisible()
const;
1578 void SetVisible(
bool x);
1581 void SetPhaseMask(
uint32 newPhaseMask,
bool update)
override;
1582 void UpdateObjectVisibility(
bool forced =
true)
override;
1590 void RemoveVisibleAura(
uint8 slot);
1594 void UpdateInterruptMask();
1597 virtual void RecalculateObjectScale();
1599 virtual void SetDisplayId(
uint32 modelId);
1601 void RestoreDisplayId();
1610 std::vector<DynamicObject*> GetDynObjects(
uint32 spellId)
const;
1611 void RemoveDynObject(
uint32 spellId);
1612 void RemoveAllDynObjects();
1615 std::vector<GameObject*> GetGameObjects(
uint32 spellId)
const;
1617 void RemoveGameObject(
GameObject* gameObj,
bool del);
1618 void RemoveGameObject(
uint32 spellid,
bool del);
1619 void RemoveAllGameObjects();
1622 uint32 BuildAuraStateUpdateForTarget(
Unit const* target)
const;
1624 void UnsummonAllTotems();
1625 bool IsMagnet()
const;
1626 Unit* GetMeleeHitRedirectTarget(
Unit* victim,
SpellInfo const* spellInfo =
nullptr);
1634 float SpellHealingPctDone(
Unit* victim,
SpellInfo const* spellProto)
const;
1640 bool IsBlockCritical();
1647 bool IsUnderLastManaUseEffect()
const;
1653 virtual bool IsImmunedToSpell(
SpellInfo const* spellInfo,
WorldObject const* caster,
bool requireImmunityPurgesEffectAttribute =
false)
const;
1654 uint32 GetSchoolImmunityMask()
const;
1655 uint32 GetDamageImmunityMask()
const;
1656 uint32 GetMechanicImmunityMask()
const;
1659 bool IsImmunedToDamage(
SpellInfo const* spellInfo)
const;
1660 virtual bool IsImmunedToSpellEffect(
SpellInfo const* spellInfo,
SpellEffectInfo const& spellEffectInfo,
WorldObject const* caster,
bool requireImmunityPurgesEffectAttribute =
false)
const;
1665 static void CalcAbsorbResist(
DamageInfo& damageInfo,
Spell* spell =
nullptr);
1666 static void CalcHealAbsorb(
HealInfo& healInfo);
1677 float CalculateSpellpowerCoefficientLevelPenalty(
SpellInfo const* spellInfo)
const;
1681 void RemoveAllFollowers();
1688 void StopMoving(
bool force =
false);
1689 void PauseMovement(
uint32 timer = 0,
uint8 slot = 0,
bool forced =
true);
1690 void ResumeMovement(
uint32 timer = 0,
uint8 slot = 0);
1704 bool IsSplineEnabled()
const;
1706 void SetControlled(
bool apply,
UnitState state);
1707 void ApplyControlStatesIfNeeded();
1715 void AddComboPoints(
Unit* target,
int8 count);
1717 void ClearComboPoints();
1718 void SendComboPoints();
1722 void ClearComboPointHolders();
1726 void SendPetActionSound(
PetAction action)
const;
1727 void SendPetDismissSound()
const;
1728 void SendPetAIReaction(
ObjectGuid guid)
const;
1731 void PropagateSpeedChange();
1734 void ClearAllReactives();
1736 void UpdateReactives(
uint32 p_time);
1739 void UpdateAuraForGroup(
uint8 slot);
1743 void SetCantProc(
bool apply);
1749 bool CreateVehicleKit(
uint32 id,
uint32 creatureEntry);
1750 void RemoveVehicleKit();
1755 bool IsOnVehicle(
Unit const* vehicle)
const;
1756 Unit* GetVehicleBase()
const;
1757 Unit* GetVehicleRoot()
const;
1758 Creature* GetVehicleCreatureBase()
const;
1763 void HandleSpellClick(
Unit* clicker,
int8 seatId = -1);
1764 void EnterVehicle(
Unit* base,
int8 seatId = -1);
1765 virtual void ExitVehicle(
Position const* exitPosition =
nullptr);
1766 void ChangeSeat(
int8 seatId,
bool next =
true);
1769 void _ExitVehicle(
Position const* exitPosition =
nullptr);
1772 void BuildMovementPacket(
ByteBuffer* data)
const;
1779 bool IsFalling()
const;
1781 virtual bool CanSwim()
const;
1794 void PurgeAndApplyPendingMovementChanges(
bool informObservers =
true);
1796 void RewardRage(
uint32 damage,
uint32 weaponSpeedHitFactor,
bool attacker);
1800 void OutDebugInfo()
const;
1804 Pet*
ToPet() {
if (IsPet())
return reinterpret_cast<Pet*
>(
this);
else return nullptr; }
1805 Pet const*
ToPet()
const {
if (IsPet())
return reinterpret_cast<Pet const*
>(
this);
else return nullptr; }
1808 Totem const*
ToTotem()
const {
if (IsTotem())
return reinterpret_cast<Totem const*
>(
this);
else return nullptr; }
1822 int32 GetHighestExclusiveSameEffectSpellGroupValue(
AuraEffect const* aurEff,
AuraType auraType,
bool checkMiscValue =
false,
int32 miscValue = 0)
const;
1823 bool IsHighestExclusiveAura(
Aura const* aura,
bool removeOtherAuraApplications =
false);
1824 bool IsHighestExclusiveAuraEffect(
SpellInfo const* spellInfo,
AuraType auraType,
int32 effectAmount,
uint8 auraEffectMask,
bool removeOtherAuraApplications =
false);
1828 virtual void Yell(std::string_view text,
Language language,
WorldObject const* target =
nullptr);
1829 virtual void TextEmote(std::string_view text,
WorldObject const* target =
nullptr,
bool isBossEmote =
false);
1830 virtual void Whisper(std::string_view text,
Language language,
Player* target,
bool isBossWhisper =
false);
1834 virtual void TextEmote(
uint32 textId,
WorldObject const* target =
nullptr,
bool isBossEmote =
false);
1835 virtual void Whisper(
uint32 textId,
Player* target,
bool isBossWhisper =
false);
1837 float GetCollisionHeight()
const override;
1849 explicit Unit (
bool isWorldObject);
1852 void DestroyForPlayer(
Player* target,
bool onDeath)
const override;
1854 void _UpdateSpells(
uint32 time);
1855 void _DeleteRemovedAuras();
1857 void _UpdateAutoRepeatSpell();
1876 void RemoveGameObjectImpl(
GameObject* gameObj,
bool del);
1922 bool IsAlwaysVisibleFor(
WorldObject const* seer)
const override;
1923 bool IsAlwaysDetectableFor(
WorldObject const* seer)
const override;
1925 void DisableSpline();
1932 virtual void AtExitCombat();
1934 virtual void AtEngage(
Unit* target);
1939 void UpdateSplineMovement(
uint32 t_diff);
1940 void UpdateSplinePosition();
1941 void SendFlightSplineSyncUpdate();
1942 void InterruptMovementBasedAuras();
1943 void CheckPendingMovementAcks();
1952 void SetFeared(
bool apply);
1953 void SetConfused(
bool apply);
1954 void SetStunned(
bool apply);
1955 void SetRooted(
bool apply);
1970 void UpdateCharmAI();
1971 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
#define MAX_GAMEOBJECT_SLOT
@ SPELL_FAILED_INTERRUPTED
@ SPELL_AURA_MOD_INVISIBILITY
@ UNIT_BYTES_2_OFFSET_SHEATH_STATE
@ UNIT_BYTES_2_OFFSET_PVP_FLAG
@ UNIT_BYTES_2_OFFSET_SHAPESHIFT_FORM
@ UNIT_BYTES_2_OFFSET_PET_FLAGS
@ UNIT_BYTES_0_OFFSET_POWER_TYPE
@ UNIT_BYTES_0_OFFSET_RACE
@ UNIT_BYTES_0_OFFSET_GENDER
@ UNIT_BYTES_0_OFFSET_CLASS
@ MOVEMENTFLAG_MASK_MOVING
@ MOVEMENTFLAG_DISABLE_GRAVITY
@ MOVEMENTFLAG_MASK_TURNING
@ UNIT_BYTES_1_OFFSET_ANIM_TIER
@ UNIT_BYTES_1_OFFSET_STAND_STATE
@ UNIT_BYTES_1_OFFSET_VIS_FLAG
NPCFlags
Non Player Character flags.
@ UNIT_NPC_FLAG_TABARDDESIGNER
@ UNIT_NPC_FLAG_AUCTIONEER
@ UNIT_NPC_FLAG_BATTLEMASTER
@ UNIT_NPC_FLAG_QUESTGIVER
@ UNIT_NPC_FLAG_INNKEEPER
@ UNIT_NPC_FLAG_FLIGHTMASTER
@ UNIT_NPC_FLAG_PETITIONER
@ UNIT_NPC_FLAG_SPIRITGUIDE
@ UNIT_NPC_FLAG_SPIRITHEALER
@ UNIT_BYTE2_FLAG_FFA_PVP
@ UNIT_BYTE2_FLAG_SANCTUARY
@ UNIT_FLAG_IMMUNE_TO_NPC
std::unordered_multimap< uint32, uint32 > SpellImmuneContainer
@ UNIT_MASK_CONTROLABLE_GUARDIAN
UnitActionBarEntry CharmSpellInfo
#define MAX_UNIT_ACTION_BAR_INDEX
@ SPEED_CHANGE_FLIGHT_SPEED
@ SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY
@ SPEED_CHANGE_FLIGHT_BACK_SPEED
#define UNIT_ACTION_BUTTON_ACTION(X)
@ 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_RESISTANCE_FIRE
@ UNIT_MOD_RESISTANCE_NATURE
@ UNIT_MOD_RESISTANCE_END
@ UNIT_MOD_DAMAGE_MAINHAND
TC_GAME_API float playerBaseMoveSpeed[MAX_MOVE_TYPE]
@ ACTION_BAR_INDEX_PET_SPELL_START
@ ACTION_BAR_INDEX_PET_SPELL_END
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ 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
#define MAKE_UNIT_ACTION_BUTTON(A, T)
std::vector< DispelableAura > DispelChargesList
#define CURRENT_MAX_SPELL
@ CR_WEAPON_SKILL_OFFHAND
@ CR_WEAPON_SKILL_MAINHAND
uint32 createProcHitMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
#define UNIT_ACTION_BUTTON_TYPE(X)
std::list< Unit * > UnitList
#define REACTIVE_TIMER_START
@ REACTIVE_WOLVERINE_BITE
TC_GAME_API float baseMoveSpeed[MAX_MOVE_TYPE]
@ UNIT_FIELD_CHANNEL_OBJECT
@ UNIT_FIELD_ATTACK_POWER_MODS
@ UNIT_FIELD_FACTIONTEMPLATE
@ UNIT_FIELD_RANGED_ATTACK_POWER
@ UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER
@ UNIT_FIELD_MOUNTDISPLAYID
@ UNIT_FIELD_ATTACK_POWER_MULTIPLIER
@ UNIT_FIELD_ATTACK_POWER
@ UNIT_FIELD_PET_NAME_TIMESTAMP
@ UNIT_FIELD_RANGED_ATTACK_POWER_MODS
@ UNIT_FIELD_BOUNDINGRADIUS
@ UNIT_FIELD_NATIVEDISPLAYID
@ UNIT_FIELD_BASEATTACKTIME
T CalculatePct(T base, U pct)
WeaponAttackType m_attackType
Unit * GetAttacker() const
SpellInfo const *const m_spellInfo
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
uint8 GetDispelCharges() const
uint32 GetEffectiveHeal() const
SpellInfo const *const _spellInfo
SpellInfo const * GetSpellInfo() const
void SetEffectiveHeal(uint32 amount)
SpellSchoolMask GetSchoolMask() const
SpellSchoolMask const _schoolMask
static ObjectGuid const Empty
static Unit * ToUnit(Object *o)
uint32 GetHitMask() const
HealInfo * GetHealInfo() const
Unit * GetActionTarget() const
uint32 GetSpellTypeMask() const
Spell const * GetProcSpell() const
uint32 GetTypeMask() const
Unit *const _actionTarget
uint32 GetSpellPhaseMask() const
DamageInfo * GetDamageInfo() const
HealthPctOrderPred(bool ascending=true)
bool operator()(WorldObject const *objA, WorldObject const *objB) const
bool operator()(Unit const *a, Unit const *b) const
bool operator()(WorldObject const *objA, WorldObject const *objB) const
PowerPctOrderPred(Powers power, bool ascending=true)
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.
float GetSpellCritChanceReduction() const
ObjectGuid GetComboTargetGUID() const
Unit * GetCharmed() const
void ClearUnitState(uint32 f)
uint32 GetChannelSpellId() const
void ReplaceAllDynamicFlags(uint32 flag) override
void SetLastDamagedTargetGuid(ObjectGuid guid)
std::pair< AuraApplicationMap::iterator, AuraApplicationMap::iterator > AuraApplicationMapBoundsNonConst
bool IsWithinMeleeRange(Unit const *obj) const
bool m_duringRemoveFromWorld
float GetBoundingRadius() const
Vehicle * GetVehicle() const
float GetPosStat(Stats stat) const
void AddComboPointHolder(Unit *unit)
bool IsBattleMaster() const
std::list< GameObject * > GameObjectList
bool HealthAbovePct(int32 pct) const
bool HasPetFlag(UnitPetFlag flags) const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
float GetHealthPct() const
bool IsCharmerOrSelfPlayer() const
float m_baseSpellCritChance
uint32 m_lastSanctuaryTime
void SetCreateStat(Stats stat, float val)
bool HasExtraUnitMovementFlag(uint32 f) const
void SetStat(Stats stat, int32 val)
bool HasPvpFlag(UnitPVPStateFlags flags) const
void KillSelf(bool durabilityLoss=true)
void SetChannelObjectGuid(ObjectGuid guid)
uint32 GetUnitMovementFlags() const
LiquidTypeEntry const * _lastLiquid
bool IsGuildMaster() const
float GetRangedCritChanceReduction() const
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
Movement::MoveSpline * movespline
void SetGender(Gender gender)
std::unordered_map< ObjectGuid, uint32 > extraAttacksTargets
std::unordered_set< Unit * > m_ComboPointHolders
void AddComboPoints(int8 count)
void SetGameClientMovingMe(GameClient *gameClientMovingMe)
void AddExtraUnitMovementFlag(uint32 f)
std::shared_ptr< UnitAI > i_AI
void SetMinionGUID(ObjectGuid guid)
Diminishing m_Diminishing
bool IsTabardDesigner() const
void SetHoverHeight(float hoverHeight)
Unit * GetCharmedOrSelf() const
ThreatManager & GetThreatManager()
void ReplaceAllPvpFlags(UnitPVPStateFlags flags)
void SetInCombatWith(Unit *enemy, bool addSecondUnitSuppressed=false)
void SetLastExtraAttackSpell(uint32 spellId)
virtual void SetCanDualWield(bool value)
std::vector< std::pair< uint8, AuraApplication * > > AuraApplicationProcContainer
void SetVisFlag(UnitVisFlags flags)
void SetCreateHealth(uint32 val)
std::list< Aura * > AuraList
uint32 GetRaceMask() const
uint32 GetClassMask() const
virtual bool UpdateAllStats()=0
uint32 GetLastExtraAttackSpell() const
uint32 GetMountDisplayId() const
ThreatManager const & GetThreatManager() const
GameClient * _gameClientMovingMe
virtual SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType attackType=BASE_ATTACK, uint8 damageIndex=0) const =0
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Emote GetEmoteState() const
bool HealthAbovePctHealed(int32 pct, uint32 heal) const
SpellHistory * _spellHistory
NPCFlags GetNpcFlags() const
bool IsMovedByClient() const
ObjectGuid GetCreatorGUID() const
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
ObjectGuid GetOwnerGUID() const override
void RemoveExtraUnitMovementFlag(uint32 f)
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
Spell * GetCurrentSpell(uint32 spellType) const
Unit * GetCharmer() const
UnitPetFlag GetPetFlags() const
Trinity::unique_trackable_ptr< Vehicle > m_vehicleKit
UnitPVPStateFlags GetPvpFlags() const
uint32 GetTransformSpell() const
void SetAttackPowerModNeg(int32 attackPowerMod)
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value, uint8 damageIndex=0)
uint32 _lastExtraAttackSpell
MotionMaster * i_motionMaster
virtual bool CanFly() const =0
void ReplaceAllUnitFlags(UnitFlags flags)
MotionMaster * GetMotionMaster()
AuraApplicationMap const & GetAppliedAuras() const
Powers GetPowerType() const
bool HasUnitFlag(UnitFlags flags) const
GameClient * GetGameClientMovingMe() const
ObjectGuid GetCharmedGUID() const
void SetCreatedBySpell(int32 spellId)
bool CanDualWield() const
bool CanInstantCast() const
void StartReactiveTimer(ReactiveType reactive)
void SetUnitMovementFlags(uint32 f)
uint32 GetMaxHealth() const
virtual void AtDisengage()
virtual void UpdateResistances(uint32 school)=0
void SetChannelSpellId(uint32 channelSpellId)
virtual void SetImmuneToAll(bool apply)
uint32 GetSpellCritDamageReduction(uint32 damage) const
bool IsFullHealth() const
float GetMeleeCritChanceReduction() const
void SetUnitFlag2(UnitFlags2 flags)
bool HasUnitFlag2(UnitFlags2 flags) const
bool HasInterruptFlag(uint32 flags) const
bool IsInSanctuary() const
std::pair< AuraMap::const_iterator, AuraMap::const_iterator > AuraMapBounds
uint32 GetRangedDamageReduction(uint32 damage) const
virtual bool IsLoading() const
uint8 GetComboPoints(ObjectGuid const &guid) const
void ReplaceAllPetFlags(UnitPetFlag flags)
float GetNegStat(Stats stat) const
void SetPetNameTimestamp(uint32 timestamp)
std::stack< std::shared_ptr< UnitAI > > UnitAIStack
float m_modRangedHitChance
float GetCombatReach() const override
void ReplaceAllVisFlags(UnitVisFlags flags)
std::deque< PlayerMovementPendingChange > m_pendingMovementChanges
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
int32 GetMinPower(Powers) const
void SetRangedAttackPowerModNeg(int32 attackPowerMod)
std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > AuraApplicationMapBounds
void RemoveNpcFlag(NPCFlags flags)
uint32 m_removedAurasCount
uint32 GetRangedCritDamageReduction(uint32 damage) const
UnitFlags GetUnitFlags() const
void SetPetFlag(UnitPetFlag flags)
TempSummon * ToTempSummon()
bool IsGravityDisabled() const
bool IsQuestGiver() const
CharmInfo * GetCharmInfo()
bool HasStealthAura() const
void RemoveVisFlag(UnitVisFlags flags)
bool IsInCombatWith(Unit const *who) const
ObjectGuid GetCharmerOrOwnerGUID() const override
AuraMap::iterator m_auraUpdateIterator
std::list< AuraApplication * > AuraApplicationList
ObjectGuid _lastDamagedTargetGuid
std::map< uint8, AuraApplication * > VisibleAuraMap
void SetNativeDisplayId(uint32 displayId)
void FollowerRemoved(AbstractFollower *f)
void SetRangedAttackPowerModPos(int32 attackPowerMod)
void FollowerAdded(AbstractFollower *f)
bool m_AutoRepeatFirstCast
AnimTier GetAnimTier() const
std::set< Unit * > ControlList
TempSummon const * ToTempSummon() const
virtual bool HasSpell(uint32) const
virtual bool IsAffectedByDiminishingReturns() const
std::pair< AuraStateAurasMap::const_iterator, AuraStateAurasMap::const_iterator > AuraStateAurasMapBounds
void AddUnitState(uint32 f)
std::multimap< AuraStateType, AuraApplication * > AuraStateAurasMap
ObjectGuid GetLastDamagedTargetGuid() const
void SetBoundingRadius(float boundingRadius)
void SetCreateMana(uint32 val)
void RemoveComboPointHolder(Unit *unit)
bool IsCharmedOwnedByPlayerOrPlayer() const
bool IsImmuneToNPC() const
virtual bool CanEnterWater() const =0
Pet const * ToPet() const
Unit * EnsureVictim() const
uint32 getAttackTimer(WeaponAttackType type) const
virtual void SetSheath(SheathState sheathed)
bool IsDuringRemoveFromWorld() const
bool m_ControlledByPlayer
void AddInterruptMask(uint32 flags)
Unit * GetCharmerOrOwner() const
void SetLastManaUse(uint32 spellCastTime)
virtual Gender GetNativeGender() const
AuraMap const & GetOwnedAuras() const
void SetInstantCast(bool set)
void SetRangedAttackPowerMultiplier(float attackPowerMult)
virtual void SetImmuneToNPC(bool apply)
void SetCombatReach(float combatReach)
void SetEmoteState(Emote emote)
uint32 CountPctFromCurHealth(int32 pct) const
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
UnitAI * GetTopAI() const
uint32 GetNativeDisplayId() const
virtual void UpdateArmor()=0
bool HealthBelowPct(int32 pct) const
void AddUnitMovementFlag(uint32 f)
ThreatManager m_threatManager
uint32 _oldFactionId
faction before charm
SpellHistory const * GetSpellHistory() const
ObjectGuid GetMinionGUID() const
float GetHoverOffset() const
SharedVisionList const & GetSharedVisionList()
bool HasUnitMovementFlag(uint32 f) const
uint32 GetMaxPower(Powers power) 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)
std::multimap< uint32, Aura * > AuraMap
virtual uint32 GetShieldBlockValue() const =0
void SetNpcFlag(NPCFlags flags)
VisibleAuraMap const & GetVisibleAuras() const
Totem const * ToTotem() const
void RemovePetFlag(UnitPetFlag flags)
void setAttackTimer(WeaponAttackType type, uint32 time)
virtual bool UpdateStats(Stats stat)=0
bool HasNpcFlag(NPCFlags flags) const
virtual void AtEnterCombat()
std::array< DiminishingReturn, DIMINISHING_MAX > Diminishing
float m_modMeleeHitChance
virtual bool CheckAttackFitToAuraRequirement(WeaponAttackType, AuraEffect const *) const
ObjectGuid GetCritterGUID() const
uint8 GetLevelForTarget(WorldObject const *) const override
void SetFullPower(Powers power)
AuraList const & GetSingleCastAuras() const
bool CanModifyStats() const
void SetAttackPower(int32 attackPower)
float GetSpeedRate(UnitMoveType mtype) const
std::set< Unit * > AttackerSet
virtual void SetTarget(ObjectGuid const &)=0
virtual float GetFollowAngle() const
std::vector< Unit * > UnitVector
bool IsMovedByServer() const
uint32 GetExtraUnitMovementFlags() const
uint32 GetMeleeCritDamageReduction(uint32 damage) const
Unit * GetComboTarget() const
float GetCreateStat(Stats stat) const
DeathState getDeathState() const
ObjectGuid GetChannelObjectGuid() const
bool IsEngagedBy(Unit const *who) const
bool HasUnitState(const uint32 f) const
uint32 GetSpellDamageReduction(uint32 damage) const
std::unordered_set< AbstractFollower * > m_followingMe
float GetPowerPct(Powers power) const
void SetCanModifyStats(bool modifyStats)
std::pair< AuraMap::iterator, AuraMap::iterator > AuraMapBoundsNonConst
void RemoveUnitMovementFlag(uint32 f)
AuraApplicationMap m_appliedAuras
void SetVehicle(Vehicle *vehicle)
void SetClass(uint8 classId)
virtual float GetNativeObjectScale() const
bool HasInvisibilityAura() const
Player * GetCharmerOrSelfPlayer() const
virtual void UpdateMaxHealth()=0
uint32 HasUnitTypeMask(uint32 mask) const
uint8 GetComboPoints(Unit const *who=nullptr) const
--------—Combo point system----------------—
uint32 CountPctFromMaxHealth(int32 pct) const
float GetStat(Stats stat) const
virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage, uint8 damageIndex) const =0
SpellHistory * GetSpellHistory()
void ReplaceAllUnitFlags2(UnitFlags2 flags)
bool IsControlledByPlayer() const
ObjectGuid GetCharmerGUID() const
bool IsCombatDisallowed() const
SheathState GetSheath() const
UnitStandStateType GetStandState() const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void SetPetGUID(ObjectGuid guid)
virtual bool HasSpellFocus(Spell const *=nullptr) const
bool HasSharedVision() const
void SetCreatorGUID(ObjectGuid creator)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
ObjectGuid LastCharmerGUID
uint32 GetPower(Powers power) const
CombatManager & GetCombatManager()
uint32 GetMeleeDamageReduction(uint32 damage) const
void SetUnitFlag(UnitFlags flags)
void SetExtraUnitMovementFlags(uint32 f)
void SetCritterGUID(ObjectGuid guid)
AuraApplicationMap & GetAppliedAuras()
std::list< AuraEffect * > AuraEffectList
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
void SetAttackTime(WeaponAttackType att, uint32 val)
void SetPetNumberForClient(uint32 petNumber)
bool IsSpiritHealer() const
VisibleAuraMap m_visibleAuras
uint32 GetCreateMana() const
CombatManager m_combatManager
void SetRangedAttackPower(int32 attackPower)
virtual void SetNativeGender(Gender gender)
AuraStateAurasMap m_auraStateAuras
int32 GetResistance(SpellSchools school) const
AuraList & GetSingleCastAuras()
uint32 GetMovementCounterAndInc()
void AddUnitTypeMask(uint32 mask)
void SetModCastingSpeed(float castingSpeed)
Vehicle * GetVehicleKit() const
virtual void SetImmuneToPC(bool apply)
float m_modSpellHitChance
std::list< DynamicObject * > DynObjectList
virtual bool IsEngaged() const
void ReplaceAllNpcFlags(NPCFlags flags)
void SetAttackPowerMultiplier(float attackPowerMult)
AuraMap & GetOwnedAuras()
bool IsSpiritService() const
void SetTransformSpell(uint32 spellid)
bool IsImmuneToPC() const
SharedVisionList m_sharedVision
ObjectGuid GetTarget() const
bool _isWalkingBeforeCharm
Are we walking before we were charmed?
void SetAttackPowerModPos(int32 attackPowerMod)
void SetMountDisplayId(uint32 mountDisplayId)
UnitFlags2 GetUnitFlags2() const
void SetIsCombatDisallowed(bool apply)
bool IsThreatenedBy(Unit const *who) const
void RemoveUnitFlag(UnitFlags flags)
uint32 GetDynamicFlags() const override
bool HasPendingMovementChange() const
bool IsSpiritGuide() const
ObjectGuid GetPetGUID() const
uint32 GetMaxSkillValueForLevel(Unit const *target=nullptr) const
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Player session in the World.
WeaponAttackType AttackType
struct CalcDamageInfo::@227 Damages[2]
MeleeHitOutcome HitOutCome
uint32 GetPetNumber() const
void SetActionBar(uint8 index, uint32 spellOrAction, ActiveStates type)
CharmSpellInfo * GetCharmSpell(uint8 index)
CommandStates GetCommandState() const
CommandStates _CommandState
UnitActionBarEntry const * GetActionBarEntry(uint8 index) const
bool HasCommandState(CommandStates state) const
ReactStates _oldReactState
void SetCommandState(CommandStates st)
MeleeHitOutcome hitOutCome
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome)
WeaponAttackType attackType
PlayerMovementPendingChange()
MovementChangeType movementChangeType
struct PlayerMovementPendingChange::KnockbackInfo knockbackInfo
SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, uint32 _schoolMask)
SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, 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)