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);
235 Spawned->AI()->AttackStart(target);
265 switch (currentPhase)
295 if (Spawned && Spawned->
AI())
413 if (damage < me->GetHealth())
459 return GetAQ40AI<cthunAI>(creature);
535 if (Spawned && Spawned->
AI())
545 std::unordered_map<ObjectGuid, bool>::const_iterator i =
Stomach_Map.begin();
547 std::list<Unit*> temp;
548 std::list<Unit*>::const_iterator j;
557 if (unit && i->second ==
false)
558 temp.push_back(unit);
570 advance(j,
rand32() % (temp.size() - 1));
619 switch (currentPhase)
651 for (
uint8 i = 0; i < 2; i++)
678 std::unordered_map<ObjectGuid, bool>::iterator i =
Stomach_Map.begin();
687 if (unit && i->second ==
true)
710 std::unordered_map<ObjectGuid, bool>::iterator i =
Stomach_Map.begin();
718 if (unit && i->second ==
true)
751 target->InterruptNonMeleeSpells(
false);
785 spawned->AI()->AttackStart(target);
800 spawned->AI()->AttackStart(target);
824 for (
uint8 i = 0; i < 2; i++)
889 return GetAQ40AI<eye_tentacleAI>(creature);
902 Portal = pPortal->GetGUID();
967 return GetAQ40AI<claw_tentacleAI>(creature);
983 Portal = pPortal->GetGUID();
1041 Portal = pPortal->GetGUID();
1081 return GetAQ40AI<giant_claw_tentacleAI>(creature);
1098 Portal = pPortal->GetGUID();
1158 Portal = pPortal->GetGUID();
1205 return GetAQ40AI<giant_eye_tentacleAI>(creature);
1219 Portal = pPortal->GetGUID();
1271 return GetAQ40AI<flesh_tentacleAI>(creature);
1284 if (
Unit* summoner = summon->GetSummonerUnit())
1285 if (summoner->IsAIEnabled())
First const & RAND(First const &first, Second const &second, Rest const &... rest)
@ TEMPSUMMON_CORPSE_DESPAWN
uint32 urand(uint32 min, uint32 max)
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
@ ACTION_FLESH_TENTACLE_KILLED
@ SPELL_EXIT_STOMACH_KNOCKBACK
@ SPELL_PURPLE_COLORATION
@ SPELL_MASSIVE_GROUND_RUPTURE
const Position FleshTentaclePos[2]
InstanceScript *const instance
void DoZoneInCombat(Creature *creature=nullptr)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid guid) override
PlayerList const & GetPlayers() const
static ObjectGuid const Empty
static ObjectGuid GetGUID(Object const *o)
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetUnsortedThreatList() const
void DoMeleeAttackIfReady()
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)
virtual void AttackStart(Unit *)
SpellCastResult DoCast(uint32 spellId)
bool IsWithinMeleeRange(Unit const *obj) const
void KillSelf(bool durabilityLoss=true)
ThreatManager & GetThreatManager()
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
void SetHealth(uint32 val)
TempSummon * ToTempSummon()
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetFacingTo(float const ori, bool force=true)
void SetUnitFlag(UnitFlags flags)
void RemoveUnitFlag(UnitFlags flags)
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
void PlayDirectSound(uint32 soundId, Player *target=nullptr)
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)
float GetPositionZ() const
float GetAbsoluteAngle(float x, float y) const
void SetOrientation(float orientation)
float GetPositionX() const
float GetPositionY() const
void AttackStart(Unit *) override
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