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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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
1837 : ScriptedAI(creature)
1838 {
1839 }
Definition ScriptedCreature.h:190

Member Function Documentation

◆ FailQuest()

void dragonmaw_race_npc::FailQuest ( Player player)
inline
1903 {
1904 if (player)
1905 {
1906 switch (me->GetEntry())
1907 {
1908 case NPC_MUCKJAW:
1909 player->FailQuest(QUEST_MUCKJAW);
1910 break;
1911 case NPC_TROPE:
1912 player->FailQuest(QUEST_TROPE);
1913 break;
1914 case NPC_CORLOK:
1915 player->FailQuest(QUEST_CORLOK);
1916 break;
1917 case NPC_ICHMAN:
1918 player->FailQuest(QUEST_ICHMAN);
1919 break;
1920 case NPC_MULVERICK:
1921 player->FailQuest(QUEST_MULVERICK);
1922 break;
1923 case NPC_SKYSHATTER:
1924 player->FailQuest(QUEST_SKYSHATTER);
1925 break;
1926 default:
1927 break;
1928 }
1929 }
1931 me->DespawnOnEvade();
1932 }
TaskScheduler scheduler
Definition CreatureAI.h:75
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition Creature.cpp:2185
uint32 GetEntry() const
Definition Object.h:116
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:1805
@ NPC_ICHMAN
Definition zone_shadowmoon_valley.cpp:1812
@ QUEST_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1802
@ NPC_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1814
@ QUEST_TROPE
Definition zone_shadowmoon_valley.cpp:1803
@ NPC_TROPE
Definition zone_shadowmoon_valley.cpp:1810
@ NPC_CORLOK
Definition zone_shadowmoon_valley.cpp:1811
@ QUEST_MULVERICK
Definition zone_shadowmoon_valley.cpp:1806
@ QUEST_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1807
@ NPC_MULVERICK
Definition zone_shadowmoon_valley.cpp:1813
@ QUEST_CORLOK
Definition zone_shadowmoon_valley.cpp:1804
@ NPC_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1809

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
2033 {
2035 me->SetHover(false);
2036 me->SetDisableGravity(false);
2037 me->SetWalk(true);
2038
2040 if (!player)
2041 return;
2042
2043 Talk(SAY_COMPLETE, player);
2044 switch (me->GetEntry())
2045 {
2046 case NPC_MUCKJAW:
2048 break;
2049 case NPC_TROPE:
2051 break;
2052 case NPC_CORLOK:
2054 break;
2055 case NPC_ICHMAN:
2057 break;
2058 case NPC_MULVERICK:
2060 break;
2061 case NPC_SKYSHATTER:
2063 break;
2064 default:
2065 break;
2066 }
2067 }
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:3220
bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition Creature.cpp:3385
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3206
Definition Player.h:1082
void AreaExploredOrEventHappens(uint32 questId)
Definition PlayerQuest.cpp:1791
Map * GetMap() const
Definition Object.h:537
Talk
Definition hyjal.cpp:82
Player * GetPlayer(Map const *, ObjectGuid const guid)
Definition ObjectAccessor.cpp:220
ObjectGuid _playerGUID
Definition zone_shadowmoon_valley.cpp:2209
@ SAY_COMPLETE
Definition zone_shadowmoon_valley.cpp:1831

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.

2070 {
2071 switch (me->GetEntry())
2072 {
2073 case NPC_MUCKJAW:
2074 switch (id)
2075 {
2076 case 4:
2077 TakeOff();
2078 break;
2079 case 7:
2080 StartRace();
2081 break;
2082 case 9:
2084 break;
2085 case 35:
2086 FinishRace();
2087 break;
2088 case 37:
2089 Reset();
2090 break;
2091 }
2092 break;
2093 case NPC_TROPE:
2094 switch (id)
2095 {
2096 case 5:
2097 TakeOff();
2098 break;
2099 case 7:
2100 StartRace();
2101 break;
2102 case 10:
2104 break;
2105 case 53:
2106 FinishRace();
2107 break;
2108 case 60:
2109 Reset();
2110 break;
2111 }
2112 break;
2113 case NPC_CORLOK:
2114 switch (id)
2115 {
2116 case 6:
2117 TakeOff();
2118 break;
2119 case 9:
2120 StartRace();
2121 break;
2122 case 12:
2124 break;
2125 case 79:
2126 FinishRace();
2127 break;
2128 case 89:
2129 Reset();
2130 break;
2131 }
2132 break;
2133 case NPC_ICHMAN:
2134 switch (id)
2135 {
2136 case 4:
2137 TakeOff();
2138 StartRace();
2139 break;
2140 case 12:
2142 break;
2143 case 107:
2144 FinishRace();
2145 break;
2146 case 111:
2147 Reset();
2148 break;
2149 }
2150 break;
2151 case NPC_MULVERICK:
2152 switch (id)
2153 {
2154 case 5:
2155 TakeOff();
2156 break;
2157 case 9:
2158 StartRace();
2159 break;
2160 case 12:
2162 break;
2163 case 166:
2164 FinishRace();
2165 break;
2166 case 172:
2167 Reset();
2168 break;
2169 }
2170 break;
2171 case NPC_SKYSHATTER:
2172 switch (id)
2173 {
2174 case 3:
2175 TakeOff();
2176 break;
2177 case 7:
2178 StartRace();
2181 break;
2182 case 10:
2184 break;
2185 case 140:
2186 FinishRace();
2187 break;
2188 case 145:
2189 Reset();
2190 break;
2191 }
2192 break;
2193 default:
2194 break;
2195 }
2196 }
void Reset() override
Definition zone_shadowmoon_valley.cpp:1841
void FinishRace()
Definition zone_shadowmoon_valley.cpp:2032
void StartRaceAttacks()
Definition zone_shadowmoon_valley.cpp:1934
void TakeOff()
Definition zone_shadowmoon_valley.cpp:1885
void StartRace()
Definition zone_shadowmoon_valley.cpp:1890
@ SAY_SKYSHATTER_SPECIAL
Definition zone_shadowmoon_valley.cpp:1832

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.

2199 {
2200 Reset();
2201 }

◆ Reset()

void dragonmaw_race_npc::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1842 {
1845 me->SetWalk(true);
1846 me->SetDisableGravity(false);
1849 }
@ 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:1664
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:719

References UNIT_NPC_FLAG_QUESTGIVER.

◆ sQuestAccept()

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

Reimplemented from UnitAI.

1852 {
1854 if (player)
1855 {
1856 _playerGUID = player->GetGUID();
1857 Talk(SAY_START, player);
1858 }
1859
1860 switch (me->GetEntry())
1861 {
1862 case NPC_MUCKJAW:
1864 break;
1865 case NPC_TROPE:
1867 break;
1868 case NPC_CORLOK:
1870 break;
1871 case NPC_ICHMAN:
1873 break;
1874 case NPC_MULVERICK:
1876 break;
1877 case NPC_SKYSHATTER:
1879 break;
1880 default:
1881 break;
1882 }
1883 }
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:113
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:720
@ SAY_START
Definition zone_shadowmoon_valley.cpp:1830
@ PATH_ICHMAN
Definition zone_shadowmoon_valley.cpp:1819
@ PATH_TROPE
Definition zone_shadowmoon_valley.cpp:1817
@ PATH_MULVERICK
Definition zone_shadowmoon_valley.cpp:1820
@ PATH_CORLOK
Definition zone_shadowmoon_valley.cpp:1818
@ PATH_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1816
@ PATH_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1821

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
1891 {
1892 me->SetWalk(false);
1893
1894 ScheduleTimedEvent(5s, [&]
1895 {
1897 if (!player || !me->IsWithinDist(player, 100.f))
1898 FailQuest(player);
1899 }, 5s);
1900 }
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:1902

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

◆ StartRaceAttacks()

void dragonmaw_race_npc::StartRaceAttacks ( )
inline
1935 {
1936 /*
1937 * Timers are placeholders
1938 * After spawned, the rest is done via SmartAI
1939 */
1940 if (_playerGUID.IsEmpty())
1941 return;
1942
1944 if (!player)
1945 return;
1946
1947 switch (me->GetEntry())
1948 {
1949 case NPC_MUCKJAW:
1950 ScheduleTimedEvent(4s, [&]
1951 {
1953 if (!player)
1954 return;
1955
1956 Position summonPos;
1957 summonPos = me->GetRandomPoint(player->GetPosition(), 15.f);
1958 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
1960 }, 4s, 8s);
1961 break;
1962 case NPC_TROPE:
1963 ScheduleTimedEvent(4s, [&]
1964 {
1966 if (!player)
1967 return;
1968
1969 Position summonPos;
1970 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1971 summonPos.m_positionZ = player->GetPositionZ();
1973 }, 1s, 3s);
1974 break;
1975 case NPC_CORLOK:
1976 ScheduleTimedEvent(4s, [&]
1977 {
1979 if (!player)
1980 return;
1981
1982 Position summonPos;
1983 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1984 summonPos.m_positionZ = player->GetPositionZ();
1986 }, 1s, 3s);
1987 break;
1988 case NPC_ICHMAN:
1989 ScheduleTimedEvent(4s, [&]
1990 {
1992 if (!player)
1993 return;
1994
1995 Position summonPos;
1996 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1997 summonPos.m_positionZ = player->GetPositionZ();
1999 }, 1s, 3s);
2000 break;
2001 case NPC_MULVERICK:
2002 ScheduleTimedEvent(4s, [&]
2003 {
2005 if (!player)
2006 return;
2007
2008 Position summonPos;
2009 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
2010 summonPos.m_positionZ = player->GetPositionZ();
2012 }, 1s, 3s);
2013 break;
2014 case NPC_SKYSHATTER:
2015 ScheduleTimedEvent(4s, [&]
2016 {
2018 if (!player)
2019 return;
2020
2021 Position summonPos;
2022 summonPos = me->GetRandomPoint(player->GetPosition(), 7.f);
2023 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
2025 }, 1s, 3s);
2026 break;
2027 default:
2028 break;
2029 }
2030 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:49
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:1823
@ NPC_TARGET_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1828
@ NPC_TARGET_MULVERICK
Definition zone_shadowmoon_valley.cpp:1827
@ NPC_TARGET_CORLOK
Definition zone_shadowmoon_valley.cpp:1825
@ NPC_TARGET_ICHMAN
Definition zone_shadowmoon_valley.cpp:1826
@ NPC_TARGET_TROPE
Definition zone_shadowmoon_valley.cpp:1824

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
1886 {
1887 me->SetDisableGravity(true);
1888 }

◆ UpdateAI()

void dragonmaw_race_npc::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

2204 {
2205 scheduler.Update(diff);
2206 }
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: