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 ()
 
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() More...
 
- 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) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
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
 
- 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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
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 ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
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 AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest 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

Player_player
 

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
1864 : ScriptedAI(creature)
1865 {
1866 _player = nullptr;
1867 }
Definition: ScriptedCreature.h:190
Player * _player
Definition: zone_shadowmoon_valley.cpp:2235

Member Function Documentation

◆ FailQuest()

void dragonmaw_race_npc::FailQuest ( )
inline
1928 {
1929 if (_player)
1930 {
1931 switch (me->GetEntry())
1932 {
1933 case NPC_MUCKJAW:
1935 break;
1936 case NPC_TROPE:
1938 break;
1939 case NPC_CORLOK:
1941 break;
1942 case NPC_ICHMAN:
1944 break;
1945 case NPC_MULVERICK:
1947 break;
1948 case NPC_SKYSHATTER:
1950 break;
1951 default:
1952 break;
1953 }
1954 }
1956 me->DespawnOnEvade();
1957 }
@ QUEST_ICHMAN
Definition: zone_shadowmoon_valley.cpp:1832
@ NPC_ICHMAN
Definition: zone_shadowmoon_valley.cpp:1839
@ QUEST_MUCKJAW
Definition: zone_shadowmoon_valley.cpp:1829
@ NPC_SKYSHATTER
Definition: zone_shadowmoon_valley.cpp:1841
@ QUEST_TROPE
Definition: zone_shadowmoon_valley.cpp:1830
@ NPC_TROPE
Definition: zone_shadowmoon_valley.cpp:1837
@ NPC_CORLOK
Definition: zone_shadowmoon_valley.cpp:1838
@ QUEST_MULVERICK
Definition: zone_shadowmoon_valley.cpp:1833
@ QUEST_SKYSHATTER
Definition: zone_shadowmoon_valley.cpp:1834
@ NPC_MULVERICK
Definition: zone_shadowmoon_valley.cpp:1840
@ QUEST_CORLOK
Definition: zone_shadowmoon_valley.cpp:1831
@ NPC_MUCKJAW
Definition: zone_shadowmoon_valley.cpp:1836
TaskScheduler & CancelAll()
Definition: TaskScheduler.cpp:45
TaskScheduler scheduler
Definition: CreatureAI.h:76
Creature * me
Definition: ScriptedCreature.h:280
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition: Creature.cpp:2181
uint32 GetEntry() const
Definition: Object.h:112
void FailQuest(uint32 quest_id)
Definition: PlayerQuest.cpp:880

References 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
2060 {
2062 me->SetHover(false);
2063 me->SetDisableGravity(false);
2064 me->SetWalk(true);
2065
2066 if (_player)
2067 {
2069 switch (me->GetEntry())
2070 {
2071 case NPC_MUCKJAW:
2073 break;
2074 case NPC_TROPE:
2076 break;
2077 case NPC_CORLOK:
2079 break;
2080 case NPC_ICHMAN:
2082 break;
2083 case NPC_MULVERICK:
2085 break;
2086 case NPC_SKYSHATTER:
2088 break;
2089 default:
2090 break;
2091 }
2092 }
2093 }
@ SAY_COMPLETE
Definition: zone_shadowmoon_valley.cpp:1858
Talk
Definition: hyjal.cpp:82
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:3192
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3357
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
void AreaExploredOrEventHappens(uint32 questId)
Definition: PlayerQuest.cpp:1785

References 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 ScriptedAI.

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

References 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.

2225 {
2226 Reset();
2227 }

◆ Reset()

void dragonmaw_race_npc::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1870 {
1873 me->SetWalk(true);
1874 me->SetDisableGravity(false);
1876 }
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:695
void MoveIdle()
Definition: MotionMaster.cpp:232

References UNIT_NPC_FLAG_QUESTGIVER.

◆ sQuestAccept()

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

Reimplemented from UnitAI.

1879 {
1880 _player = player;
1882 if (_player)
1884
1885 switch (me->GetEntry())
1886 {
1887 case NPC_MUCKJAW:
1889 break;
1890 case NPC_TROPE:
1892 break;
1893 case NPC_CORLOK:
1895 break;
1896 case NPC_ICHMAN:
1898 break;
1899 case NPC_MULVERICK:
1901 break;
1902 case NPC_SKYSHATTER:
1904 break;
1905 default:
1906 break;
1907 }
1908 }
@ SAY_START
Definition: zone_shadowmoon_valley.cpp:1857
@ PATH_ICHMAN
Definition: zone_shadowmoon_valley.cpp:1846
@ PATH_TROPE
Definition: zone_shadowmoon_valley.cpp:1844
@ PATH_MULVERICK
Definition: zone_shadowmoon_valley.cpp:1847
@ PATH_CORLOK
Definition: zone_shadowmoon_valley.cpp:1845
@ PATH_MUCKJAW
Definition: zone_shadowmoon_valley.cpp:1843
@ PATH_SKYSHATTER
Definition: zone_shadowmoon_valley.cpp:1848
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:696
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:849

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

◆ StartRace()

void dragonmaw_race_npc::StartRace ( )
inline
1916 {
1917 me->SetWalk(false);
1918 ScheduleTimedEvent(5s, [&]
1919 {
1920 if (!_player)
1921 FailQuest();
1922 else if (!me->IsWithinDist(_player, 100.f))
1923 FailQuest();
1924 }, 5s);
1925 }
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
Definition: ScriptedCreature.cpp:312
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1316
void FailQuest()
Definition: zone_shadowmoon_valley.cpp:1927

◆ StartRaceAttacks()

void dragonmaw_race_npc::StartRaceAttacks ( )
inline
1960 {
1961 /*
1962 * Timers are placeholders
1963 * After spawned, the rest is done via SmartAI
1964 */
1965 if (!_player)
1966 return;
1967
1968 switch (me->GetEntry())
1969 {
1970 case NPC_MUCKJAW:
1971 ScheduleTimedEvent(4s, [&]
1972 {
1973 if (_player)
1974 {
1975 Position summonPos;
1976 summonPos = me->GetRandomPoint(_player->GetPosition(), 15.f);
1977 summonPos.m_positionZ = _player->GetPositionZ(); // So they don't spawn at ground height
1979 }
1980 else
1981 return;
1982 }, 4s, 8s);
1983 break;
1984 case NPC_TROPE:
1985 ScheduleTimedEvent(4s, [&]
1986 {
1987 if (_player)
1988 {
1989 Position summonPos;
1990 summonPos = me->GetRandomPoint(_player->GetPosition(), 10.f);
1991 summonPos.m_positionZ = _player->GetPositionZ();
1993 }
1994 else
1995 return;
1996 }, 1s, 3s);
1997 break;
1998 case NPC_CORLOK:
1999 ScheduleTimedEvent(4s, [&]
2000 {
2001 if (_player)
2002 {
2003 Position summonPos;
2004 summonPos = me->GetRandomPoint(_player->GetPosition(), 10.f);
2005 summonPos.m_positionZ = _player->GetPositionZ();
2007 }
2008 else
2009 return;
2010 }, 1s, 3s);
2011 break;
2012 case NPC_ICHMAN:
2013 ScheduleTimedEvent(4s, [&]
2014 {
2015 if (_player)
2016 {
2017 Position summonPos;
2018 summonPos = me->GetRandomPoint(_player->GetPosition(), 10.f);
2019 summonPos.m_positionZ = _player->GetPositionZ();
2021 }
2022 else
2023 return;
2024 }, 1s, 3s);
2025 break;
2026 case NPC_MULVERICK:
2027 ScheduleTimedEvent(4s, [&]
2028 {
2029 if (_player)
2030 {
2031 Position summonPos;
2032 summonPos = me->GetRandomPoint(_player->GetPosition(), 10.f);
2033 summonPos.m_positionZ = _player->GetPositionZ();
2035 }
2036 else
2037 return;
2038 }, 1s, 3s);
2039 break;
2040 case NPC_SKYSHATTER:
2041 ScheduleTimedEvent(4s, [&]
2042 {
2043 if (_player)
2044 {
2045 Position summonPos;
2046 summonPos = me->GetRandomPoint(_player->GetPosition(), 7.f);
2047 summonPos.m_positionZ = _player->GetPositionZ(); // So they don't spawn at ground height
2049 }
2050 else
2051 return;
2052 }, 1s, 3s);
2053 break;
2054 default:
2055 break;
2056 }
2057 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_TARGET_MUCKJAW
Definition: zone_shadowmoon_valley.cpp:1850
@ NPC_TARGET_SKYSHATTER
Definition: zone_shadowmoon_valley.cpp:1855
@ NPC_TARGET_MULVERICK
Definition: zone_shadowmoon_valley.cpp:1854
@ NPC_TARGET_CORLOK
Definition: zone_shadowmoon_valley.cpp:1852
@ NPC_TARGET_ICHMAN
Definition: zone_shadowmoon_valley.cpp:1853
@ NPC_TARGET_TROPE
Definition: zone_shadowmoon_valley.cpp:1851
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:2355
void GetRandomPoint(const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
Definition: Object.cpp:1502
Definition: Position.h:28
float m_positionZ
Definition: Position.h:58
float GetPositionZ() const
Definition: Position.h:119
void GetPosition(float &x, float &y) const
Definition: Position.h:122

References 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
1911 {
1912 me->SetDisableGravity(true);
1913 }

◆ UpdateAI()

void dragonmaw_race_npc::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from ScriptedAI.

2230 {
2231 scheduler.Update(diff);
2232 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition: TaskScheduler.cpp:27

Member Data Documentation

◆ _player

Player* dragonmaw_race_npc::_player
private