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


C# RoomUser.method_7方法代码示例

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


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

示例1: method_91

 public void method_91(RoomItem RoomItem_0, RoomUser RoomUser_1)
 {
     RoomItem_0.ExtraData = "1";
     RoomItem_0.UpdateState(false, true);
     RoomItem_0.ReqUpdate(1);
     List<RoomItem> list = new List<RoomItem>();
     RoomUser_1.method_3(true);
     foreach (RoomItem @class in this.Hashtable_0.Values)
     {
         if (@class != RoomItem_0 && !(@class.GetBaseItem().InteractionType.ToLower() != "bb_teleport"))
         {
             list.Add(@class);
         }
     }
     if (list.Count > 0)
     {
         Random random = new Random((int)Essential.GetUnixTimestamp() * (int)RoomUser_1.UId);
         int index = random.Next(0, list.Count);
         list[index].ExtraData = "1";
         list[index].UpdateState(false, true);
         list[index].ReqUpdate(1);
         this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 1;
         this.byte_0[list[index].GetX, list[index].Int32_1] = 1;
         RoomUser_1.method_7(list[index].GetX, list[index].Int32_1, list[index].Double_0);
         RoomUser_1.UpdateNeeded = true;
     }
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:Room.cs

示例2: method_4

        public RoomUser method_4(RoomBot Bot, Pet PetData, uint x = 0)
        {
            int num;
            if (x == 0)
                num = this.method_5();
            else
                num = (int)x;
            RoomUser user = new RoomUser(Convert.ToUInt32(num + 1000), this.Id, this.int_7++, true, x);

            user.int_20 = num;

            this.RoomUsers[num] = user;
            if (Bot.x > 0 && Bot.y > 0 && Bot.x < this.RoomModel.int_4 && Bot.y < this.RoomModel.int_5)
            {
                user.method_7(Bot.x, Bot.y, Bot.z);
                user.method_9(Bot.Rotation);
            }
            else
            {
                Bot.x = this.RoomModel.DoorX;
                Bot.y = this.RoomModel.DoorY;
                user.method_7(this.RoomModel.DoorX, this.RoomModel.DoorY, this.RoomModel.double_0);
                user.method_9(this.RoomModel.int_2);
            }

            user.RoomBot = Bot;
            user.BotAI = Bot.GetBotAI(user.VirtualId);

            if (user.IsPet)
            {
                user.BotAI.Init((int)Bot.Id, user.VirtualId, this.Id);
                user.PetData = PetData;
                user.PetData.VirtualId = user.VirtualId;
            }
            else
            {
                user.BotAI.Init(-1, user.VirtualId, this.Id);
            }
            this.method_87(user, true, true);
            user.UpdateNeeded = true;
            ServerMessage Message = new ServerMessage(Outgoing.SetRoomUser); // P
            Message.AppendInt32(1);
            user.method_14(Message);
            this.SendMessage(Message, null);
            user.BotAI.OnSelfEnterRoom();
            return user;
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:47,代码来源:Room.cs

示例3: method_46

        public void method_46(GameClient Session, bool bool_13)
        {

            RoomUser @class = new RoomUser(Session.GetHabbo().Id, this.Id, this.int_7++, Session.GetHabbo().IsVisible);
            if (@class != null && @class.GetClient() != null && @class.GetClient().GetHabbo() != null)
            {
                if (bool_13 || [email protected]_12)
                {
                    @class.bool_11 = true;
                }
                else
                {
                    @class.method_7(this.RoomModel.DoorX, this.RoomModel.DoorY, this.RoomModel.double_0);
                    @class.method_9(this.RoomModel.int_2);
                    if (this.CheckRights(Session, true))
                    {
                        @class.AddStatus("flatctrl", "useradmin");
                    }
                    else
                    {
                        if (this.method_26(Session))
                        {
                            @class.AddStatus("flatctrl", "");
                        }
                    }
                    if ([email protected] && @class.GetClient().GetHabbo().bool_7)
                    {
                        RoomItem class2 = this.method_28(@class.GetClient().GetHabbo().uint_5);
                        if (class2 != null)
                        {
                            @class.method_7(class2.GetX, class2.Int32_1, class2.Double_0);
                            @class.method_9(class2.int_3);
                            class2.uint_4 = Session.GetHabbo().Id;
                            class2.ExtraData = "2";
                            class2.UpdateState(false, true);
                        }
                    }
                    @class.GetClient().GetHabbo().bool_7 = false;
                    @class.GetClient().GetHabbo().uint_5 = 0u;
                    ServerMessage Message = new ServerMessage(Outgoing.SetRoomUser); // P
                    Message.AppendInt32(1);
                    @class.method_14(Message);
                    this.SendMessage(Message, null);
                }
                int num = this.method_5();
                @class.int_20 = num;
                this.RoomUsers[num] = @class;
                if (!bool_13)
                {
                    this.bool_10 = true;
                }

                Session.GetHabbo().CurrentRoomId = this.Id;
                Session.GetHabbo().GetMessenger().method_5(true);
                Session.GetHabbo().RoomVisits++;
                Session.GetHabbo().CheckRoomEntryAchievements();
                Session.GetHabbo().SendToRoom(this.Id);

                //  Session.SendMessage(Session.GetHabbo().CurrentRoom.RoomModel.RelativeHeightmap(Session.GetHabbo().CurrentRoom));

                if (Session.GetHabbo().FavouriteGroup > 0)
                {
                    GroupsManager class3 = Groups.GetGroupById(Session.GetHabbo().FavouriteGroup);
                    if (class3 != null && !this.list_17.Contains(class3))
                    {
                        this.list_17.Add(class3);
                        ServerMessage Message2 = new ServerMessage(Outgoing.Guilds); // Updated
                        Message2.AppendInt32(this.list_17.Count);
                        foreach (GroupsManager current in this.list_17)
                        {
                            Message2.AppendInt32(current.Id);
                            Message2.AppendStringWithBreak(current.Badge);
                        }
                        this.SendMessage(Message2, null);
                    }
                }
                if (!bool_13)
                {
                    this.method_51();
                    for (int i = 0; i < this.RoomUsers.Length; i++)
                    {
                        RoomUser class4 = this.RoomUsers[i];
                        if (class4 != null && class4.IsBot)
                        {
                            class4.BotAI.OnUserEnterRoom(@class);
                        }
                    }
                }

                ServerMessage RoomCompetition = new ServerMessage(Outgoing.RoomCompetition);
                RoomCompetition.AppendBoolean(true);
                RoomCompetition.AppendInt32(85);
                Session.SendMessage(RoomCompetition);

                bool RoomHasPoll = false;
                bool UserFilledPoll = false;
                using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
                {
                    if (dbClient.ReadDataRow("SELECT null FROM room_polls WHERE room_id = '" + Session.GetHabbo().CurrentRoomId + "' LIMIT 1") != null)
                    {
//.........这里部分代码省略.........
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:101,代码来源:Room.cs

示例4: AddBotToRoom

        public RoomUser AddBotToRoom(RoomBot Bot, UserBot UBot)
        {
            int num = (int)UBot.BotId;
            if(num > 500)
            {
                int i = 500;
                while(i > 0)
                {
                    i--;
                    RoomUser ru = RoomUsers[i];
                    if (ru == null)
                    { num = i; break; }
                }
            }
            RoomUser user = new RoomUser(Convert.ToUInt32(UBot.BotId + 1000), this.Id, this.int_7++, true);
            user.int_20 = num;
            this.RoomUsers[num] = user;
            if (Bot.x > 0 && Bot.y > 0 && Bot.x < this.RoomModel.int_4 && Bot.y < this.RoomModel.int_5)
            {
                user.method_7(Bot.x, Bot.y, Bot.z);
                user.method_9(Bot.Rotation);
            }
            else
            {
                Bot.x = this.RoomModel.DoorX;
                Bot.y = this.RoomModel.DoorY;
                user.method_7(this.RoomModel.DoorX, this.RoomModel.DoorY, this.RoomModel.double_0);
                user.method_9(this.RoomModel.int_2);
            }

            user.RoomBot = Bot;
            user.BotAI = Bot.GetBotAI(user.VirtualId);

            user.BotAI.Init((int)Bot.Id, user.VirtualId, this.Id);

            this.method_87(user, true, true);
            user.UpdateNeeded = true;
            ServerMessage Message = new ServerMessage(Outgoing.PlaceBot); // P
            Message.AppendInt32(1);
            user.method_14(Message);
            this.SendMessage(Message, null);
            user.BotAI.OnSelfEnterRoom();
            return user;
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:44,代码来源:Room.cs

示例5: method_21


//.........这里部分代码省略.........
                                case "wf_act_moveuser":
                                    Action<object> action = delegate(object obj)
                                    {
                                        double waittime = 0.0;
                                        if (current2.string_2 != "" && double.TryParse(current2.string_2, out waittime))
                                        {
                                            Thread.Sleep(Convert.ToInt32(waittime * 1000));
                                        }
                                        current2.ExtraData = "1";
                                        current2.UpdateState(false, true);
                                        current2.ReqUpdate(1);
                                        current2.CheckExtraData3();
                                        if (current2.string_3.Length > 0)
                                        {
                                            string[] collection = current2.string_3.Split(new char[]
									        {
										        ','
									        });
                                            List<string> list = new List<string>(collection);
                                            Random random2 = new Random();
                                            int num5 = random2.Next(0, list.Count - 1);
                                            RoomItem class3 = this.method_28(Convert.ToUInt32(list[num5]));
                                            if (class3 != null)
                                            {
                                                if (RoomUser_1 != null)
                                                {
                                                    this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 1;
                                                    this.byte_0[RoomUser_1.int_12, RoomUser_1.int_13] = 1;
                                                    this.byte_0[class3.GetX, class3.Int32_1] = 1;
                                                    RoomUser_1.bool_6 = false;
                                                    RoomUser_1.int_12 = class3.GetX;
                                                    RoomUser_1.int_13 = class3.Int32_1;
                                                    RoomUser_1.double_1 = class3.Double_0;
                                                    RoomUser_1.method_7(class3.GetX, class3.Int32_1, class3.Double_0);
                                                    RoomUser_1.UpdateNeeded = true;
                                                    if (!current2.dictionary_1.ContainsKey(RoomUser_1))
                                                    {
                                                        current2.dictionary_1.Add(RoomUser_1, 10);
                                                    }
                                                    if (RoomUser_1.class34_1 != null)
                                                    {
                                                        RoomUser_1.class34_1.RoomUser_0 = null;
                                                        RoomUser_1.RoomUser_0 = null;
                                                        RoomUser_1.class34_1 = null;
                                                    }
                                                    this.method_87(RoomUser_1, true, false);
                                                }
                                                else
                                                {
                                                    RoomUser[] array = this.RoomUsers;
                                                    for (int i = 0; i < array.Length; i++)
                                                    {
                                                        RoomUser class2 = array[i];
                                                        if (class2 != null)
                                                        {
                                                            this.byte_0[class2.X, class2.Y] = 1;
                                                            this.byte_0[class3.GetX, class3.Int32_1] = 1;
                                                            class2.method_7(class3.GetX, class3.Int32_1, class3.Double_0);
                                                            class2.UpdateNeeded = true;
                                                            if (!current2.dictionary_1.ContainsKey(class2))
                                                            {
                                                                current2.dictionary_1.Add(class2, 10);
                                                            }
                                                        }
                                                    }
                                                }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:67,代码来源:Room.cs


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