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:
Shauren
2013-10-16 18:37:29 +02:00
parent 53cc37bcec
commit ce55647c41
43 changed files with 2165 additions and 946 deletions

View File

@@ -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));