From 27f182ac54ffee16da730b2053480944f9ca5412 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 1 Dec 2007 14:20:37 +0000 Subject: Part 1 of a commit. This revision will not compile, part 2 will be added in a couple of minutes that should fix that. Some work towards persisting Avatar Appearance (what is being worn). Added OnAvatarNowWearing event to IClientAPI that is triggered by AgentIsNowWearing packets. stub code to subscribe to this event in AvatarFactoryModule. Todo: code needs to be added to AvatarFactoryModule to save the uuids to a database and then read them back when that modules TryGetIntialAvatarAppearance() method is called. Done some changes to Scene to make it easier to subclass it: including changed some private fields to protected and made some methods virtual. --- OpenSim/Framework/IClientAPI.cs | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'OpenSim/Framework/IClientAPI.cs') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 1427516..ae46d8e 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -57,7 +57,7 @@ namespace OpenSim.Framework public enum ThrottleOutPacketType : int { Resend = 0, - Land = 1, + Land = 1, Wind = 2, Cloud = 3, Task = 4, @@ -172,8 +172,33 @@ namespace OpenSim.Framework } } + public class AvatarWearingArgs : EventArgs + { + private List m_nowWearing = new List(); + + public List NowWearing + { + get { return m_nowWearing; } + set { m_nowWearing = value; } + } + + public class Wearable + { + public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); + public byte Type = 0; + + public Wearable(LLUUID itemId, byte type) + { + ItemID = itemId; + Type = type; + } + } + } + public delegate void TextureRequest(Object sender, TextureRequestArgs e); + public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); + public delegate void ImprovedInstantMessage( LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog); // Cut down from full list @@ -187,7 +212,7 @@ namespace OpenSim.Framework public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq); public delegate void LinkObjects(uint parent, List children); - + public delegate void DelinkObjects(List primIds); public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); @@ -200,7 +225,7 @@ namespace OpenSim.Framework public delegate void DisconnectUser(); public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); - public delegate void SetAlwaysRun (IClientAPI remoteClient, bool SetAlwaysRun); + public delegate void SetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun); public delegate void GenericCall2(); @@ -217,7 +242,7 @@ namespace OpenSim.Framework public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); - public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient,LLUUID AgentID, uint RequestFlags, LLUUID TaskID); + public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID); public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); @@ -268,7 +293,7 @@ namespace OpenSim.Framework public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape); public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client); - + public delegate void GodKickUser(LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); public delegate void CreateInventoryFolder( @@ -314,6 +339,7 @@ namespace OpenSim.Framework event RezObject OnRezObject; event ModifyTerrain OnModifyTerrain; event SetAppearance OnSetAppearance; + event AvatarNowWearing OnAvatarNowWearing; event StartAnim OnStartAnim; event LinkObjects OnLinkObjects; event DelinkObjects OnDelinkObjects; @@ -447,7 +473,7 @@ namespace OpenSim.Framework void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, - LLQuaternion rotation,LLVector3 velocity, LLVector3 rotationalvelocity); + LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List items, int subFoldersCount); void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); -- cgit v1.1