diff options
author | Homer Horwitz | 2008-10-12 16:29:29 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-10-12 16:29:29 +0000 |
commit | f52c5febd3b87af795b8eb2a909d332ba8cddbff (patch) | |
tree | a707769d7b10051a0f5d6d7ec7b6b155e4fdeba6 /OpenSim/Region | |
parent | removed some more extraneous hidden faces (diff) | |
download | opensim-SC-f52c5febd3b87af795b8eb2a909d332ba8cddbff.zip opensim-SC-f52c5febd3b87af795b8eb2a909d332ba8cddbff.tar.gz opensim-SC-f52c5febd3b87af795b8eb2a909d332ba8cddbff.tar.bz2 opensim-SC-f52c5febd3b87af795b8eb2a909d332ba8cddbff.tar.xz |
Add EventInfoRequest and EventInfoReply packets.
Note: New file, run prebuild.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 6 |
3 files changed, 44 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4714bb3..ed4ac60 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1001,6 +1001,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1001 | public event DirLandQuery OnDirLandQuery; | 1001 | public event DirLandQuery OnDirLandQuery; |
1002 | public event DirPopularQuery OnDirPopularQuery; | 1002 | public event DirPopularQuery OnDirPopularQuery; |
1003 | public event DirClassifiedQuery OnDirClassifiedQuery; | 1003 | public event DirClassifiedQuery OnDirClassifiedQuery; |
1004 | public event EventInfoRequest OnEventInfoRequest; | ||
1004 | 1005 | ||
1005 | public event MapItemRequest OnMapItemRequest; | 1006 | public event MapItemRequest OnMapItemRequest; |
1006 | 1007 | ||
@@ -6405,6 +6406,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6405 | dirClassifiedQueryPacket.QueryData.QueryStart); | 6406 | dirClassifiedQueryPacket.QueryData.QueryStart); |
6406 | } | 6407 | } |
6407 | break; | 6408 | break; |
6409 | case PacketType.EventInfoRequest: | ||
6410 | EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; | ||
6411 | if (OnEventInfoRequest != null) | ||
6412 | { | ||
6413 | OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID); | ||
6414 | } | ||
6415 | break; | ||
6408 | 6416 | ||
6409 | default: | 6417 | default: |
6410 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); | 6418 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
@@ -7073,6 +7081,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7073 | OutPacket(packet, ThrottleOutPacketType.Task); | 7081 | OutPacket(packet, ThrottleOutPacketType.Task); |
7074 | } | 7082 | } |
7075 | 7083 | ||
7084 | public void SendEventInfoReply(EventData data) | ||
7085 | { | ||
7086 | EventInfoReplyPacket packet = (EventInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.EventInfoReply); | ||
7087 | |||
7088 | packet.AgentData = new EventInfoReplyPacket.AgentDataBlock(); | ||
7089 | packet.AgentData.AgentID = AgentId; | ||
7090 | |||
7091 | packet.EventData = new EventInfoReplyPacket.EventDataBlock(); | ||
7092 | packet.EventData.EventID = data.eventID; | ||
7093 | packet.EventData.Creator = Utils.StringToBytes(data.creator); | ||
7094 | packet.EventData.Name = Utils.StringToBytes(data.name); | ||
7095 | packet.EventData.Category = Utils.StringToBytes(data.category); | ||
7096 | packet.EventData.Desc = Utils.StringToBytes(data.description); | ||
7097 | packet.EventData.Date = Utils.StringToBytes(data.date.ToString()); | ||
7098 | packet.EventData.DateUTC = data.dateUTC; | ||
7099 | packet.EventData.Duration = data.duration; | ||
7100 | packet.EventData.Cover = data.cover; | ||
7101 | packet.EventData.Amount = data.amount; | ||
7102 | packet.EventData.SimName = Utils.StringToBytes(data.simName); | ||
7103 | packet.EventData.GlobalPos = new Vector3d(data.globalPos); | ||
7104 | packet.EventData.EventFlags = data.eventFlags; | ||
7105 | |||
7106 | OutPacket(packet, ThrottleOutPacketType.Task); | ||
7107 | } | ||
7108 | |||
7076 | public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) | 7109 | public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) |
7077 | { | 7110 | { |
7078 | MapItemReplyPacket mirplk = new MapItemReplyPacket(); | 7111 | MapItemReplyPacket mirplk = new MapItemReplyPacket(); |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index acad64a..a2d626e 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -329,9 +329,11 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
329 | public event DirLandQuery OnDirLandQuery; | 329 | public event DirLandQuery OnDirLandQuery; |
330 | public event DirPopularQuery OnDirPopularQuery; | 330 | public event DirPopularQuery OnDirPopularQuery; |
331 | public event DirClassifiedQuery OnDirClassifiedQuery; | 331 | public event DirClassifiedQuery OnDirClassifiedQuery; |
332 | public event EventInfoRequest OnEventInfoRequest; | ||
332 | 333 | ||
333 | public event MapItemRequest OnMapItemRequest; | 334 | public event MapItemRequest OnMapItemRequest; |
334 | 335 | ||
336 | |||
335 | #pragma warning restore 67 | 337 | #pragma warning restore 67 |
336 | 338 | ||
337 | #endregion | 339 | #endregion |
@@ -934,5 +936,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
934 | public void KillEndDone() | 936 | public void KillEndDone() |
935 | { | 937 | { |
936 | } | 938 | } |
939 | |||
940 | public void SendEventInfoReply (EventData info) | ||
941 | { | ||
942 | } | ||
937 | } | 943 | } |
938 | } | 944 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index ef78cb5..61791fb 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -224,7 +224,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
224 | public event DirLandQuery OnDirLandQuery; | 224 | public event DirLandQuery OnDirLandQuery; |
225 | public event DirPopularQuery OnDirPopularQuery; | 225 | public event DirPopularQuery OnDirPopularQuery; |
226 | public event DirClassifiedQuery OnDirClassifiedQuery; | 226 | public event DirClassifiedQuery OnDirClassifiedQuery; |
227 | 227 | public event EventInfoRequest OnEventInfoRequest; | |
228 | 228 | ||
229 | public event MapItemRequest OnMapItemRequest; | 229 | public event MapItemRequest OnMapItemRequest; |
230 | 230 | ||
@@ -932,5 +932,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
932 | public void KillEndDone() | 932 | public void KillEndDone() |
933 | { | 933 | { |
934 | } | 934 | } |
935 | |||
936 | public void SendEventInfoReply (EventData info) | ||
937 | { | ||
938 | } | ||
935 | } | 939 | } |
936 | } | 940 | } |