diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8922364..aac4e32 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -274,6 +274,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
274 | 274 | ||
275 | private NetworkStats handlerNetworkStatsUpdate; | 275 | private NetworkStats handlerNetworkStatsUpdate; |
276 | 276 | ||
277 | private ClassifiedInfoRequest handlerClassifiedInfoRequest; | ||
278 | private ClassifiedInfoUpdate handlerClassifiedInfoUpdate; | ||
279 | private ClassifiedDelete handlerClassifiedDelete; | ||
280 | private ClassifiedDelete handlerClassifiedGodDelete; | ||
281 | |||
277 | private readonly IGroupsModule m_GroupsModule; | 282 | private readonly IGroupsModule m_GroupsModule; |
278 | 283 | ||
279 | //private TerrainUnacked handlerUnackedTerrain = null; | 284 | //private TerrainUnacked handlerUnackedTerrain = null; |
@@ -1032,6 +1037,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1032 | public event TeleportLureRequest OnTeleportLureRequest; | 1037 | public event TeleportLureRequest OnTeleportLureRequest; |
1033 | public event NetworkStats OnNetworkStatsUpdate; | 1038 | public event NetworkStats OnNetworkStatsUpdate; |
1034 | 1039 | ||
1040 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
1041 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
1042 | public event ClassifiedDelete OnClassifiedDelete; | ||
1043 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
1035 | 1044 | ||
1036 | public void ActivateGesture(UUID assetId, UUID gestureId) | 1045 | public void ActivateGesture(UUID assetId, UUID gestureId) |
1037 | { | 1046 | { |
@@ -7215,6 +7224,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7215 | this); | 7224 | this); |
7216 | break; | 7225 | break; |
7217 | 7226 | ||
7227 | case PacketType.ClassifiedInfoRequest: | ||
7228 | ClassifiedInfoRequestPacket classifiedInfoRequest = | ||
7229 | (ClassifiedInfoRequestPacket)Pack; | ||
7230 | |||
7231 | handlerClassifiedInfoRequest = OnClassifiedInfoRequest; | ||
7232 | if (handlerClassifiedInfoRequest != null) | ||
7233 | handlerClassifiedInfoRequest( | ||
7234 | classifiedInfoRequest.Data.ClassifiedID, | ||
7235 | this); | ||
7236 | break; | ||
7237 | |||
7238 | case PacketType.ClassifiedInfoUpdate: | ||
7239 | ClassifiedInfoUpdatePacket classifiedInfoUpdate = | ||
7240 | (ClassifiedInfoUpdatePacket)Pack; | ||
7241 | |||
7242 | handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate; | ||
7243 | if (handlerClassifiedInfoUpdate != null) | ||
7244 | handlerClassifiedInfoUpdate( | ||
7245 | classifiedInfoUpdate.Data.ClassifiedID, | ||
7246 | classifiedInfoUpdate.Data.Category, | ||
7247 | Utils.BytesToString( | ||
7248 | classifiedInfoUpdate.Data.Name), | ||
7249 | Utils.BytesToString( | ||
7250 | classifiedInfoUpdate.Data.Desc), | ||
7251 | classifiedInfoUpdate.Data.ParcelID, | ||
7252 | classifiedInfoUpdate.Data.ParentEstate, | ||
7253 | classifiedInfoUpdate.Data.SnapshotID, | ||
7254 | new Vector3( | ||
7255 | classifiedInfoUpdate.Data.PosGlobal), | ||
7256 | classifiedInfoUpdate.Data.ClassifiedFlags, | ||
7257 | classifiedInfoUpdate.Data.PriceForListing, | ||
7258 | this); | ||
7259 | break; | ||
7260 | |||
7261 | case PacketType.ClassifiedDelete: | ||
7262 | ClassifiedDeletePacket classifiedDelete = | ||
7263 | (ClassifiedDeletePacket)Pack; | ||
7264 | |||
7265 | handlerClassifiedDelete = OnClassifiedDelete; | ||
7266 | if (handlerClassifiedDelete != null) | ||
7267 | handlerClassifiedDelete( | ||
7268 | classifiedDelete.Data.ClassifiedID, | ||
7269 | this); | ||
7270 | break; | ||
7271 | |||
7272 | case PacketType.ClassifiedGodDelete: | ||
7273 | ClassifiedGodDeletePacket classifiedGodDelete = | ||
7274 | (ClassifiedGodDeletePacket)Pack; | ||
7275 | |||
7276 | handlerClassifiedGodDelete = OnClassifiedGodDelete; | ||
7277 | if (handlerClassifiedGodDelete != null) | ||
7278 | handlerClassifiedGodDelete( | ||
7279 | classifiedGodDelete.Data.ClassifiedID, | ||
7280 | this); | ||
7281 | break; | ||
7282 | |||
7218 | default: | 7283 | default: |
7219 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); | 7284 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); |
7220 | break; | 7285 | break; |
@@ -8044,6 +8109,59 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8044 | OutPacket(p, ThrottleOutPacketType.Task); | 8109 | OutPacket(p, ThrottleOutPacketType.Task); |
8045 | } | 8110 | } |
8046 | 8111 | ||
8112 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
8113 | { | ||
8114 | if (classifiedID.Length != name.Length) | ||
8115 | return; | ||
8116 | |||
8117 | AvatarClassifiedReplyPacket ac = | ||
8118 | (AvatarClassifiedReplyPacket)PacketPool.Instance.GetPacket( | ||
8119 | PacketType.AvatarClassifiedReply); | ||
8120 | |||
8121 | ac.AgentData = new AvatarClassifiedReplyPacket.AgentDataBlock(); | ||
8122 | ac.AgentData.AgentID = AgentId; | ||
8123 | ac.AgentData.TargetID = targetID; | ||
8124 | |||
8125 | ac.Data = new AvatarClassifiedReplyPacket.DataBlock[classifiedID.Length]; | ||
8126 | int i; | ||
8127 | for (i = 0 ; i < classifiedID.Length ; i++) | ||
8128 | { | ||
8129 | ac.Data[i].ClassifiedID = classifiedID[i]; | ||
8130 | ac.Data[i].Name = Utils.StringToBytes(name[i]); | ||
8131 | } | ||
8132 | |||
8133 | OutPacket(ac, ThrottleOutPacketType.Task); | ||
8134 | } | ||
8135 | |||
8136 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
8137 | { | ||
8138 | ClassifiedInfoReplyPacket cr = | ||
8139 | (ClassifiedInfoReplyPacket)PacketPool.Instance.GetPacket( | ||
8140 | PacketType.ClassifiedInfoReply); | ||
8141 | |||
8142 | cr.AgentData = new ClassifiedInfoReplyPacket.AgentDataBlock(); | ||
8143 | cr.AgentData.AgentID = AgentId; | ||
8144 | |||
8145 | cr.Data = new ClassifiedInfoReplyPacket.DataBlock(); | ||
8146 | cr.Data.ClassifiedID = classifiedID; | ||
8147 | cr.Data.CreatorID = creatorID; | ||
8148 | cr.Data.CreationDate = creationDate; | ||
8149 | cr.Data.ExpirationDate = expirationDate; | ||
8150 | cr.Data.Category = category; | ||
8151 | cr.Data.Name = Utils.StringToBytes(name); | ||
8152 | cr.Data.Desc = Utils.StringToBytes(description); | ||
8153 | cr.Data.ParcelID = parcelID; | ||
8154 | cr.Data.ParentEstate = parentEstate; | ||
8155 | cr.Data.SnapshotID = snapshotID; | ||
8156 | cr.Data.SimName = Utils.StringToBytes(simName); | ||
8157 | cr.Data.PosGlobal = new Vector3d(globalPos); | ||
8158 | cr.Data.ParcelName = Utils.StringToBytes(parcelName); | ||
8159 | cr.Data.ClassifiedFlags = classifiedFlags; | ||
8160 | cr.Data.PriceForListing = price; | ||
8161 | |||
8162 | OutPacket(cr, ThrottleOutPacketType.Task); | ||
8163 | } | ||
8164 | |||
8047 | public void KillEndDone() | 8165 | public void KillEndDone() |
8048 | { | 8166 | { |
8049 | KillPacket kp = new KillPacket(); | 8167 | KillPacket kp = new KillPacket(); |