Skip to content

Commit

Permalink
AQ40: Modernize cthun even further and improve tentacle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 22, 2025
1 parent 6396054 commit aead663
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 155 deletions.
50 changes: 28 additions & 22 deletions sql/base/dbc/cmangos_fixes/Spell.sql

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3386,9 +3386,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
('-1531009','I sentence you to death!','8647','1','0','0','11443','sartura SAY_SLAY'),
('-1531010','I serve to the last!','8648','1','0','0','11444','sartura SAY_DEATH'),

('-1531011','%s is weakened!','0','2','0','0','11476','cthun EMOTE_WEAKENED'),

('-1531012','The massive floating eyeball in the center of the chamber turns its gaze upon you. You stand before a god.','0','7','0','0','11700','eye cthun EMOTE_INTRO'),
('-1531013','Only flesh and bone. Mortals are such easy prey...','0','1','0','1','11702','veklor SAY_INTRO_1'),
('-1531014','Where are your manners, brother. Let us properly welcome our guests.','0','1','0','5','11706','veknilash SAY_INTRO_2'),
('-1531015','There will be pain...','0','1','0','0','11707','veklor SAY_INTRO_3'),
Expand Down
2 changes: 2 additions & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(26275,'spell_wondervolt_trap'),
(26332,'spell_cthun_mouth_tentacle'),
(26398,'spell_cthun_tentacles_summon'),
(26399,'spell_despawn_tentacles'),
(26404,'spell_despawn_tent_port'),
(26476,'spell_cthun_digestive_acid_periodic'),
(26584,'spell_summon_toxic_slime'),
(26585,'spell_viscidus_despawn_adds'),
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,6 @@ void instance_temple_of_ahnqiraj::OnCreatureCreate(Creature* creature)
case NPC_POISON_CLOUD:
m_bugTrioSpawns.push_back(creature->GetObjectGuid());
break;
case NPC_CLAW_TENTACLE:
case NPC_EYE_TENTACLE:
if (creature->AI())
creature->AI()->SetCombatMovement(false);
creature->CastSpell(creature, SPELL_SUMMON_PORTAL, TRIGGERED_OLD_TRIGGERED);
break;
case NPC_GIANT_CLAW_TENTACLE:
case NPC_GIANT_EYE_TENTACLE:
if (creature->AI())
creature->AI()->SetCombatMovement(false);
creature->CastSpell(creature, SPELL_SUMMON_GIANT_PORTAL, TRIGGERED_OLD_TRIGGERED);
break;
case NPC_EYE_OF_CTHUN:
// Safeguard for C'Thun encounter in case of fight abruptly ended during phase 2
if (GetData(TYPE_CTHUN) != DONE)
Expand Down Expand Up @@ -320,18 +308,20 @@ void instance_temple_of_ahnqiraj::SetData(uint32 type, uint32 data)
// Respawn the Eye of C'Thun when failing in phase 2
if (Creature* eyeOfCthun = GetSingleCreatureFromStorage(NPC_EYE_OF_CTHUN))
{
if (!eyeOfCthun->IsAlive())
eyeOfCthun->Respawn();
// Reset combat
if (eyeOfCthun->AI() && eyeOfCthun->IsInCombat())
eyeOfCthun->AI()->EnterEvadeMode();
}
if (Creature* cthun = GetSingleCreatureFromStorage(NPC_CTHUN))
else
{
auto iter = m_npcEntryGuidStore.find(NPC_EYE_OF_CTHUN);
if (iter != m_npcEntryGuidStore.end())
instance->GetSpawnManager().RespawnCreature(iter->second.GetCounter(), 60);
}

if (Creature* cthun = GetSingleCreatureFromStorage(NPC_CTHUN))
// Reset combat
if (cthun->AI() && cthun->IsInCombat())
cthun->AI()->EnterEvadeMode();
}
}
m_encounter[type] = data;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ enum
GO_TWINS_EXIT_DOOR = 180635,
GO_SANDWORM_BASE = 180795,

EMOTE_EYE_INTRO = -1531012,
EMOTE_EYE_INTRO = 11700,
STAND_EMPERORS_INTRO = 1,
SAY_EMPERORS_INTRO_1 = -1531013,
SAY_EMPERORS_INTRO_2 = -1531014,
Expand Down Expand Up @@ -81,6 +81,7 @@ enum

SPELL_SUMMON_PORTAL = 26396,
SPELL_SUMMON_GIANT_PORTAL = 26477,
SPELL_BIRTH_TENTACLE = 26586,

NPC_POISON_CLOUD = 15933,

Expand Down
6 changes: 0 additions & 6 deletions src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1488,12 +1488,6 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)

return;
}
case 26399: // Despawn Tentacles
{
if (unitTarget->GetTypeId() == TYPEID_UNIT)
((Creature*)unitTarget)->ForcedDespawn();
return;
}
case 26626: // Mana Burn Area
{
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->GetPowerType() == POWER_MANA)
Expand Down

0 comments on commit aead663

Please sign in to comment.