mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Commands: Fixed .npc add overwriting existing spawns when used on transports
This commit is contained in:
@@ -350,9 +350,10 @@ public:
|
||||
|
||||
if (MapTransport* trans = chr->GetMapTransport())
|
||||
{
|
||||
ObjectGuid::LowType guid = map->GenerateLowGuid<HighGuid::Unit>();
|
||||
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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user