AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Pet.h"
Public Member Functions | |
Pet (Player *owner, PetType type=MAX_PET_TYPE) | |
~Pet () override=default | |
void | AddToWorld () override |
void | RemoveFromWorld () override |
float | GetNativeObjectScale () const override |
void | SetDisplayId (uint32 modelId, float displayScale=1.f) override |
PetType | getPetType () const |
void | setPetType (PetType type) |
bool | isControlled () const |
bool | isTemporarySummoned () const |
bool | IsPermanentPetFor (Player *owner) const |
bool | Create (ObjectGuid::LowType guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number) |
bool | CreateBaseAtCreature (Creature *creature) |
bool | CreateBaseAtCreatureInfo (CreatureTemplate const *cinfo, Unit *owner) |
bool | CreateBaseAtTamed (CreatureTemplate const *cinfo, Map *map, uint32 phaseMask) |
bool | LoadPetFromDB (Player *owner, uint32 petEntry, uint32 petnumber, bool current, uint32 healthPct=0, bool fullMana=false) |
bool | isBeingLoaded () const override |
void | SavePetToDB (PetSaveMode mode) |
void | FillPetInfo (PetStable::PetInfo *petInfo) const |
void | Remove (PetSaveMode mode, bool returnreagent=false) |
void | setDeathState (DeathState s, bool despawn=false) override |
A creature can be in 4 different states: Alive, JustDied, Corpse, and JustRespawned. The cycle follows the next order: More... | |
void | Update (uint32 diff) override |
uint8 | GetPetAutoSpellSize () const override |
uint32 | GetPetAutoSpellOnPos (uint8 pos) const override |
void | LoseHappiness () |
HappinessState | GetHappinessState () |
void | GivePetXP (uint32 xp) |
void | GivePetLevel (uint8 level) |
void | SynchronizeLevelWithOwner () |
bool | HaveInDiet (ItemTemplate const *item) const |
uint32 | GetCurrentFoodBenefitLevel (uint32 itemlevel) const |
void | SetDuration (Milliseconds dur) |
Milliseconds | GetDuration () const |
void | ToggleAutocast (SpellInfo const *spellInfo, bool apply) |
bool | HasSpell (uint32 spell) const override |
void | LearnPetPassives () |
void | CastPetAuras (bool current) |
void | CastWhenWillAvailable (uint32 spellid, Unit *spellTarget, ObjectGuid oldTarget, bool spellIsPositive=false) |
void | ClearCastWhenWillAvailable () |
void | RemoveSpellCooldown (uint32 spell_id, bool update) |
void | _SaveSpellCooldowns (CharacterDatabaseTransaction trans) |
void | _SaveAuras (CharacterDatabaseTransaction trans) |
void | _SaveSpells (CharacterDatabaseTransaction trans) |
void | _LoadSpellCooldowns (PreparedQueryResult result) |
void | _LoadAuras (PreparedQueryResult result, uint32 timediff) |
void | _LoadSpells (PreparedQueryResult result) |
bool | addSpell (uint32 spellId, ActiveStates active=ACT_DECIDE, PetSpellState state=PETSPELL_NEW, PetSpellType type=PETSPELL_NORMAL) |
bool | learnSpell (uint32 spell_id) |
void | learnSpellHighRank (uint32 spellid) |
void | InitLevelupSpellsForLevel () |
bool | unlearnSpell (uint32 spell_id, bool learn_prev, bool clear_ab=true) |
bool | removeSpell (uint32 spell_id, bool learn_prev, bool clear_ab=true) |
void | CleanupActionBar () |
std::string | GenerateActionBarData () const |
void | InitPetCreateSpells () |
bool | resetTalents () |
void | InitTalentForLevel () |
uint8 | GetMaxTalentPointsForLevel (uint8 level) |
uint8 | GetFreeTalentPoints () |
void | SetFreeTalentPoints (uint8 points) |
uint64 | GetAuraUpdateMaskForRaid () const |
void | SetAuraUpdateMaskForRaid (uint8 slot) |
void | ResetAuraUpdateMaskForRaid () |
DeclinedName const * | GetDeclinedNames () const |
Player * | GetOwner () const |
void | SetLoading (bool load) |
bool | HasTempSpell () const |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Guardian | |
Guardian (SummonPropertiesEntry const *properties, ObjectGuid owner, bool isWorldObject) | |
void | InitStats (uint32 duration) override |
bool | InitStatsForLevel (uint8 level) |
void | InitSummon () override |
bool | UpdateStats (Stats stat) override |
bool | UpdateAllStats () override |
void | UpdateArmor () override |
void | UpdateMaxHealth () override |
void | UpdateMaxPower (Powers power) override |
void | UpdateAttackPowerAndDamage (bool ranged=false) override |
void | UpdateDamagePhysical (WeaponAttackType attType) override |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Minion | |
Minion (SummonPropertiesEntry const *properties, ObjectGuid owner, bool isWorldObject) | |
void | InitStats (uint32 duration) override |
void | RemoveFromWorld () override |
Unit * | GetOwner () const |
float | GetFollowAngle () const override |
void | SetFollowAngle (float angle) |
bool | IsPetGhoul () const |
bool | IsGuardianPet () const |
void | setDeathState (DeathState s, bool despawn=false) override |
A creature can be in 4 different states: Alive, JustDied, Corpse, and JustRespawned. The cycle follows the next order: More... | |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from TempSummon | |
TempSummon (SummonPropertiesEntry const *properties, ObjectGuid owner, bool isWorldObject) | |
~TempSummon () override=default | |
void | Update (uint32 time) override |
virtual void | InitStats (uint32 lifetime) |
virtual void | InitSummon () |
virtual void | UnSummon (uint32 msTime=0) |
void | RemoveFromWorld () override |
void | SetTempSummonType (TempSummonType type) |
void | SaveToDB (uint32, uint8, uint32) override |
WorldObject * | GetSummoner () const |
Unit * | GetSummonerUnit () const |
Creature * | GetSummonerCreatureBase () const |
GameObject * | GetSummonerGameObject () const |
ObjectGuid | GetSummonerGUID () const |
TempSummonType | GetSummonType () const |
uint32 | GetTimer () |
void | SetTimer (uint32 t) |
void | SetVisibleBySummonerOnly (bool visibleBySummonerOnly) |
bool | IsVisibleBySummonerOnly () const |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Creature | |
Creature (bool isWorldObject=false) | |
~Creature () override | |
void | AddToWorld () override |
void | RemoveFromWorld () override |
float | GetNativeObjectScale () const override |
void | SetObjectScale (float scale) override |
void | SetDisplayId (uint32 displayId, float displayScale=1.f) override |
void | SetDisplayFromModel (uint32 modelIdx) |
void | DisappearAndDie () |
bool | isVendorWithIconSpeak () const |
bool | Create (ObjectGuid::LowType guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 vehId, float x, float y, float z, float ang, const CreatureData *data=nullptr) |
bool | LoadCreaturesAddon (bool reload=false) |
void | SelectLevel (bool changelevel=true) |
void | LoadEquipment (int8 id=1, bool force=false) |
ObjectGuid::LowType | GetSpawnId () const |
void | Update (uint32 time) override |
void | GetRespawnPosition (float &x, float &y, float &z, float *ori=nullptr, float *dist=nullptr) const |
void | SetCorpseDelay (uint32 delay) |
void | SetCorpseRemoveTime (uint32 delay) |
uint32 | GetCorpseDelay () const |
bool | IsRacialLeader () const |
bool | IsCivilian () const |
bool | IsTrigger () const |
bool | IsGuard () const |
CreatureMovementData const & | GetMovementTemplate () const |
bool | CanWalk () const |
bool | CanSwim () const override |
This method check the current flag/status of a creature and its inhabit type. More... | |
bool | CanEnterWater () const override |
bool | CanFly () const override |
bool | CanHover () const |
bool | IsRooted () const |
MovementGeneratorType | GetDefaultMovementType () const override |
-------—End of Pet responses methods-------— More... | |
void | SetDefaultMovementType (MovementGeneratorType mgt) |
void | SetReactState (ReactStates state) |
A creature can have 3 ReactStates : Agressive, Passive, Neutral. More... | |
ReactStates | GetReactState () const |
bool | HasReactState (ReactStates state) const |
void | InitializeReactState () |
Check if the creature has the specified ReactState. More... | |
bool | isCanInteractWithBattleMaster (Player *player, bool msg) const |
bool | isCanTrainingAndResetTalentsOf (Player *player) const |
bool | IsValidTrainerForPlayer (Player *player, uint32 *npcFlags=nullptr) const |
bool | CanCreatureAttack (Unit const *victim, bool skipDistCheck=false) const |
void | LoadSpellTemplateImmunity () |
bool | IsImmunedToSpell (SpellInfo const *spellInfo, Spell const *spell=nullptr) override |
bool | HasMechanicTemplateImmunity (uint32 mask) const |
bool | IsImmunedToSpellEffect (SpellInfo const *spellInfo, uint32 index) const override |
bool | isElite () const |
bool | isWorldBoss () const |
bool | IsDungeonBoss () const |
bool | IsImmuneToKnockback () const |
bool | IsAvoidingAOE () const |
uint8 | getLevelForTarget (WorldObject const *target) const override |
bool | IsInEvadeMode () const |
bool | IsEvadingAttacks () const |
bool | AIM_Initialize (CreatureAI *ai=nullptr) |
void | Motion_Initialize () |
CreatureAI * | AI () const |
bool | SetWalk (bool enable) override |
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client. More... | |
bool | SetDisableGravity (bool disable, bool packetOnly=false, bool updateAnimationTier=true) override |
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING. Infom also the client. More... | |
bool | SetSwim (bool enable) override |
bool | SetCanFly (bool enable, bool packetOnly=false) override |
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pressing space for example. For creatures, please look for DisableGravity(). More... | |
bool | SetWaterWalking (bool enable, bool packetOnly=false) override |
Allow to walk on water. Doesn't inform the client. Need to use SendMovementWaterWalking() if it's for players. More... | |
bool | SetFeatherFall (bool enable, bool packetOnly=false) override |
bool | SetHover (bool enable, bool packetOnly=false, bool updateAnimationTier=true) override |
bool | HasSpellFocus (Spell const *focusSpell=nullptr) const |
uint32 | GetShieldBlockValue () const override |
SpellSchoolMask | GetMeleeDamageSchoolMask (WeaponAttackType=BASE_ATTACK, uint8=0) const override |
void | SetMeleeDamageSchool (SpellSchools school) |
void | _AddCreatureSpellCooldown (uint32 spell_id, uint16 categoryId, uint32 end_time) |
void | AddSpellCooldown (uint32 spell_id, uint32, uint32 end_time, bool needSendToClient=false, bool forceSendToSpectator=false) override |
bool | HasSpellCooldown (uint32 spell_id) const override |
uint32 | GetSpellCooldown (uint32 spell_id) const |
void | ProhibitSpellSchool (SpellSchoolMask idSchoolMask, uint32 unTimeMs) override |
bool | IsSpellProhibited (SpellSchoolMask idSchoolMask) const |
void | ClearProhibitedSpellTimers () |
bool | HasSpell (uint32 spellID) const override |
void | UpdateMovementFlags () |
uint32 | GetRandomId (uint32 id1, uint32 id2, uint32 id3) |
bool | UpdateEntry (uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false) |
bool | UpdateEntry (uint32 entry, bool updateAI) |
bool | UpdateStats (Stats stat) override |
bool | UpdateAllStats () override |
void | UpdateResistances (uint32 school) override |
void | UpdateArmor () override |
void | UpdateMaxHealth () override |
void | UpdateMaxPower (Powers power) override |
void | UpdateAttackPowerAndDamage (bool ranged=false) override |
void | CalculateMinMaxDamage (WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage, uint8 damageIndex) override |
void | SetCanDualWield (bool value) override |
int8 | GetOriginalEquipmentId () const |
uint8 | GetCurrentEquipmentId () |
void | SetCurrentEquipmentId (uint8 id) |
float | GetSpellDamageMod (int32 Rank) |
VendorItemData const * | GetVendorItems () const |
uint32 | GetVendorItemCurrentCount (VendorItem const *vItem) |
uint32 | UpdateVendorItemCurrentCount (VendorItem const *vItem, uint32 used_count) |
TrainerSpellData const * | GetTrainerSpells () const |
CreatureTemplate const * | GetCreatureTemplate () const |
CreatureData const * | GetCreatureData () const |
void | SetDetectionDistance (float dist) |
CreatureAddon const * | GetCreatureAddon () const |
std::string const & | GetAIName () const |
std::string | GetScriptName () const |
uint32 | GetScriptId () const |
std::string const & | GetNameForLocaleIdx (LocaleConstant locale_idx) const override |
void | setDeathState (DeathState s, bool despawn=false) override |
A creature can be in 4 different states: Alive, JustDied, Corpse, and JustRespawned. The cycle follows the next order: More... | |
bool | LoadFromDB (ObjectGuid::LowType guid, Map *map, bool allowDuplicate=false) |
bool | LoadCreatureFromDB (ObjectGuid::LowType guid, Map *map, bool addToMap=true, bool allowDuplicate=false) |
void | SaveToDB () |
virtual void | SaveToDB (uint32 mapid, uint8 spawnMask, uint32 phaseMask) |
virtual void | DeleteFromDB () |
ObjectGuid | GetLootRecipientGUID () const |
Player * | GetLootRecipient () const |
ObjectGuid::LowType | GetLootRecipientGroupGUID () const |
Group * | GetLootRecipientGroup () const |
bool | hasLootRecipient () const |
bool | isTappedBy (Player const *player) const |
bool | CanGeneratePickPocketLoot () const |
void | SetPickPocketLootTime () |
void | ResetPickPocketLootTime () |
void | SetLootRecipient (Unit *unit, bool withGroup=true) |
void | AllLootRemovedFromCorpse () |
uint16 | GetLootMode () const |
bool | HasLootMode (uint16 lootMode) const |
void | SetLootMode (uint16 lootMode) |
void | AddLootMode (uint16 lootMode) |
void | RemoveLootMode (uint16 lootMode) |
void | ResetLootMode () |
SpellInfo const * | reachWithSpellAttack (Unit *victim) |
SpellInfo const * | reachWithSpellCure (Unit *victim) |
bool | CanStartAttack (Unit const *u) const |
float | GetAggroRange (Unit const *target) const |
float | GetAttackDistance (Unit const *player) const |
float | GetDetectionRange () const |
void | SendAIReaction (AiReaction reactionType) |
Unit * | SelectNearestTarget (float dist=0, bool playerOnly=false) const |
Select nearest hostile unit within the given distance (regardless of threat list). More... | |
Unit * | SelectNearestTargetInAttackDistance (float dist) const |
Select nearest hostile unit within the given attack distance (i.e. distance is ignored if > than ATTACK_DISTANCE), regardless of threat list. More... | |
void | DoFleeToGetAssistance () |
void | CallForHelp (float fRadius, Unit *target=nullptr) |
void | CallAssistance (Unit *target=nullptr) |
void | SetNoCallAssistance (bool val) |
void | SetNoSearchAssistance (bool val) |
bool | HasSearchedAssistance () |
bool | CanAssistTo (Unit const *u, Unit const *enemy, bool checkfaction=true) const |
bool | _IsTargetAcceptable (Unit const *target) const |
bool | CanIgnoreFeignDeath () const |
void | UpdateMoveInLineOfSightState () |
bool | IsMoveInLineOfSightDisabled () |
bool | IsMoveInLineOfSightStrictlyDisabled () |
void | RemoveCorpse (bool setSpawnTime=true, bool skipVisibility=false) |
void | DespawnOrUnsummon (Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer) |
void | DespawnOrUnsummon (uint32 msTimeToDespawn=0) |
void | DespawnOnEvade (Seconds respawnDelay=20s) |
time_t const & | GetRespawnTime () const |
time_t | GetRespawnTimeEx () const |
void | SetRespawnTime (uint32 respawn) |
void | Respawn (bool force=false) |
void | SaveRespawnTime () override |
uint32 | GetRespawnDelay () const |
void | SetRespawnDelay (uint32 delay) |
uint32 | GetCombatPulseDelay () const |
void | SetCombatPulseDelay (uint32 delay) |
float | GetWanderDistance () const |
void | SetWanderDistance (float dist) |
void | DoImmediateBoundaryCheck () |
void | SendZoneUnderAttackMessage (Player *attacker) |
Send a message to LocalDefense channel for players opposition team in the zone. More... | |
void | SetInCombatWithZone () |
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled. More... | |
bool | hasQuest (uint32 quest_id) const override |
bool | hasInvolvedQuest (uint32 quest_id) const override |
bool | isRegeneratingHealth () |
void | SetRegeneratingHealth (bool enable) |
void | SetRegeneratingPower (bool enable) |
virtual uint8 | GetPetAutoSpellSize () const |
virtual uint32 | GetPetAutoSpellOnPos (uint8 pos) const |
void | SetCannotReachTarget (ObjectGuid const &target=ObjectGuid::Empty) |
bool | CanNotReachTarget () const |
bool | IsNotReachableAndNeedRegen () const |
void | SetPosition (float x, float y, float z, float o) |
void | SetPosition (const Position &pos) |
void | SetHomePosition (float x, float y, float z, float o) |
void | SetHomePosition (const Position &pos) |
void | GetHomePosition (float &x, float &y, float &z, float &ori) const |
Position const & | GetHomePosition () const |
void | SetTransportHomePosition (float x, float y, float z, float o) |
void | SetTransportHomePosition (const Position &pos) |
void | GetTransportHomePosition (float &x, float &y, float &z, float &ori) const |
Position const & | GetTransportHomePosition () const |
uint32 | GetWaypointPath () const |
void | LoadPath (uint32 pathid) |
uint32 | GetCurrentWaypointID () const |
void | UpdateWaypointID (uint32 wpID) |
void | SearchFormation () |
CreatureGroup const * | GetFormation () const |
CreatureGroup * | GetFormation () |
void | SetFormation (CreatureGroup *formation) |
Unit * | SelectVictim () |
void | SetDisableReputationGain (bool disable) |
bool | IsReputationGainDisabled () const |
bool | IsDamageEnoughForLootingAndReward () const |
void | LowerPlayerDamageReq (uint32 unDamage, bool damagedByPlayer=true) |
void | ResetPlayerDamageReq () |
uint32 | GetPlayerDamageReq () const |
uint32 | GetOriginalEntry () const |
void | SetOriginalEntry (uint32 entry) |
void | SetTarget (ObjectGuid guid=ObjectGuid::Empty) override |
void | ClearTarget () |
void | FocusTarget (Spell const *focusSpell, WorldObject const *target) |
void | ReleaseFocus (Spell const *focusSpell) |
bool | IsMovementPreventedByCasting () const override |
std::shared_ptr< time_t > const & | GetLastLeashExtensionTimePtr () const |
void | SetLastLeashExtensionTimePtr (std::shared_ptr< time_t > const &timer) |
void | ClearLastLeashExtensionTimePtr () |
time_t | GetLastLeashExtensionTime () const |
void | UpdateLeashExtensionTime () |
bool | IsFreeToMove () |
bool | HasSwimmingFlagOutOfCombat () const |
void | RefreshSwimmingFlag (bool recheck=false) |
void | SetAssistanceTimer (uint32 value) |
void | ModifyThreatPercentTemp (Unit *victim, int32 percent, Milliseconds duration) |
void | ResumeChasingVictim () |
Helper to resume chasing current victim. More... | |
bool | CanCastSpell (uint32 spellID) const |
Returns true if the creature is able to cast the spell. More... | |
ObjectGuid | GetSummonerGUID () const |
Helper to get the creature's summoner GUID, if it is a summon. More... | |
void | SetCombatMovement (bool allowMovement) |
bool | IsCombatMovementAllowed () const |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Unit | |
~Unit () override | |
void | Update (uint32 time) override |
UnitAI * | GetAI () |
void | SetAI (UnitAI *newAI) |
void | AddToWorld () override |
void | RemoveFromWorld () override |
void | CleanupBeforeRemoveFromMap (bool finalCleanup) |
void | CleanupsBeforeDelete (bool finalCleanup=true) override |
void | SetUInt32Value (uint16 index, uint32 value) |
void | AddUnitState (uint32 f) |
bool | HasUnitState (const uint32 f) const |
void | ClearUnitState (uint32 f) |
uint32 | GetUnitState () const |
uint32 | HasUnitTypeMask (uint32 mask) const |
void | AddUnitTypeMask (uint32 mask) |
uint32 | GetUnitTypeMask () const |
UnitFlags | GetUnitFlags () const |
bool | HasUnitFlag (UnitFlags flags) const |
void | SetUnitFlag (UnitFlags flags) |
UnitFlags available in UnitDefines.h. More... | |
void | RemoveUnitFlag (UnitFlags flags) |
UnitFlags available in UnitDefines.h. More... | |
void | ReplaceAllUnitFlags (UnitFlags flags) |
Remove the Unit flag specify only. More... | |
UnitFlags2 | GetUnitFlags2 () const |
Remove all UnitFlags and set new ones. UnitFlags available in UnitDefines.h. More... | |
bool | HasUnitFlag2 (UnitFlags2 flags) const |
void | SetUnitFlag2 (UnitFlags2 flags) |
void | RemoveUnitFlag2 (UnitFlags2 flags) |
void | ReplaceAllUnitFlags2 (UnitFlags2 flags) |
NPCFlags | GetNpcFlags () const |
bool | HasNpcFlag (NPCFlags flags) const |
void | SetNpcFlag (NPCFlags flags) |
void | RemoveNpcFlag (NPCFlags flags) |
void | ReplaceAllNpcFlags (NPCFlags flags) |
uint32 | GetDynamicFlags () const override |
void | ReplaceAllDynamicFlags (uint32 flag) override |
bool | IsSummon () const |
bool | IsGuardian () const |
bool | IsControllableGuardian () const |
bool | IsPet () const |
bool | IsHunterPet () const |
bool | IsTotem () const |
bool | IsVehicle () const |
bool | IsVendor () const |
bool | IsTrainer () const |
bool | IsQuestGiver () const |
bool | IsGossip () const |
bool | IsTaxi () const |
bool | IsGuildMaster () const |
bool | IsBattleMaster () const |
bool | IsBanker () const |
bool | IsInnkeeper () const |
bool | IsSpiritHealer () const |
bool | IsSpiritGuide () const |
bool | IsTabardDesigner () const |
bool | IsAuctioner () const |
bool | IsArmorer () const |
bool | IsServiceProvider () const |
bool | IsSpiritService () const |
uint8 | getRace (bool original=false) const |
void | setRace (uint8 race) |
uint32 | getRaceMask () const |
DisplayRace | GetDisplayRaceFromModelId (uint32 modelId) const |
DisplayRace | GetDisplayRace () const |
uint8 | getClass () const |
virtual bool | IsClass (Classes unitClass, ClassContext context=CLASS_CONTEXT_NONE) const |
uint32 | getClassMask () const |
uint8 | getGender () const |
uint32 | GetFaction () const |
void | SetFaction (uint32 faction) |
FactionTemplateEntry const * | GetFactionTemplateEntry () const |
void | setAttackTimer (WeaponAttackType type, int32 time) |
void | resetAttackTimer (WeaponAttackType type=BASE_ATTACK) |
int32 | getAttackTimer (WeaponAttackType type) const |
bool | isAttackReady (WeaponAttackType type=BASE_ATTACK) const |
bool | haveOffhandWeapon () const |
bool | CanDualWield () const |
virtual void | SetCanDualWield (bool value) |
float | GetCombatReach () const override |
float | GetMeleeReach () const |
bool | IsWithinRange (Unit const *obj, float dist) const |
bool | IsWithinCombatRange (Unit const *obj, float dist2compare) const |
bool | IsWithinMeleeRange (Unit const *obj, float dist=0.f) const |
float | GetMeleeRange (Unit const *target) const |
virtual SpellSchoolMask | GetMeleeDamageSchoolMask (WeaponAttackType attackType=BASE_ATTACK, uint8 damageIndex=0) const =0 |
bool | GetRandomContactPoint (Unit const *target, float &x, float &y, float &z, bool force=false) const |
Unit * | getAttackerForHelper () const |
bool | Attack (Unit *victim, bool meleeAttack) |
void | CastStop (uint32 except_spellid=0, bool withInstant=true) |
Interrupt the unit cast for all the current spells. More... | |
bool | AttackStop () |
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell, AI assistance, and call SendMeleeAttackStop() to the client. More... | |
void | RemoveAllAttackers () |
Remove all units in m_attackers list and send them AttackStop() More... | |
AttackerSet const & | getAttackers () const |
bool | GetMeleeAttackPoint (Unit *attacker, Position &pos) |
bool | isAttackingPlayer () const |
Unit * | GetVictim () const |
void | CombatStop (bool includingCast=false) |
void | CombatStopWithPets (bool includingCast=false) |
void | StopAttackFaction (uint32 faction_id) |
void | StopAttackingInvalidTarget () |
Unit * | SelectNearbyTarget (Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const |
Unit * | SelectNearbyNoTotemTarget (Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const |
void | SendMeleeAttackStop (Unit *victim=nullptr) |
Send to the client SMSG_ATTACKSTOP but doesn't clear UNIT_STATE_MELEE_ATTACKING on server side or interrupt spells. Unless you know exactly what you're doing, use AttackStop() or RemoveAllAttackers() instead. More... | |
void | SendMeleeAttackStart (Unit *victim, Player *sendTo=nullptr) |
uint32 | GetAttackTime (WeaponAttackType att) const |
void | SetAttackTime (WeaponAttackType att, uint32 val) |
void | ApplyAttackTimePercentMod (WeaponAttackType att, float val, bool apply) |
void | ApplyCastTimePercentMod (float val, bool apply) |
void | SetImmuneToAll (bool apply, bool keepCombat=false) |
bool | IsImmuneToAll () const |
void | SetImmuneToPC (bool apply, bool keepCombat=false) |
bool | IsImmuneToPC () const |
void | SetImmuneToNPC (bool apply, bool keepCombat=false) |
bool | IsImmuneToNPC () const |
bool | IsEngaged () const |
bool | IsEngagedBy (Unit const *who) const |
bool | IsInCombat () const |
bool | IsInCombatWith (Unit const *who) const |
bool | IsPetInCombat () const |
void | CombatStart (Unit *target, bool initialAggro=true) |
void | CombatStartOnCast (Unit *target, bool initialAggro=true, uint32 duration=0) |
void | SetInCombatState (bool PvP, Unit *enemy=nullptr, uint32 duration=0) |
void | SetInCombatWith (Unit *enemy, uint32 duration=0) |
void | ClearInCombat () |
void | ClearInPetCombat () |
uint32 | GetCombatTimer () const |
void | SetCombatTimer (uint32 timer) |
bool | CanHaveThreatList () const |
void | AddThreat (Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr) |
float | ApplyTotalThreatModifier (float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL) |
void | TauntApply (Unit *victim) |
void | TauntFadeOut (Unit *taunter) |
ThreatMgr & | GetThreatMgr () |
ThreatMgr const & | GetThreatMgr () const |
void | addHatedBy (HostileReference *pHostileReference) |
void | removeHatedBy (HostileReference *) |
HostileRefMgr & | getHostileRefMgr () |
void | SetRedirectThreat (ObjectGuid guid, uint32 pct) |
void | ResetRedirectThreat () |
void | ModifyRedirectThreat (int32 amount) |
uint32 | GetRedirectThreatPercent () |
Unit * | GetRedirectThreatTarget () const |
uint8 | GetLevel () const |
uint8 | getLevelForTarget (WorldObject const *) const override |
void | SetLevel (uint8 lvl, bool showLevelChange=true) |
float | GetStat (Stats stat) const |
void | SetStat (Stats stat, int32 val) |
uint32 | GetArmor () const |
void | SetArmor (int32 val) |
uint32 | GetResistance (SpellSchools school) const |
uint32 | GetResistance (SpellSchoolMask mask) const |
void | SetResistance (SpellSchools school, int32 val) |
uint32 | GetHealth () const |
uint32 | GetMaxHealth () const |
bool | IsFullHealth () const |
bool | HealthBelowPct (int32 pct) const |
bool | HealthBelowPctDamaged (int32 pct, uint32 damage) const |
bool | HealthAbovePct (int32 pct) const |
bool | HealthAbovePctHealed (int32 pct, uint32 heal) const |
float | GetHealthPct () const |
uint32 | CountPctFromMaxHealth (int32 pct) const |
uint32 | CountPctFromCurHealth (int32 pct) const |
float | GetPowerPct (Powers power) const |
void | SetHealth (uint32 val) |
void | SetMaxHealth (uint32 val) |
void | SetFullHealth () |
int32 | ModifyHealth (int32 val) |
int32 | GetHealthGain (int32 dVal) |
Powers | getPowerType () const |
void | setPowerType (Powers power) |
virtual bool | HasActivePowerType (Powers power) |
uint32 | GetPower (Powers power) const |
uint32 | GetMaxPower (Powers power) const |
void | SetPower (Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false) |
void | SetMaxPower (Powers power, uint32 val) |
int32 | ModifyPower (Powers power, int32 val, bool withPowerUpdate=true) |
int32 | ModifyPowerPct (Powers power, float pct, bool apply=true) |
bool | HandleStatModifier (UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply) |
void | SetModifierValue (UnitMods unitMod, UnitModifierType modifierType, float value) |
float | GetModifierValue (UnitMods unitMod, UnitModifierType modifierType) const |
float | GetTotalStatValue (Stats stat, float additionalValue=0.0f) const |
float | GetTotalAuraModValue (UnitMods unitMod) const |
SpellSchools | GetSpellSchoolByAuraGroup (UnitMods unitMod) const |
Stats | GetStatByAuraGroup (UnitMods unitMod) const |
Powers | GetPowerTypeByAuraGroup (UnitMods unitMod) const |
bool | CanModifyStats () const |
void | SetCanModifyStats (bool modifyStats) |
virtual bool | UpdateStats (Stats stat)=0 |
virtual bool | UpdateAllStats ()=0 |
virtual void | UpdateResistances (uint32 school)=0 |
virtual void | UpdateAllResistances () |
virtual void | UpdateArmor ()=0 |
virtual void | UpdateMaxHealth ()=0 |
virtual void | UpdateMaxPower (Powers power)=0 |
virtual void | UpdateAttackPowerAndDamage (bool ranged=false)=0 |
virtual void | UpdateDamagePhysical (WeaponAttackType attType) |
float | GetTotalAttackPowerValue (WeaponAttackType attType, Unit *pVictim=nullptr) const |
float | GetWeaponDamageRange (WeaponAttackType attType, WeaponDamageRange type, uint8 damageIndex=0) const |
void | SetBaseWeaponDamage (WeaponAttackType attType, WeaponDamageRange damageRange, float value, uint8 damageIndex=0) |
virtual void | CalculateMinMaxDamage (WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage, uint8 damageIndex=0)=0 |
uint32 | CalculateDamage (WeaponAttackType attType, bool normalized, bool addTotalPct, uint8 itemDamagesMask=0) |
float | GetAPMultiplier (WeaponAttackType attType, bool normalized) |
DiminishingLevels | GetDiminishing (DiminishingGroup group) |
void | IncrDiminishing (DiminishingGroup group) |
float | ApplyDiminishingToDuration (DiminishingGroup group, int32 &duration, Unit *caster, DiminishingLevels Level, int32 limitduration) |
void | ApplyDiminishingAura (DiminishingGroup group, bool apply) |
void | ClearDiminishings () |
float | GetSpellMaxRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const |
float | GetSpellMinRangeForTarget (Unit const *target, SpellInfo const *spellInfo) const |
bool | CanFreeMove () const |
SheathState | GetSheath () const |
virtual void | SetSheath (SheathState sheathed) |
ReputationRank | GetReactionTo (Unit const *target, bool checkOriginalFaction=false) const |
ReputationRank | GetFactionReactionTo (FactionTemplateEntry const *factionTemplateEntry, Unit const *target) const |
bool | IsHostileTo (Unit const *unit) const |
bool | IsHostileToPlayers () const |
bool | IsFriendlyTo (Unit const *unit) const |
bool | IsNeutralToAll () const |
bool | IsInPartyWith (Unit const *unit) const |
bool | IsInRaidWith (Unit const *unit) const |
void | GetPartyMembers (std::list< Unit * > &units) |
bool | IsContestedGuard () const |
bool | IsInSanctuary () const |
bool | IsPvP () const |
bool | IsFFAPvP () const |
void | SetPvP (bool state) |
uint32 | GetCreatureType () const |
uint32 | GetCreatureTypeMask () const |
uint8 | getStandState () const |
bool | IsSitState () const |
bool | IsStandState () const |
void | SetStandState (uint8 state) |
void | SetStandFlags (uint8 flags) |
void | RemoveStandFlags (uint8 flags) |
bool | IsMounted () const |
uint32 | GetMountID () const |
void | Mount (uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0) |
void | Dismount () |
uint16 | GetMaxSkillValueForLevel (Unit const *target=nullptr) const |
void | KillSelf (bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr) |
void | ProcDamageAndSpellFor (bool isVictim, Unit *target, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const *procSpellInfo, uint32 damage, SpellInfo const *procAura=nullptr, int8 procAuraEffectIndex=-1, Spell const *procSpell=nullptr, DamageInfo *damageInfo=nullptr, HealInfo *healInfo=nullptr, uint32 procPhase=2) |
void | GetProcAurasTriggeredOnEvent (std::list< AuraApplication * > &aurasTriggeringProc, std::list< AuraApplication * > *procAuras, ProcEventInfo eventInfo) |
void | TriggerAurasProcOnEvent (CalcDamageInfo &damageInfo) |
void | TriggerAurasProcOnEvent (std::list< AuraApplication * > *myProcAuras, std::list< AuraApplication * > *targetProcAuras, Unit *actionTarget, uint32 typeMaskActor, uint32 typeMaskActionTarget, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo) |
void | TriggerAurasProcOnEvent (ProcEventInfo &eventInfo, std::list< AuraApplication * > &procAuras) |
void | HandleEmoteCommand (uint32 emoteId) |
void | AttackerStateUpdate (Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false, bool ignoreCasting=false) |
void | CalculateMeleeDamage (Unit *victim, CalcDamageInfo *damageInfo, WeaponAttackType attackType=BASE_ATTACK, const bool sittingVictim=false) |
void | DealMeleeDamage (CalcDamageInfo *damageInfo, bool durabilityLoss) |
void | HandleProcExtraAttackFor (Unit *victim, uint32 count) |
void | SetLastExtraAttackSpell (uint32 spellId) |
uint32 | GetLastExtraAttackSpell () const |
void | AddExtraAttacks (uint32 count) |
void | SetLastDamagedTargetGuid (ObjectGuid const &guid) |
ObjectGuid const & | GetLastDamagedTargetGuid () const |
void | CalculateSpellDamageTaken (SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=BASE_ATTACK, bool crit=false) |
void | DealSpellDamage (SpellNonMeleeDamage *damageInfo, bool durabilityLoss, Spell const *spell=nullptr) |
float | GetMeleeCritChanceReduction () const |
float | GetRangedCritChanceReduction () const |
float | GetSpellCritChanceReduction () const |
uint32 | GetMeleeCritDamageReduction (uint32 damage) const |
uint32 | GetRangedCritDamageReduction (uint32 damage) const |
uint32 | GetSpellCritDamageReduction (uint32 damage) const |
uint32 | GetMeleeDamageReduction (uint32 damage) const |
uint32 | GetRangedDamageReduction (uint32 damage) const |
uint32 | GetSpellDamageReduction (uint32 damage) const |
float | MeleeSpellMissChance (Unit const *victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const |
SpellMissInfo | MeleeSpellHitResult (Unit *victim, SpellInfo const *spell) |
SpellMissInfo | MagicSpellHitResult (Unit *victim, SpellInfo const *spell) |
SpellMissInfo | SpellHitResult (Unit *victim, SpellInfo const *spell, bool canReflect=false) |
SpellMissInfo | SpellHitResult (Unit *victim, Spell const *spell, bool canReflect=false) |
float | GetUnitDodgeChance () const |
float | GetUnitParryChance () const |
float | GetUnitBlockChance () const |
float | GetUnitMissChance (WeaponAttackType attType) const |
float | GetUnitCriticalChance (WeaponAttackType attackType, Unit const *victim) const |
int32 | GetMechanicResistChance (SpellInfo const *spell) |
bool | CanUseAttackType (uint8 attacktype) const |
virtual uint32 | GetShieldBlockValue () const =0 |
uint32 | GetShieldBlockValue (uint32 soft_cap, uint32 hard_cap) const |
uint32 | GetUnitMeleeSkill (Unit const *target=nullptr) const |
uint32 | GetDefenseSkillValue (Unit const *target=nullptr) const |
uint32 | GetWeaponSkillValue (WeaponAttackType attType, Unit const *target=nullptr) const |
float | GetWeaponProcChance () const |
float | GetPPMProcChance (uint32 WeaponSpeed, float PPM, SpellInfo const *spellProto) const |
MeleeHitOutcome | RollMeleeOutcomeAgainst (Unit const *victim, WeaponAttackType attType) const |
MeleeHitOutcome | RollMeleeOutcomeAgainst (Unit const *victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const |
bool | IsCritter () const |
bool | IsInFlight () const |
bool | HasAuraTypeWithFamilyFlags (AuraType auraType, uint32 familyName, uint32 familyFlags) const |
virtual bool | HasSpell (uint32) const |
bool | HasBreakableByDamageAuraType (AuraType type, uint32 excludeAura=0) const |
bool | HasBreakableByDamageCrowdControlAura (Unit *excludeCasterChannel=nullptr) const |
bool | HasStealthAura () const |
bool | HasInvisibilityAura () const |
bool | isFeared () const |
bool | isInRoots () const |
bool | IsPolymorphed () const |
bool | isFrozen () const |
bool | isTargetableForAttack (bool checkFakeDeath=true, Unit const *byWho=nullptr) const |
bool | IsValidAttackTarget (Unit const *target, SpellInfo const *bySpell=nullptr) const |
bool | _IsValidAttackTarget (Unit const *target, SpellInfo const *bySpell, WorldObject const *obj=nullptr) const |
bool | IsValidAssistTarget (Unit const *target) const |
bool | _IsValidAssistTarget (Unit const *target, SpellInfo const *bySpell) const |
virtual bool | IsInWater () const |
virtual bool | IsUnderWater () const |
bool | isInAccessiblePlaceFor (Creature const *c) const |
void | SendHealSpellLog (HealInfo const &healInfo, bool critical=false) |
int32 | HealBySpell (HealInfo &healInfo, bool critical=false) |
void | SendEnergizeSpellLog (Unit *victim, uint32 SpellID, uint32 Damage, Powers powertype) |
void | EnergizeBySpell (Unit *victim, uint32 SpellID, uint32 Damage, Powers powertype) |
SpellCastResult | CastSpell (SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (Unit *victim, uint32 spellId, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (Unit *victim, uint32 spellId, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (Unit *victim, SpellInfo const *spellInfo, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (Unit *victim, SpellInfo const *spellInfo, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (float x, float y, float z, uint32 spellId, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastSpell (GameObject *go, uint32 spellId, bool triggered, Item *castItem=nullptr, AuraEffect *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastCustomSpell (Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastCustomSpell (uint32 spellId, SpellValueMod mod, int32 value, Unit *victim, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastCustomSpell (uint32 spellId, SpellValueMod mod, int32 value, Unit *victim=nullptr, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
SpellCastResult | CastCustomSpell (uint32 spellId, CustomSpellValues const &value, Unit *victim=nullptr, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty) |
Aura * | AddAura (uint32 spellId, Unit *target) |
Aura * | AddAura (SpellInfo const *spellInfo, uint8 effMask, Unit *target) |
void | SetAuraStack (uint32 spellId, Unit *target, uint32 stack) |
void | SendPlaySpellVisual (uint32 id) |
void | SendPlaySpellImpact (ObjectGuid guid, uint32 id) |
void | BuildCooldownPacket (WorldPacket &data, uint8 flags, uint32 spellId, uint32 cooldown) |
void | BuildCooldownPacket (WorldPacket &data, uint8 flags, PacketCooldowns const &cooldowns) |
void | DeMorph () |
void | SendAttackStateUpdate (CalcDamageInfo *damageInfo) |
void | SendAttackStateUpdate (uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount) |
void | SendSpellNonMeleeDamageLog (SpellNonMeleeDamage *log) |
void | SendSpellNonMeleeReflectLog (SpellNonMeleeDamage *log, Unit *attacker) |
void | SendSpellNonMeleeDamageLog (Unit *target, SpellInfo const *spellInfo, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit=false, bool Split=false) |
void | SendPeriodicAuraLog (SpellPeriodicAuraLogInfo *pInfo) |
void | SendSpellMiss (Unit *target, uint32 spellID, SpellMissInfo missInfo) |
void | SendSpellDamageResist (Unit *target, uint32 spellId) |
void | SendSpellDamageImmune (Unit *target, uint32 spellId) |
void | NearTeleportTo (Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false) |
void | NearTeleportTo (float x, float y, float z, float orientation, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false) |
void | SendTameFailure (uint8 result) |
void | SendTeleportPacket (Position &pos) |
virtual bool | UpdatePosition (float x, float y, float z, float ang, bool teleport=false) |
bool | UpdatePosition (const Position &pos, bool teleport=false) |
void | UpdateOrientation (float orientation) |
Only server-side orientation update, does not broadcast to client. More... | |
void | UpdateHeight (float newZ) |
Only server-side height update, does not broadcast to client. More... | |
void | KnockbackFrom (float x, float y, float speedXY, float speedZ) |
void | JumpTo (float speedXY, float speedZ, bool forward=true) |
void | JumpTo (WorldObject *obj, float speedZ) |
void | SendMonsterMove (float NewPosX, float NewPosY, float NewPosZ, uint32 TransitTime, SplineFlags sf=SPLINEFLAG_WALK_MODE) |
void | MonsterMoveWithSpeed (float x, float y, float z, float speed) |
void | SendMovementFlagUpdate (bool self=false) |
virtual bool | SetWalk (bool enable) |
virtual bool | SetDisableGravity (bool disable, bool packetOnly=false, bool updateAnimationTier=true) |
virtual bool | SetSwim (bool enable) |
virtual bool | SetCanFly (bool enable, bool packetOnly=false) |
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pressing space for example. For creatures, please look for DisableGravity(). More... | |
virtual bool | SetWaterWalking (bool enable, bool packetOnly=false) |
Allow to walk on water. Doesn't inform the client. Need to use SendMovementWaterWalking() if it's for players. More... | |
virtual bool | SetFeatherFall (bool enable, bool packetOnly=false) |
virtual bool | SetHover (bool enable, bool packetOnly=false, bool updateAnimationTier=true) |
void | SendMovementWaterWalking (Player *sendTo) |
void | SendMovementFeatherFall (Player *sendTo) |
void | SendMovementHover (Player *sendTo) |
void | SetInFront (WorldObject const *target) |
void | SetFacingTo (float ori) |
void | SetFacingToObject (WorldObject *object) |
void | SendChangeCurrentVictimOpcode (HostileReference *pHostileReference) |
void | SendClearThreatListOpcode () |
void | SendRemoveFromThreatListOpcode (HostileReference *pHostileReference) |
void | SendThreatListUpdate () |
void | SendClearTarget () |
void | BuildHeartBeatMsg (WorldPacket *data) const |
bool | IsAlive () const |
bool | isDying () const |
bool | isDead () const |
DeathState | getDeathState () |
virtual void | setDeathState (DeathState s, bool despawn=false) |
ObjectGuid | GetOwnerGUID () const |
void | SetOwnerGUID (ObjectGuid owner) |
ObjectGuid | GetCreatorGUID () const |
void | SetCreatorGUID (ObjectGuid creator) |
ObjectGuid | GetMinionGUID () const |
void | SetMinionGUID (ObjectGuid guid) |
ObjectGuid | GetCharmerGUID () const |
void | SetCharmerGUID (ObjectGuid owner) |
ObjectGuid | GetCharmGUID () const |
void | SetPetGUID (ObjectGuid guid) |
ObjectGuid | GetPetGUID () const |
void | SetCritterGUID (ObjectGuid guid) |
ObjectGuid | GetCritterGUID () const |
bool | IsControlledByPlayer () const |
bool | IsCreatedByPlayer () const |
ObjectGuid | GetCharmerOrOwnerGUID () const |
ObjectGuid | GetCharmerOrOwnerOrOwnGUID () const |
bool | IsCharmedOwnedByPlayerOrPlayer () const |
Player * | GetSpellModOwner () const |
Unit * | GetOwner () const |
Guardian * | GetGuardianPet () const |
Minion * | GetFirstMinion () const |
Unit * | GetCharmer () const |
Unit * | GetCharm () const |
Unit * | GetCharmerOrOwner () const |
Unit * | GetCharmerOrOwnerOrSelf () const |
Player * | GetCharmerOrOwnerPlayerOrPlayerItself () const |
Player * | GetAffectingPlayer () const |
void | SetMinion (Minion *minion, bool apply) |
void | GetAllMinionsByEntry (std::list< Creature * > &Minions, uint32 entry) |
void | RemoveAllMinionsByEntry (uint32 entry) |
void | SetCharm (Unit *target, bool apply) |
Unit * | GetNextRandomRaidMemberOrPet (float radius) |
bool | SetCharmedBy (Unit *charmer, CharmType type, AuraApplication const *aurApp=nullptr) |
void | RemoveCharmedBy (Unit *charmer) |
void | RestoreFaction () |
Unit * | GetFirstControlled () const |
void | RemoveAllControlled (bool onDeath=false) |
bool | IsCharmed () const |
bool | isPossessed () const |
bool | isPossessedByPlayer () const |
bool | isPossessing () const |
bool | isPossessing (Unit *u) const |
CharmInfo * | GetCharmInfo () |
CharmInfo * | InitCharmInfo () |
void | DeleteCharmInfo () |
void | UpdateCharmAI () |
SharedVisionList const & | GetSharedVisionList () |
void | AddPlayerToVision (Player *player) |
void | RemovePlayerFromVision (Player *player) |
bool | HasSharedVision () const |
void | RemoveBindSightAuras () |
void | RemoveCharmAuras () |
Pet * | CreateTamedPetFrom (Creature *creatureTarget, uint32 spell_id=0) |
Pet * | CreateTamedPetFrom (uint32 creatureEntry, uint32 spell_id=0) |
bool | InitTamedPet (Pet *pet, uint8 level, uint32 spell_id) |
Aura * | _TryStackingOrRefreshingExistingAura (SpellInfo const *newAura, uint8 effMask, Unit *caster, int32 *baseAmount=nullptr, Item *castItem=nullptr, ObjectGuid casterGUID=ObjectGuid::Empty, bool periodicReset=false) |
void | _AddAura (UnitAura *aura, Unit *caster) |
AuraApplication * | _CreateAuraApplication (Aura *aura, uint8 effMask) |
void | _ApplyAuraEffect (Aura *aura, uint8 effIndex) |
void | _ApplyAura (AuraApplication *aurApp, uint8 effMask) |
void | _UnapplyAura (AuraApplicationMap::iterator &i, AuraRemoveMode removeMode) |
void | _UnapplyAura (AuraApplication *aurApp, AuraRemoveMode removeMode) |
void | _RemoveNoStackAuraApplicationsDueToAura (Aura *aura) |
void | _RemoveNoStackAurasDueToAura (Aura *aura) |
bool | _IsNoStackAuraDueToAura (Aura *appliedAura, Aura *existingAura) const |
void | _RegisterAuraEffect (AuraEffect *aurEff, bool apply) |
AuraMap & | GetOwnedAuras () |
AuraMap const & | GetOwnedAuras () const |
void | RemoveOwnedAura (AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveOwnedAura (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveOwnedAura (Aura *aura, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
Aura * | GetOwnedAura (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, Aura *except=nullptr) const |
AuraApplicationMap & | GetAppliedAuras () |
AuraApplicationMap const & | GetAppliedAuras () const |
void | RemoveAura (AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAura (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAura (AuraApplication *aurApp, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAura (Aura *aur, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAppliedAuras (std::function< bool(AuraApplication const *)> const &check) |
void | RemoveOwnedAuras (std::function< bool(Aura const *)> const &check) |
void | RemoveAppliedAuras (uint32 spellId, std::function< bool(AuraApplication const *)> const &check) |
void | RemoveOwnedAuras (uint32 spellId, std::function< bool(Aura const *)> const &check) |
void | RemoveAurasDueToSpell (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAuraFromStack (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT) |
void | RemoveAurasDueToSpellByDispel (uint32 spellId, uint32 dispellerSpellId, ObjectGuid casterGUID, Unit *dispeller, uint8 chargesRemoved=1) |
void | RemoveAurasDueToSpellBySteal (uint32 spellId, ObjectGuid casterGUID, Unit *stealer) |
void | RemoveAurasDueToItemSpell (uint32 spellId, ObjectGuid castItemGuid) |
void | RemoveAurasByType (AuraType auraType, ObjectGuid casterGUID=ObjectGuid::Empty, Aura *except=nullptr, bool negative=true, bool positive=true) |
void | RemoveNotOwnSingleTargetAuras () |
void | RemoveAurasWithInterruptFlags (uint32 flag, uint32 except=0, bool isAutoshot=false) |
void | RemoveAurasWithAttribute (uint32 flags) |
void | RemoveAurasWithFamily (SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, ObjectGuid casterGUID) |
void | RemoveAurasWithMechanic (uint32 mechanic_mask, AuraRemoveMode removemode=AURA_REMOVE_BY_DEFAULT, uint32 except=0) |
void | RemoveMovementImpairingAuras (bool withRoot) |
void | RemoveAurasByShapeShift () |
void | RemoveAreaAurasDueToLeaveWorld () |
void | RemoveAllAuras () |
void | RemoveArenaAuras () |
void | RemoveAllAurasOnDeath () |
void | RemoveAllAurasRequiringDeadTarget () |
void | RemoveAllAurasExceptType (AuraType type) |
void | RemoveEvadeAuras () |
void | DelayOwnedAuras (uint32 spellId, ObjectGuid caster, int32 delaytime) |
void | _RemoveAllAuraStatMods () |
void | _ApplyAllAuraStatMods () |
AuraEffectList const & | GetAuraEffectsByType (AuraType type) const |
AuraList & | GetSingleCastAuras () |
AuraList const & | GetSingleCastAuras () const |
AuraEffect * | GetAuraEffect (uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const |
AuraEffect * | GetAuraEffectOfRankedSpell (uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const |
AuraEffect * | GetAuraEffect (AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const |
AuraEffect * | GetAuraEffect (AuraType type, SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, ObjectGuid casterGUID=ObjectGuid::Empty) const |
AuraEffect * | GetAuraEffectDummy (uint32 spellid) const |
AuraEffect * | GetDummyAuraEffect (SpellFamilyNames name, uint32 iconId, uint8 effIndex) const |
AuraApplication * | GetAuraApplication (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraApplication *except=nullptr) const |
Aura * | GetAura (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const |
AuraApplication * | GetAuraApplicationOfRankedSpell (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraApplication *except=nullptr) const |
Aura * | GetAuraOfRankedSpell (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const |
void | GetDispellableAuraList (Unit *caster, uint32 dispelMask, DispelChargesList &dispelList, SpellInfo const *dispelSpell) |
bool | HasAuraEffect (uint32 spellId, uint8 effIndex, ObjectGuid caster=ObjectGuid::Empty) const |
uint32 | GetAuraCount (uint32 spellId) const |
bool | HasAura (uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const |
bool | HasAuraType (AuraType auraType) const |
bool | HasAuraTypeWithCaster (AuraType auratype, ObjectGuid caster) const |
bool | HasAuraTypeWithMiscvalue (AuraType auratype, int32 miscvalue) const |
bool | HasAuraTypeWithAffectMask (AuraType auratype, SpellInfo const *affectedSpell) const |
bool | HasAuraTypeWithValue (AuraType auratype, int32 value) const |
bool | HasAuraTypeWithTriggerSpell (AuraType auratype, uint32 triggerSpell) const |
bool | HasNegativeAuraWithInterruptFlag (uint32 flag, ObjectGuid guid=ObjectGuid::Empty) |
bool | HasVisibleAuraType (AuraType auraType) const |
bool | HasNegativeAuraWithAttribute (uint32 flag, ObjectGuid guid=ObjectGuid::Empty) |
bool | HasAuraWithMechanic (uint32 mechanicMask) const |
AuraEffect * | IsScriptOverriden (SpellInfo const *spell, int32 script) const |
uint32 | GetDiseasesByCaster (ObjectGuid casterGUID, uint8 mode=0) |
uint32 | GetDoTsByCaster (ObjectGuid casterGUID) const |
int32 | GetTotalAuraModifierAreaExclusive (AuraType auratype) const |
int32 | GetTotalAuraModifier (AuraType auratype) const |
float | GetTotalAuraMultiplier (AuraType auratype) const |
int32 | GetMaxPositiveAuraModifier (AuraType auratype) |
int32 | GetMaxNegativeAuraModifier (AuraType auratype) const |
int32 | GetTotalAuraModifierByMiscMask (AuraType auratype, uint32 misc_mask) const |
float | GetTotalAuraMultiplierByMiscMask (AuraType auratype, uint32 misc_mask) const |
int32 | GetMaxPositiveAuraModifierByMiscMask (AuraType auratype, uint32 misc_mask, const AuraEffect *except=nullptr) const |
int32 | GetMaxNegativeAuraModifierByMiscMask (AuraType auratype, uint32 misc_mask) const |
int32 | GetTotalAuraModifierByMiscValue (AuraType auratype, int32 misc_value) const |
float | GetTotalAuraMultiplierByMiscValue (AuraType auratype, int32 misc_value) const |
int32 | GetMaxPositiveAuraModifierByMiscValue (AuraType auratype, int32 misc_value) const |
int32 | GetMaxNegativeAuraModifierByMiscValue (AuraType auratype, int32 misc_value) const |
int32 | GetTotalAuraModifierByAffectMask (AuraType auratype, SpellInfo const *affectedSpell) const |
float | GetTotalAuraMultiplierByAffectMask (AuraType auratype, SpellInfo const *affectedSpell) const |
int32 | GetMaxPositiveAuraModifierByAffectMask (AuraType auratype, SpellInfo const *affectedSpell) const |
int32 | GetMaxNegativeAuraModifierByAffectMask (AuraType auratype, SpellInfo const *affectedSpell) const |
float | GetResistanceBuffMods (SpellSchools school, bool positive) const |
void | SetResistanceBuffMods (SpellSchools school, bool positive, float val) |
void | ApplyResistanceBuffModsMod (SpellSchools school, bool positive, float val, bool apply) |
void | ApplyResistanceBuffModsPercentMod (SpellSchools school, bool positive, float val, bool apply) |
void | InitStatBuffMods () |
void | ApplyStatBuffMod (Stats stat, float val, bool apply) |
void | ApplyStatPercentBuffMod (Stats stat, float val, bool apply) |
void | SetCreateStat (Stats stat, float val) |
void | SetCreateHealth (uint32 val) |
uint32 | GetCreateHealth () const |
void | SetCreateMana (uint32 val) |
uint32 | GetCreateMana () const |
uint32 | GetCreatePowers (Powers power) const |
float | GetPosStat (Stats stat) const |
float | GetNegStat (Stats stat) const |
float | GetCreateStat (Stats stat) const |
void | SetCurrentCastedSpell (Spell *pSpell) |
virtual void | ProhibitSpellSchool (SpellSchoolMask, uint32) |
void | InterruptSpell (CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, bool bySelf=false) |
void | FinishSpell (CurrentSpellTypes spellType, bool ok=true) |
bool | IsNonMeleeSpellCast (bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const |
void | InterruptNonMeleeSpells (bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false) |
Spell * | GetCurrentSpell (CurrentSpellTypes spellType) const |
Spell * | GetCurrentSpell (uint32 spellType) const |
Spell * | FindCurrentSpellBySpellId (uint32 spell_id) const |
int32 | GetCurrentSpellCastTime (uint32 spell_id) const |
virtual bool | IsMovementPreventedByCasting () const |
ShapeshiftForm | GetShapeshiftForm () const |
void | SetShapeshiftForm (ShapeshiftForm form) |
bool | IsInFeralForm () const |
bool | IsInDisallowedMountForm () const |
bool | isInFrontInMap (Unit const *target, float distance, float arc=M_PI) const |
bool | isInBackInMap (Unit const *target, float distance, float arc=M_PI) const |
bool | IsVisible () const |
void | SetVisible (bool x) |
void | SetModelVisible (bool on) |
uint32 | GetPhaseByAuras () const |
void | SetPhaseMask (uint32 newPhaseMask, bool update) override |
void | UpdateObjectVisibility (bool forced=true, bool fromUpdate=false) override |
VisibleAuraMap const * | GetVisibleAuras () |
AuraApplication * | GetVisibleAura (uint8 slot) |
void | SetVisibleAura (uint8 slot, AuraApplication *aur) |
void | RemoveVisibleAura (uint8 slot) |
uint32 | GetInterruptMask () const |
void | AddInterruptMask (uint32 mask) |
void | UpdateInterruptMask () |
virtual float | GetNativeObjectScale () const |
virtual void | RecalculateObjectScale () |
uint32 | GetDisplayId () const |
virtual void | SetDisplayId (uint32 modelId, float displayScale=1.f) |
uint32 | GetNativeDisplayId () const |
void | RestoreDisplayId () |
void | SetNativeDisplayId (uint32 displayId) |
void | setTransForm (uint32 spellid) |
uint32 | getTransForm () const |
void | _RegisterDynObject (DynamicObject *dynObj) |
void | _UnregisterDynObject (DynamicObject *dynObj) |
DynamicObject * | GetDynObject (uint32 spellId) |
bool | RemoveDynObject (uint32 spellId) |
void | RemoveAllDynObjects () |
GameObject * | GetGameObject (uint32 spellId) const |
void | AddGameObject (GameObject *gameObj) |
void | RemoveGameObject (GameObject *gameObj, bool del) |
void | RemoveGameObject (uint32 spellid, bool del) |
void | RemoveAllGameObjects () |
void | ModifyAuraState (AuraStateType flag, bool apply) |
uint32 | BuildAuraStateUpdateForTarget (Unit *target) const |
bool | HasAuraState (AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const |
void | UnsummonAllTotems (bool onDeath=false) |
Unit * | GetMagicHitRedirectTarget (Unit *victim, SpellInfo const *spellInfo) |
Unit * | GetMeleeHitRedirectTarget (Unit *victim, SpellInfo const *spellInfo=nullptr) |
int32 | SpellBaseDamageBonusDone (SpellSchoolMask schoolMask) |
int32 | SpellBaseDamageBonusTaken (SpellSchoolMask schoolMask, bool isDoT=false) |
float | SpellPctDamageModsDone (Unit *victim, SpellInfo const *spellProto, DamageEffectType damagetype) |
uint32 | SpellDamageBonusDone (Unit *victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint8 effIndex, float TotalMod=0.0f, uint32 stack=1) |
uint32 | SpellDamageBonusTaken (Unit *caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack=1) |
int32 | SpellBaseHealingBonusDone (SpellSchoolMask schoolMask) |
int32 | SpellBaseHealingBonusTaken (SpellSchoolMask schoolMask) |
float | SpellPctHealingModsDone (Unit *victim, SpellInfo const *spellProto, DamageEffectType damagetype) |
uint32 | SpellHealingBonusDone (Unit *victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint8 effIndex, float TotalMod=0.0f, uint32 stack=1) |
uint32 | SpellHealingBonusTaken (Unit *caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack=1) |
uint32 | MeleeDamageBonusDone (Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto=nullptr, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL) |
uint32 | MeleeDamageBonusTaken (Unit *attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const *spellProto=nullptr, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL) |
bool | isSpellBlocked (Unit *victim, SpellInfo const *spellProto, WeaponAttackType attackType=BASE_ATTACK) |
bool | isBlockCritical () |
float | SpellDoneCritChance (Unit const *, SpellInfo const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType, bool skipEffectCheck) const |
float | SpellTakenCritChance (Unit const *caster, SpellInfo const *spellProto, SpellSchoolMask schoolMask, float doneChance, WeaponAttackType attackType, bool skipEffectCheck) const |
void | SetLastManaUse (uint32 spellCastTime) |
bool | IsUnderLastManaUseEffect () const |
void | SetContestedPvP (Player *attackedPlayer=nullptr, bool lookForNearContestedGuards=true) |
uint32 | GetCastingTimeForBonus (SpellInfo const *spellProto, DamageEffectType damagetype, uint32 CastingTime) const |
float | CalculateDefaultCoefficient (SpellInfo const *spellInfo, DamageEffectType damagetype) const |
void | CastDelayedSpellWithPeriodicAmount (Unit *caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex=0) |
void | ApplySpellImmune (uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL) |
void | ApplySpellDispelImmunity (SpellInfo const *spellProto, DispelType type, bool apply) |
virtual bool | IsImmunedToSpell (SpellInfo const *spellInfo, Spell const *spell=nullptr) |
bool | IsImmunedToDamage (SpellSchoolMask meleeSchoolMask) const |
bool | IsImmunedToDamage (SpellInfo const *spellInfo) const |
bool | IsImmunedToDamage (Spell const *spell) const |
bool | IsImmunedToSchool (SpellSchoolMask meleeSchoolMask) const |
bool | IsImmunedToSchool (SpellInfo const *spellInfo) const |
bool | IsImmunedToSchool (Spell const *spell) const |
bool | IsImmunedToDamageOrSchool (SpellSchoolMask meleeSchoolMask) const |
bool | IsImmunedToDamageOrSchool (SpellInfo const *spellInfo) const |
virtual bool | IsImmunedToSpellEffect (SpellInfo const *spellInfo, uint32 index) const |
void | UpdateSpeed (UnitMoveType mtype, bool forced) |
float | GetSpeed (UnitMoveType mtype) const |
float | GetSpeedRate (UnitMoveType mtype) const |
void | SetSpeed (UnitMoveType mtype, float rate, bool forced=false) |
void | SetSpeedRate (UnitMoveType mtype, float rate) |
float | ApplyEffectModifiers (SpellInfo const *spellProto, uint8 effect_index, float value) const |
int32 | CalculateSpellDamage (Unit const *target, SpellInfo const *spellProto, uint8 effect_index, int32 const *basePoints=nullptr) const |
int32 | CalcSpellDuration (SpellInfo const *spellProto) |
int32 | ModSpellDuration (SpellInfo const *spellProto, Unit const *target, int32 duration, bool positive, uint32 effectMask) |
void | ModSpellCastTime (SpellInfo const *spellProto, int32 &castTime, Spell *spell=nullptr) |
float | CalculateLevelPenalty (SpellInfo const *spellProto) const |
void | addFollower (FollowerReference *pRef) |
void | removeFollower (FollowerReference *) |
MotionMaster * | GetMotionMaster () |
const MotionMaster * | GetMotionMaster () const |
virtual MovementGeneratorType | GetDefaultMovementType () const |
-------—End of Pet responses methods-------— More... | |
bool | IsStopped () const |
void | StopMoving () |
void | StopMovingOnCurrentPos () |
virtual void | PauseMovement (uint32 timer=0, uint8 slot=0) |
Disable the unit movement by clearing UNIT_STATE_MOVING and stopping the spline. More... | |
void | ResumeMovement (uint32 timer=0, uint8 slot=0) |
void | AddUnitMovementFlag (uint32 f) |
void | RemoveUnitMovementFlag (uint32 f) |
bool | HasUnitMovementFlag (uint32 f) const |
uint32 | GetUnitMovementFlags () const |
void | SetUnitMovementFlags (uint32 f) |
void | AddExtraUnitMovementFlag (uint16 f) |
void | RemoveExtraUnitMovementFlag (uint16 f) |
uint16 | HasExtraUnitMovementFlag (uint16 f) const |
uint16 | GetExtraUnitMovementFlags () const |
void | SetExtraUnitMovementFlags (uint16 f) |
void | SetControlled (bool apply, UnitState state, Unit *source=nullptr, bool isFear=false) |
void | DisableRotate (bool apply) |
void | DisableSpline () |
uint8 | GetComboPoints (Unit const *who=nullptr) const |
--------—Combo point system----------------— More... | |
uint8 | GetComboPoints (ObjectGuid const &guid) const |
Unit * | GetComboTarget () const |
ObjectGuid const | GetComboTargetGUID () const |
void | AddComboPoints (Unit *target, int8 count) |
void | AddComboPoints (int8 count) |
void | ClearComboPoints () |
void | SendComboPoints () |
void | AddComboPointHolder (Unit *unit) |
void | RemoveComboPointHolder (Unit *unit) |
void | ClearComboPointHolders () |
void | SendPetActionFeedback (uint8 msg) |
-------—Pet responses methods--------------— More... | |
void | SendPetTalk (uint32 pettalk) |
void | SendPetAIReaction (ObjectGuid guid) |
void | propagateSpeedChange () |
-------—End of Pet responses methods-------— More... | |
void | ClearAllReactives () |
void | StartReactiveTimer (ReactiveType reactive) |
void | UpdateReactives (uint32 p_time) |
void | UpdateAuraForGroup (uint8 slot) |
bool | CanProc () |
void | SetCantProc (bool apply) |
void | AddPetAura (PetAura const *petSpell) |
void | RemovePetAura (PetAura const *petSpell) |
void | CastPetAura (PetAura const *aura) |
bool | IsPetAura (Aura const *aura) |
uint32 | GetModelForForm (ShapeshiftForm form, uint32 spellId) const |
uint32 | GetModelForTotem (PlayerTotemType totemType) |
bool | CreateVehicleKit (uint32 id, uint32 creatureEntry) |
void | RemoveVehicleKit () |
Vehicle * | GetVehicleKit () const |
Vehicle * | GetVehicle () const |
bool | IsOnVehicle (Unit const *vehicle) const |
Unit * | GetVehicleBase () const |
Creature * | GetVehicleCreatureBase () const |
ObjectGuid | GetTransGUID () const override |
TransportBase * | GetDirectTransport () const |
Returns the transport this unit is on directly (if on vehicle and transport, return vehicle) More... | |
bool | HandleSpellClick (Unit *clicker, int8 seatId=-1) |
void | EnterVehicle (Unit *base, int8 seatId=-1) |
void | EnterVehicleUnattackable (Unit *base, int8 seatId=-1) |
void | ExitVehicle (Position const *exitPosition=nullptr) |
void | ChangeSeat (int8 seatId, bool next=true) |
void | _ExitVehicle (Position const *exitPosition=nullptr) |
void | _EnterVehicle (Vehicle *vehicle, int8 seatId, AuraApplication const *aurApp=nullptr) |
void | BuildMovementPacket (ByteBuffer *data) const |
virtual bool | CanSwim () const |
this method checks the current flag of a unit More... | |
bool | IsLevitating () const |
bool | IsWalking () const |
bool | isMoving () const |
bool | isTurning () const |
bool | IsHovering () const |
bool | isSwimming () const |
virtual bool | CanFly () const =0 |
bool | IsFlying () const |
bool | IsFalling () const |
float | GetHoverHeight () const |
virtual bool | CanEnterWater () const =0 |
void | RewardRage (uint32 damage, uint32 weaponSpeedHitFactor, bool attacker) |
virtual float | GetFollowAngle () const |
void | OutDebugInfo () const |
virtual bool | isBeingLoaded () const |
bool | IsDuringRemoveFromWorld () const |
Pet * | ToPet () |
Totem * | ToTotem () |
TempSummon * | ToTempSummon () |
const TempSummon * | ToTempSummon () const |
void | AddPointedBy (SafeUnitPointer *sup) |
void | RemovePointedBy (SafeUnitPointer *sup) |
void | ExecuteDelayedUnitRelocationEvent () |
void | ExecuteDelayedUnitAINotifyEvent () |
virtual bool | HasSpellCooldown (uint32) const |
virtual bool | HasSpellItemCooldown (uint32, uint32) const |
virtual void | AddSpellCooldown (uint32, uint32, uint32, bool needSendToClient=false, bool forceSendToSpectator=false) |
bool | CanApplyResilience () const |
void | PetSpellFail (SpellInfo const *spellInfo, Unit *target, uint32 result) |
int32 | CalculateAOEDamageReduction (int32 damage, uint32 schoolMask, Unit *caster) const |
ObjectGuid | GetTarget () const |
virtual void | SetTarget (ObjectGuid=ObjectGuid::Empty)=0 |
void | SetInstantCast (bool set) |
bool | CanInstantCast () const |
virtual void | Talk (std::string_view text, ChatMsg msgType, Language language, float textRange, WorldObject const *target) |
virtual void | Say (std::string_view text, Language language, WorldObject const *target=nullptr) |
virtual void | Yell (std::string_view text, Language language, WorldObject const *target=nullptr) |
virtual void | TextEmote (std::string_view text, WorldObject const *target=nullptr, bool isBossEmote=false) |
virtual void | Whisper (std::string_view text, Language language, Player *target, bool isBossWhisper=false) |
virtual void | Talk (uint32 textId, ChatMsg msgType, float textRange, WorldObject const *target) |
virtual void | Say (uint32 textId, WorldObject const *target=nullptr) |
virtual void | Yell (uint32 textId, WorldObject const *target=nullptr) |
virtual void | TextEmote (uint32 textId, WorldObject const *target=nullptr, bool isBossEmote=false) |
virtual void | Whisper (uint32 textId, Player *target, bool isBossWhisper=false) |
float | GetCollisionHeight () const override |
Return collision height sent to client. More... | |
float | GetCollisionWidth () const override |
this method gets the diameter of a Unit by DB if any value is defined, otherwise it gets the value by the DBC More... | |
float | GetCollisionRadius () const override |
this method gets the radius of a Unit by DB if any value is defined, otherwise it gets the value by the DBC More... | |
void | ProcessPositionDataChanged (PositionFullTerrainStatus const &data) override |
virtual void | ProcessTerrainStatusUpdate () |
bool | CanRestoreMana (SpellInfo const *spellInfo) const |
std::string | GetDebugInfo () const override |
uint32 | GetOldFactionId () const |
Public Member Functions inherited from WorldObject | |
~WorldObject () override | |
virtual void | Update (uint32) |
void | _Create (ObjectGuid::LowType guidlow, HighGuid guidhigh, uint32 phaseMask) |
void | AddToWorld () override |
void | RemoveFromWorld () override |
void | GetNearPoint2D (WorldObject const *searcher, float &x, float &y, float distance, float absAngle, Position const *startPos=nullptr) const |
void | GetNearPoint2D (float &x, float &y, float distance, float absAngle, Position const *startPos=nullptr) const |
void | GetNearPoint (WorldObject const *searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle, float controlZ=0, Position const *startPos=nullptr) const |
void | GetVoidClosePoint (float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0, float controlZ=0) const |
bool | GetClosePoint (float &x, float &y, float &z, float size, float distance2d=0, float angle=0, WorldObject const *forWho=nullptr, bool force=false) const |
void | MovePosition (Position &pos, float dist, float angle) |
Position | GetNearPosition (float dist, float angle) |
void | MovePositionToFirstCollision (Position &pos, float dist, float angle) |
Position | GetFirstCollisionPosition (float startX, float startY, float startZ, float destX, float destY) |
Position | GetFirstCollisionPosition (float destX, float destY, float destZ) |
Position | GetFirstCollisionPosition (float dist, float angle) |
Position | GetRandomNearPosition (float radius) |
void | GetContactPoint (WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const |
void | GetChargeContactPoint (WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const |
float | GetObjectSize () const |
virtual float | GetCombatReach () const |
void | UpdateGroundPositionZ (float x, float y, float &z) const |
void | UpdateAllowedPositionZ (float x, float y, float &z, float *groundZ=nullptr) const |
void | GetRandomPoint (const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const |
Position | GetRandomPoint (const Position &srcPos, float distance) const |
uint32 | GetInstanceId () const |
virtual void | SetPhaseMask (uint32 newPhaseMask, bool update) |
uint32 | GetPhaseMask () const |
bool | InSamePhase (WorldObject const *obj) const |
bool | InSamePhase (uint32 phasemask) const |
uint32 | GetZoneId () const |
uint32 | GetAreaId () const |
void | GetZoneAndAreaId (uint32 &zoneid, uint32 &areaid) const |
bool | IsOutdoors () const |
LiquidData const & | GetLiquidData () const |
InstanceScript * | GetInstanceScript () const |
std::string const & | GetName () const |
void | SetName (std::string const &newname) |
virtual std::string const & | GetNameForLocaleIdx (LocaleConstant) const |
float | GetDistance (WorldObject const *obj) const |
float | GetDistance (const Position &pos) const |
float | GetDistance (float x, float y, float z) const |
float | GetDistance2d (WorldObject const *obj) const |
float | GetDistance2d (float x, float y) const |
float | GetDistanceZ (WorldObject const *obj) const |
bool | IsSelfOrInSameMap (WorldObject const *obj) const |
bool | IsInMap (WorldObject const *obj) const |
bool | IsWithinDist3d (float x, float y, float z, float dist) const |
bool | IsWithinDist3d (const Position *pos, float dist) const |
bool | IsWithinDist2d (float x, float y, float dist) const |
bool | IsWithinDist2d (const Position *pos, float dist) const |
bool | IsWithinDist (WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const |
bool | IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const |
bool | IsWithinLOS (float x, float y, float z, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS) const |
bool | IsWithinLOSInMap (WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const |
Position | GetHitSpherePointFor (Position const &dest, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const |
void | GetHitSpherePointFor (Position const &dest, float &x, float &y, float &z, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const |
bool | GetDistanceOrder (WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const |
bool | IsInRange (WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const |
bool | IsInRange2d (float x, float y, float minRange, float maxRange) const |
bool | IsInRange3d (float x, float y, float z, float minRange, float maxRange) const |
bool | isInFront (WorldObject const *target, float arc=M_PI) const |
bool | isInBack (WorldObject const *target, float arc=M_PI) const |
bool | IsInBetween (WorldObject const *obj1, WorldObject const *obj2, float size=0) const |
virtual void | CleanupsBeforeDelete (bool finalCleanup=true) |
virtual void | SendMessageToSet (WorldPacket const *data, bool self) const |
virtual void | SendMessageToSetInRange (WorldPacket const *data, float dist, bool self) const |
virtual void | SendMessageToSet (WorldPacket const *data, Player const *skipped_rcvr) const |
virtual uint8 | getLevelForTarget (WorldObject const *) const |
void | PlayDistanceSound (uint32 sound_id, Player *target=nullptr) |
void | PlayDirectSound (uint32 sound_id, Player *target=nullptr) |
void | PlayRadiusSound (uint32 sound_id, float radius) |
void | PlayDirectMusic (uint32 music_id, Player *target=nullptr) |
void | PlayRadiusMusic (uint32 music_id, float radius) |
void | SendObjectDeSpawnAnim (ObjectGuid guid) |
virtual void | SaveRespawnTime () |
void | AddObjectToRemoveList () |
float | GetGridActivationRange () const |
float | GetVisibilityRange () const |
virtual float | GetSightRange (WorldObject const *target=nullptr) const |
bool | CanSeeOrDetect (WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false, bool checkAlert=false) const |
void | SendPlayMusic (uint32 Music, bool OnlySelf) |
virtual void | SetMap (Map *map) |
virtual void | ResetMap () |
Map * | GetMap () const |
Map * | FindMap () const |
void | SetZoneScript () |
void | ClearZoneScript () |
ZoneScript * | GetZoneScript () const |
TempSummon * | SummonCreature (uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const |
TempSummon * | SummonCreature (uint32 id, float x, float y, float z, float ang=0, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) |
GameObject * | SummonGameObject (uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN) |
Creature * | SummonTrigger (float x, float y, float z, float ang, uint32 dur, bool setLevel=false, CreatureAI *(*GetAI)(Creature *)=nullptr) |
void | SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr) |
Creature * | FindNearestCreature (uint32 entry, float range, bool alive=true) const |
GameObject * | FindNearestGameObject (uint32 entry, float range, bool onlySpawned=false) const |
GameObject * | FindNearestGameObjectOfType (GameobjectTypes type, float range) const |
Player * | SelectNearestPlayer (float distance=0) const |
void | GetGameObjectListWithEntryInGrid (std::list< GameObject * > &lList, uint32 uiEntry, float fMaxSearchRange) const |
void | GetCreatureListWithEntryInGrid (std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const |
void | GetDeadCreatureListInGrid (std::list< Creature * > &lList, float maxSearchRange, bool alive=false) const |
void | DestroyForNearbyPlayers () |
virtual void | UpdateObjectVisibility (bool forced=true, bool fromUpdate=false) |
void | BuildUpdate (UpdateDataMapType &data_map, UpdatePlayerSet &player_set) override |
void | GetCreaturesWithEntryInRange (std::list< Creature * > &creatureList, float radius, uint32 entry) |
void | SetPositionDataUpdate () |
void | UpdatePositionData () |
void | AddToObjectUpdate () override |
void | RemoveFromObjectUpdate () override |
void | AddToNotify (uint16 f) |
void | RemoveFromNotify (uint16 f) |
bool | isNeedNotify (uint16 f) const |
uint16 | GetNotifyFlags () const |
bool | NotifyExecuted (uint16 f) const |
void | SetNotified (uint16 f) |
void | ResetAllNotifies () |
bool | isActiveObject () const |
void | setActive (bool isActiveObject) |
bool | IsFarVisible () const |
bool | IsVisibilityOverridden () const |
void | SetVisibilityDistanceOverride (VisibilityDistanceType type) |
void | SetWorldObject (bool apply) |
bool | IsPermanentWorldObject () const |
bool | IsWorldObject () const |
bool | IsInWintergrasp () const |
Transport * | GetTransport () const |
float | GetTransOffsetX () const |
float | GetTransOffsetY () const |
float | GetTransOffsetZ () const |
float | GetTransOffsetO () const |
uint32 | GetTransTime () const |
int8 | GetTransSeat () const |
virtual ObjectGuid | GetTransGUID () const |
void | SetTransport (Transport *t) |
virtual float | GetStationaryX () const |
virtual float | GetStationaryY () const |
virtual float | GetStationaryZ () const |
virtual float | GetStationaryO () const |
float | GetMapWaterOrGroundLevel (float x, float y, float z, float *ground=nullptr) const |
float | GetMapHeight (float x, float y, float z, bool vmap=true, float distanceToSearch=50.0f) const |
float | GetFloorZ () const |
float | GetMinHeightInWater () const |
Get the minimum height of a object that should be in water to start floating/swim. More... | |
virtual float | GetCollisionHeight () const |
virtual float | GetCollisionWidth () const |
virtual float | GetCollisionRadius () const |
void | AddAllowedLooter (ObjectGuid guid) |
void | ResetAllowedLooters () |
void | SetAllowedLooters (GuidUnorderedSet const looters) |
bool | HasAllowedLooter (ObjectGuid guid) const |
GuidUnorderedSet const & | GetAllowedLooters () const |
void | RemoveAllowedLooter (ObjectGuid guid) |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Object | |
virtual | ~Object () |
bool | IsInWorld () const |
virtual void | AddToWorld () |
virtual void | RemoveFromWorld () |
ObjectGuid | GetGUID () const |
PackedGuid const & | GetPackGUID () const |
uint32 | GetEntry () const |
void | SetEntry (uint32 entry) |
float | GetObjectScale () const |
virtual void | SetObjectScale (float scale) |
virtual uint32 | GetDynamicFlags () const |
bool | HasDynamicFlag (uint32 flag) const |
virtual void | SetDynamicFlag (uint32 flag) |
virtual void | RemoveDynamicFlag (uint32 flag) |
virtual void | ReplaceAllDynamicFlags (uint32 flag) |
TypeID | GetTypeId () const |
bool | isType (uint16 mask) const |
virtual void | BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) |
void | SendUpdateToPlayer (Player *player) |
void | BuildValuesUpdateBlockForPlayer (UpdateData *data, Player *target) |
void | BuildOutOfRangeUpdateBlock (UpdateData *data) const |
void | BuildMovementUpdateBlock (UpdateData *data, uint32 flags=0) const |
virtual void | DestroyForPlayer (Player *target, bool onDeath=false) const |
int32 | GetInt32Value (uint16 index) const |
uint32 | GetUInt32Value (uint16 index) const |
uint64 | GetUInt64Value (uint16 index) const |
float | GetFloatValue (uint16 index) const |
uint8 | GetByteValue (uint16 index, uint8 offset) const |
uint16 | GetUInt16Value (uint16 index, uint8 offset) const |
ObjectGuid | GetGuidValue (uint16 index) const |
void | SetInt32Value (uint16 index, int32 value) |
void | SetUInt32Value (uint16 index, uint32 value) |
void | UpdateUInt32Value (uint16 index, uint32 value) |
void | SetUInt64Value (uint16 index, uint64 value) |
void | SetFloatValue (uint16 index, float value) |
void | SetByteValue (uint16 index, uint8 offset, uint8 value) |
void | SetUInt16Value (uint16 index, uint8 offset, uint16 value) |
void | SetInt16Value (uint16 index, uint8 offset, int16 value) |
void | SetGuidValue (uint16 index, ObjectGuid value) |
void | SetStatFloatValue (uint16 index, float value) |
void | SetStatInt32Value (uint16 index, int32 value) |
bool | AddGuidValue (uint16 index, ObjectGuid value) |
bool | RemoveGuidValue (uint16 index, ObjectGuid value) |
void | ApplyModUInt32Value (uint16 index, int32 val, bool apply) |
void | ApplyModInt32Value (uint16 index, int32 val, bool apply) |
void | ApplyModUInt64Value (uint16 index, int32 val, bool apply) |
void | ApplyModPositiveFloatValue (uint16 index, float val, bool apply) |
void | ApplyModSignedFloatValue (uint16 index, float val, bool apply) |
void | ApplyPercentModFloatValue (uint16 index, float val, bool apply) |
void | SetFlag (uint16 index, uint32 newFlag) |
void | RemoveFlag (uint16 index, uint32 oldFlag) |
void | ToggleFlag (uint16 index, uint32 flag) |
bool | HasFlag (uint16 index, uint32 flag) const |
void | ApplyModFlag (uint16 index, uint32 flag, bool apply) |
void | SetByteFlag (uint16 index, uint8 offset, uint8 newFlag) |
void | RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag) |
bool | HasByteFlag (uint16 index, uint8 offset, uint8 flag) const |
void | SetFlag64 (uint16 index, uint64 newFlag) |
void | RemoveFlag64 (uint16 index, uint64 oldFlag) |
void | ToggleFlag64 (uint16 index, uint64 flag) |
bool | HasFlag64 (uint16 index, uint64 flag) const |
void | ApplyModFlag64 (uint16 index, uint64 flag, bool apply) |
void | ClearUpdateMask (bool remove) |
uint16 | GetValuesCount () const |
virtual bool | hasQuest (uint32) const |
virtual bool | hasInvolvedQuest (uint32) const |
virtual void | BuildUpdate (UpdateDataMapType &, UpdatePlayerSet &) |
void | BuildFieldsUpdate (Player *, UpdateDataMapType &) |
void | SetFieldNotifyFlag (uint16 flag) |
void | RemoveFieldNotifyFlag (uint16 flag) |
void | ForceValuesUpdateAtIndex (uint32) |
bool | IsPlayer () const |
Player * | ToPlayer () |
Player const * | ToPlayer () const |
bool | IsCreature () const |
Creature * | ToCreature () |
Creature const * | ToCreature () const |
bool | IsUnit () const |
Unit * | ToUnit () |
Unit const * | ToUnit () const |
bool | IsGameObject () const |
GameObject * | ToGameObject () |
GameObject const * | ToGameObject () const |
bool | IsCorpse () const |
Corpse * | ToCorpse () |
Corpse const * | ToCorpse () const |
bool | IsDynamicObject () const |
DynamicObject * | ToDynObject () |
DynamicObject const * | ToDynObject () const |
bool | IsItem () const |
virtual std::string | GetDebugInfo () const |
Public Member Functions inherited from WorldLocation | |
WorldLocation (uint32 _mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f) | |
WorldLocation (uint32 mapId, Position const &position) | |
void | WorldRelocate (const WorldLocation &loc) |
void | WorldRelocate (uint32 mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f) |
void | SetMapId (uint32 mapId) |
uint32 | GetMapId () const |
void | GetWorldLocation (uint32 &mapId, float &x, float &y) const |
void | GetWorldLocation (uint32 &mapId, float &x, float &y, float &z) const |
void | GetWorldLocation (uint32 &mapId, float &x, float &y, float &z, float &o) const |
void | GetWorldLocation (WorldLocation *location) const |
WorldLocation | GetWorldLocation () const |
std::string | GetDebugInfo () const |
Public Member Functions inherited from Position | |
Position (float x=0, float y=0, float z=0, float o=0) | |
Position (Position const &loc) | |
Position (Position &&)=default | |
Position & | operator= (const Position &)=default |
Position & | operator= (Position &&)=default |
bool | operator== (Position const &a) const |
bool | operator!= (Position const &a) |
operator G3D::Vector3 () const | |
void | Relocate (float x, float y) |
void | Relocate (float x, float y, float z) |
void | Relocate (float x, float y, float z, float orientation) |
void | Relocate (const Position &pos) |
void | Relocate (const Position *pos) |
void | RelocatePolarOffset (float angle, float dist, float z=0.0f) |
void | RelocateOffset (const Position &offset) |
void | SetOrientation (float orientation) |
float | GetPositionX () const |
float | GetPositionY () const |
float | GetPositionZ () const |
float | GetOrientation () const |
void | GetPosition (float &x, float &y) const |
void | GetPosition (float &x, float &y, float &z) const |
void | GetPosition (float &x, float &y, float &z, float &o) const |
Position | GetPosition () const |
Position::PositionXYZStreamer | PositionXYZStream () |
Position::PositionXYZOStreamer | PositionXYZOStream () |
bool | IsPositionValid () const |
float | GetExactDist2dSq (const float x, const float y) const |
float | GetExactDist2dSq (Position const &pos) const |
float | GetExactDist2dSq (Position const *pos) const |
float | GetExactDist2d (const float x, const float y) const |
float | GetExactDist2d (Position const &pos) const |
float | GetExactDist2d (Position const *pos) const |
float | GetExactDistSq (float x, float y, float z) const |
float | GetExactDistSq (Position const &pos) const |
float | GetExactDistSq (Position const *pos) const |
float | GetExactDist (float x, float y, float z) const |
float | GetExactDist (Position const &pos) const |
float | GetExactDist (Position const *pos) const |
void | GetPositionOffsetTo (const Position &endPos, Position &retOffset) const |
Position | GetPositionWithOffset (Position const &offset) const |
float | GetAngle (const Position *pos) const |
float | GetAngle (float x, float y) const |
float | GetAbsoluteAngle (float x, float y) const |
float | GetAbsoluteAngle (Position const &pos) const |
float | GetAbsoluteAngle (Position const *pos) const |
float | GetRelativeAngle (const Position *pos) const |
float | GetRelativeAngle (float x, float y) const |
float | ToAbsoluteAngle (float relAngle) const |
void | GetSinCos (float x, float y, float &vsin, float &vcos) const |
bool | IsInDist2d (float x, float y, float dist) const |
bool | IsInDist2d (const Position *pos, float dist) const |
bool | IsInDist (float x, float y, float z, float dist) const |
bool | IsInDist (const Position *pos, float dist) const |
bool | IsWithinBox (const Position ¢er, float xradius, float yradius, float zradius) const |
bool | HasInArc (float arcangle, const Position *pos, float targetRadius=0.0f) const |
bool | HasInLine (Position const *pos, float width) const |
std::string | ToString () const |
Public Member Functions inherited from GridObject< Creature > | |
bool | IsInGrid () const |
void | AddToGrid (GridRefMgr< Creature > &m) |
void | RemoveFromGrid () |
Static Public Member Functions | |
static std::pair< PetStable::PetInfo const *, PetSaveMode > | GetLoadPetInfo (PetStable const &stable, uint32 petEntry, uint32 petnumber, bool current) |
static void | DeleteFromDB (ObjectGuid::LowType guidlow) |
static void | resetTalentsForAllPetsOf (Player *owner, Pet *online_pet=nullptr) |
Static Public Member Functions inherited from Creature | |
static float | _GetDamageMod (int32 Rank) |
Static Public Member Functions inherited from Unit | |
static float | GetEffectiveResistChance (Unit const *owner, SpellSchoolMask schoolMask, Unit const *victim) |
static void | DealDamageMods (Unit const *victim, uint32 &damage, uint32 *absorb) |
static uint32 | DealDamage (Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false, Spell const *spell=nullptr) |
static void | Kill (Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr) |
static int32 | DealHeal (Unit *healer, Unit *victim, uint32 addhealth) |
static void | ProcDamageAndSpell (Unit *actor, Unit *victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType=BASE_ATTACK, SpellInfo const *procSpellInfo=nullptr, SpellInfo const *procAura=nullptr, int8 procAuraEffectIndex=-1, Spell const *procSpell=nullptr, DamageInfo *damageInfo=nullptr, HealInfo *healInfo=nullptr, uint32 procPhase=2) |
static void | ApplyResilience (Unit const *victim, float *crit, int32 *damage, bool isCrit, CombatRating type) |
static uint32 | SpellCriticalDamageBonus (Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit const *victim) |
static uint32 | SpellCriticalHealingBonus (Unit const *caster, SpellInfo const *spellProto, uint32 damage, Unit const *victim) |
static bool | IsDamageReducedByArmor (SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo=nullptr, uint8 effIndex=MAX_SPELL_EFFECTS) |
static uint32 | CalcArmorReducedDamage (Unit const *attacker, Unit const *victim, const uint32 damage, SpellInfo const *spellInfo, uint8 attackerLevel=0, WeaponAttackType attackType=MAX_ATTACK) |
static void | CalcAbsorbResist (DamageInfo &dmgInfo, bool Splited=false) |
static void | CalcHealAbsorb (HealInfo &healInfo) |
static void | HandleSafeUnitPointersOnDelete (Unit *thisUnit) |
Static Public Member Functions inherited from Object | |
static ObjectGuid | GetGUID (Object const *o) |
Static Public Member Functions inherited from Position | |
static float | NormalizeOrientation (float o) |
Private Member Functions | |
void | SaveToDB (uint32, uint8, uint32) override |
void | DeleteFromDB () override |
Additional Inherited Members | |
Public Types inherited from Unit | |
typedef std::unordered_set< Unit * > | AttackerSet |
typedef std::set< Unit * > | ControlSet |
typedef std::multimap< uint32, Aura * > | AuraMap |
typedef std::pair< AuraMap::const_iterator, AuraMap::const_iterator > | AuraMapBounds |
typedef std::pair< AuraMap::iterator, AuraMap::iterator > | AuraMapBoundsNonConst |
typedef std::multimap< uint32, AuraApplication * > | AuraApplicationMap |
typedef std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > | AuraApplicationMapBounds |
typedef std::pair< AuraApplicationMap::iterator, AuraApplicationMap::iterator > | AuraApplicationMapBoundsNonConst |
typedef std::multimap< AuraStateType, AuraApplication * > | AuraStateAurasMap |
typedef std::pair< AuraStateAurasMap::const_iterator, AuraStateAurasMap::const_iterator > | AuraStateAurasMapBounds |
typedef std::list< AuraEffect * > | AuraEffectList |
typedef std::list< Aura * > | AuraList |
typedef std::list< AuraApplication * > | AuraApplicationList |
typedef std::list< DiminishingReturn > | Diminishing |
typedef GuidUnorderedSet | ComboPointHolderSet |
typedef std::map< uint8, AuraApplication * > | VisibleAuraMap |
typedef std::set< PetAura const * > | PetAuraSet |
Static Public Attributes inherited from Creature | |
static constexpr uint32 | MOVE_CIRCLE_CHECK_INTERVAL = 3000 |
static constexpr uint32 | MOVE_BACKWARDS_CHECK_INTERVAL = 2000 |
Protected Types inherited from Unit | |
typedef std::list< DynamicObject * > | DynObjectList |
typedef GuidList | GameObjectList |
typedef std::map< ObjectGuid, float > | CharmThreatMap |
Protected Member Functions inherited from Creature | |
bool | CreateFromProto (ObjectGuid::LowType guidlow, uint32 Entry, uint32 vehId, const CreatureData *data=nullptr) |
bool | InitEntry (uint32 entry, const CreatureData *data=nullptr) |
void | RegenerateHealth () |
void | Regenerate (Powers power) |
bool | IsInvisibleDueToDespawn () const override |
bool | CanAlwaysSee (WorldObject const *obj) const override |
bool | IsAlwaysDetectableFor (WorldObject const *seer) const override |
Protected Member Functions inherited from Unit | |
Unit (bool isWorldObject) | |
void | BuildValuesUpdate (uint8 updateType, ByteBuffer *data, Player *target) override |
void | _UpdateSpells (uint32 time) |
void | _DeleteRemovedAuras () |
void | _UpdateAutoRepeatSpell () |
bool | IsAlwaysVisibleFor (WorldObject const *seer) const override |
bool | IsAlwaysDetectableFor (WorldObject const *seer) const override |
void | SetFeared (bool apply, Unit *fearedBy=nullptr, bool isFear=false) |
void | SetConfused (bool apply) |
void | SetStunned (bool apply) |
void | SetRooted (bool apply, bool isStun=false) |
Protected Member Functions inherited from WorldObject | |
WorldObject (bool isWorldObject) | |
virtual void | ProcessPositionDataChanged (PositionFullTerrainStatus const &data) |
void | SetLocationMapId (uint32 _mapId) |
void | SetLocationInstanceId (uint32 _instanceId) |
virtual bool | IsNeverVisible () const |
virtual bool | IsAlwaysVisibleFor (WorldObject const *) const |
virtual bool | IsInvisibleDueToDespawn () const |
virtual bool | IsAlwaysDetectableFor (WorldObject const *) const |
Protected Member Functions inherited from Object | |
Object () | |
void | _InitValues () |
void | _Create (ObjectGuid::LowType guidlow, uint32 entry, HighGuid guidhigh) |
std::string | _ConcatFields (uint16 startIndex, uint16 size) const |
bool | _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count) |
uint32 | GetUpdateFieldData (Player const *target, uint32 *&flags) const |
void | BuildMovementUpdate (ByteBuffer *data, uint16 flags) const |
virtual void | BuildValuesUpdate (uint8 updateType, ByteBuffer *data, Player *target) |
virtual void | AddToObjectUpdate ()=0 |
virtual void | RemoveFromObjectUpdate ()=0 |
void | AddToObjectUpdateIfNeeded () |
Protected Member Functions inherited from MovableMapObject | |
MovableMapObject ()=default | |
Static Protected Member Functions inherited from Creature | |
static float | _GetHealthMod (int32 Rank) |
|
explicit |
References ASSERT, HUNTER_PET, Unit::InitCharmInfo(), Object::IsPlayer(), WorldObject::m_name, m_owner, Unit::m_unitTypeMask, UNIT_MASK_CONTROLABLE_GUARDIAN, UNIT_MASK_HUNTER_PET, and UNIT_MASK_PET.
|
overridedefault |
void Pet::_LoadAuras | ( | PreparedQueryResult | result, |
uint32 | timediff | ||
) |
References Field::Get(), SpellInfo::GetAuraRankForLevel(), Object::GetGUID(), Unit::GetLevel(), IN_MILLISECONDS, LOG_DEBUG, LOG_ERROR, SPELL_ATTR4_AURA_EXPIRES_OFFLINE, sSpellMgr, Position::ToString(), and Aura::TryCreate().
void Pet::_LoadSpellCooldowns | ( | PreparedQueryResult | result | ) |
References Creature::_AddCreatureSpellCooldown(), Unit::BuildCooldownPacket(), Field::Get(), GameTime::GetGameTime(), GetOwner(), CharmInfo::GetPetNumber(), Player::GetSession(), IN_MILLISECONDS, LOG_DEBUG, LOG_ERROR, Unit::m_charmInfo, Creature::m_CreatureSpellCooldowns, WorldSession::SendPacket(), SPELL_COOLDOWN_FLAG_NONE, and sSpellMgr.
void Pet::_LoadSpells | ( | PreparedQueryResult | result | ) |
References addSpell(), and PETSPELL_UNCHANGED.
void Pet::_SaveAuras | ( | CharacterDatabaseTransaction | trans | ) |
References AURA_INTERRUPT_FLAG_CHANGE_MAP, SpellInfo::AuraInterruptFlags, AuraEffect::CanBeRecalculated(), CHAR_DEL_PET_AURAS, CHAR_INS_PET_AURA, CharacterDatabase, ObjectGuid::Empty, AuraEffect::GetAmount(), AuraEffect::GetBaseAmount(), Aura::GetDuration(), Aura::GetEffect(), Object::GetGUID(), CharmInfo::GetPetNumber(), ObjectGuid::GetRawValue(), Aura::GetSpellInfo(), SpellInfo::HasAttribute(), SpellInfo::HasAura(), IN_MILLISECONDS, Aura::IsPermanent(), Unit::IsPetAura(), SpellInfo::IsPositive(), Unit::m_charmInfo, Unit::m_ownedAuras, MAX_SPELL_EFFECTS, PreparedStatementBase::SetData(), SPELL_ATTR0_NO_AURA_CANCEL, SPELL_ATTR1_NO_AURA_ICON, and SPELL_AURA_TRANSFORM.
Referenced by SavePetToDB().
void Pet::_SaveSpellCooldowns | ( | CharacterDatabaseTransaction | trans | ) |
References CHAR_DEL_PET_SPELL_COOLDOWNS, CHAR_INS_PET_SPELL_COOLDOWN, CharacterDatabase, GameTime::GetGameTime(), GameTime::GetGameTimeMS(), CharmInfo::GetPetNumber(), IN_MILLISECONDS, infinityCooldownDelayCheck, Unit::m_charmInfo, Creature::m_CreatureSpellCooldowns, and PreparedStatementBase::SetData().
Referenced by SavePetToDB().
void Pet::_SaveSpells | ( | CharacterDatabaseTransaction | trans | ) |
References CHAR_DEL_PET_SPELL_BY_SPELL, CHAR_INS_PET_SPELL, CharacterDatabase, CharmInfo::GetPetNumber(), Unit::m_charmInfo, m_spells, PETSPELL_CHANGED, PETSPELL_FAMILY, PETSPELL_NEW, PETSPELL_REMOVED, PETSPELL_UNCHANGED, and PreparedStatementBase::SetData().
Referenced by SavePetToDB().
bool Pet::addSpell | ( | uint32 | spellId, |
ActiveStates | active = ACT_DECIDE , |
||
PetSpellState | state = PETSPELL_NEW , |
||
PetSpellType | type = PETSPELL_NORMAL |
||
) |
References ACT_DECIDE, ACT_DISABLED, ACT_ENABLED, ACT_PASSIVE, PetSpell::active, CharmInfo::AddSpellToActionBar(), AURA_EFFECT_HANDLE_REAL, AURA_STATE_HEALTH_ABOVE_75_PERCENT, AURA_STATE_HEALTHLESS_20_PERCENT, AURA_STATE_HEALTHLESS_35_PERCENT, Unit::CastSpell(), CHAR_DEL_INVALID_PET_SPELL, CharacterDatabase, Unit::GetAura(), Object::GetGUID(), Unit::GetLevel(), GetMaxTalentPointsForLevel(), GetTalentSpellCost(), GetTalentSpellPos(), Unit::HasAuraState(), HasSpell(), SpellInfo::IsAutocastable(), SpellInfo::IsDifferentRankOf(), SpellInfo::IsHighRankOf(), SpellInfo::IsPassive(), SpellInfo::IsRanked(), LOG_ERROR, Unit::m_charmInfo, m_spells, m_usedTalentCount, PETSPELL_CHANGED, PETSPELL_REMOVED, PETSPELL_UNCHANGED, removeSpell(), PreparedStatementBase::SetData(), SetFreeTalentPoints(), sSpellMgr, sTalentStore, PetSpell::state, ToggleAutocast(), PetSpell::type, and unlearnSpell().
Referenced by _LoadSpells(), LearnPetPassives(), and learnSpell().
|
overridevirtual |
Reimplemented from Creature.
References Unit::AddAura(), Unit::AddToWorld(), Creature::AIM_Initialize(), CLASS_CONTEXT_PET, CLASS_WARLOCK, COMMAND_FOLLOW, WorldObject::FindMap(), Unit::GetCharmInfo(), Object::GetGUID(), WorldObject::GetInstanceScript(), WorldObject::GetMap(), WorldLocation::GetMapId(), Map::GetObjectsStore(), GetOwner(), Unit::GetOwnerGUID(), getPetType(), Object::GetUInt32Value(), Unit::HasAura(), TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Insert(), Object::IsInWorld(), Object::IsPlayer(), Creature::Motion_Initialize(), CharmInfo::SetIsAtStay(), CharmInfo::SetIsCommandAttack(), CharmInfo::SetIsCommandFollow(), CharmInfo::SetIsFollowing(), CharmInfo::SetIsReturning(), SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT, sScriptMgr, sSpellMgr, SUMMON_PET, Object::ToPlayer(), and UNIT_CREATED_BY_SPELL.
void Pet::CastPetAuras | ( | bool | current | ) |
References Unit::CastPetAura(), GetOwner(), IsPermanentPetFor(), Object::IsPlayer(), PetAura::IsRemovedOnChangePet(), Unit::m_petAuras, Unit::RemovePetAura(), and Object::ToPlayer().
Referenced by InitPetCreateSpells(), and setDeathState().
void Pet::CastWhenWillAvailable | ( | uint32 | spellid, |
Unit * | spellTarget, | ||
ObjectGuid | oldTarget, | ||
bool | spellIsPositive = false |
||
) |
References ObjectGuid::IsEmpty(), m_tempoldTarget, m_tempspell, m_tempspellIsPositive, and m_tempspellTarget.
Referenced by WorldSession::HandlePetActionHelper().
void Pet::CleanupActionBar | ( | ) |
References ACT_ENABLED, ACT_PASSIVE, CharmInfo::GetActionBarEntry(), HasSpell(), Unit::m_charmInfo, MAX_UNIT_ACTION_BAR_INDEX, CharmInfo::SetActionBar(), sSpellMgr, and ToggleAutocast().
Referenced by LoadPetFromDB().
void Pet::ClearCastWhenWillAvailable | ( | ) |
References ObjectGuid::Empty, m_tempoldTarget, m_tempspell, m_tempspellIsPositive, and m_tempspellTarget.
Referenced by WorldSession::HandlePetActionHelper().
bool Pet::Create | ( | ObjectGuid::LowType | guidlow, |
Map * | map, | ||
uint32 | phaseMask, | ||
uint32 | Entry, | ||
uint32 | pet_number | ||
) |
References Object::_Create(), ASSERT, Entry, Creature::InitEntry(), Creature::m_originalEntry, Creature::m_spawnId, WorldObject::SetMap(), Unit::SetPhaseMask(), Unit::SetSheath(), Unit::SetUnitFlag2(), SHEATH_STATE_MELEE, and UNIT_FLAG2_REGENERATE_POWER.
Referenced by CreateBaseAtTamed(), LoadPetFromDB(), and Player::SummonPet().
bool Pet::CreateBaseAtCreature | ( | Creature * | creature | ) |
References ASSERT, CreateBaseAtTamed(), CreatureTemplate::family, Creature::GetCreatureTemplate(), Unit::GetDisplayId(), Object::GetGUID(), WorldObject::GetMap(), Creature::GetNameForLocaleIdx(), Position::GetOrientation(), WorldObject::GetPhaseMask(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Position::IsPositionValid(), LOG_ERROR, Position::Relocate(), sCreatureFamilyStore, SetDisplayId(), WorldObject::SetName(), sObjectMgr, sWorld, Position::ToString(), and WorldObject::UpdatePositionData().
Referenced by Unit::CreateTamedPetFrom().
bool Pet::CreateBaseAtCreatureInfo | ( | CreatureTemplate const * | cinfo, |
Unit * | owner | ||
) |
References CreateBaseAtTamed(), CreatureTemplate::family, WorldObject::GetMap(), Position::GetOrientation(), WorldObject::GetPhaseMask(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Position::Relocate(), sCreatureFamilyStore, WorldObject::SetName(), sWorld, and WorldObject::UpdatePositionData().
Referenced by Unit::CreateTamedPetFrom().
bool Pet::CreateBaseAtTamed | ( | CreatureTemplate const * | cinfo, |
Map * | map, | ||
uint32 | phaseMask | ||
) |
References Create(), CREATURE_TYPE_BEAST, CreatureTemplate::Entry, Map::GenerateLowGuid(), Unit::GetCreatePowers(), Unit::GetLevel(), LOG_DEBUG, POWER_FOCUS, POWER_HAPPINESS, RATE_XP_PET_NEXT_LEVEL, Unit::ReplaceAllNpcFlags(), Object::SetByteFlag(), Unit::SetMaxPower(), Unit::SetPower(), Unit::setPowerType(), Unit::SetSheath(), Unit::SetUInt32Value(), SHEATH_STATE_MELEE, sObjectMgr, sWorld, CreatureTemplate::type, UNIT_CAN_BE_ABANDONED, UNIT_CAN_BE_RENAMED, UNIT_FIELD_BYTES_0, UNIT_FIELD_BYTES_2, UNIT_FIELD_PET_NAME_TIMESTAMP, UNIT_FIELD_PETEXPERIENCE, UNIT_FIELD_PETNEXTLEVELEXP, and UNIT_NPC_FLAG_NONE.
Referenced by CreateBaseAtCreature(), and CreateBaseAtCreatureInfo().
|
inlineoverrideprivatevirtual |
Reimplemented from Creature.
References ABORT.
Referenced by Player::DeleteFromDB(), and SavePetToDB().
|
static |
References CHAR_DEL_CHAR_PET_BY_ID, CHAR_DEL_CHAR_PET_DECLINEDNAME, CHAR_DEL_PET_AURAS, CHAR_DEL_PET_SPELL_COOLDOWNS, CHAR_DEL_PET_SPELLS, CharacterDatabase, and PreparedStatementBase::SetData().
void Pet::FillPetInfo | ( | PetStable::PetInfo * | petInfo | ) | const |
References PetStable::PetInfo::ActionBar, PetStable::PetInfo::CreatedBySpellId, PetStable::PetInfo::CreatureId, PetStable::PetInfo::DisplayId, PetStable::PetInfo::Experience, GenerateActionBarData(), Object::GetEntry(), GameTime::GetGameTime(), Unit::GetHealth(), Unit::GetLevel(), WorldObject::GetName(), Unit::GetNativeDisplayId(), CharmInfo::GetPetNumber(), getPetType(), Unit::GetPower(), Creature::GetReactState(), Object::GetUInt32Value(), PetStable::PetInfo::Happiness, Object::HasByteFlag(), PetStable::PetInfo::Health, PetStable::PetInfo::LastSaveTime, PetStable::PetInfo::Level, Unit::m_charmInfo, PetStable::PetInfo::Mana, PetStable::PetInfo::Name, PetStable::PetInfo::PetNumber, POWER_HAPPINESS, POWER_MANA, PetStable::PetInfo::ReactState, PetStable::PetInfo::Type, UNIT_CAN_BE_RENAMED, UNIT_CREATED_BY_SPELL, UNIT_FIELD_BYTES_2, UNIT_FIELD_PETEXPERIENCE, and PetStable::PetInfo::WasRenamed.
Referenced by Unit::InitTamedPet(), SavePetToDB(), and Player::SummonPet().
std::string Pet::GenerateActionBarData | ( | ) | const |
References ACTION_BAR_INDEX_END, ACTION_BAR_INDEX_START, UnitActionBarEntry::GetAction(), CharmInfo::GetActionBarEntry(), UnitActionBarEntry::GetType(), and Unit::m_charmInfo.
Referenced by FillPetInfo(), and SavePetToDB().
|
inline |
References Unit::GetLevel().
Referenced by Spell::CheckCast(), and Spell::EffectFeedPet().
|
overridevirtual |
Reimplemented from Guardian.
References Guardian::GetDebugInfo(), CharmInfo::GetPetNumber(), getPetType(), and Unit::m_charmInfo.
|
inline |
References m_declinedname.
|
inline |
|
inline |
References Object::GetByteValue(), and UNIT_FIELD_BYTES_1.
Referenced by Player::BuildPetTalentsInfoData(), and Player::LearnPetTalent().
HappinessState Pet::GetHappinessState | ( | ) |
References CONTENT, Unit::GetPower(), HAPPINESS_LEVEL_SIZE, HAPPY, POWER_HAPPINESS, and UNHAPPY.
Referenced by Guardian::UpdateDamagePhysical().
|
static |
References PetStable::PetInfo::CreatureId, PetStable::CurrentPet, PET_SAVE_AS_CURRENT, PET_SAVE_AS_DELETED, PET_SAVE_FIRST_STABLE_SLOT, PET_SAVE_NOT_IN_SLOT, PetStable::PetInfo::PetNumber, PetStable::StabledPets, and PetStable::UnslottedPets.
Referenced by Spell::CheckCast(), and LoadPetFromDB().
References GetOwner(), RATE_TALENT_PET, SPELL_AURA_MOD_PET_TALENT_POINTS, sScriptMgr, and sWorld.
Referenced by addSpell(), InitTalentForLevel(), removeSpell(), and resetTalents().
|
overridevirtual |
Reimplemented from Creature.
References CREATURE_FAMILY_CHIMAERA, CREATURE_FAMILY_CORE_HOUND, CREATURE_FAMILY_CRAB, CREATURE_FAMILY_DEVILSAUR, CREATURE_FAMILY_NETHER_RAY, CREATURE_FAMILY_RHINO, CREATURE_FAMILY_SPIDER, CREATURE_FAMILY_TURTLE, CREATURE_FAMILY_WARP_STALKER, CREATURE_FAMILY_WASP, CREATURE_FAMILY_WIND_SERPENT, CreatureTemplate::family, Creature::GetCreatureTemplate(), Unit::GetLevel(), Creature::GetNativeObjectScale(), getPetType(), HUNTER_PET, CreatureFamilyEntry::maxScale, CreatureFamilyEntry::maxScaleLevel, CreatureFamilyEntry::minScale, CreatureFamilyEntry::minScaleLevel, and sCreatureFamilyStore.
Player * Pet::GetOwner | ( | ) | const |
References m_owner.
Referenced by _LoadSpellCooldowns(), AddToWorld(), CastPetAuras(), Spell::CheckCast(), Spell::EffectLearnPetSpell(), spell_hun_target_self_and_pet::FilterTargets(), GetMaxTalentPointsForLevel(), GivePetXP(), WorldSession::HandlePetRename(), InitTalentForLevel(), Remove(), removeSpell(), resetTalents(), SavePetToDB(), SetDisplayId(), SynchronizeLevelWithOwner(), and Update().
|
inlineoverridevirtual |
|
inline |
References m_petType.
Referenced by AddToWorld(), Spell::EffectRenamePet(), FillPetInfo(), GetDebugInfo(), GetNativeObjectScale(), GivePetLevel(), GivePetXP(), WorldSession::HandlePetAbandon(), WorldSession::HandlePetActionHelper(), WorldSession::HandleStablePet(), isControlled(), IsPermanentPetFor(), LoadPetFromDB(), Player::RemovePet(), Player::ResetPetTalents(), SavePetToDB(), setDeathState(), SynchronizeLevelWithOwner(), and Update().
void Pet::GivePetLevel | ( | uint8 | level | ) |
References Unit::GetLevel(), getPetType(), HUNTER_PET, InitLevelupSpellsForLevel(), Guardian::InitStatsForLevel(), InitTalentForLevel(), RATE_XP_PET_NEXT_LEVEL, Unit::SetUInt32Value(), sObjectMgr, sWorld, UNIT_FIELD_PETEXPERIENCE, and UNIT_FIELD_PETNEXTLEVELEXP.
Referenced by GivePetXP(), and SynchronizeLevelWithOwner().
void Pet::GivePetXP | ( | uint32 | xp | ) |
References CONFIG_MAX_PLAYER_LEVEL, Unit::GetLevel(), GetOwner(), getPetType(), Object::GetUInt32Value(), GivePetLevel(), HUNTER_PET, Unit::IsAlive(), RATE_XP_PET, Unit::SetUInt32Value(), sWorld, UNIT_FIELD_PETEXPERIENCE, and UNIT_FIELD_PETNEXTLEVELEXP.
|
overridevirtual |
Reimplemented from Creature.
References m_spells, and PETSPELL_REMOVED.
Referenced by addSpell(), Player::BuildPetTalentsInfoData(), CleanupActionBar(), pet_commandscript::HandlePetLearnCommand(), pet_commandscript::HandlePetUnlearnCommand(), and Player::LearnPetTalent().
|
inline |
bool Pet::HaveInDiet | ( | ItemTemplate const * | item | ) | const |
References CreatureTemplate::family, ItemTemplate::FoodType, Creature::GetCreatureTemplate(), CreatureFamilyEntry::petFoodMask, and sCreatureFamilyStore.
Referenced by Spell::CheckCast().
void Pet::InitLevelupSpellsForLevel | ( | ) |
References Creature::GetCreatureTemplate(), Object::GetEntry(), Unit::GetLevel(), SpellInfo::Id, learnSpell(), CreatureTemplate::PetSpellDataId, SpellInfo::SpellLevel, sScriptMgr, sSpellMgr, and unlearnSpell().
Referenced by GivePetLevel(), and InitPetCreateSpells().
void Pet::InitPetCreateSpells | ( | ) |
References CastPetAuras(), InitLevelupSpellsForLevel(), CharmInfo::InitPetActionBar(), LearnPetPassives(), Unit::m_charmInfo, and m_spells.
Referenced by Unit::InitTamedPet(), and Player::SummonPet().
void Pet::InitTalentForLevel | ( | ) |
References Unit::GetLevel(), GetMaxTalentPointsForLevel(), GetOwner(), Object::IsPlayer(), m_loading, m_usedTalentCount, resetTalents(), Player::SendTalentsInfoData(), SetFreeTalentPoints(), and Object::ToPlayer().
Referenced by Player::CreatePet(), Spell::EffectCreateTamedPet(), Spell::EffectTameCreature(), GivePetLevel(), and Player::SummonPet().
|
inlineoverridevirtual |
|
inline |
References getPetType(), HUNTER_PET, and SUMMON_PET.
Referenced by Unit::GetRandomContactPoint(), Unit::Kill(), LoadPetFromDB(), Player::RemovePet(), SavePetToDB(), SetDisplayId(), Player::UnsummonPetTemporaryIfAny(), Update(), and Unit::UpdateAuraForGroup().
bool Pet::IsPermanentPetFor | ( | Player * | owner | ) | const |
References CLASS_CONTEXT_PET, CLASS_DEATH_KNIGHT, CLASS_MAGE, CLASS_WARLOCK, CREATURE_TYPE_DEMON, CREATURE_TYPE_UNDEAD, Creature::GetCreatureTemplate(), Object::GetEntry(), getPetType(), HUNTER_PET, Player::IsClass(), SUMMON_PET, and CreatureTemplate::type.
Referenced by CastPetAuras(), LoadPetFromDB(), and Player::PetSpellInitialize().
|
inline |
void Pet::LearnPetPassives | ( | ) |
References ACT_DECIDE, addSpell(), CreatureTemplate::family, Creature::GetCreatureTemplate(), CreatureFamilyEntry::ID, PETSPELL_FAMILY, PETSPELL_NEW, sCreatureFamilyStore, and sPetFamilySpellsStore.
Referenced by InitPetCreateSpells().
bool Pet::learnSpell | ( | uint32 | spell_id | ) |
References addSpell(), m_loading, m_owner, Player::PetSpellInitialize(), Player::SendDirectMessage(), WorldPackets::Pet::PetLearnedSpell::SpellID, and WorldPackets::Pet::PetLearnedSpell::Write().
Referenced by Spell::EffectLearnPetSpell(), pet_commandscript::HandlePetLearnCommand(), InitLevelupSpellsForLevel(), Player::LearnPetTalent(), learnSpellHighRank(), and removeSpell().
void Pet::learnSpellHighRank | ( | uint32 | spellid | ) |
References learnSpell(), learnSpellHighRank(), and sSpellMgr.
Referenced by learn_commandscript::HandleLearnAllMyPetTalentsCommand(), and learnSpellHighRank().
bool Pet::LoadPetFromDB | ( | Player * | owner, |
uint32 | petEntry, | ||
uint32 | petnumber, | ||
bool | current, | ||
uint32 | healthPct = 0 , |
||
bool | fullMana = false |
||
) |
References PetStable::PetInfo::ActionBar, WorldSession::AddQueryHolderCallback(), Map::AddToMap(), SQLQueryHolderCallback::AfterComplete(), ASSERT, ASSERT_NOTNULL, Player::CanSeeDKPet(), Player::CanTameExoticPets(), SpellInfo::CategoryRecoveryTime, CharacterDatabase, CLASS_CONTEXT_PET, CLASS_DEATH_KNIGHT, CleanupActionBar(), Unit::CountPctFromMaxHealth(), Create(), PetStable::PetInfo::CreatedBySpellId, CREATURE_TYPE_DEMON, CREATURE_TYPE_UNDEAD, PetStable::PetInfo::CreatureId, PetStable::CurrentPet, PetLoadQueryHolder::DECLINED_NAMES, PetStable::PetInfo::DisplayId, PetStable::PetInfo::Experience, WorldObject::FindMap(), Map::GenerateLowGuid(), Field::Get(), Unit::GetCharmInfo(), WorldObject::GetClosePoint(), Unit::GetCombatReach(), ObjectGuid::GetCounter(), Unit::GetCreatePowers(), Creature::GetCreatureTemplate(), SpellInfo::GetDuration(), Unit::GetFaction(), Minion::GetFollowAngle(), GameTime::GetGameTime(), Player::GetGroup(), Object::GetGUID(), Unit::GetLevel(), GetLoadPetInfo(), WorldObject::GetMap(), Unit::GetMaxHealth(), Unit::GetMaxPower(), Position::GetOrientation(), Object::GetPackGUID(), Player::GetPet(), Player::GetPetStable(), getPetType(), WorldObject::GetPhaseMask(), Position::GetPositionX(), Position::GetPositionY(), SQLQueryHolderBase::GetPreparedResult(), Player::GetSession(), GROUP_UPDATE_PET, PetStable::PetInfo::Happiness, PetStable::PetInfo::Health, HUNTER_PET, Guardian::InitStatsForLevel(), Player::IsClass(), isControlled(), Unit::IsCritter(), Object::IsInWorld(), IsPermanentPetFor(), Minion::IsPetGhoul(), Player::IsPetNeedBeTemporaryUnsummoned(), Object::IsPlayer(), Position::IsPositionValid(), Player::IsSpectator(), CreatureTemplate::IsTameable(), isTemporarySummoned(), PetStable::PetInfo::LastSaveTime, PetStable::PetInfo::Level, CharmInfo::LoadPetActionBar(), LOG_DEBUG, LOG_ERROR, Unit::m_charmInfo, m_declinedname, m_loading, PetStable::PetInfo::Mana, MAX_DECLINED_NAME_CASES, PetStable::PetInfo::Name, PET_FOLLOW_DIST, PET_SAVE_FIRST_STABLE_SLOT, PET_SAVE_LAST_STABLE_SLOT, PET_SAVE_NOT_IN_SLOT, PetStable::PetInfo::PetNumber, Player::PetSpellInitialize(), POWER_FOCUS, POWER_HAPPINESS, POWER_MANA, PetStable::PetInfo::ReactState, SpellInfo::RecoveryTime, Position::Relocate(), Player::RemovePet(), Unit::ReplaceAllNpcFlags(), Unit::ReplaceAllUnitFlags(), Player::SendMessageToSet(), Player::SendTalentsInfoData(), Object::SetByteFlag(), Unit::SetCanModifyStats(), Unit::SetCreatorGUID(), setDeathState(), SetDisplayId(), Unit::SetFaction(), Unit::SetFullHealth(), Player::SetGroupUpdateFlag(), Unit::SetHealth(), Player::SetLastPetNumber(), Player::SetLastPetSpell(), Unit::SetMaxPower(), Unit::SetMinion(), WorldObject::SetName(), Unit::SetNativeDisplayId(), CharmInfo::SetPetNumber(), setPetType(), Unit::SetPower(), Unit::setPowerType(), Creature::SetReactState(), Unit::SetSheath(), Player::SetTemporaryUnsummonedPetNumber(), Unit::SetUInt32Value(), SHEATH_STATE_MELEE, SMSG_SPELL_GO, sObjectMgr, sScriptMgr, sSpellMgr, PetStable::StabledPets, SUMMON_PET, SynchronizeLevelWithOwner(), Object::ToCreature(), Object::ToPlayer(), Position::ToString(), PetStable::PetInfo::Type, UNIT_CAN_BE_ABANDONED, UNIT_CAN_BE_RENAMED, UNIT_CREATED_BY_SPELL, UNIT_FIELD_BYTES_0, UNIT_FIELD_BYTES_2, UNIT_FIELD_PET_NAME_TIMESTAMP, UNIT_FIELD_PETEXPERIENCE, UNIT_FLAG_PLAYER_CONTROLLED, UNIT_NPC_FLAG_NONE, PetStable::UnslottedPets, WorldObject::UpdatePositionData(), and PetStable::PetInfo::WasRenamed.
Referenced by spell_gen_pet_summoned::HandleScript(), WorldSession::HandleStableSwapPet(), WorldSession::HandleUnstablePet(), Player::LoadPet(), Player::ResummonPetTemporaryUnSummonedIfAny(), and Player::SummonPet().
void Pet::LoseHappiness | ( | ) |
References Unit::GetPower(), Unit::IsInCombat(), Unit::ModifyPower(), and POWER_HAPPINESS.
Referenced by Update().
void Pet::Remove | ( | PetSaveMode | mode, |
bool | returnreagent = false |
||
) |
References GetOwner(), and Player::RemovePet().
Referenced by Spell::EffectDismissPet(), AuraEffect::HandleModPossessPet(), TempSummon::UnSummon(), and Update().
|
overridevirtual |
Reimplemented from Minion.
References Object::GetGUID(), WorldObject::GetMap(), Map::GetObjectsStore(), Object::IsInWorld(), TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Remove(), and Unit::RemoveFromWorld().
bool Pet::removeSpell | ( | uint32 | spell_id, |
bool | learn_prev, | ||
bool | clear_ab = true |
||
) |
References Unit::GetLevel(), GetMaxTalentPointsForLevel(), GetOwner(), GetTalentSpellCost(), learnSpell(), Unit::m_charmInfo, m_loading, m_spells, m_usedTalentCount, PETSPELL_NEW, PETSPELL_REMOVED, Unit::RemoveAurasDueToSpell(), CharmInfo::RemoveSpellFromActionBar(), SetFreeTalentPoints(), and sSpellMgr.
Referenced by addSpell(), pet_commandscript::HandlePetUnlearnCommand(), and unlearnSpell().
void Pet::RemoveSpellCooldown | ( | uint32 | spell_id, |
bool | update | ||
) |
References Unit::GetCharmerOrOwnerPlayerOrPlayerItself(), Object::GetGUID(), Creature::m_CreatureSpellCooldowns, and SMSG_CLEAR_COOLDOWN.
Referenced by WorldSession::HandlePetActionHelper().
|
inline |
References m_auraRaidUpdateMask.
bool Pet::resetTalents | ( | ) |
References AT_LOGIN_RESET_PET_TALENTS, CreatureTemplate::family, Creature::GetCreatureTemplate(), Unit::GetLevel(), GetMaxTalentPointsForLevel(), GetOwner(), Player::HasAtLoginFlag(), Object::IsPlayer(), m_loading, m_spells, m_usedTalentCount, PETSPELL_REMOVED, Player::PetSpellInitialize(), TalentTabEntry::petTalentMask, CreatureFamilyEntry::petTalentType, TalentEntry::RankID, Player::RemoveAtLoginFlag(), sCreatureFamilyStore, SetFreeTalentPoints(), sScriptMgr, sSpellMgr, sTalentStore, sTalentTabStore, TalentEntry::TalentTab, Object::ToPlayer(), and unlearnSpell().
Referenced by InitTalentForLevel(), Player::ResetPetTalents(), and resetTalentsForAllPetsOf().
References AT_LOGIN_RESET_PET_TALENTS, CharacterDatabase, PetStable::CurrentPet, Unit::GetCharmInfo(), CharmInfo::GetPetNumber(), Player::GetPetStable(), Player::HasAtLoginFlag(), PetStable::PetInfo::PetNumber, Player::RemoveAtLoginFlag(), resetTalents(), sPetTalentSpells, PetStable::StabledPets, Object::ToPlayer(), and PetStable::UnslottedPets.
Referenced by WorldSession::HandlePlayerLoginFromDB(), and reset_commandscript::HandleResetTalentsCommand().
void Pet::SavePetToDB | ( | PetSaveMode | mode | ) |
References _SaveAuras(), _SaveSpellCooldowns(), _SaveSpells(), CHAR_DEL_CHAR_PET_BY_ID, CHAR_DEL_CHAR_PET_BY_SLOT, CHAR_REP_CHAR_PET, CharacterDatabase, PetStable::CurrentPet, DeleteFromDB(), FillPetInfo(), GenerateActionBarData(), ObjectGuid::GetCounter(), Object::GetEntry(), GameTime::GetGameTime(), Unit::GetHealth(), Unit::GetLevel(), WorldObject::GetName(), Unit::GetNativeDisplayId(), GetOwner(), Unit::GetOwnerGUID(), CharmInfo::GetPetNumber(), Player::GetPetStable(), getPetType(), Unit::GetPower(), Creature::GetReactState(), Player::GetTemporaryUnsummonedPetNumber(), Object::GetUInt32Value(), Object::HasByteFlag(), HUNTER_PET, isControlled(), Object::IsPlayer(), Unit::m_charmInfo, m_loading, PET_SAVE_AS_CURRENT, PET_SAVE_LAST_STABLE_SLOT, PET_SAVE_NOT_IN_SLOT, POWER_HAPPINESS, POWER_MANA, Unit::RemoveAllAuras(), PreparedStatementBase::SetData(), Object::ToPlayer(), UNIT_CAN_BE_RENAMED, UNIT_CREATED_BY_SPELL, UNIT_FIELD_BYTES_2, and UNIT_FIELD_PETEXPERIENCE.
Referenced by Player::CreatePet(), Spell::EffectCreateTamedPet(), Spell::EffectLearnPetSpell(), Spell::EffectResurrectPet(), Spell::EffectTameCreature(), Player::RemovePet(), and Player::SummonPet().
|
inline |
|
overridevirtual |
A creature can be in 4 different states: Alive, JustDied, Corpse, and JustRespawned. The cycle follows the next order:
state | Specify one of 4 states above |
despawn | Despawn the creature immediately, without waiting for any movement to finish |
Reimplemented from Minion.
References CastPetAuras(), Unit::getDeathState(), WorldLocation::GetMapId(), getPetType(), HAPPINESS_LEVEL_SIZE, HUNTER_PET, MAP_ARENA, MAP_BATTLEGROUND, MapEntry::map_type, Unit::ModifyPower(), POWER_HAPPINESS, Unit::RemoveUnitFlag(), Unit::ReplaceAllDynamicFlags(), Creature::setDeathState(), sMapStore, UNIT_DYNFLAG_NONE, and UNIT_FLAG_SKINNABLE.
Referenced by Spell::EffectResurrectPet(), and LoadPetFromDB().
|
overridevirtual |
Reimplemented from Creature.
References GetOwner(), GROUP_UPDATE_FLAG_PET_MODEL_ID, isControlled(), Creature::SetDisplayId(), and Object::ToPlayer().
Referenced by CreateBaseAtCreature(), Spell::EffectResurrectPet(), and LoadPetFromDB().
|
inline |
|
inline |
References Object::SetByteValue(), UNIT_BYTES_1_OFFSET_PET_TALENTS, and UNIT_FIELD_BYTES_1.
Referenced by addSpell(), learn_commandscript::HandleLearnAllMyPetTalentsCommand(), InitTalentForLevel(), Player::LearnPetTalent(), removeSpell(), and resetTalents().
|
inline |
void Pet::SynchronizeLevelWithOwner | ( | ) |
References Unit::GetLevel(), GetOwner(), getPetType(), GivePetLevel(), HUNTER_PET, Object::IsPlayer(), and SUMMON_PET.
Referenced by LoadPetFromDB().
void Pet::ToggleAutocast | ( | SpellInfo const * | spellInfo, |
bool | apply | ||
) |
References ACT_DISABLED, ACT_ENABLED, ASSERT, SpellInfo::Id, SpellInfo::IsAutocastable(), m_autospells, m_spells, PETSPELL_CHANGED, and PETSPELL_NEW.
Referenced by addSpell(), and CleanupActionBar().
bool Pet::unlearnSpell | ( | uint32 | spell_id, |
bool | learn_prev, | ||
bool | clear_ab = true |
||
) |
References m_loading, m_owner, removeSpell(), Player::SendDirectMessage(), WorldPackets::Pet::PetUnlearnedSpell::SpellID, and WorldPackets::Pet::PetUnlearnedSpell::Write().
Referenced by addSpell(), InitLevelupSpellsForLevel(), and resetTalents().
|
overridevirtual |
Reimplemented from TempSummon.
References Creature::AddSpellCooldown(), Creature::AI(), ASSERT, UnitAI::AttackStart(), Unit::CastSpell(), MotionMaster::Clear(), COMMAND_FOLLOW, ObjectGuid::Empty, SpellRangeEntry::Flags, Unit::GetCharmerOrOwner(), Unit::GetCharmInfo(), WorldObject::GetDistance(), Object::GetEntry(), Minion::GetFollowAngle(), GameTime::GetGameTime(), Object::GetGUID(), WorldObject::GetMap(), Unit::GetMotionMaster(), WorldObject::GetName(), GetOwner(), Unit::GetPetGUID(), getPetType(), WorldSession::GetPlayerInfo(), Unit::getPowerType(), Player::GetSession(), Unit::GetSpellMaxRangeForTarget(), ObjectAccessor::GetUnit(), Unit::GetVictim(), WorldObject::GetVisibilityRange(), Creature::HasSpellCooldown(), HUNTER_PET, infinityCooldownDelay, Unit::IsAIEnabled, Unit::IsAlive(), isControlled(), SpellInfo::IsCooldownStartedOnEvent(), ObjectGuid::IsEmpty(), Unit::isPossessed(), WorldObject::IsWithinDistInMap(), WorldObject::IsWithinLOSInMap(), LOG_ERROR, LoseHappiness(), Creature::m_corpseRemoveTime, Unit::m_deathState, m_duration, m_happinessTimer, m_loading, m_petRegenTimer, m_removed, m_tempoldTarget, m_tempspell, m_tempspellIsPositive, m_tempspellTarget, MIN_MELEE_REACH, MotionMaster::MoveFollow(), MotionMaster::MoveIdle(), PET_FOCUS_REGEN_INTERVAL, PET_FOLLOW_DIST, PET_LOSE_HAPPINES_INTERVAL, PET_SAVE_AS_DELETED, PET_SAVE_NOT_IN_SLOT, CreatureAI::PetStopAttack(), POWER_FOCUS, SpellInfo::RangeEntry, Creature::Regenerate(), Remove(), CharmInfo::SaveStayPosition(), CharmInfo::SetCommandState(), CharmInfo::SetIsAtStay(), CharmInfo::SetIsCommandAttack(), CharmInfo::SetIsCommandFollow(), CharmInfo::SetIsFollowing(), CharmInfo::SetIsReturning(), SPELL_RANGE_MELEE, sSpellMgr, Unit::StopMoving(), SUMMON_PET, Object::ToCreature(), and Creature::Update().
|
protected |
Referenced by GetAuraUpdateMaskForRaid(), ResetAuraUpdateMaskForRaid(), and SetAuraUpdateMaskForRaid().
AutoSpellList Pet::m_autospells |
Referenced by GetPetAutoSpellOnPos(), GetPetAutoSpellSize(), and ToggleAutocast().
|
protected |
Referenced by GetDeclinedNames(), and LoadPetFromDB().
|
protected |
Referenced by GetDuration(), isTemporarySummoned(), SetDuration(), and Update().
|
protected |
Referenced by InitTalentForLevel(), isBeingLoaded(), learnSpell(), LoadPetFromDB(), removeSpell(), resetTalents(), SavePetToDB(), SetLoading(), unlearnSpell(), and Update().
|
protected |
Referenced by GetOwner(), learnSpell(), Pet(), and unlearnSpell().
|
protected |
Referenced by Update().
|
protected |
Referenced by getPetType(), and setPetType().
bool Pet::m_removed |
Referenced by Player::RemovePet(), and Update().
PetSpellMap Pet::m_spells |
Referenced by _SaveSpells(), addSpell(), HasSpell(), InitPetCreateSpells(), Player::PetSpellInitialize(), removeSpell(), resetTalents(), and ToggleAutocast().
|
protected |
Referenced by CastWhenWillAvailable(), ClearCastWhenWillAvailable(), and Update().
|
protected |
Referenced by CastWhenWillAvailable(), ClearCastWhenWillAvailable(), HasTempSpell(), and Update().
|
protected |
Referenced by CastWhenWillAvailable(), ClearCastWhenWillAvailable(), and Update().
|
protected |
Referenced by CastWhenWillAvailable(), ClearCastWhenWillAvailable(), and Update().
uint32 Pet::m_usedTalentCount |
Referenced by addSpell(), InitTalentForLevel(), removeSpell(), Player::ResetPetTalents(), and resetTalents().