diff options
author | NoName <322016+Faq@users.noreply.github.com> | 2020-05-19 12:40:50 +0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-06 00:22:44 +0100 |
commit | 7facbec01ec569d2213f8022dbc7f4f1a3272127 (patch) | |
tree | 68e542d75a1d137c3da4a17cd1e747803e90ea55 /src | |
parent | 28bc3a68fd265846f11b8ed66740e71a10eb8450 (diff) |
Core/Objects: Add GOSummonType argument to SummonGameObject accepting XYZ arguments instead of Position (#24655)
(cherry picked from commit d2b88fbd503565a0289cbaa4bf7315f8c9cf5211)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Entities/Object/Object.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 0780bc85a38..31c4bcefbac 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1892,7 +1892,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, Qua return go; } -GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, QuaternionData const& rot, uint32 respawnTime) +GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, QuaternionData const& rot, uint32 respawnTime, GOSummonType summonType) { if (!x && !y && !z) { @@ -1901,7 +1901,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float } Position pos(x, y, z, ang); - return SummonGameObject(entry, pos, rot, respawnTime); + return SummonGameObject(entry, pos, rot, respawnTime, summonType); } Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint32 duration, CreatureAI* (*GetAI)(Creature*)) diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index de477f61b09..4770ecfa3b8 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -572,7 +572,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType, Milliseconds despawnTime, uint32 vehId = 0, uint32 spellId = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty) { return SummonCreature(entry, pos, despawnType, uint32(despawnTime.count()), vehId, spellId, privateObjectOwner); } TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, ObjectGuid privateObjectOwner = ObjectGuid::Empty); 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 */); + 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); void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = nullptr); |