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


C# GameClient.SendNotification方法代码示例

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


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

示例1: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			CatalogPage @class = Essential.GetGame().GetCatalog().GetPage(Event.PopWiredInt32());
			if (@class != null && @class.Enabled && @class.Visible && @class.MinRank <= Session.GetHabbo().Rank)
			{
                if (@class.ClubOnly && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip"))
				{
                    Session.SendNotification("Diese Seite ist nur für Clubmitglieder zugänglich!");
				}
				else
				{
                    Session.SendMessage(@class.GetMessage);
				}
            }
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:15,代码来源:GetCatalogPageEvent.cs

示例2: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().HasFuse("acc_supporttool"))
			{
				uint uint_ = Event.PopWiredUInt();
				if (Essential.GetGame().GetClientManager().GetNameById(uint_) != "Unknown User")
				{
					Session.SendMessage(Essential.GetGame().GetModerationTool().method_18(uint_));
				}
				else
				{
					Session.SendNotification("Could not load user info, invalid user.");
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:15,代码来源:GetModeratorUserInfoMessageEvent.cs

示例3: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null && (!(class14_.Owner != Session.GetHabbo().Username) || Session.GetHabbo().Rank == 7u))
			{
				Essential.GetGame().GetRoomManager().method_2(num);
                RoomData @class = Essential.GetGame().GetRoomManager().method_12(num);

                if (Groups.GetRoomGroup(@class.Id) != null)
                 {
                     Session.SendNotification("Gruppenräume können nicht gelöscht werden! Bitte wähl in den Einstellungen der Gruppe einen anderen Raum aus oder ändere ihn auf \"Keinen Raum\".");
                     return;
                 }

				if (@class != null && (!(@class.Owner.ToLower() != Session.GetHabbo().Username.ToLower()) || Session.GetHabbo().Rank == 7u))
				{
					Room class2 = Essential.GetGame().GetRoomManager().GetRoom(@class.Id);
					if (class2 != null)
					{
						for (int i = 0; i < class2.RoomUsers.Length; i++)
						{
							RoomUser class3 = class2.RoomUsers[i];
							if (class3 != null && !class3.IsBot)
							{
                                class3.GetClient().SendMessage(new ServerMessage(Outgoing.OutOfRoom)); // P
								class3.GetClient().GetHabbo().RemoveFromRoom();
							}
						}
						Essential.GetGame().GetRoomManager().method_16(class2);
					}
					using (DatabaseClient class4 = Essential.GetDatabase().GetClient())
					{
						class4.ExecuteQuery("DELETE FROM rooms WHERE Id = '" + num + "' LIMIT 1");
						class4.ExecuteQuery("DELETE FROM user_favorites WHERE room_id = '" + num + "'");
						class4.ExecuteQuery("UPDATE items SET room_id = '0' WHERE room_id = '" + num + "'");
						class4.ExecuteQuery("DELETE FROM room_rights WHERE room_id = '" + num + "'");
						class4.ExecuteQuery("UPDATE users SET home_room = '0' WHERE home_room = '" + num + "'");
						class4.ExecuteQuery("UPDATE user_pets SET room_id = '0' WHERE room_id = '" + num + "'");
						Session.GetHabbo().method_1(class4);
					}
					Session.GetHabbo().GetInventoryComponent().method_9(true);
					Session.GetHabbo().GetInventoryComponent().method_3(true);
                    Session.SendMessage(Essential.GetGame().GetNavigator().GetNavigatorMessage(Session, -3));
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:47,代码来源:DeleteRoomMessageEvent.cs

示例4: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
                RoomData @class = Essential.GetGame().GetRoomManager().method_12(Session.GetHabbo().uint_2);
				if (@class != null)
				{
					if (@class.Model == null)
					{
						Session.SendNotification("Error loading room, please try again soon! (Error Code: MdlData)");
                        Session.SendMessage(new ServerMessage(Outgoing.OutOfRoom)); // P
						Session.GetClientMessageHandler().method_7();
					}
					else
					{
                        Session.SendMessage(@class.Model.method_1(Essential.GetGame().GetRoomManager().GetRoom(@class.Id)));
						Session.SendMessage(@class.Model.method_2(Essential.GetGame().GetRoomManager().GetRoom(@class.Id)));
                        /*if (@class.IsPublicRoom)
                        {
                            if (@class.Model.string_2.Contains("|"))
                            {
                                ServerMessage Message = new ServerMessage(Outgoing.RoomModel); // Updated
                                Message.AppendInt32(@class.Model.string_2.Split('|').Length);
                                foreach (string PublicIt in @class.Model.string_2.Split('|'))
                                {
                                    Message.AppendInt32(0);
                                    Message.AppendString(PublicIt.Split(' ')[0]);
                                    Message.AppendString(PublicIt.Split(' ')[1]);
                                    Message.AppendInt32(int.Parse(PublicIt.Split(' ')[2]));
                                    Message.AppendInt32(int.Parse(PublicIt.Split(' ')[3]));
                                    Message.AppendInt32(int.Parse(PublicIt.Split(' ')[4]));
                                    Message.AppendInt32(int.Parse(PublicIt.Split(' ')[5]));
                                }
                                Session.SendMessage(Message);
                                ServerMessage Message6 = new ServerMessage(Outgoing.RoomEntryInfo); // P
                                Message6.AppendBoolean(false);
                                Message6.AppendString(@class.ModelName);
                                Message6.AppendUInt(0);
                                Message6.AppendBoolean(false);
                                Session.SendMessage(Message6);
                            }
                        }   */               
                    }
                }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:43,代码来源:GetHeightmapMessageEvent.cs

示例5: Handle

		public void Handle(GameClient session, ClientMessage message)
		{
			Room room = Essential.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);

            if (room != null && (room.AllowPet || room.CheckRights(session, true)))
			{
				uint petId = message.PopWiredUInt();

				Pet pet = session.GetHabbo().GetInventoryComponent().GetPetById(petId);

				if (pet != null && !pet.PlacedInRoom)
				{
					int num = message.PopWiredInt32();
					int num2 = message.PopWiredInt32();

					if (room.method_30(num, num2, 0.0, true, false))
					{
						if (room.PetCount >= ServerConfiguration.PetsPerRoomLimit)
						{
							session.SendNotification(EssentialEnvironment.GetExternalText("error_maxpets") + ServerConfiguration.PetsPerRoomLimit);
						}
						else
						{
                            try
                            {
                                pet.PlacedInRoom = true;
                                pet.RoomId = room.Id;

                                List<RandomSpeech> list = new List<RandomSpeech>();
                                List<BotResponse> list2 = new List<BotResponse>();

                                room.method_4(new RoomBot(pet.PetId, pet.RoomId, AIType.Pet, "freeroam", pet.Name, "", pet.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), pet);
                                session.GetHabbo().GetInventoryComponent().RemovePetById(pet.PetId);

                            }catch(Exception ex)
                            {
                                Console.WriteLine(ex.ToString());
                            }
						}
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:43,代码来源:PlacePetMessageEvent.cs

示例6: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     string message = Essential.FilterString(Event.PopFixedString());
     if (string.IsNullOrEmpty(message.Trim()))
         return;
     if (Essential.GetAntiAd().ContainsIllegalWord(message))
     {
         ServerMessage Message2 = new ServerMessage(Outgoing.InstantChat);
         Message2.AppendUInt(0u);
         Message2.AppendString("[AWS] " + Session.GetHabbo().Username +": " + message);
         Message2.AppendString(Essential.GetUnixTimestamp() + string.Empty);
         Essential.GetGame().GetClientManager().SendToStaffs(Session, Message2);
         Session.SendNotification(Essential.GetGame().GetRoleManager().GetConfiguration().getData("antiad.alert"));
         return;
     }
     // I don't "bobba" filter the word.. I just check if the message contains a Illegal word. And if,
     // I "close" the Event!
     Essential.GetGame().GetGuideManager().GetTicket(Session.GetHabbo().Id).StoreMessage(message, Session.GetHabbo().Id);
     ServerMessage Message = new ServerMessage(Outgoing.GuideSessionMessage); //Rootkit
     Message.AppendString(message);
     Message.AppendInt32(Session.GetHabbo().Id);
     Essential.GetGame().GetGuideManager().GetTicket(Session.GetHabbo().Id).SendToTicket(Message);
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:23,代码来源:GuideChatMessageEvent.cs

示例7: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            
            string message = Event.PopFixedString();
            using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
            {
                DataRow dr = dbClient.ReadDataRow("SELECT * FROM friend_stream WHERE userid='" + Session.GetHabbo().Id.ToString() + "' ORDER BY time DESC LIMIT 1");
                double currentTime = Essential.GetUnixTimestamp();
                if (dr == null)
                {

                    string Id = Session.GetHabbo().Id.ToString();
                    string Gender = Session.GetHabbo().Gender.ToString();
                    string look = Session.GetHabbo().Figure.ToString();
                    dbClient.AddParamWithValue("@endstring", message);
                    dbClient.ExecuteQuery("INSERT INTO friend_stream (`type`,`userid`,`gender`,`look`,`time`,`data`,`data_extra`) VALUES ('1','" + Id + "','" + Gender + "','" + look + "','" + currentTime + "', @endstring, '0');");
                }
                else
                {
                    double lastTime = (double)dr["time"];
                    double seconds = currentTime - lastTime;
                    if (seconds > 300)
                    {
                        string Id = Session.GetHabbo().Id.ToString();
                        string Gender = Session.GetHabbo().Gender.ToString();
                        string look = Session.GetHabbo().Figure.ToString();
                        dbClient.AddParamWithValue("@endstring", message);
                        dbClient.ExecuteQuery("INSERT INTO friend_stream (`type`,`userid`,`gender`,`look`,`time`,`data`,`data_extra`) VALUES ('1','" + Id + "','" + Gender + "','" + look + "','" + currentTime + "', @endstring, '0');");
                    }
                    else
                    {
                        Session.SendNotification("Du kannst nur alle 15 Minuten einen Friendstream Eintrag erstellen! Versuchs später nochmal.");
                    }
                }
            }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:36,代码来源:UpdateStream.cs

示例8: CreateRoom

        public RoomData CreateRoom(GameClient Session, string Name, string Model)
		{
            Name = Essential.FilterString(Name);
			RoomData result;
            if (!this.Models.ContainsKey(Model))
			{
				Session.SendNotification("Sorry, this room model has not been added yet. Try again later.");
				result = null;
			}
			else
			{
                if (this.Models[Model].bool_0 && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip"))
				{
					Session.SendNotification("You must be an Essential Club member to use that room layout.");
					result = null;
				}
				else
				{
                    if (Name.Length < 3)
					{
						Session.SendNotification("Room name is too short for room creation!");
						result = null;
					}
					else
					{
						uint uint_ = 0u;

						using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
						{
                            dbClient.AddParamWithValue("caption", Name);
                            dbClient.AddParamWithValue("model", Model);
							dbClient.AddParamWithValue("username", Session.GetHabbo().Username);

							dbClient.ExecuteQuery("INSERT INTO rooms (roomtype,caption,owner,model_name) VALUES ('private',@caption,@username,@model)");

                            Session.GetHabbo().GetUserDataFactory().SetRooms(dbClient.ReadDataTable("SELECT * FROM rooms WHERE owner = @username ORDER BY Id ASC"));

							uint_ = (uint)dbClient.ReadDataRow("SELECT Id FROM rooms WHERE owner = @username AND caption = @caption ORDER BY Id DESC")[0];

							Session.GetHabbo().method_1(dbClient);
						}

						result = this.method_12(uint_);
					}
				}
			}
			return result;
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:48,代码来源:RoomManager.cs

示例9: HandleCommands

        public static bool HandleCommands(GameClient Session, string Input)
        {
            string[] Params = Input.Split(new char[]
			{
				' '
			});
            GameClient TargetClient = null;
            Room class2 = Session.GetHabbo().CurrentRoom;
            if (!Essential.GetGame().GetRoleManager().dictionary_4.ContainsKey(Params[0]))
            {
                return false;
            }
            else
            {
                try
                {
                    int num;
                    if (class2 != null && class2.CheckRights(Session, true))
                    {
                        num = Essential.GetGame().GetRoleManager().dictionary_4[Params[0]];
                        if (num <= 33)
                        {
                            if (num == 8)
                            {
                                class2 = Session.GetHabbo().CurrentRoom;
                                if (class2.bool_5)
                                {
                                    class2.bool_5 = false;
                                }
                                else
                                {
                                    class2.bool_5 = true;
                                }
                                Essential.GetGame().GetClientManager().StoreCommand(Session, Params[0].ToLower(), Input);
                                return true;
                            }
                            if (num == 33)
                            {
                                class2 = Session.GetHabbo().CurrentRoom;
                                if (class2 != null && class2.CheckRights(Session, true))
                                {
                                    List<RoomItem> list = class2.method_24(Session);
                                    Session.GetHabbo().GetInventoryComponent().method_17(list);
                                    Session.GetHabbo().GetInventoryComponent().method_9(true);
                                    Essential.GetGame().GetClientManager().StoreCommand(Session, Params[0].ToLower(), Input + " " + Session.GetHabbo().CurrentRoomId);
                                    return true;
                                }
                                return false;
                            }
                        }
                        else
                        {
                            if (num == 46)
                            {
                                class2 = Session.GetHabbo().CurrentRoom;
                                try
                                {
                                    int num2 = int.Parse(Params[1]);
                                    if (Session.GetHabbo().Rank >= 6u)
                                    {
                                        class2.UsersMax = num2;
                                    }
                                    else
                                    {
                                        if (num2 > 100 || num2 < 5)
                                        {
                                            Session.SendNotification("Fehler: Wähle eine Zahl zwischen 5 und 100.");
                                        }
                                        else
                                        {
                                            class2.UsersMax = num2;
                                        }
                                    }
                                }
                                catch
                                {
                                    return false;
                                }
                                Essential.GetGame().GetClientManager().StoreCommand(Session, Params[0].ToLower(), Input);
                                return true;
                            }
                            if (num == 53)
                            {
                                class2 = Session.GetHabbo().CurrentRoom;
                                Essential.GetGame().GetRoomManager().method_16(class2);
                                Essential.GetGame().GetClientManager().StoreCommand(Session, Params[0].ToLower(), Input);
                                return true;
                            }
                        }
                    }
                    switch (Essential.GetGame().GetRoleManager().dictionary_4[Params[0]])
                    {
                        case 2:
                            {
                                if (!Session.GetHabbo().HasFuse("cmd_alert"))
                                {
                                    return false;
                                }
                                string TargetUser = Params[1];
                                TargetClient = Essential.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
//.........这里部分代码省略.........
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:101,代码来源:ChatCommandHandler.cs

示例10: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
           
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (@class != null && Session != null && Session.GetHabbo().PassedSafetyQuiz)
			{
                Session.GetHabbo().CheckForUnmute();
				if (Session.GetHabbo().IsMuted)
				{
					Session.SendNotification(EssentialEnvironment.GetExternalText("error_muted"));
				}
				else
				{
                    if (Session.GetHabbo().HasFuse("ignore_roommute") || [email protected]_4)
                    {
                        string text = Essential.FilterString(Event.PopFixedString());
                        if (!String.IsNullOrEmpty(text) || !String.IsNullOrWhiteSpace(text))
                        {
                            string text2 = text.Split(new char[]
						{
							' '
						})[0];
                            string text3 = text.Substring(text2.Length + 1);
                            text3 = ChatCommandHandler.ApplyFilter(text3);
                            RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
                            RoomUser class3 = @class.method_56(text2);
                            if (Session.GetHabbo().method_4() > 0)
                            {
                                TimeSpan timeSpan = DateTime.Now - Session.GetHabbo().dateTime_0;
                                if (timeSpan.Seconds > 4)
                                {
                                    Session.GetHabbo().int_23 = 0;
                                }
                                if (timeSpan.Seconds < 4 && Session.GetHabbo().int_23 > 5 && !class2.IsBot)
                                {
                                    ServerMessage Message = new ServerMessage(Outgoing.FloodFilter);
                                    Message.AppendInt32(Session.GetHabbo().method_4());
                                    Session.SendMessage(Message);
                                    Session.GetHabbo().IsMuted = true;
                                    Session.GetHabbo().int_4 = Session.GetHabbo().method_4();
                                    return;
                                }
                                Session.GetHabbo().dateTime_0 = DateTime.Now;
                                Session.GetHabbo().int_23++;
                            }
                            ServerMessage Message2 = new ServerMessage(Outgoing.Whisp); // OLD 25 UPDATED
                            Message2.AppendInt32(class2.VirtualId);
                            Message2.AppendStringWithBreak(text3);
                            Message2.AppendInt32(0);
                            Message2.AppendInt32(Event.PopWiredInt32());
                            Message2.AppendInt32(0);
                            Message2.AppendInt32(-1);
                            if (class2 != null && !class2.IsBot && !Essential.GetAntiAd().ContainsIllegalWord(text3))
                            {
                                class2.GetClient().SendMessage(Message2);
                            }
                            class2.Unidle();
                            if (class3 != null && !class3.IsBot && (class3.GetClient().GetHabbo().list_2.Count <= 0 || !class3.GetClient().GetHabbo().list_2.Contains(Session.GetHabbo().Id)))
                            {
                                if(!Essential.GetAntiAd().ContainsIllegalWord(text3))
                                class3.GetClient().SendMessage(Message2);
                                if (ServerConfiguration.EnableChatlog)
                                {
                                    using (DatabaseClient class4 = Essential.GetDatabase().GetClient())
                                    {
                                        class4.AddParamWithValue("message", "<Whisper to " + class3.GetClient().GetHabbo().Username + ">: " + text3);
                                        class4.ExecuteQuery(string.Concat(new object[]
									{
										"INSERT INTO chatlogs (user_id,room_id,hour,minute,timestamp,message,user_name,full_date) VALUES ('",
										Session.GetHabbo().Id,
										"','",
										@class.Id,
										"','",
										DateTime.Now.Hour,
										"','",
										DateTime.Now.Minute,
										"',UNIX_TIMESTAMP(),@message,'",
										Session.GetHabbo().Username,
										"','",
										DateTime.Now.ToLongDateString(),
										"')"
									}));
                                    }
                                }
                                if (Essential.GetAntiAd().ContainsIllegalWord(text3))
                                {
                                    ServerMessage Message3 = new ServerMessage(Outgoing.InstantChat);
                                    Message3.AppendUInt(0u);
                                    Message3.AppendString("[AWS] " + Session.GetHabbo().Username + ": " + text3);
                                    Message3.AppendString(Essential.GetUnixTimestamp() + string.Empty);
                                    Essential.GetGame().GetClientManager().SendToStaffs(Session, Message3);
                                    Session.SendNotification(Essential.GetGame().GetRoleManager().GetConfiguration().getData("antiad.alert"));
                                }
                            }
                        }
                    }
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:99,代码来源:WhisperMessageEvent.cs

示例11: AddItemToInventory


//.........这里部分代码省略.........
                        return;
                    }
                    if (text == "e")
                    {
                        for (int i = 0; i < int_0; i++)
                        {
                            Session.GetHabbo().GetEffectsInventoryComponent().method_0(Item.Sprite, 3600);
                        }
                        return;
                    }
                    if (text == "h")
                    {
                        for (int i = 0; i < int_0; i++)
                        {
                            Session.GetHabbo().GetSubscriptionManager().method_3("habbo_club", 2678400);
                            Session.GetHabbo().CheckHCAchievements();
                        }
                        ServerMessage Message2 = new ServerMessage(Outgoing.SerializeClub); // Updated
                        Message2.AppendStringWithBreak("habbo_club");
                        if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
                        {
                            double num3 = (double)Session.GetHabbo().GetSubscriptionManager().GetSubscriptionByType("habbo_club").ExpirationTime;
                            double num4 = num3 - Essential.GetUnixTimestamp();
                            int num5 = (int)Math.Ceiling(num4 / 86400.0);
                            int num6 = num5 / 31;
                            if (num6 >= 1)
                            {
                                num6--;
                            }
                            Message2.AppendInt32(num5 - num6 * 31);
                            Message2.AppendInt32(2);
                            Message2.AppendInt32(0);
                            Message2.AppendInt32(1);
                            Message2.AppendBoolean(true);
                            Message2.AppendBoolean(true);
                            Message2.AppendInt32(num6);
                            Message2.AppendInt32(0);
                            Message2.AppendInt32(0);
                        }
                        else
                        {
                            for (int i = 0; i < 3; i++)
                            {
                                Message2.AppendInt32(0);
                            }
                        }
                        Session.SendMessage(Message2);
                        ServerMessage Message3 = new ServerMessage(Outgoing.Fuserights); // Updated
                        if (Session.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes)
                        {
                            Message3.AppendInt32(2);
                        }
                        else
                        {
                            if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
                            {
                                Message3.AppendInt32(1);
                            }
                            else
                            {
                                Message3.AppendInt32(0);
                            }
                        }
                        if (Session.GetHabbo().HasFuse("acc_anyroomowner"))
                        {
                            Message3.AppendInt32(7);
                        }
                        else
                        {
                            if (Session.GetHabbo().HasFuse("acc_anyroomrights"))
                            {
                                Message3.AppendInt32(5);
                            }
                            else
                            {
                                if (Session.GetHabbo().HasFuse("acc_supporttool"))
                                {
                                    Message3.AppendInt32(4);
                                }
                                else
                                {
                                    if (Session.GetHabbo().IsVIP || ServerConfiguration.HabboClubForClothes || Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
                                    {
                                        Message3.AppendInt32(2);
                                    }
                                    else
                                    {
                                        Message3.AppendInt32(0);
                                    }
                                }
                            }
                        }
                        Session.SendMessage(Message3);
                        return;
                    }
                }
                if(text != "r")
                    Session.SendNotification("Something went wrong! The item type could not be processed. Please do not try to buy this item anymore, instead inform support as soon as possible.");
            }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:101,代码来源:Catalog.cs

示例12: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            try
            {
                int num = Event.PopWiredInt32();
                bool flag = Event.PopWiredBoolean();
                DataRow habbo = null;
                DataRow userStats = null;
                DataTable userGroups = null;
                int Friends = 0;
                using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
                {
                    habbo = dbClient.ReadDataRow("SELECT * FROM users WHERE Id=" + num + " LIMIT 1");
                    userStats = dbClient.ReadDataRow("SELECT * FROM user_stats WHERE id=" + num + " LIMIT 1");
                    userGroups = dbClient.ReadDataTable("SELECT groupid FROM group_memberships WHERE userid=" + num);
                    Friends = dbClient.ReadInt32("SELECT COUNT(*) FROM messenger_friendships WHERE user_one_id=" + num);
                }

                if (habbo == null)
                {
                    Session.SendNotification("No Data found for User: " + num);
                }
                else
                {
                        DataRow Info;
                        TimeSpan span = (TimeSpan)(DateTime.Now - UnixTimeStampToDateTime(double.Parse((string)habbo["last_online"])));
                        List<GroupsManager> list = new List<GroupsManager>();
                        foreach(DataRow guild2 in userGroups.Rows)
                        {
                            if (!list.Contains(Groups.GetGroupById((int)guild2["groupid"])))
                                list.Add(Groups.GetGroupById((int)guild2["groupid"]));
                        }
                        ServerMessage Response = new ServerMessage(Outgoing.ProfileInformation);
                        Response.AppendUInt((uint)habbo["id"]);
                        Response.AppendString((string)habbo["username"]);
                        Response.AppendString((string)habbo["look"]);
                        Response.AppendString((string)habbo["motto"]);
                        Response.AppendString(UnixTimeStampToDateTime(double.Parse((string)habbo["account_created"])).ToShortDateString());
                        Response.AppendInt32((int)userStats["achievementScore"]);
                        Response.AppendInt32(Friends);
                        Response.AppendBoolean(num != Session.GetHabbo().Id);
                        Response.AppendBoolean(false);
                        Response.AppendBoolean(Essential.GetGame().GetClientManager().GetClient((uint)num) != null);
                        Response.AppendInt32(list.Count);
                        int idk = 0;
                        foreach (GroupsManager guild in list)
                        {
                            if (guild != null)
                            {
                                Response.AppendInt32(guild.Id);
                                Response.AppendString(guild.Name);
                                Response.AppendString(guild.Badge);
                                Response.AppendString(guild.ColorOne);
                                Response.AppendString(guild.ColorTwo);
                                Response.AppendBoolean((int)userStats["groupid"] == guild.Id);
                            }
                            else
                            {
                                Response.AppendInt32(idk);
                                Response.AppendString("Undefined");
                                Response.AppendString("");
                                Response.AppendString("bf2222");
                                Response.AppendString("bf2222");
                                Response.AppendBoolean(false);
                            }
                            idk++;
                        }
                        Response.AppendBoolean(false);
                        Response.AppendInt32((int)span.TotalSeconds);//(int)span.TotalSeconds);
                        Response.AppendBoolean(true);
                        Session.SendMessage(Response);
                    }
            }
            catch(Exception ex)
            {
               /* Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex.ToString());
                Console.ForegroundColor = ConsoleColor.Gray;*/
            }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:80,代码来源:GetUserProfileEvent.cs

示例13: method_15

		public void method_15(GameClient Session, uint uint_0, string string_0, bool bool_0)
		{
			GameClient @class = Essential.GetGame().GetClientManager().GetClient(uint_0);
			if (@class != null && @class.GetHabbo().CurrentRoomId >= 1u && @class.GetHabbo().Id != Session.GetHabbo().Id)
			{
				if (@class.GetHabbo().Rank >= Session.GetHabbo().Rank)
				{
					Session.SendNotification(EssentialEnvironment.GetExternalText("mod_error_permission_kick"));
				}
				else
				{
					Room class2 = Essential.GetGame().GetRoomManager().GetRoom(@class.GetHabbo().CurrentRoomId);
					if (class2 != null)
					{
                        class2.RemoveUserFromRoom(@class, true, false);
						if (!bool_0)
						{
							@class.SendNotification(string_0);
							using (DatabaseClient class3 = Essential.GetDatabase().GetClient())
							{
								class3.ExecuteQuery("UPDATE user_info SET cautions = cautions + 1 WHERE user_id = '" + uint_0 + "' LIMIT 1");
							}
						}
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:ModerationTool.cs

示例14: RedeemShell

        public void RedeemShell(GameClient client)
        {
            int num = 0;

            List<UserItem> list = new List<UserItem>();

            foreach (UserItem current in this.Items)
            {
                if (current != null && (current.GetBaseItem().Name.StartsWith("PntEx_")))
                {
                    string[] array = current.GetBaseItem().Name.Split(new char[]
					{
						'_'
					});

                    int num2 = int.Parse(array[1]);

                    if (!this.list_1.Contains(current.uint_0))
                    {
                        if (num2 > 0)
                            num += num2;

                        list.Add(current);
                    }
                }
            }

            foreach (UserItem current in list)
            {
                this.method_12(current.uint_0, 0u, false);
            }

            client.GetHabbo().VipPoints += num;
            client.GetHabbo().UpdateVipPoints(false, true);

            client.SendNotification("All deine VIP Punkte im Inventar wurden zu " + num + " VIP Punkte umgetauscht!");
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:37,代码来源:InventoryComponent.cs

示例15: method_17

		public void method_17(GameClient Session, uint uint_0, int int_0, string string_0)
		{
			GameClient @class = Essential.GetGame().GetClientManager().GetClient(uint_0);
			if (@class != null && @class.GetHabbo().Id != Session.GetHabbo().Id)
			{
				if (@class.GetHabbo().Rank >= Session.GetHabbo().Rank)
				{
					Session.SendNotification(EssentialEnvironment.GetExternalText("mod_error_permission_ban"));
				}
				else
				{
					double double_ = (double)int_0;
					Essential.GetGame().GetBanManager().BanUser(@class, Session.GetHabbo().Username, double_, string_0, false);
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:16,代码来源:ModerationTool.cs


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