예제 #1
0
 public static void Send(Players.Player player, localization.LocalizationHelper localizationHelper, string message, params string[] args)
 {
     if (player.IsConnected())
     {
         var messageBuilt = BuildMessage(string.Format(localizationHelper.LocalizeOrDefault(message, player), LocalizeArgs(player, localizationHelper, args)), player, localizationHelper);
         Chat.Send(player, messageBuilt);
     }
 }
예제 #2
0
        public static bool CanSendMesssage(Players.Player p)
        {
            if (!_nextSendTime.ContainsKey(p))
            {
                _nextSendTime.Add(p, 0);
            }

            return(p.IsConnected() && Time.SecondsSinceStartDouble > _nextSendTime[p]);
        }
예제 #3
0
 public static void IssueNotification(Players.Player player, localization.LocalizationHelper localizationHelper,
                                      string message,
                                      params string[] args)
 {
     if (player.IsConnected())
     {
         var messageBuilt = string.Format(localizationHelper.LocalizeOrDefault(message, player), PandaChat.LocalizeArgs(player, localizationHelper, args));
         IssueNotification(player, messageBuilt);
     }
 }
예제 #4
0
 public static void Send(Players.Player player, localization.LocalizationHelper localizationHelper,
                         string message,
                         ChatColor color         = ChatColor.white,
                         ChatStyle style         = ChatStyle.normal,
                         EChatSendOptions sender = EChatSendOptions.Default)
 {
     if (player.IsConnected())
     {
         var messageBuilt = BuildMessage(message, player, localizationHelper, color, style);
         Chat.Send(player, messageBuilt, sender);
     }
 }