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


C# GameClient.SendNotif方法代码示例

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


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

示例1: Execute

        public override void Execute(GameClient session, string[] pms)
        {
            var userName = pms[0];
            if (!string.IsNullOrEmpty(userName))
            {
                var clientByUserName = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(userName);
                if (clientByUserName == null)
                {
                    session.SendNotif("Funny is niet online!");
                    return;
                }

                var habbo = clientByUserName.GetHabbo();
                var builder = new StringBuilder();
                if (habbo.CurrentRoom != null)
                {
                    builder.AppendFormat(" - ROOM INFORMATION [{0}] - \r", habbo.CurrentRoom.RoomId);
                    builder.AppendFormat("Owner: {0}\r", habbo.CurrentRoom.RoomData.Owner);
                    builder.AppendFormat("Room Name: {0}\r", habbo.CurrentRoom.RoomData.Name);
                    builder.Append(
                        string.Concat("Current Users: ", habbo.CurrentRoom.UserCount, "/", habbo.CurrentRoom.RoomData.UsersMax));
                }
                session.SendNotif(string.Concat("User info for: ", userName, " \rUser ID: ", habbo.Id, ":\rRank: ", habbo.Rank, "\rCurrentTalentLevel: ", habbo.CurrentTalentLevel, " \rCurrent Room: ", habbo.CurrentRoomId, " \rCredits: ", habbo.Credits, "\rDuckets: ", habbo.ActivityPoints, "\rDiamonds: ", habbo.Diamonds, "\rMuted: ", habbo.Muted.ToString(), "\r\r\r", builder.ToString()));
                return;
            }
            session.SendNotif("Voer een Funnynaam in");
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:27,代码来源:UserInfo.cs

示例2: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     try
     {
         session.GetHabbo().GetInventoryComponent().Redeemcredits(session);
         session.SendNotif(TextManager.GetText("command_redeem_credits"));
     }
     catch (Exception e)
     {
         Writer.Writer.LogException(e.ToString());
         session.SendNotif(TextManager.GetText("command_redeem_credits"));
     }
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:13,代码来源:RedeemCredits.cs

示例3: canTalk

        internal static bool canTalk(GameClient Session, string Message)
        {
            if (CheckForBannedPhrases(Message) && !Session.GetHabbo().HasFuse("moderator"))
            {
                if (!AzureEmulator.MutedUsersByFilter.ContainsKey(Session.GetHabbo().Id))
                    Session.GetHabbo().BobbaFiltered++;

                if (Session.GetHabbo().BobbaFiltered < 3)
                {
                    Session.SendNotif(TextManager.GetText("wordfilter_inappropriate"));
                }
                else if (Session.GetHabbo().BobbaFiltered == 3)
                {
                    Session.GetHabbo().BobbaFiltered = 4;
                    AzureEmulator.MutedUsersByFilter.Add(Session.GetHabbo().Id, uint.Parse((AzureEmulator.GetUnixTimeStamp() + (300)).ToString()));
                    return false;
                }
                else if (Session.GetHabbo().BobbaFiltered == 5)
                {
                    Session.SendNotif(TextManager.GetText("wordfilter_last_warning"));
                }
                else if (Session.GetHabbo().BobbaFiltered >= 6)
                {
                    Session.GetHabbo().BobbaFiltered = 0;

                    int Length = 3600;
                    AzureEmulator.GetGame().GetBanManager().BanUser(Session, "Auto-system-ban", Length, "ban.", false, false);
                }
            }

            if (AzureEmulator.MutedUsersByFilter.ContainsKey(Session.GetHabbo().Id))
            {
                foreach (KeyValuePair<uint, uint> tim in AzureEmulator.MutedUsersByFilter)
                {
                    int time = int.Parse((AzureEmulator.GetUnixTimeStamp()).ToString());
                    if (tim.Value < time && AzureEmulator.MutedUsersByFilter.ContainsKey(Session.GetHabbo().Id))
                    {
                        AzureEmulator.MutedUsersByFilter.Remove(Session.GetHabbo().Id);
                        return true;
                    }
                    else
                    {
                        Session.SendNotifWithPicture("<br><br><font color=\"#000000\" size=\"13\"> Je hebt een mute tot: <b>" + AzureEmulator.UnixToDateTime(tim.Value) + "</b>", "Spreekverbod", "frank_19", "", "");
                        return true;
                    }
                }
            }
            return true;
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:49,代码来源:BobbaFilter.cs

示例4: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
     if (client == null)
     {
         session.SendNotif(TextManager.GetText("user_not_found"));
         return;
     }
     client.GetHabbo().GetBadgeComponent().GiveBadge(pms[1], true, client, false);
     session.SendNotif(TextManager.GetText("command_badge_give_done"));
     AzureEmulator.GetGame()
         .GetModerationTool()
         .LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName,
             "Badge", string.Format("Badge given to user [{0}]", pms[1]));
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:15,代码来源:GiveBadge.cs

示例5: Execute

 public override bool Execute(GameClient session, string[] pms)
 {
     if (!pms.Any() || pms[0].ToLower() != Azure.GetLanguage().GetVar("command_group_yes"))
     {
         session.SendNotif(Azure.GetLanguage().GetVar("command_group_delete_confirm"));
         return true;
     }
     var room = session.GetHabbo().CurrentRoom;
     if (room.RoomData == null || room.RoomData.Group == null)
     {
         session.SendWhisper(Azure.GetLanguage().GetVar("command_group_has_no_room"));
         return true;
     }
     var group = room.RoomData.Group;
     foreach (var user in @group.Members.Values)
     {
         var clientByUserId = Azure.GetGame().GetClientManager().GetClientByUserId(user.Id);
         if (clientByUserId == null) continue;
         clientByUserId.GetHabbo().UserGroups.Remove(user);
         if (clientByUserId.GetHabbo().FavouriteGroup == @group.Id) clientByUserId.GetHabbo().FavouriteGroup = 0;
     }
     room.RoomData.Group = null;
     room.RoomData.GroupId = 0;
     Azure.GetGame().GetGroupManager().DeleteGroup(@group.Id);
     Azure.GetGame().GetRoomManager().UnloadRoom(room, Azure.GetLanguage().GetVar("command_group_remove"));
     return true;
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:27,代码来源:DeleteGroup.cs

示例6: Execute

        public override void Execute(GameClient session, string[] pms)
        {
            var room = session.GetHabbo().CurrentRoom;

            room.GetGameMap().DiagonalEnabled = !room.GetGameMap().DiagonalEnabled;
            session.SendNotif(TextManager.GetText("command_disable_diagonal"));
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:7,代码来源:DisableDiagonal.cs

示例7: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     using (var adapter = AzureEmulator.GetDatabaseManager().GetQueryReactor())
     {
         AzureEmulator.GetGame().GetRoleManager().LoadRights(adapter);
     }
     session.SendNotif(TextManager.GetText("command_refresh_ranks"));
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:8,代码来源:RefreshRanks.cs

示例8: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
     if (client == null)
     {
         session.SendNotif(TextManager.GetText("user_not_found"));
         return;
     }
     int amount;
     if (!int.TryParse(pms[1], out amount))
     {
         session.SendNotif(TextManager.GetText("enter_numbers"));
         return;
     }
     client.GetHabbo().ActivityPoints += amount;
     client.GetHabbo().UpdateActivityPointsBalance();
     client.SendNotif(string.Format(TextManager.GetText("staff_gives_duckets"), session.GetHabbo().UserName, amount));
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:18,代码来源:GiveDuckets.cs

示例9: Execute

        public override void Execute(GameClient session, string[] pms)
        {
            foreach (var client in AzureEmulator.GetGame().GetClientManager().Clients.Values.Where(client => client != null && client.GetHabbo() != null))
                client.GetHabbo().GetBadgeComponent().GiveBadge(pms[0], true, client, false);

            session.SendNotif(TextManager.GetText("command_badge_give_done"));
            AzureEmulator.GetGame()
                .GetModerationTool()
                .LogStaffEntry(session.GetHabbo().UserName, "All",
                    "Badge", "Badge [" + pms[0] + "] given to all online users ATM");
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:11,代码来源:MassBadge.cs

示例10: Execute

        public override void Execute(GameClient session, string[] pms)
        {
            var userName = pms[0];
            var userSession = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(userName);
            if (userSession == null)
            {
                session.SendWhisper(TextManager.GetText("user_not_found"));
                return;
            }
            if (session.GetHabbo().Rank <= userSession.GetHabbo().Rank)
            {
                session.SendNotif(TextManager.GetText("user_is_higher_rank"));
                return;
            }
            if (userSession.GetHabbo().CurrentRoomId < 1)
            {
                session.SendNotif(TextManager.GetText("command_kick_user_not_in_room"));
                return;
            }
            var room = AzureEmulator.GetGame().GetRoomManager().GetRoom(userSession.GetHabbo().CurrentRoomId);
            if (room == null)
            {
                return;
            }

            room.GetRoomUserManager().RemoveUserFromRoom(userSession, true, false);
            userSession.CurrentRoomUserId = -1;
            if (pms.Length > 1)
            {
                userSession.SendNotif(
                    string.Format(TextManager.GetText("command_kick_user_mod_default") + "{0}.",
                        string.Join(" ", pms.Skip(1))));
            }
            else
            {
                userSession.SendNotif(TextManager.GetText("command_kick_user_mod_default"));
            }
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:38,代码来源:Kick.cs

示例11: Execute

        public override void Execute(GameClient session, string[] pms)
        {
            var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
            if (client == null)
            {
                session.SendNotif(TextManager.GetText("user_not_found"));
                return;
            }

            if (client.GetHabbo().Rank >= session.GetHabbo().Rank)
            {
                session.SendNotif(TextManager.GetText("user_is_higher_rank"));
                return;
            }
            AzureEmulator.GetGame()
                .GetModerationTool()
                .LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName, "Ban",
                    "User has received a Super ban.");
            AzureEmulator.GetGame()
                .GetBanManager()
                .BanUser(client, session.GetHabbo().UserName, 788922000.0, string.Join(" ", pms.Skip(1)),
                    false, false);
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:23,代码来源:SuperBan.cs

示例12: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     int amount;
     if (!int.TryParse(pms[0], out amount))
     {
         session.SendNotif(TextManager.GetText("enter_numbers"));
         return;
     }
     foreach (GameClient client in AzureEmulator.GetGame().GetClientManager().Clients.Values)
     {
         if (client == null || client.GetHabbo() == null) continue;
         var habbo = client.GetHabbo();
         habbo.Diamonds += amount;
         client.GetHabbo().UpdateSeasonalCurrencyBalance();
         client.SendNotif(TextManager.GetText("command_diamonds_one_give") + amount + (TextManager.GetText("command_diamonds_two_give")));
     }
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:17,代码来源:MassDiamonds.cs

示例13: Execute

 public override void Execute(GameClient session, string[] pms)
 {
     var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
     if (client == null || client.GetHabbo() == null)
     {
         session.SendWhisper(TextManager.GetText("user_not_found"));
         return;
     }
     if (client.GetHabbo().Rank >= 4)
     {
         session.SendNotif(TextManager.GetText("user_is_higher_rank"));
     }
     AzureEmulator.GetGame()
         .GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName,
             "Mute", "Muted user");
     client.GetHabbo().Mute();
 }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:17,代码来源:Mute.cs

示例14: 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)
            {
                return;
            }
            if (item.ExtraData != "5")
            {
                if (item.VikingCotieBurning)
                {
                    return;
                }
                item.ExtraData = "1";
                item.UpdateState();

                item.VikingCotieBurning = true;
                GameClient clientByUsername = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(item.GetRoom().RoomData.Owner);

                if (clientByUsername != null)
                {
                    if (clientByUsername.GetHabbo().UserName != item.GetRoom().RoomData.Owner)
                    {
                        clientByUsername.SendNotif(string.Format(TextManager.GetText("viking_burn_started"), user.GetUserName()));
                    }
                }

                _mItem = item;

                var timer = new Timer(5000);
                timer.Elapsed += OnElapse;
                timer.Enabled = true;
            }
            else
            {
                session.SendNotif(TextManager.GetText("user_viking_error"));
            }
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:43,代码来源:InteractorVikingCotie.cs

示例15: Execute

        public override bool Execute(GameClient session, string[] pms)
        {
            Room TargetRoom = session.GetHabbo().CurrentRoom;
            DataTable data;
            using (IQueryAdapter dbClient = Azure.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("SELECT question, answer FROM rooms_faq");
                data = dbClient.GetTable();
            }

            StringBuilder builder = new StringBuilder();
            builder.Append(" - FAQ - \r\r");

            foreach (DataRow row in data.Rows)
            {
                builder.Append("Q: " + (string)row["question"] + "\r");
                builder.Append("A: " + (string)row["answer"] + "\r\r");
            }
            session.SendNotif(builder.ToString());
            return true;
        }
开发者ID:BjkGkh,项目名称:Azure2,代码行数:21,代码来源:UserFaq.cs


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