*Set vehicle owner guid and faction in summonvehicle instead of spelleffecthandler.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-08-19 23:01:56 -05:00
1 parent 92f3d27027
commit 6169483d0f
2 files changed
+16 -6

No files matched your search

+5
View File
@@ -1852,6 +1852,11 @@ Vehicle* WorldObject::SummonVehicle(uint32 entry, float x, float y, float z, flo
return NULL;
}
if(isType(TYPEMASK_UNIT))
{
v->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, GetGUID());
v->setFaction(((Unit*)this)->getFaction());
}
map->Add((Creature*)v);
//ObjectAccessor::UpdateObjectVisibility(v);