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


C# GameClient.SendMessage方法代码示例

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


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

示例1: GiveBadge

		internal void GiveBadge(string Badge, bool InDatabase, GameClient Session, bool WiredReward = false)
		{
			if (WiredReward)
			{
				Session.SendMessage(this.SerializeBadgeReward(!this.HasBadge(Badge)));
			}
			if (this.HasBadge(Badge))
			{
				return;
			}
			if (InDatabase)
			{
				using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
				{
					queryreactor.setQuery(string.Concat(new object[]
					{
						"INSERT INTO user_badges (user_id,badge_id,badge_slot) VALUES (",
						this.UserId,
						",@badge,",
						0,
						")"
					}));
					queryreactor.addParameter("badge", Badge);
					queryreactor.runQuery();
				}
			}
			this.Badges.Add(Badge, new Badge(Badge, 0));
			Session.SendMessage(this.SerializeBadge(Badge));
            Session.SendMessage(this.Update(Badge));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:30,代码来源:BadgeComponent.cs

示例2: HandlePurchase


//.........这里部分代码省略.........
                            if (item.Name.Contains("MONTH"))
                            {
                                double num4 = double.Parse(array[3]);
                                dayLength = Math.Ceiling((num4 * 31) - 0.205);
                            }
                            else
                            {
                                if (item.Name.Contains("YEAR"))
                                {
                                    double num5 = double.Parse(array[3]);
                                    dayLength = (num5 * 31 * 12);
                                }
                                else
                                {
                                    dayLength = 31;
                                }
                            }
                        }
                        Session.GetHabbo().GetSubscriptionManager().AddSubscription(dayLength);
                       
                        return;
                    }
                }

                if (item.Name == "room_ad_plus_badge")
                {
                    return;
                }

                if (item.ClubOnly && !Session.GetHabbo().GetSubscriptionManager().HasSubscription)
                {
                    ServerMessage serverMessage = new ServerMessage(Outgoing.CatalogPurchaseNotAllowedMessageComposer);
                    serverMessage.AppendInt32(1);
                    Session.SendMessage(serverMessage);
                    return;
                }
                else if (item.Name.Contains("guild_forum"))
                {
                    uint GroupId;
                    if (!uint.TryParse(ExtraData, out GroupId))
                    {
                        Session.SendNotif("Your group forum couldn't be created by an unknown error. Please report it.");
                        return;
                    }
                    else
                    {
                        Guild Grap = MercuryEnvironment.GetGame().GetGroupManager().GetGroup(GroupId);
                        if (Grap == null)
                        {
                            Session.SendNotif("Your group forum couldn't be created by an unknown error. Please report it");
                            return;
                        }
                        else if (!Grap.HasForum && Grap.CreatorId == Session.GetHabbo().Id)
                        {
                            Grap.HasForum = true;
                            MercuryEnvironment.GetGame().GetClientManager().SendSuperNotif("Congratulations!", "You successfully purchased a Forum for your group.", "admin", Session, "event:groupforum/" + Grap.Id, "Enter my new Group Forum", false, false);
                            Grap.UpdateForum();
                        }
                        else if (Grap.CreatorId != Session.GetHabbo().Id && !Grap.HasForum)
                        {
                            Session.SendNotif("Uhm, looks like you're not the owner of the group. Anyway, you received a Group Forum Terminal, which would work only when the owner of the group buys a forum.");
                        }
                    }
                }
                bool flag = false;
                foreach (uint current in item.Items.Keys)
开发者ID:BjkGkh,项目名称:Mercury,代码行数:67,代码来源:Catalog.cs

示例3: SendSuperNotif

		internal void SendSuperNotif(string Title, string Notice, string Picture, GameClient Client, string Link, string LinkTitle, bool Broadcast, bool Event)
		{
			ServerMessage serverMessage = new ServerMessage(Outgoing.SuperNotificationMessageComposer);
			serverMessage.AppendString(Picture);
			serverMessage.AppendInt32(4);
			serverMessage.AppendString("title");
			serverMessage.AppendString(Title);
			serverMessage.AppendString("message");
			if (Broadcast)
			{
				if (Event)
				{
					serverMessage.AppendString("<b>¡Nuevo evento abierto ahora en la Sala de " + Client.GetHabbo().CurrentRoom.Owner + "!</b> ¡Corre! No querrás ser el último en llegar.\r\n<b>Más detalles:</b>\r\n" + Notice);
				}
				else
				{
					serverMessage.AppendString(string.Concat(new string[]
					{
						"<b>Mensaje del Equipo Staff:</b>\r\n",
						Notice,
						"\r\n- <i>",
						Client.GetHabbo().Username,
						"</i>"
					}));
				}
			}
			else
			{
				serverMessage.AppendString(Notice);
			}
			if (Link != "")
			{
				serverMessage.AppendString("linkUrl");
				serverMessage.AppendString(Link);
                serverMessage.AppendString("linkTitle");
                serverMessage.AppendString(LinkTitle);
			}
            else
            {
                serverMessage.AppendString("linkUrl");
                serverMessage.AppendString("event:");
                serverMessage.AppendString("linkTitle");
                serverMessage.AppendString("ok");
            }
           
			if (Broadcast)
			{
				this.QueueBroadcaseMessage(serverMessage);
				return;
			}
			Client.SendMessage(serverMessage);
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:52,代码来源:GameClientManager.cs

示例4: SaveWired


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

                    case InteractionType.conditionhowmanyusersinroom:
                    case InteractionType.conditionnegativehowmanyusers:
                        {
                            Request.PopWiredInt32();
                            int Minimum = Request.PopWiredInt32();
                            int Maximum = Request.PopWiredInt32();

                            string EI = Minimum + "," + Maximum;
                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = new List<RoomItem>();
                            wired12.OtherString = EI;
                            wiredHandler.ReloadWired(wired12);
                            break;
                        }

                    case InteractionType.conditionusernotwearingeffect:
                    case InteractionType.conditionuserwearingeffect:
                        {
                            Request.PopWiredInt32();
                            int Effect = Request.PopWiredInt32();
                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = new List<RoomItem>();
                            wired12.OtherString = Effect.ToString();
                            wiredHandler.ReloadWired(wired12);
                            break;
                        }

                    case InteractionType.conditionuserwearingbadge:
                    case InteractionType.conditionusernotwearingbadge:
                        {
                            Request.PopWiredInt32();
                            string badge = Request.PopFixedString();
                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = new List<RoomItem>();
                            wired12.OtherString = badge;
                            wiredHandler.ReloadWired(wired12);
                            break;
                        }

                    case InteractionType.conditiondaterangeactive:
                        {
                            Request.PopWiredInt32();
                            int startDate = Request.PopWiredInt32();
                            int endDate = Request.PopWiredInt32();//timestamps

                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = new List<RoomItem>();
                            wired12.OtherString = startDate + "," + endDate;
                            
                            if (startDate == 0)
                            {
                                wired12.OtherString = "";
                                Session.SendNotif(@"Para poder guardar la fecha debes introducirlo así: <b>YYYY/MM/dd hh:mm</b> o bien <b>dd/MM/YYYY hh:mm</b><br />No especifiques fecha de término si no hay. La hora y los minutos son opcionales. Anímate a arreglarlo.<br /><br /><br />Con cariño,<br /><b>Finn</b>");
                            }

                            wiredHandler.ReloadWired(wired12);
                            break;
                        }

                    case InteractionType.conditionfurnishaveusers:
                    case InteractionType.conditiontriggeronfurni:
                    case InteractionType.conditionfurnihasfurni:
                    case InteractionType.conditionfurnitypematches:
                    case InteractionType.conditionfurnishavenotusers:
                    case InteractionType.conditiontriggerernotonfurni:
                    case InteractionType.conditionfurnihasnotfurni:
                    case InteractionType.conditionfurnitypedontmatch:
                        {
                            Request.PopWiredInt32();
                            Request.PopFixedString();
                            List<RoomItem> furniItems8 = WiredSaver.GetFurniItems(Request, room);
                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = furniItems8;
                            wiredHandler.ReloadWired(wired12);
                            break;
                        }

                    case InteractionType.actiongivescore:
                        {
                            Request.PopWiredInt32();
                            int ScoreToGive = Request.PopWiredInt32();
                            int MaxTimesPerGame = Request.PopWiredInt32();

                            string NewExtraInfo = (ScoreToGive + "," + MaxTimesPerGame);

                            List<RoomItem> furniItems8 = WiredSaver.GetFurniItems(Request, room);
                            WiredItem wired12 = wiredHandler.GetWired(Item);
                            wired12.Items = furniItems8;
                            wired12.OtherString = NewExtraInfo;
                            wiredHandler.ReloadWired(wired12);
                            break;
                        }


                }
                
                Session.SendMessage(new ServerMessage(Outgoing.SaveWiredMessageComposer));
            }
        }
开发者ID:BjkGkh,项目名称:Mercury,代码行数:101,代码来源:WiredSaver.cs

示例5: OnTrigger

		public void OnTrigger(GameClient Session, RoomItem Item, int Request, bool HasRights)
		{
			if (Session == null || Item == null)
			{
				return;
			}
			if (!HasRights)
			{
				return;
			}
			string ExtraInfo = "";
			bool flag = false;
			int i = 0;
			List<RoomItem> list = new List<RoomItem>();
			string ExtraString = "";
			string ExtraString2 = "";
			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				queryreactor.setQuery("SELECT * FROM wired_items WHERE [email protected] LIMIT 1");
				queryreactor.addParameter("id", Item.Id);
				DataRow row = queryreactor.getRow();
				if (row != null)
				{
					ExtraInfo = row["string"].ToString();
					i = (int)row["delay"] / 500;
					flag = (row["bool"].ToString() == "1");
					ExtraString = row["extra_string"].ToString();
					ExtraString2 = row["extra_string_2"].ToString();
					string[] array = row["items"].ToString().Split(new char[]
					{
						';'
					});
					for (int j = 0; j < array.Length; j++)
					{
						string s = array[j];
						uint pId = 0u;
						if (uint.TryParse(s, out pId))
						{
							RoomItem item = Item.GetRoom().GetRoomItemHandler().GetItem(pId);
							if (item != null && !list.Contains(item))
							{
								list.Add(item);
							}
						}
					}
				}
			}
			switch (Item.GetBaseItem().InteractionType)
			{
			case InteractionType.triggertimer:
			{
				ServerMessage serverMessage = new ServerMessage(Outgoing.WiredTriggerMessageComposer);
				serverMessage.AppendBoolean(false);
				serverMessage.AppendInt32(5);
				serverMessage.AppendInt32(list.Count);
				foreach (RoomItem current in list)
				{
					serverMessage.AppendUInt(current.Id);
				}
				serverMessage.AppendInt32(Item.GetBaseItem().SpriteId);
				serverMessage.AppendUInt(Item.Id);
				serverMessage.AppendString(ExtraInfo);
				serverMessage.AppendInt32(1);
				serverMessage.AppendInt32(1);
				serverMessage.AppendInt32(1);
				serverMessage.AppendInt32(3);
				serverMessage.AppendInt32(0);
				serverMessage.AppendInt32(0);
				Session.SendMessage(serverMessage);
				return;
			}
			case InteractionType.triggerroomenter:
			{
				ServerMessage serverMessage2 = new ServerMessage(Outgoing.WiredTriggerMessageComposer);
				serverMessage2.AppendBoolean(false);
				serverMessage2.AppendInt32(0);
				serverMessage2.AppendInt32(list.Count);
				foreach (RoomItem current2 in list)
				{
					serverMessage2.AppendUInt(current2.Id);
				}
				serverMessage2.AppendInt32(Item.GetBaseItem().SpriteId);
				serverMessage2.AppendUInt(Item.Id);
				serverMessage2.AppendString(ExtraInfo);
				serverMessage2.AppendInt32(0);
				serverMessage2.AppendInt32(0);
				serverMessage2.AppendInt32(7);
				serverMessage2.AppendInt32(0);
				serverMessage2.AppendInt32(0);
				serverMessage2.AppendInt32(0);
				Session.SendMessage(serverMessage2);
				return;
			}
			case InteractionType.triggergameend:
			{
				ServerMessage serverMessage3 = new ServerMessage(Outgoing.WiredTriggerMessageComposer);
				serverMessage3.AppendBoolean(false);
				serverMessage3.AppendInt32(0);
				serverMessage3.AppendInt32(list.Count);
				foreach (RoomItem current3 in list)
//.........这里部分代码省略.........
开发者ID:BjkGkh,项目名称:Mercury,代码行数:101,代码来源:InteractorWired.cs

示例6: GetList

		internal void GetList(GameClient Session, ClientMessage Message)
		{
			Session.SendMessage(AchievementListComposer.Compose(Session, this.Achievements.Values.ToList<Achievement>()));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:4,代码来源:AchievementManager.cs

示例7: GetDisks

		private static void GetDisks(GameClient Session, ClientMessage Message)
		{
			Session.SendMessage(JukeboxComposer.Compose(Session));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:4,代码来源:SongManager.cs

示例8: AddToPlaylist

		private static void AddToPlaylist(GameClient Session, ClientMessage Message)
		{
			Room currentRoom = Session.GetHabbo().CurrentRoom;
			if (currentRoom == null || !currentRoom.CheckRights(Session, true, false) || !currentRoom.GotMusicController() || currentRoom.GetRoomMusicController().PlaylistSize >= currentRoom.GetRoomMusicController().PlaylistCapacity)
			{
				return;
			}
			UserItem item = Session.GetHabbo().GetInventoryComponent().GetItem(Message.PopWiredUInt());
			if (item == null || item.GetBaseItem().InteractionType != InteractionType.musicdisc)
			{
				return;
			}
			SongItem songItem = new SongItem(item);
			int num = currentRoom.GetRoomMusicController().AddDisk(songItem);
			if (num < 0)
			{
				return;
			}
			Session.GetHabbo().GetInventoryComponent().RemoveItem(songItem.itemID, true);
			Session.SendMessage(JukeboxComposer.Compose(currentRoom.GetRoomMusicController().PlaylistCapacity, currentRoom.GetRoomMusicController().Playlist.Values.ToList<SongInstance>()));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:21,代码来源:SongManager.cs

示例9: CancelQuest

		internal void CancelQuest(GameClient Session, ClientMessage Message)
		{
			Quest quest = this.GetQuest(Session.GetHabbo().CurrentQuestId);
			if (quest == null)
			{
				return;
			}
			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"DELETE FROM user_quests WHERE user_id = ",
					Session.GetHabbo().Id,
					" AND quest_id = ",
					quest.Id,
					";UPDATE user_stats SET quest_id=0 WHERE id=",
					Session.GetHabbo().Id
				}));
			}
			Session.GetHabbo().CurrentQuestId = 0u;
			Session.SendMessage(QuestAbortedComposer.Compose());
			this.GetList(Session, null);
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:23,代码来源:QuestManager.cs

示例10: GetCurrentQuest

		internal void GetCurrentQuest(GameClient Session, ClientMessage Message)
		{
			if (!Session.GetHabbo().InRoom)
			{
				return;
			}
			Quest quest = this.GetQuest(Session.GetHabbo().LastQuestCompleted);
			Quest nextQuestInSeries = this.GetNextQuestInSeries(quest.Category, checked(quest.Number + 1));
			if (nextQuestInSeries == null)
			{
				return;
			}
			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"REPLACE INTO user_quests(user_id,quest_id) VALUES (",
					Session.GetHabbo().Id,
					", ",
					nextQuestInSeries.Id,
					")"
				}));
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"UPDATE user_stats SET quest_id = ",
					nextQuestInSeries.Id,
					" WHERE id = ",
					Session.GetHabbo().Id
				}));
			}
			Session.GetHabbo().CurrentQuestId = nextQuestInSeries.Id;
			this.GetList(Session, null);
			Session.SendMessage(QuestStartedComposer.Compose(Session, nextQuestInSeries));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:34,代码来源:QuestManager.cs

示例11: ActivateQuest

		internal void ActivateQuest(GameClient Session, ClientMessage Message)
		{
			Quest quest = this.GetQuest(Message.PopWiredUInt());
			if (quest == null)
			{
				return;
			}
			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"REPLACE INTO user_quests(user_id,quest_id) VALUES (",
					Session.GetHabbo().Id,
					", ",
					quest.Id,
					")"
				}));
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"UPDATE user_stats SET quest_id = ",
					quest.Id,
					" WHERE id = ",
					Session.GetHabbo().Id
				}));
			}
			Session.GetHabbo().CurrentQuestId = quest.Id;
			this.GetList(Session, null);
			Session.SendMessage(QuestStartedComposer.Compose(Session, quest));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:29,代码来源:QuestManager.cs

示例12: GetList

		internal void GetList(GameClient Session, ClientMessage Message)
		{
			Session.SendMessage(QuestListComposer.Compose(Session, this.quests.Values.ToList<Quest>(), Message != null));
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:4,代码来源:QuestManager.cs

示例13: RemoveBadge

		internal void RemoveBadge(string Badge, GameClient Session)
		{
			if (!this.HasBadge(Badge))
			{
				return;
			}
			using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				queryreactor.setQuery("DELETE FROM user_badges WHERE badge_id = @badge AND user_id = " + this.UserId + " LIMIT 1");
				queryreactor.addParameter("badge", Badge);
				queryreactor.runQuery();
			}
			this.Badges.Remove(this.GetBadge(Badge));
			Session.SendMessage(this.Serialize());
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:15,代码来源:BadgeComponent.cs

示例14: SerializeGroupInfo

		internal void SerializeGroupInfo(Guild Group, ServerMessage Response, GameClient Session, Room Room, bool NewWindow = false)
		{
            if (Room == null) { return; }
			DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);
			DateTime dateTime2 = dateTime.AddSeconds((double)Group.CreateTime);
			Response.Init(Outgoing.GroupDataMessageComposer);
			Response.AppendUInt(Group.Id);
			Response.AppendBoolean(true);
			Response.AppendUInt(Group.State);
			Response.AppendString(Group.Name);
			Response.AppendString(Group.Description);
			Response.AppendString(Group.Badge);
			Response.AppendUInt(Group.RoomId);
			Response.AppendString((MercuryEnvironment.GetGame().GetRoomManager().GenerateRoomData(Group.RoomId) == null) ? "No room found.." : MercuryEnvironment.GetGame().GetRoomManager().GenerateRoomData(Group.RoomId).Name);
			Response.AppendInt32((Group.CreatorId == Session.GetHabbo().Id) ? 3 : (Group.Requests.Contains(Session.GetHabbo().Id) ? 2 : (Group.Members.ContainsKey(Session.GetHabbo().Id) ? 1 : 0)));
			Response.AppendInt32(Group.Members.Count);
			Response.AppendBoolean(Session.GetHabbo().FavouriteGroup == Group.Id);
			Response.AppendString(string.Concat(new object[]
			{
				dateTime2.Day,
				"-",
				dateTime2.Month,
				"-",
				dateTime2.Year
			}));
			Response.AppendBoolean(Group.CreatorId == Session.GetHabbo().Id);
			Response.AppendBoolean(Group.Admins.ContainsKey(Session.GetHabbo().Id));
			Response.AppendString((MercuryEnvironment.getHabboForId(Group.CreatorId) == null) ? "" : MercuryEnvironment.getHabboForId(Group.CreatorId).Username);
			Response.AppendBoolean(NewWindow);
			Response.AppendBoolean(Group.AdminOnlyDeco == 0u);
			Response.AppendInt32(Group.Requests.Count);
			Response.AppendBoolean(Group.HasForum);
			if (Room != null)
			{
				Room.SendMessage(Response);
				return;
			}
			if (Session != null)
			{
				Session.SendMessage(Response);
			}
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:42,代码来源:GroupManager.cs

示例15: DeliverItems


//.........这里部分代码省略.........
									'\n'
								});
                                        Pet pet26 = Catalog.CreatePet(Session.GetHabbo().Id, array26[0], 25, array26[1], array26[2], 0);
                                        Session.GetHabbo().GetInventoryComponent().AddPet(pet26);
                                        list.Add(Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, 320u, "0", 0u, true, false, 0, 0, ""));
                                        break;
                                    }
                                case InteractionType.pet26:
                                    {
                                        string[] array27 = ExtraData.Split(new char[]
								{
									'\n'
								});
                                        Pet pet27 = Catalog.CreatePet(Session.GetHabbo().Id, array27[0], 26, array27[1], array27[2], 0);
                                        Session.GetHabbo().GetInventoryComponent().AddPet(pet27);
                                        list.Add(Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, 320u, "0", 0u, true, false, 0, 0, ""));
                                        break;
                                    }
                                default:
                                    switch (interactionType)
                                    {
                                        case InteractionType.musicdisc:
                                            goto IL_1067;
                                        case InteractionType.puzzlebox:
                                            goto IL_10C3;
                                        case InteractionType.roombg:
                                            goto IL_FF7;
                                        default:
                                            switch (interactionType)
                                            {
                                                case InteractionType.gld_item:
                                                case InteractionType.gld_gate:
                                                case InteractionType.groupforumterminal:
                                                    list.Add(Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, Item.ItemId, "0", Convert.ToUInt32(ExtraData), true, false, 0, 0, ""));
                                                    break;
                                                default:
                                                    goto IL_10C3;
                                            }
                                            break;
                                    }
                                    break;
                            }
                        IL_10EE:
                            i++;
                            continue;
                        IL_F87:
                            UserItem userItem3 = Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, Item.ItemId, ExtraData, 0u, true, false, 0, 0, "");
                            uint id3 = userItem3.Id;
                            list.Add(userItem3);
                            using (IQueryAdapter queryreactor2 = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                queryreactor2.runFastQuery("INSERT INTO room_items_moodlight (item_id,enabled,current_preset,preset_one,preset_two,preset_three) VALUES (" + id3 + ",'0',1,'#000000,255,0','#000000,255,0','#000000,255,0')");
                                goto IL_10EE;
                            }
                        IL_FF7:
                            UserItem userItem4 = Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, Item.ItemId, ExtraData, 0u, true, false, 0, 0, "");
                            uint id4 = userItem4.Id;
                            list.Add(userItem4);
                            using (IQueryAdapter queryreactor3 = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                queryreactor3.runFastQuery("INSERT INTO room_items_toner VALUES (" + id4 + ",'0',0,0,0)");
                                goto IL_10EE;
                            }
                        IL_1067:
                            list.Add(Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, Item.ItemId, ExtraData, 0u, true, false, 0, 0, SongCode));
                            goto IL_10EE;
                        IL_10C3:
                            list.Add(Session.GetHabbo().GetInventoryComponent().AddNewItem(0u, Item.ItemId, ExtraData, 0u, true, false, limno, limtot, ""));
                            goto IL_10EE;
                        }
                        return list;
                    }
                    if (a == "e")
                    {
                        for (int j = 0; j < Amount; j++)
                        {
                            Session.GetHabbo().GetAvatarEffectsInventoryComponent().AddNewEffect(Item.SpriteId, 7200);
                        }
                        return list;
                    }
                    if (a == "r")
                    {
                        if (Item.Name == "bot_bartender")
                        {
                            RoomBot bot = Catalog.CreateBot(Session.GetHabbo().Id, "Camarera", "hr-9534-39.hd-600-1.ch-819-92.lg-3058-64.sh-3064-110.wa-2005", "¡Te calma la sed y sabe bailar!", "f", true);
                            Session.GetHabbo().GetInventoryComponent().AddBot(bot);
                            Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializeBotInventory());
                        }
                        else
                        {
                            RoomBot bot2 = Catalog.CreateBot(Session.GetHabbo().Id, "Robbie", "hr-3020-34.hd-3091-2.ch-225-92.lg-3058-100.sh-3089-1338.ca-3084-78-108.wa-2005", "Habla, anda, baila y se viste", "m", false);
                            Session.GetHabbo().GetInventoryComponent().AddBot(bot2);
                            Session.SendMessage(Session.GetHabbo().GetInventoryComponent().SerializeBotInventory());
                        }
                        return list;
                    }
                }
                return list;
            }
        }
开发者ID:BjkGkh,项目名称:Mercury,代码行数:101,代码来源:Catalog.cs


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