AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
dragonmaw_race_npc Struct Reference
Inheritance diagram for dragonmaw_race_npc:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 dragonmaw_race_npc (Creature *creature)
 
void Reset () override
 
void sQuestAccept (Player *player, Quest const *) override
 
void TakeOff ()
 
void StartRace ()
 
void FailQuest (Player *player)
 
void StartRaceAttacks ()
 
void FinishRace ()
 
void MovementInform (uint32, uint32 id) override
 
void PathEndReached (uint32) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
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 &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

ObjectGuid _playerGUID
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ dragonmaw_race_npc()

dragonmaw_race_npc::dragonmaw_race_npc ( Creature creature)
inline
1867 : ScriptedAI(creature)
1868 {
1869 }
Definition ScriptedCreature.h:190

Member Function Documentation

◆ FailQuest()

void dragonmaw_race_npc::FailQuest ( Player player)
inline
1933 {
1934 if (player)
1935 {
1936 switch (me->GetEntry())
1937 {
1938 case NPC_MUCKJAW:
1939 player->FailQuest(QUEST_MUCKJAW);
1940 break;
1941 case NPC_TROPE:
1942 player->FailQuest(QUEST_TROPE);
1943 break;
1944 case NPC_CORLOK:
1945 player->FailQuest(QUEST_CORLOK);
1946 break;
1947 case NPC_ICHMAN:
1948 player->FailQuest(QUEST_ICHMAN);
1949 break;
1950 case NPC_MULVERICK:
1951 player->FailQuest(QUEST_MULVERICK);
1952 break;
1953 case NPC_SKYSHATTER:
1954 player->FailQuest(QUEST_SKYSHATTER);
1955 break;
1956 default:
1957 break;
1958 }
1959 }
1961 me->DespawnOnEvade();
1962 }
TaskScheduler scheduler
Definition CreatureAI.h:75
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition Creature.cpp:2191
uint32 GetEntry() const
Definition Object.h:115
void FailQuest(uint32 quest_id)
Definition PlayerQuest.cpp:886
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
Creature * me
Definition ScriptedCreature.h:280
@ QUEST_ICHMAN
Definition zone_shadowmoon_valley.cpp:1835
@ NPC_ICHMAN
Definition zone_shadowmoon_valley.cpp:1842
@ QUEST_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1832
@ NPC_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1844
@ QUEST_TROPE
Definition zone_shadowmoon_valley.cpp:1833
@ NPC_TROPE
Definition zone_shadowmoon_valley.cpp:1840
@ NPC_CORLOK
Definition zone_shadowmoon_valley.cpp:1841
@ QUEST_MULVERICK
Definition zone_shadowmoon_valley.cpp:1836
@ QUEST_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1837
@ NPC_MULVERICK
Definition zone_shadowmoon_valley.cpp:1843
@ QUEST_CORLOK
Definition zone_shadowmoon_valley.cpp:1834
@ NPC_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1839

References Player::FailQuest(), NPC_CORLOK, NPC_ICHMAN, NPC_MUCKJAW, NPC_MULVERICK, NPC_SKYSHATTER, NPC_TROPE, QUEST_CORLOK, QUEST_ICHMAN, QUEST_MUCKJAW, QUEST_MULVERICK, QUEST_SKYSHATTER, and QUEST_TROPE.

◆ FinishRace()

void dragonmaw_race_npc::FinishRace ( )
inline
2063 {
2065 me->SetHover(false);
2066 me->SetDisableGravity(false);
2067 me->SetWalk(true);
2068
2070 if (!player)
2071 return;
2072
2073 Talk(SAY_COMPLETE, player);
2074 switch (me->GetEntry())
2075 {
2076 case NPC_MUCKJAW:
2078 break;
2079 case NPC_TROPE:
2081 break;
2082 case NPC_CORLOK:
2084 break;
2085 case NPC_ICHMAN:
2087 break;
2088 case NPC_MULVERICK:
2090 break;
2091 case NPC_SKYSHATTER:
2093 break;
2094 default:
2095 break;
2096 }
2097 }
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....
Definition Creature.cpp:3222
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition Creature.cpp:3387
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3208
Definition Player.h:1081
void AreaExploredOrEventHappens(uint32 questId)
Definition PlayerQuest.cpp:1791
Map * GetMap() const
Definition Object.h:536
Talk
Definition hyjal.cpp:82
Player * GetPlayer(Map const *, ObjectGuid const guid)
Definition ObjectAccessor.cpp:220
ObjectGuid _playerGUID
Definition zone_shadowmoon_valley.cpp:2239
@ SAY_COMPLETE
Definition zone_shadowmoon_valley.cpp:1861

References Player::AreaExploredOrEventHappens(), ObjectAccessor::GetPlayer(), NPC_CORLOK, NPC_ICHMAN, NPC_MUCKJAW, NPC_MULVERICK, NPC_SKYSHATTER, NPC_TROPE, QUEST_CORLOK, QUEST_ICHMAN, QUEST_MUCKJAW, QUEST_MULVERICK, QUEST_SKYSHATTER, QUEST_TROPE, and SAY_COMPLETE.

◆ MovementInform()

void dragonmaw_race_npc::MovementInform ( uint32  ,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

2100 {
2101 switch (me->GetEntry())
2102 {
2103 case NPC_MUCKJAW:
2104 switch (id)
2105 {
2106 case 4:
2107 TakeOff();
2108 break;
2109 case 7:
2110 StartRace();
2111 break;
2112 case 9:
2114 break;
2115 case 35:
2116 FinishRace();
2117 break;
2118 case 37:
2119 Reset();
2120 break;
2121 }
2122 break;
2123 case NPC_TROPE:
2124 switch (id)
2125 {
2126 case 5:
2127 TakeOff();
2128 break;
2129 case 7:
2130 StartRace();
2131 break;
2132 case 10:
2134 break;
2135 case 53:
2136 FinishRace();
2137 break;
2138 case 60:
2139 Reset();
2140 break;
2141 }
2142 break;
2143 case NPC_CORLOK:
2144 switch (id)
2145 {
2146 case 6:
2147 TakeOff();
2148 break;
2149 case 9:
2150 StartRace();
2151 break;
2152 case 12:
2154 break;
2155 case 79:
2156 FinishRace();
2157 break;
2158 case 89:
2159 Reset();
2160 break;
2161 }
2162 break;
2163 case NPC_ICHMAN:
2164 switch (id)
2165 {
2166 case 4:
2167 TakeOff();
2168 StartRace();
2169 break;
2170 case 12:
2172 break;
2173 case 107:
2174 FinishRace();
2175 break;
2176 case 111:
2177 Reset();
2178 break;
2179 }
2180 break;
2181 case NPC_MULVERICK:
2182 switch (id)
2183 {
2184 case 5:
2185 TakeOff();
2186 break;
2187 case 9:
2188 StartRace();
2189 break;
2190 case 12:
2192 break;
2193 case 166:
2194 FinishRace();
2195 break;
2196 case 172:
2197 Reset();
2198 break;
2199 }
2200 break;
2201 case NPC_SKYSHATTER:
2202 switch (id)
2203 {
2204 case 3:
2205 TakeOff();
2206 break;
2207 case 7:
2208 StartRace();
2211 break;
2212 case 10:
2214 break;
2215 case 140:
2216 FinishRace();
2217 break;
2218 case 145:
2219 Reset();
2220 break;
2221 }
2222 break;
2223 default:
2224 break;
2225 }
2226 }
void Reset() override
Definition zone_shadowmoon_valley.cpp:1871
void FinishRace()
Definition zone_shadowmoon_valley.cpp:2062
void StartRaceAttacks()
Definition zone_shadowmoon_valley.cpp:1964
void TakeOff()
Definition zone_shadowmoon_valley.cpp:1915
void StartRace()
Definition zone_shadowmoon_valley.cpp:1920
@ SAY_SKYSHATTER_SPECIAL
Definition zone_shadowmoon_valley.cpp:1862

References ObjectAccessor::GetPlayer(), NPC_CORLOK, NPC_ICHMAN, NPC_MUCKJAW, NPC_MULVERICK, NPC_SKYSHATTER, NPC_TROPE, and SAY_SKYSHATTER_SPECIAL.

◆ PathEndReached()

void dragonmaw_race_npc::PathEndReached ( uint32  )
inlineoverridevirtual

Reimplemented from CreatureAI.

2229 {
2230 Reset();
2231 }

◆ Reset()

void dragonmaw_race_npc::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1872 {
1875 me->SetWalk(true);
1876 me->SetDisableGravity(false);
1879 }
@ UNIT_NPC_FLAG_QUESTGIVER
Definition UnitDefines.h:316
void MoveIdle()
Definition MotionMaster.cpp:232
void Clear()
Definition ObjectGuid.h:138
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:735

References UNIT_NPC_FLAG_QUESTGIVER.

◆ sQuestAccept()

void dragonmaw_race_npc::sQuestAccept ( Player player,
Quest const *   
)
inlineoverridevirtual

Reimplemented from UnitAI.

1882 {
1884 if (player)
1885 {
1886 _playerGUID = player->GetGUID();
1887 Talk(SAY_START, player);
1888 }
1889
1890 switch (me->GetEntry())
1891 {
1892 case NPC_MUCKJAW:
1894 break;
1895 case NPC_TROPE:
1897 break;
1898 case NPC_CORLOK:
1900 break;
1901 case NPC_ICHMAN:
1903 break;
1904 case NPC_MULVERICK:
1906 break;
1907 case NPC_SKYSHATTER:
1909 break;
1910 default:
1911 break;
1912 }
1913 }
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:852
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:736
@ SAY_START
Definition zone_shadowmoon_valley.cpp:1860
@ PATH_ICHMAN
Definition zone_shadowmoon_valley.cpp:1849
@ PATH_TROPE
Definition zone_shadowmoon_valley.cpp:1847
@ PATH_MULVERICK
Definition zone_shadowmoon_valley.cpp:1850
@ PATH_CORLOK
Definition zone_shadowmoon_valley.cpp:1848
@ PATH_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1846
@ PATH_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1851

References Object::GetGUID(), NPC_CORLOK, NPC_ICHMAN, NPC_MUCKJAW, NPC_MULVERICK, NPC_SKYSHATTER, NPC_TROPE, PATH_CORLOK, PATH_ICHMAN, PATH_MUCKJAW, PATH_MULVERICK, PATH_SKYSHATTER, PATH_TROPE, SAY_START, and UNIT_NPC_FLAG_QUESTGIVER.

◆ StartRace()

void dragonmaw_race_npc::StartRace ( )
inline
1921 {
1922 me->SetWalk(false);
1923
1924 ScheduleTimedEvent(5s, [&]
1925 {
1927 if (!player || !me->IsWithinDist(player, 100.f))
1928 FailQuest(player);
1929 }, 5s);
1930 }
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition Object.cpp:1327
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
Definition ScriptedCreature.cpp:321
void FailQuest(Player *player)
Definition zone_shadowmoon_valley.cpp:1932

References ObjectAccessor::GetPlayer(), and WorldObject::IsWithinDist().

◆ StartRaceAttacks()

void dragonmaw_race_npc::StartRaceAttacks ( )
inline
1965 {
1966 /*
1967 * Timers are placeholders
1968 * After spawned, the rest is done via SmartAI
1969 */
1970 if (_playerGUID.IsEmpty())
1971 return;
1972
1974 if (!player)
1975 return;
1976
1977 switch (me->GetEntry())
1978 {
1979 case NPC_MUCKJAW:
1980 ScheduleTimedEvent(4s, [&]
1981 {
1983 if (!player)
1984 return;
1985
1986 Position summonPos;
1987 summonPos = me->GetRandomPoint(player->GetPosition(), 15.f);
1988 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
1990 }, 4s, 8s);
1991 break;
1992 case NPC_TROPE:
1993 ScheduleTimedEvent(4s, [&]
1994 {
1996 if (!player)
1997 return;
1998
1999 Position summonPos;
2000 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
2001 summonPos.m_positionZ = player->GetPositionZ();
2003 }, 1s, 3s);
2004 break;
2005 case NPC_CORLOK:
2006 ScheduleTimedEvent(4s, [&]
2007 {
2009 if (!player)
2010 return;
2011
2012 Position summonPos;
2013 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
2014 summonPos.m_positionZ = player->GetPositionZ();
2016 }, 1s, 3s);
2017 break;
2018 case NPC_ICHMAN:
2019 ScheduleTimedEvent(4s, [&]
2020 {
2022 if (!player)
2023 return;
2024
2025 Position summonPos;
2026 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
2027 summonPos.m_positionZ = player->GetPositionZ();
2029 }, 1s, 3s);
2030 break;
2031 case NPC_MULVERICK:
2032 ScheduleTimedEvent(4s, [&]
2033 {
2035 if (!player)
2036 return;
2037
2038 Position summonPos;
2039 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
2040 summonPos.m_positionZ = player->GetPositionZ();
2042 }, 1s, 3s);
2043 break;
2044 case NPC_SKYSHATTER:
2045 ScheduleTimedEvent(4s, [&]
2046 {
2048 if (!player)
2049 return;
2050
2051 Position summonPos;
2052 summonPos = me->GetRandomPoint(player->GetPosition(), 7.f);
2053 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
2055 }, 1s, 3s);
2056 break;
2057 default:
2058 break;
2059 }
2060 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:48
bool IsEmpty() const
Definition ObjectGuid.h:161
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
Definition Object.cpp:2368
void GetRandomPoint(const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
Definition Object.cpp:1513
Definition Position.h:27
float m_positionZ
Definition Position.h:57
float GetPositionZ() const
Definition Position.h:123
void GetPosition(float &x, float &y) const
Definition Position.h:126
@ NPC_TARGET_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1853
@ NPC_TARGET_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1858
@ NPC_TARGET_MULVERICK
Definition zone_shadowmoon_valley.cpp:1857
@ NPC_TARGET_CORLOK
Definition zone_shadowmoon_valley.cpp:1855
@ NPC_TARGET_ICHMAN
Definition zone_shadowmoon_valley.cpp:1856
@ NPC_TARGET_TROPE
Definition zone_shadowmoon_valley.cpp:1854

References ObjectAccessor::GetPlayer(), Position::GetPosition(), Position::GetPositionZ(), Position::m_positionZ, NPC_CORLOK, NPC_ICHMAN, NPC_MUCKJAW, NPC_MULVERICK, NPC_SKYSHATTER, NPC_TARGET_CORLOK, NPC_TARGET_ICHMAN, NPC_TARGET_MUCKJAW, NPC_TARGET_MULVERICK, NPC_TARGET_SKYSHATTER, NPC_TARGET_TROPE, NPC_TROPE, and TEMPSUMMON_TIMED_DESPAWN.

◆ TakeOff()

void dragonmaw_race_npc::TakeOff ( )
inline
1916 {
1917 me->SetDisableGravity(true);
1918 }

◆ UpdateAI()

void dragonmaw_race_npc::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

2234 {
2235 scheduler.Update(diff);
2236 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27

Member Data Documentation

◆ _playerGUID

ObjectGuid dragonmaw_race_npc::_playerGUID
private

The documentation for this struct was generated from the following file: