fix(Scripts/Karazhan): Fix Dorothee yell once Tito dies and clean up … (#17395)

* fix(Scripts/Karazhan): Fix Dorothee yell once Tito dies and clean up script

* fix dorothee interrupt immunity
This commit is contained in:
Skjalf
2023-10-01 02:24:11 -03:00
committed by GitHub
parent 5385d0bb59
commit c17a6c0a0e
2 changed files with 7 additions and 80 deletions

View File

@@ -0,0 +1,2 @@
--
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|33554432 WHERE `entry` = 17535;

View File

@@ -231,20 +231,12 @@ struct boss_dorothee : public ScriptedAI
me->DespawnOrUnsummon();
}
void AttackStart(Unit* who) override
void SummonedCreatureDies(Creature* creature, Unit* /*killer*/) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
if (creature->GetEntry() == NPC_TITO)
{
Talk(SAY_DOROTHEE_TITO_DEATH);
}
}
void EnterEvadeMode(EvadeReason reason) override
@@ -288,8 +280,6 @@ struct npc_tito : public ScriptedAI
InstanceScript* instance;
void Reset() override { }
void JustEngagedWith(Unit* /*who*/) override
{
_scheduler.Schedule(10s, [this](TaskContext context)
@@ -299,18 +289,6 @@ struct npc_tito : public ScriptedAI
});
}
void JustDied(Unit* /*killer*/) override
{
if (Creature* Dorothee = instance->GetCreature(DATA_DOROTHEE))
{
if (Dorothee->IsAlive())
{
Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee);
}
}
me->DespawnOrUnsummon();
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
@@ -351,17 +329,6 @@ struct boss_roar : public ScriptedAI
}
}
void Reset() override { }
void MoveInLineOfSight(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
}
void EnterEvadeMode(EvadeReason reason) override
{
ScriptedAI::EnterEvadeMode(reason);
@@ -373,14 +340,6 @@ struct boss_roar : public ScriptedAI
}
}
void AttackStart(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
}
void JustEngagedWith(Unit* /*who*/) override
{
Talk(SAY_ROAR_AGGRO);
@@ -458,24 +417,6 @@ struct boss_strawman : public ScriptedAI
}
}
void Reset() override { }
void AttackStart(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
}
void EnterEvadeMode(EvadeReason reason) override
{
ScriptedAI::EnterEvadeMode(reason);
@@ -601,22 +542,6 @@ struct boss_tinhead : public ScriptedAI
me->DespawnOrUnsummon();
}
void AttackStart(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who) override
{
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
}
void EnterEvadeMode(EvadeReason reason) override
{
ScriptedAI::EnterEvadeMode(reason);