mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 11:55:43 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -344,7 +344,7 @@ void TransportMgr::AddPathNodeToTransport(uint32 transportEntry, uint32 timeSeg,
|
||||
animNode.Path[timeSeg] = node;
|
||||
}
|
||||
|
||||
MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* map /*= nullptr*/)
|
||||
MotionTransport* TransportMgr::CreateTransport(uint32 entry, ObjectGuid::LowType guid /*= 0*/, Map* map /*= nullptr*/)
|
||||
{
|
||||
// instance case, execute GetGameObjectEntry hook
|
||||
if (map)
|
||||
@@ -377,7 +377,8 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
|
||||
float o = tInfo->keyFrames.begin()->InitialOrientation;
|
||||
|
||||
// initialize the gameobject base
|
||||
uint32 guidLow = guid ? guid : sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT);
|
||||
ObjectGuid::LowType guidLow = guid ? guid : sObjectMgr->GetGenerator<HighGuid::Mo_Transport>().Generate();
|
||||
|
||||
if (!trans->CreateMoTrans(guidLow, entry, mapId, x, y, z, o, 255))
|
||||
{
|
||||
delete trans;
|
||||
@@ -401,6 +402,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
|
||||
|
||||
// xinef: transports are active so passengers can be relocated (grids must be loaded)
|
||||
trans->setActive(true);
|
||||
HashMapHolder<MotionTransport>::Insert(trans);
|
||||
trans->GetMap()->AddToMap<MotionTransport>(trans);
|
||||
return trans;
|
||||
}
|
||||
@@ -422,7 +424,7 @@ void TransportMgr::SpawnContinentTransports()
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
ObjectGuid::LowType guid = fields[0].GetUInt32();
|
||||
uint32 entry = fields[1].GetUInt32();
|
||||
|
||||
if (TransportTemplate const* tInfo = GetTransportTemplate(entry))
|
||||
|
||||
Reference in New Issue
Block a user