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


C# GameClient.SendNotif方法代码示例

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


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

示例1: OnTrigger

		public void OnTrigger(GameClient Session, RoomItem Item, int Request, bool HasRights)
		{
			RoomUser User = Item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
			if (User == null)
			{
				return;
			}
			
			if (User.CurrentEffect == 172 || User.CurrentEffect == 5 || User.CurrentEffect == 173)
			{
				if (Item.ExtraData != "5")
				{
					if (!Item.VikingCotieBurning)
					{
                        Item.ExtraData = "1";
                        Item.UpdateState();

						Item.VikingCotieBurning = true;
                        GameClient clientByUsername = MercuryEnvironment.GetGame().GetClientManager().GetClientByUsername(Item.GetRoom().Owner);
                       
                        if (clientByUsername != null )
                        {
                            if (clientByUsername.GetHabbo().Username != Item.GetRoom().Owner)
                            {
                                clientByUsername.SendNotif("" + User.GetUsername() + " ha empezado a quemar una cabaña vikingo de tu Sala!");
                            }
                        }

                        this.mItem = Item;

                        Timer Timer = new Timer(5000);
                        Timer.Elapsed += OnElapse;
                        Timer.Enabled = true;
						return;
					}
				}
				else
				{
					Session.SendNotif("¡Lo sentimos! Esta cabaña Vikingo ya ha sido quemada y no hay marcha atrás!");
				}
			}
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:42,代码来源:InteractorVikingCotie.cs

示例2: HandlePurchase


//.........这里部分代码省略.........
                                {
                                    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)
                {
                    if (item.GetBaseItem(current).InteractionType == InteractionType.pet1 || item.GetBaseItem(current).InteractionType == InteractionType.pet2 || item.GetBaseItem(current).InteractionType == InteractionType.pet3 || item.GetBaseItem(current).InteractionType == InteractionType.pet4 || item.GetBaseItem(current).InteractionType == InteractionType.pet5 || item.GetBaseItem(current).InteractionType == InteractionType.pet6 || item.GetBaseItem(current).InteractionType == InteractionType.pet7 || item.GetBaseItem(current).InteractionType == InteractionType.pet8 || item.GetBaseItem(current).InteractionType == InteractionType.pet9 || item.GetBaseItem(current).InteractionType == InteractionType.pet10 || item.GetBaseItem(current).InteractionType == InteractionType.pet11 || item.GetBaseItem(current).InteractionType == InteractionType.pet12 || item.GetBaseItem(current).InteractionType == InteractionType.pet13 || item.GetBaseItem(current).InteractionType == InteractionType.pet14 || item.GetBaseItem(current).InteractionType == InteractionType.pet15 || item.GetBaseItem(current).InteractionType == InteractionType.pet16 || item.GetBaseItem(current).InteractionType == InteractionType.pet17 || item.GetBaseItem(current).InteractionType == InteractionType.pet18 || item.GetBaseItem(current).InteractionType == InteractionType.pet19 || item.GetBaseItem(current).InteractionType == InteractionType.pet20 || item.GetBaseItem(current).InteractionType == InteractionType.pet21 || item.GetBaseItem(current).InteractionType == InteractionType.pet22 || item.GetBaseItem(current).InteractionType == InteractionType.pet23 || item.GetBaseItem(current).InteractionType == InteractionType.pet24 || item.GetBaseItem(current).InteractionType == InteractionType.pet25 || item.GetBaseItem(current).InteractionType == InteractionType.pet26)
                    {
                        flag = true;
                    }
                }
                if (!flag && (item.CreditsCost * num < 0 || item.DucketsCost * num < 0 || item.BelCreditsCost * num < 0 || item.LoyaltyCost * num < 0))
                {
开发者ID:BjkGkh,项目名称:Mercury,代码行数:67,代码来源:Catalog.cs

示例3: 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

示例4: CreateRoom

		internal RoomData CreateRoom(GameClient Session, string Name, string Desc, string Model, int Category, int MaxVisitors, int TradeState)
		{
            if (!this.roomModels.Contains(Model))
			{
				Session.SendNotif("I can't create your room with that model!");
				return null;
			}

			uint RoomId = 0;
			using (IQueryAdapter dbClient = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
			{
				dbClient.setQuery("INSERT INTO rooms (roomtype,caption,description,owner,model_name,category,users_max,trade_state) VALUES ('private',@caption,@desc,@username,@model,@cat,@usmax,@tstate)");
				dbClient.addParameter("caption", Name);
				dbClient.addParameter("desc", Desc);
				dbClient.addParameter("username", Session.GetHabbo().Username);
				dbClient.addParameter("model", Model);
				dbClient.addParameter("cat", Category);
				dbClient.addParameter("usmax", MaxVisitors);
				dbClient.addParameter("tstate", TradeState.ToString());
				RoomId = (uint)dbClient.insertQuery();
			}
			RoomData Data = this.GenerateRoomData(RoomId);
			Session.GetHabbo().UsersRooms.Add(Data);
			return Data;
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:25,代码来源:RoomManager.cs

示例5: BanUser

		internal static void BanUser(GameClient ModSession, uint UserId, int Length, string Message)
		{
			GameClient clientByUserID = MercuryEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
			if (clientByUserID == null || clientByUserID.GetHabbo().Id == ModSession.GetHabbo().Id)
			{
				return;
			}
			if (clientByUserID.GetHabbo().Rank >= ModSession.GetHabbo().Rank)
			{
				ModSession.SendNotif("No tienes los permisos para banear");
				return;
			}
			double lengthSeconds = (double)Length;
			MercuryEnvironment.GetGame().GetBanManager().BanUser(clientByUserID, ModSession.GetHabbo().Username, lengthSeconds, Message, false, false);
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:15,代码来源:ModerationTool.cs

示例6: KickUser

		internal static void KickUser(GameClient ModSession, uint UserId, string Message, bool Soft)
		{
			GameClient clientByUserID = MercuryEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
			if (clientByUserID == null || clientByUserID.GetHabbo().CurrentRoomId < 1u || clientByUserID.GetHabbo().Id == ModSession.GetHabbo().Id)
			{
				return;
			}
			if (clientByUserID.GetHabbo().Rank >= ModSession.GetHabbo().Rank)
			{
				ModSession.SendNotif("You are not allowed to kick him/her.");
				return;
			}
			Room room = MercuryEnvironment.GetGame().GetRoomManager().GetRoom(clientByUserID.GetHabbo().CurrentRoomId);
			if (room == null)
			{
				return;
			}
			room.GetRoomUserManager().RemoveUserFromRoom(clientByUserID, true, false);
			clientByUserID.CurrentRoomUserID = -1;
			if (!Soft)
			{
				clientByUserID.SendNotif(Message);
				using (IQueryAdapter queryreactor = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
				{
					queryreactor.runFastQuery("UPDATE user_info SET cautions = cautions + 1 WHERE user_id = " + UserId);
				}
			}
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:28,代码来源:ModerationTool.cs

示例7: CheckGroupRights

		internal bool CheckGroupRights(GameClient Session)
		{
			try
			{
				if (this.Group == null)
				{
					bool result = false;
					return result;
				}
				if (this.Group.AdminOnlyDeco == 0u && this.Group.Members.ContainsKey(Session.GetHabbo().Id))
				{
					bool result = true;
					return result;
				}
				if (this.Group.Admins.ContainsKey(Session.GetHabbo().Id))
				{
					Session.SendNotif("Group Admin");
					bool result = true;
					return result;
				}
				if (Session.GetHabbo().Username == this.Owner)
				{
					bool result = true;
					return result;
				}
				if (Session.GetHabbo().HasFuse("fuse_admin") || Session.GetHabbo().HasFuse("fuse_any_room_controller"))
				{
					bool result = true;
					return result;
				}
			}
			catch (Exception pException)
			{
				Logging.HandleException(pException, "Room.CheckGroupRights");
			}
			return false;
		}
开发者ID:BjkGkh,项目名称:Mercury,代码行数:37,代码来源:Room.cs


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