Core/Commands: Fixed .npc add overwriting existing spawns when used on transports
This commit is contained in:
1 parent
e3bab35d5e
commit
bc57ecd3bd
1 file changed
+2
-1
@@ -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