Plumb in the 4 missing classified events and the 3 packet methods
parent
151d3afe16
commit
fc053a6af8
|
@ -413,6 +413,11 @@ namespace OpenSim.Framework
|
|||
public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client);
|
||||
public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client);
|
||||
|
||||
public delegate void ClassifiedInfoRequest(UUID classifiedID, IClientAPI client);
|
||||
public delegate void ClassifiedInfoUpdate(UUID classifiedID, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, Vector3 globalPos, byte classifiedFlags, int price, IClientAPI client);
|
||||
public delegate void ClassifiedDelete(UUID classifiedID, IClientAPI client);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public struct DirPlacesReplyData
|
||||
|
@ -723,6 +728,13 @@ namespace OpenSim.Framework
|
|||
event TeleportLureRequest OnTeleportLureRequest;
|
||||
event NetworkStats OnNetworkStatsUpdate;
|
||||
|
||||
event ClassifiedInfoRequest OnClassifiedInfoRequest;
|
||||
event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
|
||||
event ClassifiedDelete OnClassifiedDelete;
|
||||
event ClassifiedDelete OnClassifiedGodDelete;
|
||||
|
||||
// void ActivateGesture(UUID assetId, UUID gestureId);
|
||||
|
||||
/// <summary>
|
||||
/// Tell this client what items it should be wearing now
|
||||
/// </summary>
|
||||
|
@ -1054,6 +1066,9 @@ namespace OpenSim.Framework
|
|||
|
||||
void SendTerminateFriend(UUID exFriendID);
|
||||
|
||||
void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name);
|
||||
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);
|
||||
|
||||
void KillEndDone();
|
||||
|
||||
bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
|
||||
|
|
|
@ -274,6 +274,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
private NetworkStats handlerNetworkStatsUpdate;
|
||||
|
||||
private ClassifiedInfoRequest handlerClassifiedInfoRequest;
|
||||
private ClassifiedInfoUpdate handlerClassifiedInfoUpdate;
|
||||
private ClassifiedDelete handlerClassifiedDelete;
|
||||
private ClassifiedDelete handlerClassifiedGodDelete;
|
||||
|
||||
private readonly IGroupsModule m_GroupsModule;
|
||||
|
||||
//private TerrainUnacked handlerUnackedTerrain = null;
|
||||
|
@ -1032,6 +1037,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public event TeleportLureRequest OnTeleportLureRequest;
|
||||
public event NetworkStats OnNetworkStatsUpdate;
|
||||
|
||||
public event ClassifiedInfoRequest OnClassifiedInfoRequest;
|
||||
public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
|
||||
public event ClassifiedDelete OnClassifiedDelete;
|
||||
public event ClassifiedDelete OnClassifiedGodDelete;
|
||||
|
||||
public void ActivateGesture(UUID assetId, UUID gestureId)
|
||||
{
|
||||
|
@ -7215,6 +7224,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
this);
|
||||
break;
|
||||
|
||||
case PacketType.ClassifiedInfoRequest:
|
||||
ClassifiedInfoRequestPacket classifiedInfoRequest =
|
||||
(ClassifiedInfoRequestPacket)Pack;
|
||||
|
||||
handlerClassifiedInfoRequest = OnClassifiedInfoRequest;
|
||||
if (handlerClassifiedInfoRequest != null)
|
||||
handlerClassifiedInfoRequest(
|
||||
classifiedInfoRequest.Data.ClassifiedID,
|
||||
this);
|
||||
break;
|
||||
|
||||
case PacketType.ClassifiedInfoUpdate:
|
||||
ClassifiedInfoUpdatePacket classifiedInfoUpdate =
|
||||
(ClassifiedInfoUpdatePacket)Pack;
|
||||
|
||||
handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate;
|
||||
if (handlerClassifiedInfoUpdate != null)
|
||||
handlerClassifiedInfoUpdate(
|
||||
classifiedInfoUpdate.Data.ClassifiedID,
|
||||
classifiedInfoUpdate.Data.Category,
|
||||
Utils.BytesToString(
|
||||
classifiedInfoUpdate.Data.Name),
|
||||
Utils.BytesToString(
|
||||
classifiedInfoUpdate.Data.Desc),
|
||||
classifiedInfoUpdate.Data.ParcelID,
|
||||
classifiedInfoUpdate.Data.ParentEstate,
|
||||
classifiedInfoUpdate.Data.SnapshotID,
|
||||
new Vector3(
|
||||
classifiedInfoUpdate.Data.PosGlobal),
|
||||
classifiedInfoUpdate.Data.ClassifiedFlags,
|
||||
classifiedInfoUpdate.Data.PriceForListing,
|
||||
this);
|
||||
break;
|
||||
|
||||
case PacketType.ClassifiedDelete:
|
||||
ClassifiedDeletePacket classifiedDelete =
|
||||
(ClassifiedDeletePacket)Pack;
|
||||
|
||||
handlerClassifiedDelete = OnClassifiedDelete;
|
||||
if (handlerClassifiedDelete != null)
|
||||
handlerClassifiedDelete(
|
||||
classifiedDelete.Data.ClassifiedID,
|
||||
this);
|
||||
break;
|
||||
|
||||
case PacketType.ClassifiedGodDelete:
|
||||
ClassifiedGodDeletePacket classifiedGodDelete =
|
||||
(ClassifiedGodDeletePacket)Pack;
|
||||
|
||||
handlerClassifiedGodDelete = OnClassifiedGodDelete;
|
||||
if (handlerClassifiedGodDelete != null)
|
||||
handlerClassifiedGodDelete(
|
||||
classifiedGodDelete.Data.ClassifiedID,
|
||||
this);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_log.Warn("[CLIENT]: unhandled packet " + Pack);
|
||||
break;
|
||||
|
@ -8044,6 +8109,59 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
OutPacket(p, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
|
||||
{
|
||||
if (classifiedID.Length != name.Length)
|
||||
return;
|
||||
|
||||
AvatarClassifiedReplyPacket ac =
|
||||
(AvatarClassifiedReplyPacket)PacketPool.Instance.GetPacket(
|
||||
PacketType.AvatarClassifiedReply);
|
||||
|
||||
ac.AgentData = new AvatarClassifiedReplyPacket.AgentDataBlock();
|
||||
ac.AgentData.AgentID = AgentId;
|
||||
ac.AgentData.TargetID = targetID;
|
||||
|
||||
ac.Data = new AvatarClassifiedReplyPacket.DataBlock[classifiedID.Length];
|
||||
int i;
|
||||
for (i = 0 ; i < classifiedID.Length ; i++)
|
||||
{
|
||||
ac.Data[i].ClassifiedID = classifiedID[i];
|
||||
ac.Data[i].Name = Utils.StringToBytes(name[i]);
|
||||
}
|
||||
|
||||
OutPacket(ac, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
ClassifiedInfoReplyPacket cr =
|
||||
(ClassifiedInfoReplyPacket)PacketPool.Instance.GetPacket(
|
||||
PacketType.ClassifiedInfoReply);
|
||||
|
||||
cr.AgentData = new ClassifiedInfoReplyPacket.AgentDataBlock();
|
||||
cr.AgentData.AgentID = AgentId;
|
||||
|
||||
cr.Data = new ClassifiedInfoReplyPacket.DataBlock();
|
||||
cr.Data.ClassifiedID = classifiedID;
|
||||
cr.Data.CreatorID = creatorID;
|
||||
cr.Data.CreationDate = creationDate;
|
||||
cr.Data.ExpirationDate = expirationDate;
|
||||
cr.Data.Category = category;
|
||||
cr.Data.Name = Utils.StringToBytes(name);
|
||||
cr.Data.Desc = Utils.StringToBytes(description);
|
||||
cr.Data.ParcelID = parcelID;
|
||||
cr.Data.ParentEstate = parentEstate;
|
||||
cr.Data.SnapshotID = snapshotID;
|
||||
cr.Data.SimName = Utils.StringToBytes(simName);
|
||||
cr.Data.PosGlobal = new Vector3d(globalPos);
|
||||
cr.Data.ParcelName = Utils.StringToBytes(parcelName);
|
||||
cr.Data.ClassifiedFlags = classifiedFlags;
|
||||
cr.Data.PriceForListing = price;
|
||||
|
||||
OutPacket(cr, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void KillEndDone()
|
||||
{
|
||||
KillPacket kp = new KillPacket();
|
||||
|
|
|
@ -346,6 +346,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
|||
public event TeleportLureRequest OnTeleportLureRequest;
|
||||
public event NetworkStats OnNetworkStatsUpdate;
|
||||
|
||||
public event ClassifiedInfoRequest OnClassifiedInfoRequest;
|
||||
public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
|
||||
public event ClassifiedDelete OnClassifiedDelete;
|
||||
public event ClassifiedDelete OnClassifiedGodDelete;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
|
@ -1007,6 +1011,14 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,6 +241,11 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
public event TeleportLureRequest OnTeleportLureRequest;
|
||||
public event NetworkStats OnNetworkStatsUpdate;
|
||||
|
||||
public event ClassifiedInfoRequest OnClassifiedInfoRequest;
|
||||
public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
|
||||
public event ClassifiedDelete OnClassifiedDelete;
|
||||
public event ClassifiedDelete OnClassifiedGodDelete;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
private UUID myID = UUID.Random();
|
||||
|
@ -1007,6 +1012,14 @@ namespace OpenSim.Region.Examples.SimpleModule
|
|||
return true;
|
||||
}
|
||||
|
||||
public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,6 +237,11 @@ namespace OpenSim.Tests.Common.Mock
|
|||
public event TeleportLureRequest OnTeleportLureRequest;
|
||||
public event NetworkStats OnNetworkStatsUpdate;
|
||||
|
||||
public event ClassifiedInfoRequest OnClassifiedInfoRequest;
|
||||
public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
|
||||
public event ClassifiedDelete OnClassifiedDelete;
|
||||
public event ClassifiedDelete OnClassifiedGodDelete;
|
||||
|
||||
#pragma warning restore 67
|
||||
|
||||
/// <value>
|
||||
|
@ -953,5 +958,13 @@ namespace OpenSim.Tests.Common.Mock
|
|||
return false;
|
||||
}
|
||||
|
||||
public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
|
||||
{
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue