|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <ScriptedFollowerAI.h>
Public Member Functions | |
| void | AttackStart (Unit *) OVERRIDE |
| void | EnterEvadeMode () OVERRIDE |
| FollowerAI (Creature *creature) | |
| bool | HasFollowState (uint32 uiFollowState) const |
| void | JustDied (Unit *) OVERRIDE |
| void | JustRespawned () OVERRIDE |
| void | MoveInLineOfSight (Unit *) OVERRIDE |
| void | MovementInform (uint32 motionType, uint32 pointId) OVERRIDE |
| void | SetFollowComplete (bool bWithEndEvent=false) |
| void | SetFollowPaused (bool bPaused) |
| void | StartFollow (Player *player, uint32 factionForFollower=0, const Quest *quest=NULL) |
| void | UpdateAI (uint32) OVERRIDE |
| == Triggered Actions Requested ================== | |
| virtual void | UpdateFollowerAI (uint32) |
| ~FollowerAI () | |
| Public Member Functions inherited from ScriptedAI | |
| void | AttackStart (Unit *) OVERRIDE |
| void | AttackStartNoMove (Unit *target) |
| void | DamageTaken (Unit *, uint32 &) OVERRIDE |
| void | DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false) |
| std::list< Creature * > | DoFindFriendlyCC (float range) |
| std::list< Creature * > | DoFindFriendlyMissingBuff (float range, uint32 spellId) |
| float | DoGetThreat (Unit *unit) |
| void | DoModifyThreatPercent (Unit *unit, int32 pct) |
| void | DoPlaySoundToSet (WorldObject *source, uint32 soundId) |
| void | DoResetThreat () |
| Unit * | DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1) |
| Creature * | DoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, TempSummonType type, uint32 despawntime) |
| void | DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f) |
| void | DoStartNoMovement (Unit *target) |
| void | DoStopAttack () |
| void | DoTeleportAll (float x, float y, float z, float o) |
| void | DoTeleportPlayer (Unit *unit, float x, float y, float z, float o) |
| void | DoTeleportTo (float const pos[4]) |
| void | DoTeleportTo (float x, float y, float z, uint32 time=0) |
| template<class T> | |
| const T & | DUNGEON_MODE (const T &normal5, const T &heroic5) const |
| void | EnterCombat (Unit *) OVERRIDE |
| bool | EnterEvadeIfOutOfCombatArea (uint32 const diff) |
| void | ExecuteEvent (uint32) OVERRIDE |
| DifficultyID | GetDifficulty () const |
| Player * | GetPlayerAtMinimumRange (float minRange) |
| bool | HealthAbovePct (uint32 pct) const |
| bool | HealthBelowPct (uint32 pct) const |
| bool | Is25ManRaid () const |
| bool | IsCombatMovementAllowed () const |
| bool | IsHeroic () const |
| void | JustDied (Unit *) OVERRIDE |
| void | JustSummoned (Creature *) OVERRIDE |
| void | KilledUnit (Unit *) OVERRIDE |
| void | MovementInform (uint32, uint32) OVERRIDE |
| void | OnPossess (bool) |
| template<class T> | |
| const T & | RAID_MODE (const T &normal10, const T &normal25) const |
| template<class T> | |
| const T & | RAID_MODE (const T &normal10, const T &normal25, const T &flex, const T &lfr) const |
| template<class T> | |
| const T & | RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25, const T &flex, const T &lfr) const |
| void | Reset () OVERRIDE |
| ScriptedAI (Creature *creature) | |
| SpellInfo const * | SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect) |
| void | SetCombatMovement (bool allowMovement) |
| void | SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE) |
| void | SpellHit (Unit *, SpellInfo const *) OVERRIDE |
| void | SpellHitTarget (Unit *, SpellInfo const *) OVERRIDE |
| void | SummonedCreatureDespawn (Creature *) OVERRIDE |
| void | UpdateAI (uint32 diff) OVERRIDE |
| == Triggered Actions Requested ================== | |
| virtual | ~ScriptedAI () |
| Public Member Functions inherited from CreatureAI | |
| virtual void | AttackedBy (Unit *) |
| virtual bool | CanRespawn () |
| virtual bool | CanSeeAlways (WorldObject const *) |
| bool | CanSeeEvenInPassiveMode () const |
| virtual void | CorpseRemoved (uint32 &) |
| == State checks ================================= | |
| CreatureAI (Creature *creature) | |
| void | DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f) |
| virtual bool | IsEscorted () |
| virtual void | IsSummonedBy (Unit *) |
| virtual void | JustReachedHome () |
| void | MoveInLineOfSight_Safe (Unit *who) |
| == Reactions At ================================= | |
| void | OnCharmed (bool apply) |
| virtual void | OnSpellClick (Unit *, bool &) |
| virtual void | OwnerAttacked (Unit *) |
| virtual void | OwnerAttackedBy (Unit *) |
| virtual void | PassengerBoarded (Unit *, int8, bool) |
| == Fields ======================================= | |
| virtual void | ReceiveEmote (Player *, uint32) |
| void | SetCanSeeEvenInPassiveMode (bool canSeeEvenInPassiveMode) |
| virtual void | SummonedCreatureDies (Creature *, Unit *) |
| void | Talk (uint8 id, WorldObject const *whisperTarget=NULL) |
| virtual | ~CreatureAI () |
| Public Member Functions inherited from UnitAI | |
| void | AttackStartCaster (Unit *victim, float dist) |
| virtual bool | CanAIAttack (Unit const *) const |
| virtual void | DamageDealt (Unit *, uint32 &, DamageEffectType) |
| virtual void | DoAction (int32) |
| void | DoAddAuraToAllHostilePlayers (uint32 spellid) |
| void | DoCast (uint32 spellId) |
| void | DoCast (Unit *victim, uint32 spellId, bool triggered=false) |
| void | DoCastAOE (uint32 spellId, bool triggered=false) |
| void | DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false) |
| void | DoCastVictim (uint32 spellId, bool triggered=false) |
| float | DoGetSpellMaxRange (uint32 spellId, bool positive=false) |
| void | DoMeleeAttackIfReady () |
| bool | DoSpellAttackIfReady (uint32 spell) |
| virtual uint32 | GetData (uint32) const |
| virtual uint64 | GetGUID (int32=0) const |
| virtual void | HealDone (Unit *, uint32 &) |
| virtual void | HealReceived (Unit *, uint32 &) |
| virtual void | InitializeAI () |
| virtual bool | OnGossipHello (Player *player) |
| template<class PREDICATE> | |
| Unit * | SelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate) |
| Unit * | SelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0) |
| template<class PREDICATE> | |
| void | SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType) |
| void | SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0) |
| virtual void | SetData (uint32, uint32) |
| virtual void | SetGUID (uint64, int32=0) |
| virtual void | sGossipHello (Player *) |
| virtual void | sGossipSelect (Player *, uint32, uint32) |
| virtual void | sGossipSelectCode (Player *, uint32, uint32, char const *) |
| virtual bool | sOnDummyEffect (Unit *, uint32, SpellEffIndex) |
| virtual void | sOnGameEvent (bool, uint16) |
| virtual void | SpellInterrupted (uint32, uint32) |
| virtual void | sQuestAccept (Player *, Quest const *) |
| virtual void | sQuestComplete (Player *, Quest const *) |
| virtual void | sQuestReward (Player *, Quest const *, uint32) |
| virtual void | sQuestSelect (Player *, Quest const *) |
| UnitAI (Unit *unit) | |
| virtual | ~UnitAI () |
Protected Member Functions | |
| Player * | GetLeaderForFollower () |
| Protected Member Functions inherited from CreatureAI | |
| bool | _EnterEvadeMode () |
| Creature * | DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TempSummonType::TEMPSUMMON_CORPSE_TIMED_DESPAWN) |
| Creature * | DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TempSummonType::TEMPSUMMON_CORPSE_TIMED_DESPAWN) |
| Creature * | DoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TempSummonType::TEMPSUMMON_CORPSE_TIMED_DESPAWN) |
| void | SetGazeOn (Unit *target) |
| bool | UpdateVictim () |
| bool | UpdateVictimWithGaze () |
Private Member Functions | |
| void | AddFollowState (uint32 uiFollowState) |
| bool | AssistPlayerInCombat (Unit *who) |
| void | RemoveFollowState (uint32 uiFollowState) |
Private Attributes | |
| const Quest * | m_pQuestForFollow |
| uint32 | m_uiFollowState |
| uint64 | m_uiLeaderGUID |
| uint32 | m_uiUpdateFollowTimer |
Additional Inherited Members | |
| Static Public Member Functions inherited from UnitAI | |
| static void | FillAISpellInfo () |
| Public Attributes inherited from ScriptedAI | |
| bool | IsFleeing |
| Creature * | me |
| Static Public Attributes inherited from UnitAI | |
| static AISpellInfoType * | AISpellInfo |
| Protected Attributes inherited from CreatureAI | |
| Creature *const | me |
| Protected Attributes inherited from UnitAI | |
| Unit *const | me |
Definition at line 22 of file ScriptedFollowerAI.h.
|
explicit |
Definition at line 25 of file ScriptedFollowerAI.cpp.
References m_pQuestForFollow, m_uiFollowState, m_uiLeaderGUID, m_uiUpdateFollowTimer, ScriptedAI::ScriptedAI(), and STATE_FOLLOW_NONE.
Referenced by npc_beryl_sorcerer::npc_beryl_sorcererAI::npc_beryl_sorcererAI(), npc_mist::npc_mistAI::npc_mistAI(), npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::npc_nexus_drake_hatchlingAI(), npc_tarindrella::npc_tarindrellaAI::npc_tarindrellaAI(), and npc_tooga::npc_toogaAI::npc_toogaAI().
|
inline |
Definition at line 26 of file ScriptedFollowerAI.h.
|
inlineprivate |
Definition at line 56 of file ScriptedFollowerAI.h.
References m_uiFollowState.
Referenced by MovementInform(), SetFollowComplete(), SetFollowPaused(), and StartFollow().
|
private |
Definition at line 54 of file ScriptedFollowerAI.cpp.
References AttackStart(), CREATURE_TYPEFLAGS_AID_PLAYERS, Unit::GetCharmerOrOwnerPlayerOrPlayerItself(), Unit::GetVictim(), MAX_PLAYER_DISTANCE, ScriptedAI::me, and Unit::SetInCombatWith().
Referenced by MoveInLineOfSight().
|
virtual |
Reimplemented from UnitAI.
Definition at line 32 of file ScriptedFollowerAI.cpp.
References ScriptedAI::IsCombatMovementAllowed(), ScriptedAI::me, Unit::SetInCombatWith(), and UNIT_STATE_FOLLOW.
Referenced by AssistPlayerInCombat(), npc_beryl_sorcerer::npc_beryl_sorcererAI::EnterCombat(), npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::EnterCombat(), and MoveInLineOfSight().
|
virtual |
Reimplemented from CreatureAI.
Definition at line 161 of file ScriptedFollowerAI.cpp.
References CHASE_MOTION_TYPE, HasFollowState(), ScriptedAI::me, POINT_COMBAT_START, ScriptedAI::Reset(), SF_LOG_DEBUG, and STATE_FOLLOW_INPROGRESS.
Referenced by npc_beryl_sorcerer::npc_beryl_sorcererAI::SpellHit(), and npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::UpdateAI().
|
protected |
Definition at line 313 of file ScriptedFollowerAI.cpp.
References Object::GetGUID(), ObjectAccessor::GetPlayer(), Unit::IsAlive(), m_uiLeaderGUID, MAX_PLAYER_DISTANCE, ScriptedAI::me, GroupReference::next(), and SF_LOG_DEBUG.
Referenced by npc_mist::npc_mistAI::DoComplete(), JustDied(), npc_tooga::npc_toogaAI::MoveInLineOfSight(), MovementInform(), SetFollowPaused(), and UpdateAI().
|
inline |
Definition at line 50 of file ScriptedFollowerAI.h.
References HasFollowState(), and m_uiFollowState.
Referenced by EnterEvadeMode(), HasFollowState(), JustDied(), MoveInLineOfSight(), npc_mist::npc_mistAI::MoveInLineOfSight(), npc_tooga::npc_toogaAI::MoveInLineOfSight(), MovementInform(), SetFollowComplete(), SetFollowPaused(), StartFollow(), UpdateAI(), and npc_tooga::npc_toogaAI::UpdateFollowerAI().
|
virtual |
Reimplemented from CreatureAI.
Definition at line 121 of file ScriptedFollowerAI.cpp.
References GetLeaderForFollower(), HasFollowState(), m_pQuestForFollow, m_uiLeaderGUID, GroupReference::next(), QUEST_STATUS_INCOMPLETE, and STATE_FOLLOW_INPROGRESS.
|
virtual |
Reimplemented from CreatureAI.
Definition at line 148 of file ScriptedFollowerAI.cpp.
References ScriptedAI::IsCombatMovementAllowed(), m_uiFollowState, ScriptedAI::me, ScriptedAI::Reset(), ScriptedAI::SetCombatMovement(), and STATE_FOLLOW_NONE.
|
virtual |
Reimplemented from CreatureAI.
Reimplemented in npc_beryl_sorcerer::npc_beryl_sorcererAI, npc_mist::npc_mistAI, npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI, npc_tarindrella::npc_tarindrellaAI, and npc_tooga::npc_toogaAI.
Definition at line 91 of file ScriptedFollowerAI.cpp.
References AssistPlayerInCombat(), AttackStart(), CREATURE_Z_ATTACK_RANGE, HasFollowState(), Unit::isInAccessiblePlaceFor(), Unit::isTargetableForAttack(), ScriptedAI::me, Unit::RemoveAurasByType(), Unit::SetInCombatWith(), SPELL_AURA_MOD_STEALTH, STATE_FOLLOW_INPROGRESS, and UNIT_STATE_STUNNED.
Referenced by npc_beryl_sorcerer::npc_beryl_sorcererAI::MoveInLineOfSight(), npc_mist::npc_mistAI::MoveInLineOfSight(), npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::MoveInLineOfSight(), npc_tarindrella::npc_tarindrellaAI::MoveInLineOfSight(), and npc_tooga::npc_toogaAI::MoveInLineOfSight().
Reimplemented from CreatureAI.
Reimplemented in npc_tooga::npc_toogaAI.
Definition at line 258 of file ScriptedFollowerAI.cpp.
References AddFollowState(), GetLeaderForFollower(), HasFollowState(), ScriptedAI::me, POINT_COMBAT_START, POINT_MOTION_TYPE, STATE_FOLLOW_INPROGRESS, STATE_FOLLOW_PAUSED, and STATE_FOLLOW_RETURNING.
Referenced by npc_tooga::npc_toogaAI::MovementInform().
|
inlineprivate |
Definition at line 57 of file ScriptedFollowerAI.h.
References m_uiFollowState.
Referenced by SetFollowComplete(), SetFollowPaused(), and UpdateAI().
| void FollowerAI::SetFollowComplete | ( | bool | bWithEndEvent = false | ) |
Definition at line 342 of file ScriptedFollowerAI.cpp.
References AddFollowState(), HasFollowState(), ScriptedAI::me, RemoveFollowState(), STATE_FOLLOW_COMPLETE, STATE_FOLLOW_POSTEVENT, and UNIT_STATE_FOLLOW.
Referenced by npc_mist::npc_mistAI::DoComplete(), npc_beryl_sorcerer::npc_beryl_sorcererAI::MoveInLineOfSight(), npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::MoveInLineOfSight(), npc_tooga::npc_toogaAI::MoveInLineOfSight(), npc_tooga::npc_toogaAI::MovementInform(), and npc_tooga::npc_toogaAI::UpdateFollowerAI().
| void FollowerAI::SetFollowPaused | ( | bool | bPaused | ) |
Definition at line 364 of file ScriptedFollowerAI.cpp.
References AddFollowState(), GetLeaderForFollower(), HasFollowState(), ScriptedAI::me, PET_FOLLOW_ANGLE, PET_FOLLOW_DIST, RemoveFollowState(), STATE_FOLLOW_COMPLETE, STATE_FOLLOW_INPROGRESS, STATE_FOLLOW_PAUSED, and UNIT_STATE_FOLLOW.
| void FollowerAI::StartFollow | ( | Player * | player, |
| uint32 | factionForFollower = 0, | ||
| const Quest * | quest = NULL ) |
Definition at line 275 of file ScriptedFollowerAI.cpp.
References AddFollowState(), Object::GetGUID(), WorldObject::GetName(), HasFollowState(), m_pQuestForFollow, m_uiLeaderGUID, ScriptedAI::me, PET_FOLLOW_ANGLE, PET_FOLLOW_DIST, SF_LOG_DEBUG, SF_LOG_ERROR, STATE_FOLLOW_INPROGRESS, UI64FMTD, UNIT_FIELD_NPC_FLAGS, UNIT_NPC_FLAG_NONE, and WAYPOINT_MOTION_TYPE.
Referenced by npc_beryl_sorcerer::npc_beryl_sorcererAI::SpellHit(), and npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI::UpdateAI().
|
virtual |
== Triggered Actions Requested ==================
Reimplemented from CreatureAI.
Reimplemented in npc_beryl_sorcerer::npc_beryl_sorcererAI, and npc_nexus_drake_hatchling::npc_nexus_drake_hatchlingAI.
Definition at line 188 of file ScriptedFollowerAI.cpp.
References GetLeaderForFollower(), HasFollowState(), m_uiUpdateFollowTimer, MAX_PLAYER_DISTANCE, ScriptedAI::me, GroupReference::next(), PET_FOLLOW_ANGLE, PET_FOLLOW_DIST, RemoveFollowState(), SF_LOG_DEBUG, STATE_FOLLOW_COMPLETE, STATE_FOLLOW_INPROGRESS, STATE_FOLLOW_POSTEVENT, STATE_FOLLOW_RETURNING, and UpdateFollowerAI().
|
virtual |
Reimplemented in npc_tarindrella::npc_tarindrellaAI, and npc_tooga::npc_toogaAI.
Definition at line 250 of file ScriptedFollowerAI.cpp.
References UnitAI::DoMeleeAttackIfReady(), and CreatureAI::UpdateVictim().
Referenced by UpdateAI().
|
private |
Definition at line 65 of file ScriptedFollowerAI.h.
Referenced by FollowerAI(), JustDied(), and StartFollow().
|
private |
Definition at line 63 of file ScriptedFollowerAI.h.
Referenced by AddFollowState(), FollowerAI(), HasFollowState(), JustRespawned(), and RemoveFollowState().
|
private |
Definition at line 61 of file ScriptedFollowerAI.h.
Referenced by FollowerAI(), GetLeaderForFollower(), JustDied(), and StartFollow().
|
private |
Definition at line 62 of file ScriptedFollowerAI.h.
Referenced by FollowerAI(), and UpdateAI().