Skip to content

Commit

Permalink
UnitAI: Fix Wandering Eye of Kilrogg
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Jan 1, 2025
1 parent 4fd9221 commit cf931ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(20038,'spell_explosion_razorgore'),
(21651,'spell_opening_capping'),
(22858,'spell_retaliation_creature'),
(22876,'spell_summon_netherwalker'),
(23134,'spell_goblin_bomb'),
(23226,'spell_ritual_candle_aura'),
(24228,'spell_arlokk_vanish'),
Expand Down
4 changes: 0 additions & 4 deletions src/game/AI/BaseAI/UnitAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,10 +829,6 @@ void UnitAI::TimedFleeingEnded()

bool UnitAI::DoFlee(uint32 duration)
{
Unit* victim = m_unit->GetVictim();
if (!victim)
return false;

if (!duration)
duration = sWorld.getConfig(CONFIG_UINT32_CREATURE_FAMILY_FLEE_DELAY);

Expand Down
13 changes: 13 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/kalimdor/dire_maul/dire_maul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,18 @@ struct RitualCandleAura : public SpellScript
}
};

// 22876 - Summon Netherwalker
struct SummonNetherWalker : public SpellScript
{
void OnSuccessfulFinish(Spell* spell) const override
{
Creature* caster = static_cast<Creature*>(spell->GetCaster());
if (!caster || !caster->IsAlive() || !caster->IsCreature())
return;
caster->ForcedDespawn();
}
};

void AddSC_dire_maul()
{
Script* pNewScript = new Script;
Expand All @@ -326,4 +338,5 @@ void AddSC_dire_maul()
pNewScript->RegisterSelf();

RegisterSpellScript<RitualCandleAura>("spell_ritual_candle_aura");
RegisterSpellScript<SummonNetherWalker>("spell_summon_netherwalker");
}

0 comments on commit cf931ea

Please sign in to comment.