当前位置: 首页>>代码示例>>C#>>正文


C# GameClient.ClearRoomLoading方法代码示例

本文整理汇总了C#中Uber.HabboHotel.GameClients.GameClient.ClearRoomLoading方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.ClearRoomLoading方法的具体用法?C# GameClient.ClearRoomLoading怎么用?C# GameClient.ClearRoomLoading使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Uber.HabboHotel.GameClients.GameClient的用法示例。


在下文中一共展示了GameClient.ClearRoomLoading方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: parse

        public void parse(GameClient Session, ClientPacket Packet)
        {
            if (Session.GetHabbo().LoadingRoom <= 0)
            {
                return;
            }

            RoomData Data = UberEnvironment.GetGame().GetRoomManager().GenerateRoomData(Session.GetHabbo().LoadingRoom);

            if (Data == null)
            {
                return;
            }

            if (Data.Model == null)
            {
                Session.SendNotif("Sorry, model data is missing from this room and therefore cannot be loaded.");
                Session.SendPacket(new ServerPacket(18));
                Session.ClearRoomLoading();
                return;
            }

            Session.SendPacket(Data.Model.SerializeHeightmap());
            Session.SendPacket(Data.Model.SerializeRelativeHeightmap());
        }
开发者ID:habb0,项目名称:uberEmu-stabilized,代码行数:25,代码来源:GetRoomEntryDataMessageEvent.cs

示例2: parse

        public void parse(GameClient Session, ClientPacket Packet)
        {
            if (Session.GetHabbo().LoadingRoom <= 0 || !Session.GetHabbo().LoadingChecksPassed)
            {
                return;
            }

            Room Room = UberEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().LoadingRoom);

            if (Room == null)
            {
                return;
            }

            Session.ClearRoomLoading();

            ServerPacket packet = new ServerPacket(30);

            if (Room.Model.StaticFurniMap != "")
            {
                packet.AppendStringWithBreak(Room.Model.StaticFurniMap);
            }
            else
            {
                packet.AppendInt32(0);
            }

            Session.SendPacket(packet);

            if (Room.Type == "private")
            {
                List<RoomItem> FloorItems = Room.FloorItems;
                List<RoomItem> WallItems = Room.WallItems;

                ServerPacket _packet = new ServerPacket(32);
                _packet.AppendInt32(FloorItems.Count);

                foreach (RoomItem Item in FloorItems)
                {
                    Item.Serialize(_packet);
                }

                Session.SendPacket(_packet);

                ServerPacket pak = new ServerPacket(45);
                pak.AppendInt32(WallItems.Count);

                foreach (RoomItem Item in WallItems)
                {
                    Item.Serialize(pak);
                }

                Session.SendPacket(pak);
            }

            Room.AddUserToRoom(Session, Session.GetHabbo().SpectatorMode);

            List<RoomUser> UsersToDisplay = new List<RoomUser>();

            foreach (RoomUser User in Room.UserList)
            {
                if (User.IsSpectator)
                {
                    continue;
                }

                UsersToDisplay.Add(User);
            }

            ServerPacket _pak = new ServerPacket(28);
            _pak.AppendInt32(UsersToDisplay.Count);

            foreach (RoomUser User in UsersToDisplay)
            {
                User.Serialize(_pak);
            }

            Session.SendPacket(_pak);

            //GXI
            ServerPacket p472 = new ServerPacket(472);
            p472.AppendBoolean(Room.Hidewall);
            Session.SendPacket(p472);

            if (Room.Type == "public")
            {
                ServerPacket p471 = new ServerPacket(471);
                p471.AppendBoolean(false);
                p471.AppendStringWithBreak(Room.ModelName);
                p471.AppendBoolean(false);
                Session.SendPacket(p471);
            }
            else if (Room.Type == "private")
            {
                ServerPacket p471 = new ServerPacket(471);
                p471.AppendBoolean(true);
                p471.AppendUInt(Room.RoomId);

                if (Room.CheckRights(Session, true))
                {
//.........这里部分代码省略.........
开发者ID:habb0,项目名称:uberEmu-stabilized,代码行数:101,代码来源:GetRoomAdMessageEvent.cs


注:本文中的Uber.HabboHotel.GameClients.GameClient.ClearRoomLoading方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。