Beispiel #1
0
 public void ChatNewChatMessage(object sender, GChatEventArgs e)
 {
     try
     {
         ChatMsg msg = e.Msg;
         if ((msg.Type == Constants.ChatType.Whisper || msg.Type == Constants.ChatType.RealId) &&
             msg.Player != ObjectManager.MyPlayer.Name)
         {
             if (LazySettings.SoundWhisper && Engine.Running)
             {
                 try
                 {
                     if (File.Exists(LazySettings.OurDirectory + @"\palert.wav"))
                     {
                         _soundPlayer.SoundLocation = LazySettings.OurDirectory + @"\palert.wav";
                         _soundPlayer.Play();
                     }
                 }
                 catch
                 {
                 }
             }
             if (msg.Type == Constants.ChatType.RealId)
             {
                 WhisperMessage("Type: " + msg.Type.ToString().ToLower() + ", Text: " + msg.Msg);
                 Logging.Write(LogType.Warning, "Type: " + msg.Type + ", Text: " + msg.Msg);
             }
             else
             {
                 WhisperMessage("Type: " + msg.Type.ToString().ToLower() + ", Player Name: " + msg.Player +
                                ", Text: " + msg.Msg);
                 Logging.Write(LogType.Warning,
                               "Type: " + msg.Type + ", Player Name: " + msg.Player + ", Text: " + msg.Msg);
             }
             return;
         }
         ChatMessage("Type: " + msg.Type.ToString().ToLower() + ", Player Name: " + msg.Player + ", Text: " +
                     msg.Msg);
     }
     catch
     {
     }
 }
Beispiel #2
0
 private void ChatNewChatMessage(object sender, GChatEventArgs e)
 {
     
     //Logging.Write("Plugin got chat message: " + e.Msg.Player + " " + e.Msg.Msg);
 }