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

Public Member Functions

 npc_weegli_blastfuseAI (Creature *creature)
 
void InitializeAI () override
 
void JustRespawned () override
 
void JustDied (Unit *) override
 
void Reset () override
 
void AttackStart (Unit *victim) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustReachedHome () override
 
void MovementInform (uint32 type, uint32 id) override
 
void PathEndReached (uint32 pathId) override
 
void DoAction (int32 action) override
 
void sGossipSelect (Player *player, uint32, uint32 gossipListId) override
 
void sGossipHello (Player *player) override
 
- 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 (Position const *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)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (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 >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
Player * SelectTargetFromPlayerList (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)
 
WorldObject * GetSummoner () 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 bool IsEscortNPC (bool=true) const
 
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 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.
 
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 uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
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, int32 aura=0)
 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 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
 

Public Attributes

uint32 Bomb_Timer
 
uint32 LandMine_Timer
 
WeegliDoorStage doorStage = WeegliDoorStage::Idle
 
InstanceScript * instance
 
- Public Attributes inherited from ScriptedAI
Creature * me
 

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 ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoType * AISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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

◆ npc_weegli_blastfuseAI()

npc_weegli_blastfuse::npc_weegli_blastfuseAI::npc_weegli_blastfuseAI ( Creature *  creature)
inline
436 : ScriptedAI(creature)
437 {
438 instance = creature->GetInstanceScript();
439 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
Definition ScriptedCreature.h:202
InstanceScript * instance
Definition zulfarrak.cpp:444

References WorldObject::GetInstanceScript(), and instance.

Member Function Documentation

◆ AttackStart()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::AttackStart ( Unit *  victim)
inlineoverridevirtual

Reimplemented from UnitAI.

475 {
477 return;
478
479 AttackStartCaster(victim, 10);//keep back & toss bombs/shoot
480 }
void AttackStartCaster(Unit *victim, float dist)
Definition UnitAI.cpp:35
WeegliDoorStage doorStage
Definition zulfarrak.cpp:443

References UnitAI::AttackStartCaster(), doorStage, and Idle.

◆ DoAction()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

600 {
601 if (action != ACTION_BLY_BETRAYAL && action != ACTION_DESTROY_GATES)
602 return;
603
604 // The menu can remain open on multiple clients, including while he is already escaping.
608 return;
609
613 me->CombatStop(true);
616 me->SetWalk(false);
621 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ NOT_STARTED
Definition InstanceScript.h:58
@ REACT_PASSIVE
Definition Unit.h:574
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:347
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3416
void MovePoint(uint32 id, Position const &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:241
void Clear(bool reset=true)
Definition MotionMaster.h:194
void ClearAllThreat()
Definition ThreatManager.cpp:617
void SetFaction(uint32 faction)
Definition Unit.cpp:6886
MotionMaster * GetMotionMaster()
Definition Unit.h:1774
bool IsAlive() const
Definition Unit.h:1812
void CombatStop(bool includingCast=false, bool mutualPvP=true, bool keepPvPForOthers=false)
Definition Unit.cpp:7303
ThreatManager & GetThreatMgr()
Definition Unit.h:965
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:51
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Talk
Definition hyjal.cpp:82
Creature * me
Definition ScriptedCreature.h:292
@ FACTION_WEEGLI_ESCAPE
Definition zulfarrak.cpp:67
@ SAY_WEEGLI_OK_I_GO
Definition zulfarrak.cpp:400
@ SAY_WEEGLI_OUT_OF_HERE
Definition zulfarrak.cpp:401
Position const WeegliDoorPosition
Definition zulfarrak.cpp:420
@ DATA_END_DOOR
Definition zulfarrak.h:53
@ DATA_PYRAMID
Definition zulfarrak.h:51
@ PYRAMID_KILLED_ALL_TROLLS
Definition zulfarrak.h:80
@ ACTION_BLY_BETRAYAL
Definition zulfarrak.h:58
@ ACTION_DESTROY_GATES
Definition zulfarrak.h:59
@ POINT_WEEGLI_DOOR
Definition zulfarrak.h:67

References ACTION_BLY_BETRAYAL, ACTION_DESTROY_GATES, MotionMaster::Clear(), ThreatManager::ClearAllThreat(), Unit::CombatStop(), DATA_END_DOOR, DATA_PYRAMID, doorStage, FACTION_WEEGLI_ESCAPE, ZoneScript::GetData(), Unit::GetMotionMaster(), Unit::GetThreatMgr(), Idle, IN_PROGRESS, instance, Unit::IsAlive(), ScriptedAI::me, MotionMaster::MovePoint(), Moving, NOT_STARTED, POINT_WEEGLI_DOOR, PYRAMID_KILLED_ALL_TROLLS, REACT_PASSIVE, SAY_WEEGLI_OK_I_GO, SAY_WEEGLI_OUT_OF_HERE, ZoneScript::SetData(), Unit::SetFaction(), Creature::SetHomePosition(), Creature::SetReactState(), Creature::SetWalk(), and WeegliDoorPosition.

Referenced by sGossipSelect().

◆ InitializeAI()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

447 {
448 events.Reset();
451 Reset();
452 }
@ UNIT_NPC_FLAG_GOSSIP
Definition UnitDefines.h:322
events
Definition boss_sartura.cpp:43
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:770
void Reset() override
Definition zulfarrak.cpp:468

References doorStage, Idle, ScriptedAI::me, Reset(), Unit::SetNpcFlag(), and UNIT_NPC_FLAG_GOSSIP.

Referenced by JustRespawned().

◆ JustDied()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::JustDied ( Unit *  )
inlineoverridevirtual

◆ JustReachedHome()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

553 {
555 {
557 return;
558 }
559
564 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
void MovementInform(uint32 type, uint32 id) override
Definition zulfarrak.cpp:566
@ PYRAMID_CAGES_OPEN
Definition zulfarrak.h:73
@ POINT_CREW_STAIRS
Definition zulfarrak.h:64
@ POINT_CREW_GATHER
Definition zulfarrak.h:66

References DATA_PYRAMID, doorStage, ZoneScript::GetData(), instance, MovementInform(), Moving, POINT_CREW_GATHER, POINT_CREW_STAIRS, POINT_MOTION_TYPE, POINT_WEEGLI_DOOR, PYRAMID_CAGES_OPEN, and PYRAMID_KILLED_ALL_TROLLS.

◆ JustRespawned()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::JustRespawned ( )
inlineoverridevirtual

◆ MovementInform()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

567 {
568 if (type != POINT_MOTION_TYPE)
569 return;
570
572 {
574 events.ScheduleEvent(EVENT_WEEGLI_PLANT_BARREL, 2s);
575 return;
576 }
577
579 return;
580
582 {
586 }
588 {
590 }
591 }
@ SAY_WEEGLI_OHNO
Definition zulfarrak.cpp:399
@ EVENT_WEEGLI_PLANT_BARREL
Definition zulfarrak.cpp:406
@ PYRAMID_ARRIVED_AT_STAIR
Definition zulfarrak.h:74
@ PYRAMID_MOVED_DOWNSTAIRS
Definition zulfarrak.h:81

References DATA_PYRAMID, doorStage, EVENT_WEEGLI_PLANT_BARREL, ZoneScript::GetData(), Idle, instance, ScriptedAI::me, Moving, Planting, POINT_CREW_GATHER, POINT_CREW_STAIRS, POINT_MOTION_TYPE, POINT_WEEGLI_DOOR, PYRAMID_ARRIVED_AT_STAIR, PYRAMID_CAGES_OPEN, PYRAMID_KILLED_ALL_TROLLS, PYRAMID_MOVED_DOWNSTAIRS, SAY_WEEGLI_OHNO, ZoneScript::SetData(), Unit::SetNpcFlag(), and UNIT_NPC_FLAG_GOSSIP.

Referenced by JustReachedHome().

◆ PathEndReached()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::PathEndReached ( uint32  pathId)
inlineoverridevirtual

Reimplemented from CreatureAI.

594 {
597 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2221
@ PATH_WEEGLI_ESCAPE
Definition zulfarrak.cpp:424

References Creature::DespawnOrUnsummon(), doorStage, Escaping, ScriptedAI::me, and PATH_WEEGLI_ESCAPE.

◆ Reset()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

469 {
470 Bomb_Timer = 10000;
471 LandMine_Timer = 30000;
472 }
uint32 LandMine_Timer
Definition zulfarrak.cpp:442
uint32 Bomb_Timer
Definition zulfarrak.cpp:441

References Bomb_Timer, and LandMine_Timer.

Referenced by InitializeAI().

◆ sGossipHello()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::sGossipHello ( Player *  player)
inlineoverridevirtual

Reimplemented from UnitAI.

636 {
637 switch (instance->GetData(DATA_PYRAMID))
638 {
643 case PYRAMID_DONE:
645 SendGossipMenuFor(player, 1514, me->GetGUID()); //if event can proceed to end
646 break;
648 SendGossipMenuFor(player, 1511, me->GetGUID()); //if event not started
649 break;
650 default:
651 SendGossipMenuFor(player, 1513, me->GetGUID()); //if event is in progress
652 }
653 }
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:61
void AddGossipItemFor(Player *player, uint32 icon, std::string const &text, uint32 sender, uint32 action)
Definition ScriptedGossip.cpp:28
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
Definition ScriptedGossip.cpp:45
@ GOSSIP_SENDER_MAIN
Definition ScriptedGossip.h:70
@ GOSSIP_ACTION_INFO_DEF
Definition ScriptedGossip.h:68
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:120
#define GOSSIP_WEEGLI
Definition zulfarrak.cpp:427
@ PYRAMID_DESTROY_GATES
Definition zulfarrak.h:82
@ PYRAMID_NOT_STARTED
Definition zulfarrak.h:72
@ PYRAMID_DONE
Definition zulfarrak.h:84
@ PYRAMID_GATES_DESTROYED
Definition zulfarrak.h:83

References AddGossipItemFor(), DATA_PYRAMID, ZoneScript::GetData(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ICON_CHAT, GOSSIP_SENDER_MAIN, GOSSIP_WEEGLI, instance, ScriptedAI::me, PYRAMID_DESTROY_GATES, PYRAMID_DONE, PYRAMID_GATES_DESTROYED, PYRAMID_KILLED_ALL_TROLLS, PYRAMID_MOVED_DOWNSTAIRS, PYRAMID_NOT_STARTED, and SendGossipMenuFor().

◆ sGossipSelect()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::sGossipSelect ( Player *  player,
uint32  ,
uint32  gossipListId 
)
inlineoverridevirtual

Reimplemented from UnitAI.

624 {
625 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
626 ClearGossipMenuFor(player);
627
628 if (action == GOSSIP_ACTION_INFO_DEF + 1)
629 {
630 CloseGossipMenuFor(player);
632 }
633 }
std::uint32_t uint32
Definition Define.h:107
void ClearGossipMenuFor(Player *player)
Definition ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition ScriptedGossip.cpp:56
uint32 GetGossipOptionAction(uint32 selection) const
Definition GossipDef.h:271
PlayerMenu * PlayerTalkClass
Definition Player.h:2287
void DoAction(int32 action) override
Definition zulfarrak.cpp:599

References ACTION_DESTROY_GATES, ClearGossipMenuFor(), CloseGossipMenuFor(), DoAction(), PlayerMenu::GetGossipOptionAction(), GOSSIP_ACTION_INFO_DEF, and Player::PlayerTalkClass.

◆ UpdateAI()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

483 {
484 events.Update(diff);
485 while (uint32 eventId = events.ExecuteEvent())
486 {
487 switch (eventId)
488 {
491 break;
492
494 {
495 events.ScheduleEvent(EVENT_WEEGLI_PLANT_BARREL, 1s);
496 break;
497 }
498
500 events.ScheduleEvent(EVENT_WEEGLI_ESCAPE, 3s);
501 break;
503 // The barrel's SmartAI records completion, not a movement callback or Bly's death.
505 {
506 events.ScheduleEvent(EVENT_WEEGLI_ESCAPE, 500ms);
507 break;
508 }
509
513 break;
514 }
515 }
516
518 return;
519
520 if (Bomb_Timer <= diff)
521 {
523 Bomb_Timer = 10000;
524 }
525 else
526 {
527 Bomb_Timer -= diff;
528 }
529
530 if (LandMine_Timer <= diff)
531 {
533 LandMine_Timer = 30000;
534 }
535 else
536 {
537 LandMine_Timer -= diff;
538 }
539
541 {
544 }
545 else
546 {
549 }
550 }
@ DONE
Definition InstanceScript.h:61
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
@ SHEATH_STATE_MELEE
Definition UnitDefines.h:130
@ SHEATH_STATE_RANGED
Definition UnitDefines.h:131
bool UpdateVictim()
Definition CreatureAI.cpp:350
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:1017
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:274
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:399
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition Unit.cpp:790
virtual void SetSheath(SheathState sheathed)
Definition Unit.h:1793
Unit * GetVictim() const
Definition Unit.h:910
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition Unit.h:895
@ EVENT_WEEGLI_ESCAPE
Definition zulfarrak.cpp:407
@ SPELL_GOBLIN_LAND_MINE
Definition zulfarrak.cpp:392
@ SPELL_SHOOT
Definition zulfarrak.cpp:393
@ SPELL_WEEGLIS_BARREL
Definition zulfarrak.cpp:394
@ SPELL_BOMB
Definition zulfarrak.cpp:391

References Bomb_Timer, MotionMaster::Clear(), DATA_END_DOOR, UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), DONE, doorStage, Escaping, EVENT_WEEGLI_ESCAPE, EVENT_WEEGLI_PLANT_BARREL, ZoneScript::GetData(), Unit::GetMotionMaster(), Unit::GetVictim(), Idle, instance, Unit::isAttackReady(), Unit::IsWithinMeleeRange(), LandMine_Timer, ScriptedAI::me, MotionMaster::MoveWaypoint(), PATH_WEEGLI_ESCAPE, Planting, Unit::SetSheath(), SHEATH_STATE_MELEE, SHEATH_STATE_RANGED, SPELL_BOMB, SPELL_CAST_OK, SPELL_GOBLIN_LAND_MINE, SPELL_SHOOT, SPELL_WEEGLIS_BARREL, CreatureAI::UpdateVictim(), and WaitingForExplosion.

Member Data Documentation

◆ Bomb_Timer

uint32 npc_weegli_blastfuse::npc_weegli_blastfuseAI::Bomb_Timer

Referenced by Reset(), and UpdateAI().

◆ doorStage

WeegliDoorStage npc_weegli_blastfuse::npc_weegli_blastfuseAI::doorStage = WeegliDoorStage::Idle

◆ instance

InstanceScript* npc_weegli_blastfuse::npc_weegli_blastfuseAI::instance

◆ LandMine_Timer

uint32 npc_weegli_blastfuse::npc_weegli_blastfuseAI::LandMine_Timer

Referenced by Reset(), and UpdateAI().


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