diff options
| author | Carbenium <carbenium@outlook.com> | 2020-07-28 00:09:50 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-01-24 13:11:13 +0100 |
| commit | b3f2ff97ffae7012904e149271ff2dc080890829 (patch) | |
| tree | b8c82f855cfc4a3d5e121b372fb51157d871b203 /src/server/game | |
| parent | 10e3016e85f2a3a3cc0ec659eb2eae57ffe07be2 (diff) | |
Core/CreatureAI: std::chrono-ify DoSummon* methods
(cherry picked from commit 1245833cdd9988a2ac9c3a9374b40e76a53d889a)
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/AI/CreatureAI.h | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index b7b8cc88568..f2a7f346fa0 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -446,20 +446,20 @@ bool CreatureAI::CheckInRoom() } } -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 d246b4124d0..0f488e4925a 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -63,9 +63,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 |
