From e660b870e95cb8289fc9f82fe53e8b6637a46594 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sat, 25 Jul 2020 21:25:28 +0200 Subject: Core/ScriptedAI: std::chrono-ify DoSpawnCreature (cherry picked from commit f5076112cb25bff877a450a14fe20172e9044081) --- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 4 ++-- src/server/game/AI/ScriptedAI/ScriptedCreature.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 8c5a51eed00..10b1e8d9577 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -282,9 +282,9 @@ void ScriptedAI::ForceCombatStopForCreatureEntry(std::vector creatureEnt ForceCombatStopForCreatureEntry(entry, maxSearchRange, samePhase, reset); } -Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime) +Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime) { - return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime); + return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime.count()); } bool ScriptedAI::HealthBelowPct(uint32 pct) const diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index eeeba10a21d..b53915c47f5 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -218,7 +218,7 @@ struct TC_GAME_API ScriptedAI : public CreatureAI Player* GetPlayerAtMinimumRange(float minRange); // Spawns a creature relative to me - Creature* DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime); + Creature* DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime); bool HealthBelowPct(uint32 pct) const; bool HealthAbovePct(uint32 pct) const; -- cgit v1.2.3