AzerothCore 3.3.5a
OpenSource WoW Emulator
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
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
void UpdateAI (uint32 diff) override
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 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)
void SetCombatMovement (bool allowMovement)
bool IsCombatMovementAllowed () const
virtual bool CheckEvadeIfOutOfCombatArea () const
bool IsHeroic () const
Difficulty GetDifficulty () const
bool Is25ManRaid () const
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
void Talk (uint8 id, Milliseconds delay)
 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 JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
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 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
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 ()
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 *)
- 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
virtual void InitializeAI ()
virtual void Reset ()
virtual void OnCharmed (bool apply)=0
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)
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
virtual void HealReceived (Unit *, uint32 &)
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
virtual void HealDone (Unit *, uint32 &)
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
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)
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)
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
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
- Public Attributes inherited from ScriptedAI
bool IsFleeing

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
- Public Types inherited from CreatureAI
enum  EvadeReason {
- 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)
397 : ScriptedAI(creature)
398 {
399 instance = creature->GetInstanceScript();
400 destroyingDoor = false;
401 outroTimer = 2000;
402 outroStage = 0;
403 }
Definition: ScriptedCreature.h:192
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
uint32 outroTimer
Definition: zulfarrak.cpp:407
bool destroyingDoor
Definition: zulfarrak.cpp:409
uint8 outroStage
Definition: zulfarrak.cpp:408
InstanceScript * instance
Definition: zulfarrak.cpp:410

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

Member Function Documentation

◆ AttackStart()

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

Reimplemented from ScriptedAI.

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

References UnitAI::AttackStartCaster().

◆ DestroyDoor()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::DestroyDoor ( )
536 {
537 if (me->IsAlive())
538 {
540 me->SetWalk(false);
541 me->GetMotionMaster()->MovePoint(0, { 1858.57f, 1146.35f, 14.745f, 3.85f });
542 me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f);
545 }
546 }
Definition: zulfarrak.cpp:384
Definition: zulfarrak.h:53
Definition: zulfarrak.h:69
Definition: boss_fathomlord_karathress.cpp:25
Definition: SharedDefines.h:201
Creature * me
Definition: ScriptedCreature.h:282
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:330
bool SetWalk(bool enable) override
Definition: Creature.cpp:3098
void SetFaction(uint32 faction)
Definition: Unit.cpp:10064
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
bool IsAlive() const
Definition: Unit.h:1822
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211

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

Reimplemented from UnitAI.

413 {
415 Reset();
416 }
Definition: Unit.h:516
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:1661
void Reset() override
Definition: zulfarrak.cpp:418

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

◆ JustReachedHome()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::JustReachedHome ( )

Reimplemented from CreatureAI.

495 {
497 {
501 }
503 {
505 }
507 {
508 destroyingDoor = true;
509 }
510 }
Definition: zulfarrak.cpp:383
Definition: zulfarrak.h:61
Definition: zulfarrak.h:60
Definition: zulfarrak.h:67
Definition: zulfarrak.h:68
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52


◆ MovementInform()

◆ Reset()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::Reset ( )

Reimplemented from ScriptedAI.

419 {
420 Bomb_Timer = 10000;
421 LandMine_Timer = 30000;
422 }
uint32 LandMine_Timer
Definition: zulfarrak.cpp:406
uint32 Bomb_Timer
Definition: zulfarrak.cpp:405

References Bomb_Timer, and LandMine_Timer.

Referenced by InitializeAI().

◆ sGossipHello()

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

Reimplemented from UnitAI.

562 {
563 switch (instance->GetData(DATA_PYRAMID))
564 {
568 SendGossipMenuFor(player, 1514, me->GetGUID()); //if event can proceed to end
569 break;
571 SendGossipMenuFor(player, 1511, me->GetGUID()); //if event not started
572 break;
573 default:
574 SendGossipMenuFor(player, 1513, me->GetGUID()); //if event is in progress
575 }
576 }
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
Definition: ScriptedGossip.h:70
Definition: ScriptedGossip.h:68
Definition: GossipDef.h:60
Definition: zulfarrak.cpp:388
Definition: zulfarrak.h:59
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106


◆ sGossipSelect()

void npc_weegli_blastfuse::npc_weegli_blastfuseAI::sGossipSelect ( Player player,
uint32  ,
uint32  gossipListId 

Reimplemented from UnitAI.

549 {
550 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
551 ClearGossipMenuFor(player);
553 if (action == GOSSIP_ACTION_INFO_DEF + 1)
554 {
555 CloseGossipMenuFor(player);
556 //here we make him run to door, set the charge and run away off to nowhere
557 DestroyDoor();
558 }
559 }
std::uint32_t uint32
Definition: Define.h:108
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
uint32 GetGossipOptionAction(uint32 selection) const
Definition: GossipDef.h:270
PlayerMenu * PlayerTalkClass
Definition: Player.h:2201
void DestroyDoor()
Definition: zulfarrak.cpp:535

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

◆ UpdateAI()

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

Reimplemented from ScriptedAI.

430 {
431 if (!UpdateVictim())
432 {
433 if (destroyingDoor)
434 {
435 if (outroTimer <= diff)
436 {
437 switch (outroStage)
438 {
439 case 0:
441 outroTimer = 2000;
442 ++outroStage;
443 break;
444 case 1:
445 me->GetMotionMaster()->MovePoint(2, 1871.18f, 1100.f, 8.88f);
447 me->DespawnOrUnsummon(8000);
449 destroyingDoor = false;
450 break;
451 }
452 }
453 else
454 {
455 outroTimer -= diff;
456 }
457 }
459 return;
460 }
462 if (Bomb_Timer <= diff)
463 {
465 Bomb_Timer = 10000;
466 }
467 else
468 {
469 Bomb_Timer -= diff;
470 }
472 if (LandMine_Timer <= diff)
473 {
475 LandMine_Timer = 30000;
476 }
477 else
478 {
479 LandMine_Timer -= diff;
480 }
483 {
486 }
487 else
488 {
491 }
492 }
Definition: Unit.h:127
Definition: Unit.h:128
Definition: zulfarrak.cpp:385
Definition: zulfarrak.cpp:376
Definition: zulfarrak.cpp:377
Definition: zulfarrak.cpp:378
Definition: zulfarrak.cpp:375
Definition: zulfarrak.h:70
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:379
bool UpdateVictim()
Definition: CreatureAI.cpp:268
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2117
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:683
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:1506
Unit * GetVictim() const
Definition: Unit.h:1398
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1355

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