Core/Entities: Created factory methods to create new areatriggers, creatures and gameobjects

This commit is contained in:
hondacrx
2018-01-27 20:15:24 -05:00
parent 854ae39aeb
commit 419ee1b882
19 changed files with 382 additions and 328 deletions
+5 -4
View File
@@ -938,13 +938,14 @@ namespace Game.Chat
if (vehicleRecord == null)
return false;
Creature creature = new Creature();
Map map = handler.GetSession().GetPlayer().GetMap();
if (!creature.Create(map.GenerateLowGuid(HighGuid.Vehicle), map, entry, x, y, z, o, null, id))
Position pos = new Position(x, y, z, o);
Creature creature = Creature.CreateCreature(entry, map, pos, id);
if (!creature)
return false;
map.AddToMap(creature.ToCreature());
map.AddToMap(creature);
return true;
}