mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/AI: add another helper for "ScriptedAI::ForceCombatStop"
(cherry picked from commit 3842ab2781)
This commit is contained in:
@@ -272,6 +272,12 @@ void ScriptedAI::ForceCombatStopForCreatureEntry(uint32 entry, float maxSearchRa
|
||||
ForceCombatStop(creature, reset);
|
||||
}
|
||||
|
||||
void ScriptedAI::ForceCombatStopForCreatureEntry(std::vector<uint32> creatureEntries, float maxSearchRange /*= 250.0f*/, bool samePhase /*= true*/, bool reset /*= true*/)
|
||||
{
|
||||
for (uint32 const entry : creatureEntries)
|
||||
ForceCombatStopForCreatureEntry(entry, maxSearchRange, samePhase, reset);
|
||||
}
|
||||
|
||||
Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
|
||||
{
|
||||
return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime);
|
||||
|
||||
@@ -192,6 +192,8 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
void ForceCombatStop(Creature* who, bool reset = true);
|
||||
// Stops combat, ignoring restrictions, for the found creatures
|
||||
void ForceCombatStopForCreatureEntry(uint32 entry, float maxSearchRange = 250.0f, bool samePhase = true, bool reset = true);
|
||||
// Stops combat, ignoring restrictions, for the found creatures
|
||||
void ForceCombatStopForCreatureEntry(std::vector<uint32> creatureEntries, float maxSearchRange = 250.0f, bool samePhase = true, bool reset = true);
|
||||
|
||||
void DoTeleportTo(float x, float y, float z, uint32 time = 0);
|
||||
void DoTeleportTo(float const pos[4]);
|
||||
|
||||
Reference in New Issue
Block a user