mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-03 23:57:10 +01:00
Core/Creatures: Moved autoattack handling from scripts to game
This commit is contained in:
@@ -156,8 +156,6 @@ struct emerald_dragonAI : public WorldBossAI
|
||||
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, -50.0f, true))
|
||||
DoCast(target, SPELL_SUMMON_PLAYER);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -129,12 +129,8 @@ struct npc_guard_generic : public GuardAI
|
||||
{
|
||||
me->resetAttackTimer();
|
||||
DoCastVictim(spellInfo->Id);
|
||||
meleeContext.Repeat();
|
||||
return;
|
||||
}
|
||||
}
|
||||
me->AttackerStateUpdate(victim);
|
||||
me->resetAttackTimer();
|
||||
meleeContext.Repeat();
|
||||
}).Schedule(Seconds(5), [this](TaskContext spellContext)
|
||||
{
|
||||
@@ -205,10 +201,7 @@ struct npc_guard_shattrath_faction : public GuardAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_scheduler.Update(diff, [this]
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
});
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
void ScheduleVanish()
|
||||
|
||||
@@ -251,8 +251,7 @@ public:
|
||||
ResetFlagTimer -= diff;
|
||||
}
|
||||
|
||||
if (UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
UpdateVictim();
|
||||
}
|
||||
|
||||
void ReceiveEmote(Player* player, uint32 emote) override
|
||||
|
||||
Reference in New Issue
Block a user