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


C# ServerMessage.AppendRawInt32方法代码示例

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


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

示例1: TryRedeemVoucher

        internal static void TryRedeemVoucher(GameClient Session, string Code)
        {
            if (!IsValidCode(Code))
            {
                ServerMessage Error = new ServerMessage(213);
                Error.AppendRawInt32(1);
                Session.SendMessage(Error);
                return;
            }

            int Value = GetVoucherValue(Code);

            TryDeleteVoucher(Code);

            Session.GetHabbo().Credits += Value;
            Session.GetHabbo().UpdateCreditsBalance();

            Session.SendMessage(new ServerMessage(212));
        }
开发者ID:habb0,项目名称:Bfly,代码行数:19,代码来源:VoucherHandler.cs

示例2: Compose

 public static ServerMessage Compose(int Code)
 {
     ServerMessage Message = new ServerMessage(OpcodesOut.CATALOG_REDEEM_ERROR);
     Message.AppendRawInt32(Code);
     return Message;
 }
开发者ID:habb0,项目名称:Snowlight,代码行数:6,代码来源:CatalogRedeemErrorComposer.cs

示例3: RemoveBot

        internal void RemoveBot(int VirtualId, bool Kicked)
        {
            RoomUser User = GetRoomUserByVirtualId(VirtualId);

            if (User == null || !User.IsBot)
            {
                return;
            }

            if (User.IsPet)
            {
                pets.Remove(User.PetData.PetId);
                petCount--;
            }

            User.BotAI.OnSelfLeaveRoom(Kicked);

            ServerMessage LeaveMessage = new ServerMessage(29);
            LeaveMessage.AppendRawInt32(User.VirtualId);
            room.SendMessage(LeaveMessage);

            userlist.Remove(User.InternalRoomID);
            //freeIDs[User.InternalRoomID] = null;
        }
开发者ID:habb0,项目名称:Bfly,代码行数:24,代码来源:RoomUserManager.cs

示例4: BotLeaveMessage

 private void BotLeaveMessage()
 {
     foreach (RoomUser user in roomUserManager.UserList.Values)
     {
         if (user.IsBot || user.IsPet)
         {
             ServerMessage LeaveMessage = new ServerMessage(29);
             LeaveMessage.AppendRawInt32(user.VirtualId);
             SendMessage(LeaveMessage);
         }
     }
 }
开发者ID:habb0,项目名称:Bfly,代码行数:12,代码来源:Room.cs

示例5: RemoveRoomUser

        private void RemoveRoomUser(RoomUser user)
        {
            UserList.Remove(user.InternalRoomID);
            user.InternalRoomID = -1;

            room.GetGameMap().GameMap[user.X, user.Y] = user.SqState;
            room.GetGameMap().RemoveUserFromMap(user, new Point(user.X, user.Y));
            ServerMessage LeaveMessage = new ServerMessage(29);
            LeaveMessage.AppendRawInt32(user.VirtualId);
            room.SendMessage(LeaveMessage);
        }
开发者ID:habb0,项目名称:Bfly,代码行数:11,代码来源:RoomUserManager.cs


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