Core/Commands: Fixed .npc add overwriting existing spawns when used on transports

This commit is contained in:
Shauren authored and Ovahlord committed 2020-05-16 13:47:43 +02:00
1 parent e3bab35d5e
commit bc57ecd3bd
1 file changed
+2 -1
+2 -1
View File
@@ -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());