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 - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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=0ms)
 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
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
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)
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
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 *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- 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 const &, 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 EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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
 
bool _isEngaged
 
- 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
1744 : ScriptedAI(creature)
1745 {
1746 }
Definition ScriptedCreature.h:191

Member Function Documentation

◆ FailQuest()

void dragonmaw_race_npc::FailQuest ( Player player)
inline
1810 {
1811 if (player)
1812 {
1813 switch (me->GetEntry())
1814 {
1815 case NPC_MUCKJAW:
1816 player->FailQuest(QUEST_MUCKJAW);
1817 break;
1818 case NPC_TROPE:
1819 player->FailQuest(QUEST_TROPE);
1820 break;
1821 case NPC_CORLOK:
1822 player->FailQuest(QUEST_CORLOK);
1823 break;
1824 case NPC_ICHMAN:
1825 player->FailQuest(QUEST_ICHMAN);
1826 break;
1827 case NPC_MULVERICK:
1828 player->FailQuest(QUEST_MULVERICK);
1829 break;
1830 case NPC_SKYSHATTER:
1831 player->FailQuest(QUEST_SKYSHATTER);
1832 break;
1833 default:
1834 break;
1835 }
1836 }
1838 me->DespawnOnEvade();
1839 }
TaskScheduler scheduler
Definition CreatureAI.h:74
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition Creature.cpp:2136
uint32 GetEntry() const
Definition Object.h:117
void FailQuest(uint32 quest_id)
Definition PlayerQuest.cpp:887
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
Creature * me
Definition ScriptedCreature.h:281
@ QUEST_ICHMAN
Definition zone_shadowmoon_valley.cpp:1712
@ NPC_ICHMAN
Definition zone_shadowmoon_valley.cpp:1719
@ QUEST_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1709
@ NPC_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1721
@ QUEST_TROPE
Definition zone_shadowmoon_valley.cpp:1710
@ NPC_TROPE
Definition zone_shadowmoon_valley.cpp:1717
@ NPC_CORLOK
Definition zone_shadowmoon_valley.cpp:1718
@ QUEST_MULVERICK
Definition zone_shadowmoon_valley.cpp:1713
@ QUEST_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1714
@ NPC_MULVERICK
Definition zone_shadowmoon_valley.cpp:1720
@ QUEST_CORLOK
Definition zone_shadowmoon_valley.cpp:1711
@ NPC_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1716

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
1940 {
1942 me->SetHover(false);
1943 me->SetDisableGravity(false);
1944 me->SetWalk(true);
1945
1947 if (!player)
1948 return;
1949
1950 Talk(SAY_COMPLETE, player);
1951 switch (me->GetEntry())
1952 {
1953 case NPC_MUCKJAW:
1955 break;
1956 case NPC_TROPE:
1958 break;
1959 case NPC_CORLOK:
1961 break;
1962 case NPC_ICHMAN:
1964 break;
1965 case NPC_MULVERICK:
1967 break;
1968 case NPC_SKYSHATTER:
1970 break;
1971 default:
1972 break;
1973 }
1974 }
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3249
Definition Player.h:1084
void AreaExploredOrEventHappens(uint32 questId)
Definition PlayerQuest.cpp:1823
void SetHover(bool enable)
Definition Unit.cpp:16603
void SetDisableGravity(bool disable)
Definition Unit.cpp:16466
Map * GetMap() const
Definition Object.h:625
Talk
Definition hyjal.cpp:82
Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:220
ObjectGuid _playerGUID
Definition zone_shadowmoon_valley.cpp:2116
@ SAY_COMPLETE
Definition zone_shadowmoon_valley.cpp:1738

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.

1977 {
1978 switch (me->GetEntry())
1979 {
1980 case NPC_MUCKJAW:
1981 switch (id)
1982 {
1983 case 4:
1984 TakeOff();
1985 break;
1986 case 7:
1987 StartRace();
1988 break;
1989 case 9:
1991 break;
1992 case 35:
1993 FinishRace();
1994 break;
1995 case 37:
1996 Reset();
1997 break;
1998 }
1999 break;
2000 case NPC_TROPE:
2001 switch (id)
2002 {
2003 case 5:
2004 TakeOff();
2005 break;
2006 case 7:
2007 StartRace();
2008 break;
2009 case 10:
2011 break;
2012 case 53:
2013 FinishRace();
2014 break;
2015 case 60:
2016 Reset();
2017 break;
2018 }
2019 break;
2020 case NPC_CORLOK:
2021 switch (id)
2022 {
2023 case 6:
2024 TakeOff();
2025 break;
2026 case 9:
2027 StartRace();
2028 break;
2029 case 12:
2031 break;
2032 case 79:
2033 FinishRace();
2034 break;
2035 case 89:
2036 Reset();
2037 break;
2038 }
2039 break;
2040 case NPC_ICHMAN:
2041 switch (id)
2042 {
2043 case 4:
2044 TakeOff();
2045 StartRace();
2046 break;
2047 case 12:
2049 break;
2050 case 107:
2051 FinishRace();
2052 break;
2053 case 111:
2054 Reset();
2055 break;
2056 }
2057 break;
2058 case NPC_MULVERICK:
2059 switch (id)
2060 {
2061 case 5:
2062 TakeOff();
2063 break;
2064 case 9:
2065 StartRace();
2066 break;
2067 case 12:
2069 break;
2070 case 166:
2071 FinishRace();
2072 break;
2073 case 172:
2074 Reset();
2075 break;
2076 }
2077 break;
2078 case NPC_SKYSHATTER:
2079 switch (id)
2080 {
2081 case 3:
2082 TakeOff();
2083 break;
2084 case 7:
2085 StartRace();
2088 break;
2089 case 10:
2091 break;
2092 case 140:
2093 FinishRace();
2094 break;
2095 case 145:
2096 Reset();
2097 break;
2098 }
2099 break;
2100 default:
2101 break;
2102 }
2103 }
void Reset() override
Definition zone_shadowmoon_valley.cpp:1748
void FinishRace()
Definition zone_shadowmoon_valley.cpp:1939
void StartRaceAttacks()
Definition zone_shadowmoon_valley.cpp:1841
void TakeOff()
Definition zone_shadowmoon_valley.cpp:1792
void StartRace()
Definition zone_shadowmoon_valley.cpp:1797
@ SAY_SKYSHATTER_SPECIAL
Definition zone_shadowmoon_valley.cpp:1739

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.

2106 {
2107 Reset();
2108 }

◆ Reset()

void dragonmaw_race_npc::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1749 {
1752 me->SetWalk(true);
1753 me->SetDisableGravity(false);
1756 }
@ UNIT_NPC_FLAG_QUESTGIVER
Definition UnitDefines.h:323
void MoveIdle()
Definition MotionMaster.cpp:234
void Clear()
Definition ObjectGuid.h:138
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:764

References UNIT_NPC_FLAG_QUESTGIVER.

◆ sQuestAccept()

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

Reimplemented from UnitAI.

1759 {
1761 if (player)
1762 {
1763 _playerGUID = player->GetGUID();
1764 Talk(SAY_START, player);
1765 }
1766
1767 switch (me->GetEntry())
1768 {
1769 case NPC_MUCKJAW:
1771 break;
1772 case NPC_TROPE:
1774 break;
1775 case NPC_CORLOK:
1777 break;
1778 case NPC_ICHMAN:
1780 break;
1781 case NPC_MULVERICK:
1783 break;
1784 case NPC_SKYSHATTER:
1786 break;
1787 default:
1788 break;
1789 }
1790 }
void MoveWaypoint(uint32 path_id, bool repeatable, PathSource pathSource=PathSource::WAYPOINT_MGR)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:913
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:765
@ SAY_START
Definition zone_shadowmoon_valley.cpp:1737
@ PATH_ICHMAN
Definition zone_shadowmoon_valley.cpp:1726
@ PATH_TROPE
Definition zone_shadowmoon_valley.cpp:1724
@ PATH_MULVERICK
Definition zone_shadowmoon_valley.cpp:1727
@ PATH_CORLOK
Definition zone_shadowmoon_valley.cpp:1725
@ PATH_MUCKJAW
Definition zone_shadowmoon_valley.cpp:1723
@ PATH_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1728

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
1798 {
1799 me->SetWalk(false);
1800
1801 ScheduleTimedEvent(5s, [&]
1802 {
1804 if (!player || !me->IsWithinDist(player, 100.f))
1805 FailQuest(player);
1806 }, 5s);
1807 }
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:1372
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
Definition ScriptedCreature.cpp:349
void FailQuest(Player *player)
Definition zone_shadowmoon_valley.cpp:1809

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

◆ StartRaceAttacks()

void dragonmaw_race_npc::StartRaceAttacks ( )
inline
1842 {
1843 /*
1844 * Timers are placeholders
1845 * After spawned, the rest is done via SmartAI
1846 */
1847 if (_playerGUID.IsEmpty())
1848 return;
1849
1851 if (!player)
1852 return;
1853
1854 switch (me->GetEntry())
1855 {
1856 case NPC_MUCKJAW:
1857 ScheduleTimedEvent(4s, [&]
1858 {
1860 if (!player)
1861 return;
1862
1863 Position summonPos;
1864 summonPos = me->GetRandomPoint(player->GetPosition(), 15.f);
1865 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
1867 }, 4s, 8s);
1868 break;
1869 case NPC_TROPE:
1870 ScheduleTimedEvent(4s, [&]
1871 {
1873 if (!player)
1874 return;
1875
1876 Position summonPos;
1877 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1878 summonPos.m_positionZ = player->GetPositionZ();
1880 }, 1s, 3s);
1881 break;
1882 case NPC_CORLOK:
1883 ScheduleTimedEvent(4s, [&]
1884 {
1886 if (!player)
1887 return;
1888
1889 Position summonPos;
1890 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1891 summonPos.m_positionZ = player->GetPositionZ();
1893 }, 1s, 3s);
1894 break;
1895 case NPC_ICHMAN:
1896 ScheduleTimedEvent(4s, [&]
1897 {
1899 if (!player)
1900 return;
1901
1902 Position summonPos;
1903 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1904 summonPos.m_positionZ = player->GetPositionZ();
1906 }, 1s, 3s);
1907 break;
1908 case NPC_MULVERICK:
1909 ScheduleTimedEvent(4s, [&]
1910 {
1912 if (!player)
1913 return;
1914
1915 Position summonPos;
1916 summonPos = me->GetRandomPoint(player->GetPosition(), 10.f);
1917 summonPos.m_positionZ = player->GetPositionZ();
1919 }, 1s, 3s);
1920 break;
1921 case NPC_SKYSHATTER:
1922 ScheduleTimedEvent(4s, [&]
1923 {
1925 if (!player)
1926 return;
1927
1928 Position summonPos;
1929 summonPos = me->GetRandomPoint(player->GetPosition(), 7.f);
1930 summonPos.m_positionZ = player->GetPositionZ(); // So they don't spawn at ground height
1932 }, 1s, 3s);
1933 break;
1934 default:
1935 break;
1936 }
1937 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:51
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:2394
void GetRandomPoint(const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
Definition Object.cpp:1558
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:1730
@ NPC_TARGET_SKYSHATTER
Definition zone_shadowmoon_valley.cpp:1735
@ NPC_TARGET_MULVERICK
Definition zone_shadowmoon_valley.cpp:1734
@ NPC_TARGET_CORLOK
Definition zone_shadowmoon_valley.cpp:1732
@ NPC_TARGET_ICHMAN
Definition zone_shadowmoon_valley.cpp:1733
@ NPC_TARGET_TROPE
Definition zone_shadowmoon_valley.cpp:1731

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
1793 {
1794 me->SetDisableGravity(true);
1795 }

◆ UpdateAI()

void dragonmaw_race_npc::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

2111 {
2112 scheduler.Update(diff);
2113 }
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: