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

@@ -31,6 +31,7 @@ EndScriptData */
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "GossipDef.h"
#include "Transport.h"
#include "Language.h"
#include <fstream>
@@ -91,6 +92,7 @@ public:
{ "areatriggers", rbac::RBAC_PERM_COMMAND_DEBUG_AREATRIGGERS, false, &HandleDebugAreaTriggersCommand, "", NULL },
{ "los", rbac::RBAC_PERM_COMMAND_DEBUG_LOS, false, &HandleDebugLoSCommand, "", NULL },
{ "moveflags", rbac::RBAC_PERM_COMMAND_DEBUG_MOVEFLAGS, false, &HandleDebugMoveflagsCommand, "", NULL },
{ "transport", rbac::RBAC_PERM_COMMAND_DEBUG_TRANSPORT, false, &HandleDebugTransportCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
@@ -1363,6 +1365,30 @@ public:
handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
return true;
}
static bool HandleDebugTransportCommand(ChatHandler* handler, char const* args)
{
Transport* transport = handler->GetSession()->GetPlayer()->GetTransport();
if (!transport)
return false;
bool start = false;
if (!stricmp(args, "stop"))
transport->EnableMovement(false);
else if (!stricmp(args, "start"))
{
transport->EnableMovement(true);
start = true;
}
else
{
handler->PSendSysMessage("Transport %s is %s", transport->GetName().c_str(), transport->GetGoState() == GO_STATE_READY ? "stopped" : "moving");
return true;
}
handler->PSendSysMessage("Transport %s %s", transport->GetName().c_str(), start ? "started" : "stopped");
return true;
}
};
void AddSC_debug_commandscript()