[11385] Add support for static vehicle spawns

Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
zergtmn 2011-04-20 23:23:47 +06:00
parent 75e1e7c3a3
commit 2835aa5f20
32 changed files with 115 additions and 331 deletions

View file

@ -19,7 +19,6 @@
#include "Common.h"
#include "Database/DatabaseEnv.h"
#include "WorldPacket.h"
#include "Vehicle.h"
#include "Player.h"
#include "Opcodes.h"
#include "Chat.h"
@ -645,41 +644,6 @@ bool ChatHandler::HandleDebugArenaCommand(char* /*args*/)
return true;
}
bool ChatHandler::HandleDebugSpawnVehicleCommand(char* args)
{
uint32 entry;
if (!ExtractUInt32(&args, entry))
return false;
uint32 id;
if (!ExtractUInt32(&args, id))
return false;
CreatureInfo const *ci = ObjectMgr::GetCreatureTemplate(entry);
if (!ci)
return false;
VehicleEntry const *ve = sVehicleStore.LookupEntry(id);
if (!ve)
return false;
Player* chr = m_session->GetPlayer();
Vehicle *v = new Vehicle;
CreatureCreatePos pos(chr, chr->GetOrientation());
if (!v->Create(pos.GetMap()->GenerateLocalLowGuid(HIGHGUID_VEHICLE), pos, ci, id, chr->GetTeam()))
{
delete v;
return false;
}
pos.GetMap()->Add((Creature*)v);
return true;
}
bool ChatHandler::HandleDebugSpellCheckCommand(char* /*args*/)
{
sLog.outString( "Check expected in code spell properties base at table 'spell_check' content...");