Beispiel #1
0
        public static void HandleDungeonTile(Session session, ClientDungeonTiles packet)
        {
            foreach (uint cellId in packet.CellIds)
            {
                DungeonInfo dungeonInfo = DungeonTileManager.GetDungeonInfo((short)cellId);
                if (dungeonInfo == null)
                {
                    continue;
                }

                var dungeonTiles = new ServerDungeonTiles();
                foreach (DungeonTileInfo dungeonTileInfo in dungeonInfo)
                {
                    dungeonTiles.Tiles.Add(new ServerDungeonTiles.Tile
                    {
                        X           = dungeonTileInfo.Origin.X,
                        Y           = dungeonTileInfo.Origin.Y,
                        Z           = dungeonTileInfo.Origin.Z,
                        TileId      = dungeonTileInfo.TileId,
                        LandBlockId = dungeonTileInfo.LandBlockId,
                        ushort_2    = 0,
                        byte_0      = 1
                    });
                }

                session.EnqueueMessage(dungeonTiles);
            }
        }
Beispiel #2
0
        public static void HandleDungeonList(Session session, ClientDungeonList packet)
        {
            var dungeonList = new ServerDungeonList
            {
                SearchParameter = packet.SearchParameter
            };

            foreach (DungeonInfo dungeonInfo in DungeonTileManager.GetDungeonInfo(packet.SearchParameter))
            {
                dungeonList.Dungeons.Add(new ServerDungeonList.Dungeon(dungeonInfo));
            }

            session.EnqueueMessage(dungeonList);
        }