Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now * Implemented stopping transports * Implemented spawning transports in instances * Implemented spawning gameobjects as transport passengers * Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
This commit is contained in:
1 parent
53cc37bcec
commit
ce55647c41
43 files changed
+2165
-946
No files matched your search
@@ -17182,17 +17182,15 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (MapManager::TransportSet::iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter)
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(m_movementInfo.transport.guid))
|
||||
m_transport = go->ToTransport();
|
||||
|
||||
if (m_transport)
|
||||
{
|
||||
if ((*iter)->GetGUIDLow() == transGUID)
|
||||
{
|
||||
m_transport = *iter;
|
||||
m_transport->AddPassenger(this);
|
||||
mapId = (m_transport->GetMapId());
|
||||
break;
|
||||
}
|
||||
m_transport->AddPassenger(this);
|
||||
mapId = m_transport->GetMapId();
|
||||
}
|
||||
if (!m_transport)
|
||||
else
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
|
||||
guid, transGUID);
|
||||
@@ -22165,7 +22163,7 @@ inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, T* target, std::set
|
||||
template<>
|
||||
inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, GameObject* target, std::set<Unit*>& /*v*/)
|
||||
{
|
||||
// Don't update only GAMEOBJECT_TYPE_TRANSPORT (or all transports and destructible buildings?)
|
||||
// @HACK: This is to prevent objects like deeprun tram from disappearing when player moves far from its spawn point while riding it
|
||||
if ((target->GetGOInfo()->type != GAMEOBJECT_TYPE_TRANSPORT))
|
||||
s64.insert(target->GetGUID());
|
||||
}
|
||||
@@ -22217,9 +22215,6 @@ void Player::UpdateVisibilityOf(WorldObject* target)
|
||||
{
|
||||
if (CanSeeOrDetect(target, false, true))
|
||||
{
|
||||
//if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle)
|
||||
// UpdateVisibilityOf(((Unit*)target)->m_Vehicle);
|
||||
|
||||
target->SendUpdateToPlayer(this);
|
||||
m_clientGUIDs.insert(target->GetGUID());
|
||||
|
||||
@@ -22308,9 +22303,6 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
|
||||
{
|
||||
if (CanSeeOrDetect(target, false, true))
|
||||
{
|
||||
//if (target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle)
|
||||
// UpdateVisibilityOf(((Unit*)target)->m_Vehicle, data, visibleNow);
|
||||
|
||||
target->BuildCreateUpdateBlockForPlayer(&data, this);
|
||||
UpdateVisibilityOf_helper(m_clientGUIDs, target, visibleNow);
|
||||
|
||||
|
||||
Reference in new issue
Block a user