public PlayerChatEventArgs(int sender, string message, ChatRecipients recipients, float duration) { Sender = sender; Message = message; Recipients = recipients; Duration = duration; }
private static void OnPlayerChat(Int32 sender, String message, ChatRecipients recipients) { try { if (InternalInput.PlayerChat != null) { InternalInput.PlayerChat(sender, message, recipients); } } catch (Exception e) { Trace.WriteLine("Unhandled Exception in InternalInput.OnPlayerChat!"); Trace.WriteLine(e.ToString()); } }
/// <summary> /// Displays a chat message as sent by a player. /// </summary> /// <param name="this">The CGameUI instance.</param> /// <param name="sender">The player that send the message.</param> /// <param name="message">The message sent.</param> /// <param name="recipients">The team to receive the message.</param> /// <param name="duration">The duration the message should be shown.</param> /// <returns>Unknown</returns> public static IntPtr CGameUI__DisplayChatMessage(CGameUI @this, Int32 sender, String message, ChatRecipients recipients, Single duration) { return(ThisCall.Invoke <IntPtr>(GameAddresses.CGameUI__DisplayChatMessage, @this, sender, message, recipients, duration)); }
public virtual void OnPlayerChat(Int32 sender, String message, ChatRecipients recipients) { }
private unsafe static IntPtr CGameUI__DisplayChatMessageHook(CGameUI *_this, int sender, string message, ChatRecipients recipients, float duration) { try { PlayerChatEventArgs playerChatEventArgs = new PlayerChatEventArgs(sender, message, recipients, duration); PlayerChat?.Invoke(null, playerChatEventArgs); if (BlockChat || playerChatEventArgs.IsBlocked) { return(IntPtr.Zero); } return(CGameUI__DisplayChatMessage(_this, playerChatEventArgs.Sender, playerChatEventArgs.Message, playerChatEventArgs.Recipients, playerChatEventArgs.Duration)); } catch (Exception ex) { Trace.WriteLine("Unhandled Exception in InternalCGameUI__DisplayChatMessageHook!"); Trace.WriteLine(ex.ToString()); } return(BlockChat ? IntPtr.Zero : CGameUI__DisplayChatMessage(_this, sender, message, recipients, duration)); }
public static unsafe IntPtr CGameUI__DisplayChatMessage(CGameUI * @this, int sender, string message, ChatRecipients recipients, float duration) { return(ThisCall.Invoke <IntPtr>(GameAddresses.CGameUI__DisplayChatMessage, (IntPtr)(void *)@this, sender, message, recipients, duration)); }
private static IntPtr CGameUI__DisplayChatMessageHook(CGameUI _this, Int32 sender, String message, ChatRecipients recipients, Single duration) { try { InternalInput.OnPlayerChat(sender, message, recipients); if (InternalInput.BlockChat) { return(IntPtr.Zero); } } catch (Exception e) { Trace.WriteLine("Unhandled Exception in InternalInput.CGameUI__DisplayChatMessageHook!"); Trace.WriteLine(e.ToString()); } return(CGameUI__DisplayChatMessage(_this, sender, message, recipients, duration)); }
public void WriteChatMessage(Int32 sender, String message, ChatRecipients recipients, Single duration) { GameFunctions.CGameUI__DisplayChatMessage(this, sender, message, recipients, duration); }