mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Commands: Fixed .npc add overwriting existing spawns when used on transports
(cherry picked from commit 75ab3619bd)
This commit is contained in:
@@ -217,9 +217,10 @@ public:
|
||||
|
||||
if (Transport* trans = chr->GetTransport())
|
||||
{
|
||||
ObjectGuid::LowType guid = map->GenerateLowGuid<HighGuid::Creature>();
|
||||
ObjectGuid::LowType guid = sObjectMgr->GenerateCreatureSpawnId();
|
||||
CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid);
|
||||
data.spawnId = guid;
|
||||
data.spawnGroupData = sObjectMgr->GetDefaultSpawnGroup();
|
||||
data.id = id;
|
||||
data.spawnPoint.Relocate(chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
|
||||
if (Creature* creature = trans->CreateNPCPassenger(guid, &data))
|
||||
|
||||
Reference in New Issue
Block a user