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


C# ServerMessage.AppendRawInt32方法代码示例

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


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

示例1: RemoveUserFromRoom

        public void RemoveUserFromRoom(GameClient Session, bool NotifyClient, bool NotifyKick)
        {
            int num = 1;
            if (Session != null && Session.GetHabbo() != null)
            {
                RoomUser @class = this.GetRoomUserByHabbo(Session.GetHabbo().Id);
                if (@class != null)
                {
                    this.GetRoomTeamManager().OnUserLeave(@class);
                }
            }

            if (this.bool_12)
            {
                if (NotifyClient && Session != null)
                {
                    if (NotifyKick)
                    {
                        ServerMessage Message = new ServerMessage(Outgoing.GenericError); // P
                        Message.AppendInt32(4008);
                        Session.SendMessage(Message);
                    }
                    ServerMessage Message5_ = new ServerMessage(Outgoing.OutOfRoom); // P
                    Session.SendMessage(Message5_);
                }
            }
            else
            {
                try
                {
                    if (Session != null && Session.GetHabbo() != null)
                    {
                        num = 2;
                        RoomUser @class = this.GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (@class != null)
                        {
                            this.RoomUsers[@class.int_20] = null;
                            @class.int_20 = -1;
                            this.byte_0[@class.X, @class.Y] = @class.byte_0;
                        }
                        num = 3;
                        if (NotifyClient)
                        {
                            if (NotifyKick)
                            {
                                ServerMessage Message = new ServerMessage(Outgoing.GenericError); // P
                                Message.AppendInt32(4008);
                                Session.SendMessage(Message);
                            }
                            ServerMessage Message5_ = new ServerMessage(Outgoing.OutOfRoom); // P
                            Session.SendMessage(Message5_);
                        }
                        num = 4;
                        if (@class != null && [email protected]_11)
                        {
                            if (@class.byte_1 > 0 && @class.GetClient() != null)
                            {
                                @class.GetClient().GetHabbo().GetEffectsInventoryComponent().int_0 = -1;
                            }
                            this.byte_0[@class.X, @class.Y] = @class.byte_0;
                            if (!this.IsPublic)
                            {
                                /*ServerMessage Message2 = new ServerMessage(Outgoing.KickMessage); // m8 idk
                                Message2.AppendBoolean(false);
                                Session.SendMessage(Message2);*/
                            }
                            ServerMessage Message3 = new ServerMessage(Outgoing.UserLeftRoom);
                            Message3.AppendRawInt32(@class.VirtualId);
                            this.SendMessage(Message3, null);
                            if (this.method_74(Session.GetHabbo().Id))
                            {
                                this.method_78(Session.GetHabbo().Id);
                            }
                            num = 5;
                            if (Session.GetHabbo().Username.ToLower() == this.Owner.ToLower() && this.HasEvent)
                            {
                                this.Event = null;
                                /*ServerMessage Logging = new ServerMessage(Outgoing.Logging);
                                Logging.AppendStringWithBreak("-1");
                                this.SendMessage(Logging, null);*/
                            }
                            num = 6;
                            if (@class.class34_1 != null)
                            {
                                @class.class34_1.RoomUser_0 = null;
                                @class.class34_1 = null;
                                Session.GetHabbo().GetEffectsInventoryComponent().int_0 = -1;
                            }
                            Session.GetHabbo().RemoveFromRoom();

                            this.bool_10 = true;
                            this.method_51();
                            List<RoomUser> list = new List<RoomUser>();
                            for (int i = 0; i < this.RoomUsers.Length; i++)
                            {
                                RoomUser class2 = this.RoomUsers[i];
                                if (class2 != null && class2.IsBot)
                                {
                                    list.Add(class2);
                                }
//.........这里部分代码省略.........
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:101,代码来源:Room.cs

示例2: method_6

 public void method_6(int int_17, bool bool_13)
 {
     RoomUser @class = this.method_52(int_17);
     if (@class != null && @class.IsBot)
     {
         @class.BotAI.OnSelfLeaveRoom(bool_13);
         ServerMessage Message = new ServerMessage(Outgoing.UserLeftRoom); // Updated
         Message.AppendRawInt32(@class.VirtualId);
         this.SendMessage(Message, null);
         uint num = @class.UId;
         for (int i = 0; i < this.RoomUsers.Length; i++)
         {
             RoomUser class2 = this.RoomUsers[i];
             if (class2 != null && class2.UId == num)
             {
                 this.RoomUsers[i] = null;
             }
         }
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:20,代码来源:Room.cs

示例3: method_33


//.........这里部分代码省略.........
                                        if (class3.GetClient().GetHabbo() != null && class3.GetClient().GetHabbo().int_4 > 0)
                                        {
                                            class3.GetClient().GetHabbo().int_4--;
                                            if (class3.GetClient().GetHabbo().int_4 == 0)
                                            {
                                                class3.GetClient().GetHabbo().IsMuted = false;
                                            }
                                        }
                                    }
                                    if (this.MusicController != null)
                                    {
                                        this.MusicController.Update(this);
                                    }
                                    class3.int_1++;
                                    this.GetFreeze().CycleUser(class3);
                                    num = 2;
                                    if (!class3.bool_8 && class3.int_1 >= ServerConfiguration.SleepTimer)
                                    {
                                        class3.bool_8 = true;
                                        ServerMessage Message = new ServerMessage(Outgoing.IdleStatus);
                                        Message.AppendInt32(class3.VirtualId);
                                        Message.AppendBoolean(true);
                                        this.SendMessage(Message, null);
                                    }
                                    num = 3;
                                    if (class3.GetClient() == null && !class3.IsBot)
                                    {
                                        this.RoomUsers[i] = null;
                                        if (!class3.bool_1)
                                        {
                                            this.byte_0[class3.X, class3.Y] = class3.byte_0;
                                        }
                                        ServerMessage Message2 = new ServerMessage(Outgoing.UserLeftRoom); // Updated
                                        Message2.AppendRawInt32(class3.VirtualId);
                                        this.SendMessage(Message2, null);
                                        this.method_50();
                                    }
                                    num = 4;
                                    if (class3.Boolean_2 && !list.Contains(class3.UId))
                                    {
                                        list.Add(class3.UId);
                                    }
                                    num = 5;
                                    if (class3.CarryItemID > 0)
                                    {
                                        class3.int_6--;
                                        if (class3.int_6 <= 0)
                                        {
                                            class3.CarryItem(0);
                                        }
                                    }
                                    num = 6;
                                    if (class3.bool_4 && class3.class34_1 == null)
                                    {
                                        num = 7;
                                        if (class3.IsBot && class3.RoomBot.RoomUser_0 != null && this.method_30(class3.int_12, class3.int_13, class3.double_0, true, true))
                                        {
                                            num = 8;
                                            this.method_85(class3);
                                            class3.X = class3.int_12;
                                            class3.Y = class3.int_13;
                                            class3.double_0 = class3.double_1;
                                            class3.RoomBot.RoomUser_0.X = class3.int_12;
                                            class3.RoomBot.RoomUser_0.Y = class3.int_13;
                                            class3.RoomBot.RoomUser_0.double_0 = class3.double_1 + 1.0;
                                            class3.RoomBot.RoomUser_0.bool_4 = false;
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:67,代码来源:Room.cs


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