* 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.
This commit is contained in:
Adam Frisby
2007-10-19 22:02:07 +00:00
parent 9a17bc58a6
commit 1313544ac7
8 changed files with 209 additions and 28 deletions

View File

@@ -119,13 +119,12 @@ namespace OpenSim.Region.Environment.Modules
client.OnChatFromViewer += DeliverClientMessage;
}
private void DeliverClientMessage(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName,
LLUUID fromAgentID)
private void DeliverClientMessage(Object sender, ChatFromViewerArgs e)
{
ASCIIEncoding ae = new ASCIIEncoding();
DeliverMessage(fromAgentID.ToString(), type, channel, fromName, ae.GetString(message));
DeliverMessage(e.Sender.AgentId.ToString(),
(int)e.Type, e.Channel,
e.Sender.FirstName + " " + e.Sender.LastName,
e.Message);
}
public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg)