Ejemplo n.º 1
0
        public GameObject CreateGameObject(uint Entry, ushort ZoneId, ushort Px, ushort Py, ushort Pz)
        {
            GameObject_proto Proto = WorldMgr.GetGameObjectProto(Entry);

            if (Proto == null)
            {
                return(null);
            }

            GameObject_spawn Spawn = new GameObject_spawn();

            Spawn.Entry = Entry;
            Spawn.Guid  = (uint)WorldMgr.GenerateGameObjectSpawnGUID();
            Spawn.BuildFromProto(Proto);
            Spawn.ZoneId = ZoneId;
            ZoneMgr.CalculWorldPosition(ZoneId, Px, Py, Pz, ref Spawn.WorldX, ref Spawn.WorldY, ref Spawn.WorldZ);
            return(CreateGameObject(Spawn));
        }