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


C# Room.GetRoomUserManager方法代码示例

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


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

示例1: Execute

        public void Execute(GameClients.GameClient Session, Room Room, string[] Params)
        {
            int ItemId = 0;
            if (!int.TryParse(Convert.ToString(Params[1]), out ItemId))
            {
                Session.SendWhisper("Please enter a valid integer.");
                return;
            }

            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
            if (User == null)
                return;

            User.CarryItem(ItemId);
        }
开发者ID:BjkGkh,项目名称:Boon,代码行数:15,代码来源:CarryCommand.cs

示例2: Execute

        public void Execute(GameClient Session, Room Room, string[] Params)
        {
            if (!Room.CheckRights(Session, true))
                return;

            if (Params.Length == 1)
            {
                Session.SendWhisper("Oops, you forgot to choose a price to sell the room for.");
                return;
            }
            else if (Room.Group != null)
            {
                Session.SendWhisper("Oops, this room has a group. You must delete the group before you can sell the room.");
                return;
            }

            int Price = 0;
            if (!int.TryParse(Params[1], out Price))
            {
                Session.SendWhisper("Oops, you've entered an invalid integer.");
                return;
            }

            if (Price == 0)
            {
                Session.SendWhisper("Oops, you cannot sell a room for 0 credits.");
                return;
            }

            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("UPDATE `rooms` SET `sale_price` = @SalePrice WHERE `id` = @Id LIMIT 1");
                dbClient.AddParameter("SalePrice", Price);
                dbClient.AddParameter("Id", Room.Id);
                dbClient.RunQuery();
            }

            Session.SendNotification("Your room is now up for sale. The the current room visitors have been alerted, any item that belongs to you in this room will be transferred to the new owner once purchased. Other items shall be ejected.");

            foreach (RoomUser User in Room.GetRoomUserManager().GetRoomUsers())
            {
                if (User == null || User.GetClient() == null)
                    continue;

                User.GetClient().SendWhisper("Attention! This room has been put up for sale, you can buy it now for " + Price + " credits! Use the :buyroom command.");
            }
        }
开发者ID:BjkGkh,项目名称:Boon,代码行数:47,代码来源:SellRoomCommand.cs

示例3: HandleDefaultSave


//.........这里部分代码省略.........

                        break;
                    }

                case InteractionType.triggergameend:
                    {
                        IWiredTrigger handler = new GameEnds(item, room.GetWiredHandler(), room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggergamestart:
                    {
                        IWiredTrigger handler = new GameStarts(item, room.GetWiredHandler(), room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggeronusersay:
                    {
                        bool isOnlyOwner = false;
                        string message = string.Empty;

                        IWiredTrigger handler = new UserSays(item, room.GetWiredHandler(), !isOnlyOwner, message, room);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggerrepeater:
                    {
                        int cycleTimes = 0;

                        IWiredTrigger handler = new Repeater(room.GetWiredHandler(), item, cycleTimes);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggerroomenter:
                    {
                        string users = string.Empty;

                        IWiredTrigger handler = new EntersRoom(item, room.GetWiredHandler(), room.GetRoomUserManager(), !string.IsNullOrEmpty(users), users);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggerscoreachieved:
                    {
                        int score = 0;

                        IWiredTrigger handler = new ScoreAchieved(item, room.GetWiredHandler(), score, room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggertimer:
                    {
                        int cycles = 0;

                        IWiredTrigger handler = new Timer(item, room.GetWiredHandler(), cycles, room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggerstatechanged:
                    {
                        List<RoomItem> items = new List<RoomItem>();
                        int delay = 0;

                        IWiredTrigger handler = new SateChanged(room.GetWiredHandler(), item, items, delay);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggerwalkofffurni:
                    {
                        List<RoomItem> items = new List<RoomItem>();

                        int delay = 0;

                        IWiredTrigger handler = new WalksOffFurni(item, room.GetWiredHandler(), items, delay);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggerwalkonfurni:
                    {
                        List<RoomItem> items = new List<RoomItem>();

                        int delay = 0;

                        IWiredTrigger handler = new WalksOnFurni(item, room.GetWiredHandler(), items, delay);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }
            }
        }
开发者ID:habb0,项目名称:PiciEmulator,代码行数:101,代码来源:WiredSaver.cs

示例4: HandleSave


//.........这里部分代码省略.........
                        break;
                    }

                case InteractionType.triggeronusersay:
                    {
                        clientMessage.AdvancePointer(1);
                        bool isOnlyOwner = clientMessage.PopWiredBoolean();
                        clientMessage.AdvancePointer(0);
                        string message = clientMessage.PopFixedString();
                        string stuff = clientMessage.ToString();

                        IWiredTrigger handler = new UserSays(item, room.GetWiredHandler(), isOnlyOwner, message, room);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggerrepeater:
                    {
                        clientMessage.AdvancePointer(1);
                        int cycleTimes = clientMessage.PopWiredInt32();

                        IWiredTrigger handler = new Repeater(room.GetWiredHandler(), item, cycleTimes);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggerroomenter:
                    {
                        clientMessage.AdvancePointer(1);
                        string users = clientMessage.PopFixedString();

                        IWiredTrigger handler = new EntersRoom(item, room.GetWiredHandler(), room.GetRoomUserManager(), !string.IsNullOrEmpty(users), users);
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);
                        break;
                    }

                case InteractionType.triggerscoreachieved:
                    {
                        clientMessage.AdvancePointer(1);
                        int score = clientMessage.PopWiredInt32();

                        IWiredTrigger handler = new ScoreAchieved(item, room.GetWiredHandler(), score, room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggertimer:
                    {
                        clientMessage.AdvancePointer(1);
                        int cycles = clientMessage.PopWiredInt32();

                        IWiredTrigger handler = new Timer(item, room.GetWiredHandler(), cycles, room.GetGameManager());
                        HandleTriggerSave(handler, room.GetWiredHandler(), room, itemID);

                        break;
                    }

                case InteractionType.triggerstatechanged:
                    {
                        clientMessage.AdvancePointer(3);

                        int furniAmount;
                        List<RoomItem> items = GetItems(clientMessage, room, out furniAmount);
开发者ID:habb0,项目名称:PiciEmulator,代码行数:67,代码来源:WiredSaver.cs

示例5: LoadWiredItem


//.........这里部分代码省略.........
                case InteractionType.conditiontriggeronfurni:
                    {
                        IWiredCondition triggerOnFurni = new TriggerUserIsOnFurni(item, new List<RoomItem>(), room.GetWiredHandler());
                        triggerOnFurni.LoadFromWiredObject(wiredData);
                        HandleConditionLoad(triggerOnFurni, item);
                        break;
                    }

                case InteractionType.specialrandom:
                    {

                        break;
                    }

                case InteractionType.specialunseen:
                    {

                        break;
                    }

                case InteractionType.triggergameend:
                    {
                        IWiredTrigger handler = new GameEnds(item, room.GetWiredHandler(), room.GetGameManager());
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggergamestart:
                    {
                        IWiredTrigger handler = new GameStarts(item, room.GetWiredHandler(), room.GetGameManager());
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggeronusersay:
                    {
                        IWiredTrigger handler = new UserSays(item, room.GetWiredHandler(), false, string.Empty, room);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerrepeater:
                    {
                        IWiredTrigger handler = new Repeater(room.GetWiredHandler(), item, 0);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerroomenter:
                    {
                        IWiredTrigger handler = new EntersRoom(item, room.GetWiredHandler(), room.GetRoomUserManager(), false, string.Empty);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerscoreachieved:
                    {
                        IWiredTrigger handler = new ScoreAchieved(item, room.GetWiredHandler(), 0, room.GetGameManager());
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggertimer:
                    {
                        IWiredTrigger handler = new Timer(item, room.GetWiredHandler(), 0, room.GetGameManager());
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerstatechanged:
                    {
                        IWiredTrigger handler = new StateChanged(room.GetWiredHandler(), item, new List<RoomItem>(), 0);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerwalkofffurni:
                    {
                        IWiredTrigger handler = new WalksOffFurni(item, room.GetWiredHandler(), new List<RoomItem>(), 0);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }

                case InteractionType.triggerwalkonfurni:
                    {
                        IWiredTrigger handler = new WalksOnFurni(item, room.GetWiredHandler(), new List<RoomItem>(), 0);
                        handler.LoadFromWiredObject(wiredData);
                        HandleItemLoad(handler, room.GetWiredHandler(), item);
                        break;
                    }
            }

        }
开发者ID:BjkGkh,项目名称:R106,代码行数:101,代码来源:WiredLoader.cs


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