aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-07-28 00:09:50 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-28 17:25:51 +0200
commit1245833cdd9988a2ac9c3a9374b40e76a53d889a (patch)
tree5fac8d6f273754d8dfd07e873727eb7db48e48fd /src/server/game/AI
parent2ea511b9f45d2e8ad33824fd76e848dace264469 (diff)
Core/CreatureAI: std::chrono-ify DoSummon* methods
Diffstat (limited to 'src/server/game/AI')
-rw-r--r--src/server/game/AI/CreatureAI.cpp12
-rw-r--r--src/server/game/AI/CreatureAI.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index a3c469a2686..0a3b87efd30 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -434,20 +434,20 @@ void CreatureAI::SetBoundary(CreatureBoundary const* boundary, bool negateBounda
me->DoImmediateBoundaryCheck();
}
-Creature* CreatureAI::DoSummon(uint32 entry, Position const& pos, uint32 despawnTime, TempSummonType summonType)
+Creature* CreatureAI::DoSummon(uint32 entry, Position const& pos, Milliseconds despawnTime, TempSummonType summonType)
{
- return me->SummonCreature(entry, pos, summonType, Milliseconds(despawnTime));
+ return me->SummonCreature(entry, pos, summonType, despawnTime);
}
-Creature* CreatureAI::DoSummon(uint32 entry, WorldObject* obj, float radius, uint32 despawnTime, TempSummonType summonType)
+Creature* CreatureAI::DoSummon(uint32 entry, WorldObject* obj, float radius, Milliseconds despawnTime, TempSummonType summonType)
{
Position pos = obj->GetRandomNearPosition(radius);
- return me->SummonCreature(entry, pos, summonType, Milliseconds(despawnTime));
+ return me->SummonCreature(entry, pos, summonType, despawnTime);
}
-Creature* CreatureAI::DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius, uint32 despawnTime, TempSummonType summonType)
+Creature* CreatureAI::DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius, Milliseconds despawnTime, TempSummonType summonType)
{
Position pos = obj->GetRandomNearPosition(radius);
pos.m_positionZ += flightZ;
- return me->SummonCreature(entry, pos, summonType, Milliseconds(despawnTime));
+ return me->SummonCreature(entry, pos, summonType, despawnTime);
}
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index 18f4230f2fc..c3a4a21cffb 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -82,9 +82,9 @@ class TC_GAME_API CreatureAI : public UnitAI
bool UpdateVictim();
- Creature* DoSummon(uint32 entry, Position const& pos, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
- Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
- Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ Creature* DoSummon(uint32 entry, Position const& pos, Milliseconds despawnTime = 30s, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, Milliseconds despawnTime = 30s, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, Milliseconds despawnTime = 30s, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
public:
enum EvadeReason