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 Reset () override
 
void AttackStart (Unit *victim) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void JustReachedHome () override
 
void MovementInform (uint32 type, uint32) override
 
void DestroyDoor ()
 
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) 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
 
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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon. More...
 
 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
 

Public Attributes

uint32 Bomb_Timer
 
uint32 LandMine_Timer
 
uint32 outroTimer
 
uint8 outroStage
 
bool destroyingDoor
 
InstanceScriptinstance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

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

◆ npc_weegli_blastfuseAI()

npc_weegli_blastfuse::npc_weegli_blastfuseAI::npc_weegli_blastfuseAI ( Creature creature)
inline
401 : ScriptedAI(creature)
402 {
403 instance = creature->GetInstanceScript();
404 destroyingDoor = false;
405 outroTimer = 2000;
406 outroStage = 0;
407 }
Definition: ScriptedCreature.h:190
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
uint32 outroTimer
Definition: zulfarrak.cpp:411
bool destroyingDoor
Definition: zulfarrak.cpp:413
uint8 outroStage
Definition: zulfarrak.cpp:412
InstanceScript * instance
Definition: zulfarrak.cpp:414

References destroyingDoor, WorldObject::GetInstanceScript(), instance, outroStage, and outroTimer.

Member Function Documentation

◆ AttackStart()

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

Reimplemented from ScriptedAI.

429 {
430 AttackStartCaster(victim, 10);//keep back & toss bombs/shoot
431 }
void AttackStartCaster(Unit *victim, float dist)
Definition: UnitAI.cpp:33

References UnitAI::AttackStartCaster().

◆ DestroyDoor()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::DestroyDoor ( )
inline
540 {
541 if (me->IsAlive())
542 {
544 me->SetWalk(false);
545 me->GetMotionMaster()->MovePoint(0, { 1858.57f, 1146.35f, 14.745f, 3.85f });
546 me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f);
549 }
550 }
@ DATA_PYRAMID
Definition: zulfarrak.h:51
@ PYRAMID_DESTROY_GATES
Definition: zulfarrak.h:67
@ SAY_WEEGLI_OK_I_GO
Definition: zulfarrak.cpp:388
Talk
Definition: hyjal.cpp:82
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
Creature * me
Definition: ScriptedCreature.h:280
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:336
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3191
void SetFaction(uint32 faction)
Definition: Unit.cpp:10056
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
bool IsAlive() const
Definition: Unit.h:1654
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213

References DATA_PYRAMID, FACTION_FRIENDLY, Unit::GetMotionMaster(), instance, Unit::IsAlive(), ScriptedAI::me, MotionMaster::MovePoint(), PYRAMID_DESTROY_GATES, SAY_WEEGLI_OK_I_GO, ZoneScript::SetData(), Unit::SetFaction(), Creature::SetHomePosition(), and Creature::SetWalk().

Referenced by sGossipSelect().

◆ InitializeAI()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

417 {
419 Reset();
420 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:726
void Reset() override
Definition: zulfarrak.cpp:422

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

◆ JustReachedHome()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

499 {
501 {
505 }
507 {
509 }
511 {
512 destroyingDoor = true;
513 }
514 }
@ PYRAMID_ARRIVED_AT_STAIR
Definition: zulfarrak.h:59
@ PYRAMID_CAGES_OPEN
Definition: zulfarrak.h:58
@ PYRAMID_KILLED_ALL_TROLLS
Definition: zulfarrak.h:65
@ PYRAMID_MOVED_DOWNSTAIRS
Definition: zulfarrak.h:66
@ SAY_WEEGLI_OHNO
Definition: zulfarrak.cpp:387
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51

References DATA_PYRAMID, destroyingDoor, ZoneScript::GetData(), instance, ScriptedAI::me, PYRAMID_ARRIVED_AT_STAIR, PYRAMID_CAGES_OPEN, PYRAMID_DESTROY_GATES, PYRAMID_KILLED_ALL_TROLLS, PYRAMID_MOVED_DOWNSTAIRS, SAY_WEEGLI_OHNO, ZoneScript::SetData(), Unit::SetNpcFlag(), and UNIT_NPC_FLAG_GOSSIP.

◆ MovementInform()

◆ Reset()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

423 {
424 Bomb_Timer = 10000;
425 LandMine_Timer = 30000;
426 }
uint32 LandMine_Timer
Definition: zulfarrak.cpp:410
uint32 Bomb_Timer
Definition: zulfarrak.cpp:409

References Bomb_Timer, and LandMine_Timer.

Referenced by InitializeAI().

◆ sGossipHello()

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

Reimplemented from UnitAI.

566 {
567 switch (instance->GetData(DATA_PYRAMID))
568 {
572 SendGossipMenuFor(player, 1514, me->GetGUID()); //if event can proceed to end
573 break;
575 SendGossipMenuFor(player, 1511, me->GetGUID()); //if event not started
576 break;
577 default:
578 SendGossipMenuFor(player, 1513, me->GetGUID()); //if event is in progress
579 }
580 }
@ PYRAMID_NOT_STARTED
Definition: zulfarrak.h:57
#define GOSSIP_WEEGLI
Definition: zulfarrak.cpp:392
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const guid)
Definition: ScriptedGossip.cpp:45
void AddGossipItemFor(Player *player, uint32 icon, std::string const &text, uint32 sender, uint32 action)
Definition: ScriptedGossip.cpp:28
@ GOSSIP_SENDER_MAIN
Definition: ScriptedGossip.h:70
@ GOSSIP_ACTION_INFO_DEF
Definition: ScriptedGossip.h:68
@ GOSSIP_ICON_CHAT
Definition: GossipDef.h:61
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112

References AddGossipItemFor(), DATA_PYRAMID, ZoneScript::GetData(), Object::GetGUID(), GOSSIP_ACTION_INFO_DEF, GOSSIP_ICON_CHAT, GOSSIP_SENDER_MAIN, GOSSIP_WEEGLI, instance, ScriptedAI::me, 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.

553 {
554 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
555 ClearGossipMenuFor(player);
556
557 if (action == GOSSIP_ACTION_INFO_DEF + 1)
558 {
559 CloseGossipMenuFor(player);
560 //here we make him run to door, set the charge and run away off to nowhere
561 DestroyDoor();
562 }
563 }
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:2239
void DestroyDoor()
Definition: zulfarrak.cpp:539

References ClearGossipMenuFor(), CloseGossipMenuFor(), DestroyDoor(), 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()

Reimplemented from ScriptedAI.

434 {
435 if (!UpdateVictim())
436 {
437 if (destroyingDoor)
438 {
439 if (outroTimer <= diff)
440 {
441 switch (outroStage)
442 {
443 case 0:
445 outroTimer = 2000;
446 ++outroStage;
447 break;
448 case 1:
449 me->GetMotionMaster()->MovePoint(2, 1871.18f, 1100.f, 8.88f);
451 me->DespawnOrUnsummon(8000);
453 destroyingDoor = false;
454 break;
455 }
456 }
457 else
458 {
459 outroTimer -= diff;
460 }
461 }
462
463 return;
464 }
465
466 if (Bomb_Timer <= diff)
467 {
469 Bomb_Timer = 10000;
470 }
471 else
472 {
473 Bomb_Timer -= diff;
474 }
475
476 if (LandMine_Timer <= diff)
477 {
479 LandMine_Timer = 30000;
480 }
481 else
482 {
483 LandMine_Timer -= diff;
484 }
485
487 {
490 }
491 else
492 {
495 }
496 }
@ PYRAMID_GATES_DESTROYED
Definition: zulfarrak.h:68
@ SAY_WEEGLI_OUT_OF_HERE
Definition: zulfarrak.cpp:389
@ SPELL_GOBLIN_LAND_MINE
Definition: zulfarrak.cpp:380
@ SPELL_SHOOT
Definition: zulfarrak.cpp:381
@ SPELL_WEEGLIS_BARREL
Definition: zulfarrak.cpp:382
@ SPELL_BOMB
Definition: zulfarrak.cpp:379
@ SHEATH_STATE_MELEE
Definition: UnitDefines.h:106
@ SHEATH_STATE_RANGED
Definition: UnitDefines.h:107
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:240
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:392
bool UpdateVictim()
Definition: CreatureAI.cpp:280
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2178
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:664
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:1639
Unit * GetVictim() const
Definition: Unit.h:853
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:838

References Bomb_Timer, DATA_PYRAMID, Creature::DespawnOrUnsummon(), destroyingDoor, UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), Unit::GetMotionMaster(), Unit::GetVictim(), instance, Unit::isAttackReady(), Unit::IsWithinMeleeRange(), LandMine_Timer, ScriptedAI::me, MotionMaster::MovePoint(), outroStage, outroTimer, PYRAMID_GATES_DESTROYED, SAY_WEEGLI_OUT_OF_HERE, ZoneScript::SetData(), Unit::SetSheath(), SHEATH_STATE_MELEE, SHEATH_STATE_RANGED, SPELL_BOMB, SPELL_GOBLIN_LAND_MINE, SPELL_SHOOT, SPELL_WEEGLIS_BARREL, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ Bomb_Timer

uint32 npc_weegli_blastfuse::npc_weegli_blastfuseAI::Bomb_Timer

Referenced by Reset(), and UpdateAI().

◆ destroyingDoor

bool npc_weegli_blastfuse::npc_weegli_blastfuseAI::destroyingDoor

◆ 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().

◆ outroStage

uint8 npc_weegli_blastfuse::npc_weegli_blastfuseAI::outroStage

Referenced by npc_weegli_blastfuseAI(), and UpdateAI().

◆ outroTimer

uint32 npc_weegli_blastfuse::npc_weegli_blastfuseAI::outroTimer

Referenced by npc_weegli_blastfuseAI(), and UpdateAI().