mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
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:
@@ -315,6 +315,7 @@ void Map::ScriptsProcess()
|
||||
case HIGHGUID_PLAYER:
|
||||
source = HashMapHolder<Player>::Find(step.sourceGUID);
|
||||
break;
|
||||
case HIGHGUID_TRANSPORT:
|
||||
case HIGHGUID_GAMEOBJECT:
|
||||
source = HashMapHolder<GameObject>::Find(step.sourceGUID);
|
||||
break;
|
||||
@@ -322,15 +323,11 @@ void Map::ScriptsProcess()
|
||||
source = HashMapHolder<Corpse>::Find(step.sourceGUID);
|
||||
break;
|
||||
case HIGHGUID_MO_TRANSPORT:
|
||||
for (MapManager::TransportSet::iterator itr2 = sMapMgr->m_Transports.begin(); itr2 != sMapMgr->m_Transports.end(); ++itr2)
|
||||
{
|
||||
if ((*itr2)->GetGUID() == step.sourceGUID)
|
||||
{
|
||||
source = *itr2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
GameObject* go = HashMapHolder<GameObject>::Find(step.sourceGUID);
|
||||
source = go ? go->ToTransport() : NULL;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
|
||||
step.script->GetDebugInfo().c_str(), step.sourceGUID, GUID_HIPART(step.sourceGUID));
|
||||
@@ -353,12 +350,19 @@ void Map::ScriptsProcess()
|
||||
case HIGHGUID_PLAYER: // empty GUID case also
|
||||
target = HashMapHolder<Player>::Find(step.targetGUID);
|
||||
break;
|
||||
case HIGHGUID_TRANSPORT:
|
||||
case HIGHGUID_GAMEOBJECT:
|
||||
target = HashMapHolder<GameObject>::Find(step.targetGUID);
|
||||
break;
|
||||
case HIGHGUID_CORPSE:
|
||||
target = HashMapHolder<Corpse>::Find(step.targetGUID);
|
||||
break;
|
||||
case HIGHGUID_MO_TRANSPORT:
|
||||
{
|
||||
GameObject* go = HashMapHolder<GameObject>::Find(step.targetGUID);
|
||||
target = go ? go->ToTransport() : NULL;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
|
||||
step.script->GetDebugInfo().c_str(), step.targetGUID, GUID_HIPART(step.targetGUID));
|
||||
|
||||
Reference in New Issue
Block a user