*Add new creature_template column VehicleId

*Allow spawn vehicles
*Make vehicles grid objects.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-28 22:44:09 -06:00
parent 3a485c658d
commit 783e4fd3ff
13 changed files with 132 additions and 12 deletions

View File

@@ -1746,7 +1746,7 @@ Vehicle* WorldObject::SummonVehicle(uint32 entry, float x, float y, float z, flo
if(!ci)
return NULL;
uint32 id = ci->spells[7]; //temp store id here
uint32 id = ci->VehicleId; //temp store id here
if(!id) id = 156;
VehicleEntry const *ve = sVehicleStore.LookupEntry(id);
if(!ve)
@@ -1757,7 +1757,7 @@ Vehicle* WorldObject::SummonVehicle(uint32 entry, float x, float y, float z, flo
uint32 team = 0;
if (GetTypeId()==TYPEID_PLAYER)
team = ((Player*)this)->GetTeam();
if(!v->Create(objmgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, entry, id, team))
if(!v->Create(objmgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, GetPhaseMask(), entry, id, team))
{
delete v;
return NULL;