137#define STOMACH_X -8562.0f
138#define STOMACH_Y 2037.0f
139#define STOMACH_Z -70.0f
140#define STOMACH_O 5.05f
145 { -8571.0f, 1990.0f, -98.0f, 1.22f},
146 { -8525.0f, 1994.0f, -98.0f, 2.12f},
159 return GetAQ40AI<eye_of_cthunAI>(creature);
236 Spawned->AI()->AttackStart(target);
266 switch (currentPhase)
296 if (Spawned && Spawned->
AI())
414 if (damage < me->GetHealth())
461 return GetAQ40AI<cthunAI>(creature);
538 if (Spawned && Spawned->
AI())
548 std::unordered_map<ObjectGuid, bool>::const_iterator i =
Stomach_Map.begin();
550 std::list<Unit*> temp;
551 std::list<Unit*>::const_iterator j;
560 if (unit && i->second ==
false)
561 temp.push_back(unit);
573 advance(j,
rand32() % (temp.size() - 1));
622 switch (currentPhase)
655 for (
uint8 i = 0; i < 2; i++)
682 std::unordered_map<ObjectGuid, bool>::iterator i =
Stomach_Map.begin();
691 if (unit && i->second ==
true)
714 std::unordered_map<ObjectGuid, bool>::iterator i =
Stomach_Map.begin();
722 if (unit && i->second ==
true)
755 target->InterruptNonMeleeSpells(
false);
790 spawned->AI()->AttackStart(target);
805 spawned->AI()->AttackStart(target);
829 for (
uint8 i = 0; i < 2; i++)
894 return GetAQ40AI<eye_tentacleAI>(creature);
907 Portal = pPortal->GetGUID();
972 return GetAQ40AI<claw_tentacleAI>(creature);
988 Portal = pPortal->GetGUID();
1046 Portal = pPortal->GetGUID();
1084 return GetAQ40AI<giant_claw_tentacleAI>(creature);
1101 Portal = pPortal->GetGUID();
1161 Portal = pPortal->GetGUID();
1206 return GetAQ40AI<giant_eye_tentacleAI>(creature);
1220 Portal = pPortal->GetGUID();
1272 return GetAQ40AI<flesh_tentacleAI>(creature);
1285 if (
Unit* summoner = summon->GetSummonerUnit())
1286 if (summoner->IsAIEnabled())
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ TEMPSUMMON_CORPSE_DESPAWN
uint32 urand(uint32 min, uint32 max)
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ UNIT_FLAG_NON_ATTACKABLE
@ ACTION_FLESH_TENTACLE_KILLED
@ SPELL_EXIT_STOMACH_KNOCKBACK
@ SPELL_PURPLE_COLORATION
@ SPELL_MASSIVE_GROUND_RUPTURE
const Position FleshTentaclePos[2]
InstanceScript *const instance
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid const &guid) override
PlayerList const & GetPlayers() const
static ObjectGuid const Empty
static ObjectGuid GetGUID(Object const *o)
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetUnsortedThreatList() const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCast(uint32 spellId)
bool IsWithinMeleeRange(Unit const *obj) const
void SetHealth(uint64 val)
ThreatManager & GetThreatManager()
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
TempSummon * ToTempSummon()
void SetUninteractible(bool apply)
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void SetUnitFlag(UnitFlags flags)
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveUnitFlag(UnitFlags flags)
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
bool IsWithinDist3d(float x, float y, float z, float dist) const
InstanceScript * GetInstanceScript() const
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_giant_claw_tentacle()
CreatureAI * GetAI(Creature *creature) const override
npc_giant_flesh_tentacle()
CreatureAI * GetAI(Creature *creature) const override
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
constexpr void SetOrientation(float orientation)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
float GetAbsoluteAngle(float x, float y) const
constexpr float GetPositionZ() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SetCombatMovement(bool allowMovement)
void DoTeleportPlayer(Unit *unit, float x, float y, float z, float o)
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime)
void JustDied(Unit *) override
cthunAI(Creature *creature)
uint32 StomachEnterVisTimer
void UpdateAI(uint32 diff) override
void DoAction(int32 param) override
std::unordered_map< ObjectGuid, bool > Stomach_Map
uint8 FleshTentaclesKilled
uint32 GiantClawTentacleTimer
Unit * SelectRandomNotStomach()
uint32 GiantEyeTentacleTimer
ObjectGuid StomachEnterTarget
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void SpawnEyeTentacle(float x, float y)
uint32 DarkGlareTickTimer
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void SpawnEyeTentacle(float x, float y)
InstanceScript * instance
eye_of_cthunAI(Creature *creature)
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
claw_tentacleAI(Creature *creature)
uint32 GroundRuptureTimer
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
eye_tentacleAI(Creature *creature)
void JustDied(Unit *) override
giant_claw_tentacleAI(Creature *creature)
uint32 GroundRuptureTimer
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void JustDied(Unit *) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *) override
giant_eye_tentacleAI(Creature *creature)
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
flesh_tentacleAI(Creature *creature)
@ NPC_GIANT_CLAW_TENTACLE