diff options
5 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index fc411d78d71..824653356f7 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2043,10 +2043,10 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float return SummonGameObject(entry, pos, rot, respawnTime, summonType); } -Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint32 duration, CreatureAI* (*GetAI)(Creature*)) +Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI* (*GetAI)(Creature*)) { - TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; - Creature* summon = SummonCreature(WORLD_TRIGGER, x, y, z, ang, summonType, Milliseconds(duration)); + TempSummonType summonType = (despawnTime == 0s) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; + Creature* summon = SummonCreature(WORLD_TRIGGER, x, y, z, ang, summonType, despawnTime); if (!summon) return nullptr; diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 7e1d397ee56..2189dca1a9a 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -408,7 +408,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s); GameObject* SummonGameObject(uint32 entry, Position const& pos, QuaternionData const& rot, uint32 respawnTime /* s */, GOSummonType summonType = GO_SUMMON_TIMED_OR_CORPSE_DESPAWN); GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, QuaternionData const& rot, uint32 respawnTime /* s */, GOSummonType summonType = GO_SUMMON_TIMED_OR_CORPSE_DESPAWN); - Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI* (*GetAI)(Creature*) = nullptr); + Creature* SummonTrigger(float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI* (*GetAI)(Creature*) = nullptr); void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = nullptr); Creature* FindNearestCreature(uint32 entry, float range, bool alive = true) const; diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 30acd239c78..5380b45f704 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -157,7 +157,7 @@ public: { if (GameObject* go = ObjectAccessor::GetGameObject(*me, *itr)) { - if (Creature* trigger = go->SummonTrigger(go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 1)) + if (Creature* trigger = go->SummonTrigger(go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 1ms)) { //visual effects are not working! trigger->CastSpell(trigger, 11542, true); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 73998bb15cd..942a5c18475 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -186,7 +186,7 @@ class boss_akilzon : public CreatureScript { x = 343.0f + rand32() % 60; y = 1380.0f + rand32() % 60; - if (Unit* trigger = me->SummonTrigger(x, y, z, 0, 2000)) + if (Unit* trigger = me->SummonTrigger(x, y, z, 0, 2s)) { trigger->SetFaction(FACTION_FRIENDLY); trigger->SetMaxHealth(100000); @@ -281,7 +281,7 @@ class boss_akilzon : public CreatureScript } */ - Unit* Cloud = me->SummonTrigger(x, y, me->GetPositionZ()+16, 0, 15000); + Unit* Cloud = me->SummonTrigger(x, y, me->GetPositionZ()+16, 0, 15s); if (Cloud) { CloudGUID = Cloud->GetGUID(); diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 50b20366978..a2a9d3728f0 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -370,7 +370,7 @@ class go_wg_vehicle_teleporter : public GameObjectScript if (Vehicle* vehicle = cVeh->GetVehicleKit()) if (Unit* passenger = vehicle->GetPassenger(0)) if (IsFriendly(passenger)) - if (Creature* teleportTrigger = passenger->SummonTrigger(me->GetPositionX()-60.0f, me->GetPositionY(), me->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1000)) + if (Creature* teleportTrigger = passenger->SummonTrigger(me->GetPositionX()-60.0f, me->GetPositionY(), me->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1s)) return teleportTrigger; return nullptr; |