From 1313544ac7761ec7d84c14009fc95d5d7316004d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 19 Oct 2007 22:02:07 +0000 Subject: * Major structural change: Begun converting Events to use (caller, args) syntax to conform with .NET guidelines. * OnChatFromViewer has been converted as an example. * Bug: SimpleApp's NPC client does not implement a Scene property and will likely crash with a NullReferenceException when it attempts to chat. --- OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Examples') diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index c9c663e..1460b81 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs @@ -245,7 +245,15 @@ namespace SimpleApp { if (OnChatFromViewer != null) { - this.OnChatFromViewer(enc.GetBytes("Kind of quiet around here, isn't it! \0"), 2, 0, new LLVector3(128, 128, 26), this.FirstName + " " + this.LastName, this.AgentId); + ChatFromViewerArgs args = new ChatFromViewerArgs(); + args.Message = "Kinda quiet around here, isn't it?"; + args.Channel = 0; + args.From = this.FirstName + " " + this.LastName; + args.Position = new LLVector3(128, 128, 26); + args.Sender = this; + args.Type = ChatTypeEnum.Shout; + + this.OnChatFromViewer(this, args); } count = -1; -- cgit v1.1