diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-26 20:44:07 +0200 |
---|---|---|
committer | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-26 23:30:32 +0200 |
commit | 1131229ee9c43704b11187f0b11c327db92018b6 (patch) | |
tree | bc8614c3f34492f46789033f3272f4dc0c24426f /src/server/game/AI/CreatureAI.cpp | |
parent | e6f36f83b8af4d973a96f01c6095b075dd12f5d5 (diff) |
Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0);
to
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s);
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index b13c1660fc8..a044d00c0ef 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -323,7 +323,7 @@ static const float BOUNDARY_VISUALIZE_CREATURE_SCALE = 0.25f; static const int8 BOUNDARY_VISUALIZE_STEP_SIZE = 1; static const int32 BOUNDARY_VISUALIZE_FAILSAFE_LIMIT = 750; static const float BOUNDARY_VISUALIZE_SPAWN_HEIGHT = 5.0f; -int32 CreatureAI::VisualizeBoundary(uint32 duration, Unit* owner, bool fill) const +int32 CreatureAI::VisualizeBoundary(Seconds duration, Unit* owner, bool fill) const { typedef std::pair<int32, int32> coordinate; @@ -381,7 +381,7 @@ int32 CreatureAI::VisualizeBoundary(uint32 duration, Unit* owner, bool fill) con } if (fill || hasOutOfBoundsNeighbor) { - if (TempSummon* point = owner->SummonCreature(BOUNDARY_VISUALIZE_CREATURE, Position(startPosition.GetPositionX() + front.first * BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + front.second * BOUNDARY_VISUALIZE_STEP_SIZE, spawnZ), TEMPSUMMON_TIMED_DESPAWN, duration * IN_MILLISECONDS)) + if (TempSummon* point = owner->SummonCreature(BOUNDARY_VISUALIZE_CREATURE, Position(startPosition.GetPositionX() + front.first * BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + front.second * BOUNDARY_VISUALIZE_STEP_SIZE, spawnZ), TEMPSUMMON_TIMED_DESPAWN, duration)) { point->SetObjectScale(BOUNDARY_VISUALIZE_CREATURE_SCALE); point->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); |