Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
75a790ca47
326 files changed
+3311
-1522
No files matched your search
@@ -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 },
|
||||
{ "phase", rbac::RBAC_PERM_COMMAND_DEBUG_PHASE, false, &HandleDebugPhaseCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
@@ -1358,6 +1360,30 @@ public:
|
||||
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;
|
||||
}
|
||||
|
||||
static bool HandleDebugPhaseCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
Unit* unit = handler->getSelectedUnit();
|
||||
|
||||
Reference in new issue
Block a user