mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user