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


C# ServerMessage.AppendRawUInt方法代码示例

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


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

示例1: RemoveAllFurniture

        internal List<RoomItem> RemoveAllFurniture(GameClient Session)
        {
            List<RoomItem> ReturnList = new List<RoomItem>();
            foreach (RoomItem Item in mFloorItems.Values.ToArray())
            {
                Item.Interactor.OnRemove(Session, Item);
                ServerMessage Message = new ServerMessage(94);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);

                //mFloorItems.Remove(Item.Id);

                ReturnList.Add(Item);
            }

            foreach (RoomItem Item in mWallItems.Values.ToArray())
            {
                Item.Interactor.OnRemove(Session, Item);
                ServerMessage Message = new ServerMessage(84);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);
                //mWallItems.Remove(Item.Id);

                ReturnList.Add(Item);
            }

            mWallItems.Clear();
            mFloorItems.Clear();

            mRemovedItems.Clear();

            mMovedItems.Clear();
            mAddedItems.Clear();
            mRollers.QueueDelegate(new onCycleDoneDelegate(ClearRollers));

            using (IQueryAdapter dbClient = PiciEnvironment.GetDatabaseManager().getQueryreactor())
            {
                dbClient.runFastQuery("DELETE FROM items_rooms WHERE room_id = " + room.RoomId);
            }

            room.GetGameMap().GenerateMaps();
            room.GetRoomUserManager().UpdateUserStatusses();

            if (room.GotWired())
            {
                room.GetWiredHandler().OnPickall();
            }

            return ReturnList;
        }
开发者ID:habb0,项目名称:PiciEmulator,代码行数:54,代码来源:RoomItemHandling.cs

示例2: RemoveRoomItem

        private void RemoveRoomItem(RoomItem Item)
        {
            if (Item.IsWallItem)
            {
                ServerMessage Message = new ServerMessage(84);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);
            }
            else if (Item.IsFloorItem)
            {
                ServerMessage Message = new ServerMessage(94);
                Message.AppendRawUInt(Item.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                room.SendMessage(Message);
            }

            if (Item.IsWallItem)
                mWallItems.Remove(Item.Id);
            else
            {
                room.GetGameMap().RemoveFromMap(Item);
                mFloorItems.Remove(Item.Id);
            }

            RemoveItem(Item);

            room.GetRoomUserManager().UpdateUserStatusses();

            if (WiredHandler.TypeIsWire(Item.GetBaseItem().InteractionType))
            {
                room.GetWiredHandler().RemoveWiredItem(Item.Coordinate);
            }
        }
开发者ID:habb0,项目名称:PiciEmulator,代码行数:36,代码来源:RoomItemHandling.cs

示例3: MoveWallItem

        internal void MoveWallItem()
        {
            Room Room = PiciEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);

            if (Room == null || !Room.CheckRights(Session))
            {
                return;
            }

            uint itemID = Request.PopWiredUInt();
            string wallPositionData = Request.PopFixedString();

            RoomItem Item = Room.GetRoomItemHandler().GetItem(itemID);

            if (Item == null)
                return;

            try
            {
                WallCoordinate coordinate = new WallCoordinate(":" + wallPositionData.Split(':')[1]);
                Item.wallCoord = coordinate;
            }
            catch
            {
                Response.Init(516);
                Response.Append(11);
                SendResponse();

                return;
            }

            Room.GetRoomItemHandler().UpdateItem(Item);

            ServerMessage LeaveMessage = new ServerMessage(84);
            LeaveMessage.AppendRawUInt(Item.Id);
            LeaveMessage.Append(string.Empty);
            LeaveMessage.AppendBoolean(false);
            Room.SendMessage(LeaveMessage);

            ServerMessage Message = new ServerMessage(83);
            Item.Serialize(Message);
            Room.SendMessage(Message);
        }
开发者ID:habb0,项目名称:PiciEmulator,代码行数:43,代码来源:Rooms.cs


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