change encoding of a another event cap message
parent
695d807696
commit
cc204a279e
|
@ -48,6 +48,8 @@ namespace OpenSim.Framework
|
||||||
sb.Append("<llsd>");
|
sb.Append("<llsd>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public const string LLSDEmpty = "<llsd><map /></llsd>";
|
||||||
|
|
||||||
// got tired of creating a stringbuilder all the time;
|
// got tired of creating a stringbuilder all the time;
|
||||||
public static StringBuilder Start(int size = 256, bool addxmlversion = false)
|
public static StringBuilder Start(int size = 256, bool addxmlversion = false)
|
||||||
{
|
{
|
||||||
|
@ -97,6 +99,11 @@ namespace OpenSim.Framework
|
||||||
sb.Append("</array>");
|
sb.Append("</array>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void AddEndMapAndArray(StringBuilder sb)
|
||||||
|
{
|
||||||
|
sb.Append("</map></array>");
|
||||||
|
}
|
||||||
|
|
||||||
public static void AddEmptyArray(StringBuilder sb)
|
public static void AddEmptyArray(StringBuilder sb)
|
||||||
{
|
{
|
||||||
sb.Append("<array />");
|
sb.Append("<array />");
|
||||||
|
@ -386,6 +393,13 @@ namespace OpenSim.Framework
|
||||||
sb.Append("</key><array>");
|
sb.Append("</key><array>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void AddArrayAndMap(string name, StringBuilder sb)
|
||||||
|
{
|
||||||
|
sb.Append("<key>");
|
||||||
|
sb.Append(name);
|
||||||
|
sb.Append("</key><array><map>");
|
||||||
|
}
|
||||||
|
|
||||||
public static void AddEmptyArray(string name, StringBuilder sb)
|
public static void AddEmptyArray(string name, StringBuilder sb)
|
||||||
{
|
{
|
||||||
sb.Append("<key>");
|
sb.Append("<key>");
|
||||||
|
@ -746,14 +760,14 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
return new byte[8]
|
return new byte[8]
|
||||||
{
|
{
|
||||||
(byte)((uLongValue >> 56) & 0xff),
|
(byte)(uLongValue >> 56),
|
||||||
(byte)((uLongValue >> 48) & 0xff),
|
(byte)(uLongValue >> 48),
|
||||||
(byte)((uLongValue >> 40) & 0xff),
|
(byte)(uLongValue >> 40),
|
||||||
(byte)((uLongValue >> 32) & 0xff),
|
(byte)(uLongValue >> 32),
|
||||||
(byte)((uLongValue >> 24) & 0xff),
|
(byte)(uLongValue >> 24),
|
||||||
(byte)((uLongValue >> 16) & 0xff),
|
(byte)(uLongValue >> 16),
|
||||||
(byte)((uLongValue >> 8) & 0xff),
|
(byte)(uLongValue >> 8),
|
||||||
(byte)(uLongValue & 0xff)
|
(byte)uLongValue
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -761,10 +775,10 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
return new byte[4]
|
return new byte[4]
|
||||||
{
|
{
|
||||||
(byte)((value >> 24) & 0xff),
|
(byte)(value >> 24),
|
||||||
(byte)((value >> 16) & 0xff),
|
(byte)(value >> 16),
|
||||||
(byte)((value >> 8) & 0xff),
|
(byte)(value >> 8),
|
||||||
(byte)(value & 0xff)
|
(byte)value
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2815,15 +2815,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
|
|
||||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||||
{
|
|
||||||
SceneObjectPart part = (SceneObjectPart)entity;
|
|
||||||
if (part != null && AgentId != UUID.Zero)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
if (eq != null)
|
if (eq == null)
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
SceneObjectPart part = (SceneObjectPart)entity;
|
||||||
|
if (part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
uint localid = part.LocalId;
|
uint localid = part.LocalId;
|
||||||
byte physshapetype = part.PhysicsShapeType;
|
byte physshapetype = part.PhysicsShapeType;
|
||||||
float density = part.Density;
|
float density = part.Density;
|
||||||
|
@ -2833,13 +2833,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);
|
eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3406,37 +3399,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
|
public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
|
||||||
{
|
{
|
||||||
OSDMap llsd = new OSDMap(3);
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
OSDArray AgentData = new OSDArray(1);
|
if (eq == null)
|
||||||
OSDMap AgentDataMap = new OSDMap(1);
|
return;
|
||||||
AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId));
|
|
||||||
AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID));
|
// message template has a GroupData field AcceptNotices ignored by viewers
|
||||||
AgentData.Add(AgentDataMap);
|
// and a array NewGroupData also ignored
|
||||||
llsd.Add("AgentData", AgentData);
|
StringBuilder sb = eq.StartEvent("AvatarGroupsReply");
|
||||||
OSDArray GroupData = new OSDArray(data.Length);
|
|
||||||
// OSDArray NewGroupData = new OSDArray(data.Length);
|
LLSDxmlEncode.AddArrayAndMap("AgentData", sb);
|
||||||
|
LLSDxmlEncode.AddElem("AgentID", AgentId, sb);
|
||||||
|
LLSDxmlEncode.AddElem("AvatarID", avatarID, sb);
|
||||||
|
LLSDxmlEncode.AddEndMapAndArray(sb);
|
||||||
|
|
||||||
|
if(data.Length == 0)
|
||||||
|
LLSDxmlEncode.AddEmptyArray("GroupData", sb);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LLSDxmlEncode.AddArray("GroupData", sb);
|
||||||
foreach (GroupMembershipData m in data)
|
foreach (GroupMembershipData m in data)
|
||||||
{
|
{
|
||||||
OSDMap GroupDataMap = new OSDMap(6);
|
LLSDxmlEncode.AddMap(sb);
|
||||||
OSDMap NewGroupDataMap = new OSDMap(1);
|
LLSDxmlEncode.AddElem("GroupPowers", m.GroupPowers, sb);
|
||||||
GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers));
|
LLSDxmlEncode.AddElem("GroupTitle", m.GroupTitle, sb);
|
||||||
GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices));
|
LLSDxmlEncode.AddElem("GroupID",m.GroupID, sb);
|
||||||
GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
|
LLSDxmlEncode.AddElem("GroupName", m.GroupName, sb);
|
||||||
GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
|
LLSDxmlEncode.AddElem("GroupInsigniaID", m.GroupPicture, sb);
|
||||||
GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName));
|
LLSDxmlEncode.AddEndMap(sb);
|
||||||
GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture));
|
}
|
||||||
// NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile));
|
LLSDxmlEncode.AddEndArray(sb);
|
||||||
GroupData.Add(GroupDataMap);
|
|
||||||
// NewGroupData.Add(NewGroupDataMap);
|
|
||||||
}
|
}
|
||||||
llsd.Add("GroupData", GroupData);
|
|
||||||
// llsd.Add("NewGroupData", NewGroupData);
|
|
||||||
|
|
||||||
IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
|
OSD ev = new OSDllsdxml(eq.EndEvent(sb));
|
||||||
if (eq != null)
|
eq.Enqueue(ev, AgentId);
|
||||||
{
|
|
||||||
eq.Enqueue(BuildEvent("AvatarGroupsReply", llsd), this.AgentId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
|
public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
|
||||||
|
@ -5277,7 +5272,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
ParcelOverlayPacket packet = (ParcelOverlayPacket)PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
|
ParcelOverlayPacket packet = (ParcelOverlayPacket)PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
|
||||||
packet.ParcelData.Data = data;
|
packet.ParcelData.Data = data;
|
||||||
packet.ParcelData.SequenceID = sequence_id;
|
packet.ParcelData.SequenceID = sequence_id;
|
||||||
packet.Header.Zerocoded = true;
|
|
||||||
// OutPacket(packet, ThrottleOutPacketType.Task);
|
// OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
OutPacket(packet, ThrottleOutPacketType.Land);
|
OutPacket(packet, ThrottleOutPacketType.Land);
|
||||||
}
|
}
|
||||||
|
@ -5298,12 +5292,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LandData landData = lo.LandData;
|
LandData landData = lo.LandData;
|
||||||
IPrimCounts pc = lo.PrimCounts;
|
IPrimCounts pc = lo.PrimCounts;
|
||||||
|
|
||||||
ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
|
|
||||||
|
|
||||||
StringBuilder sb = eq.StartEvent("ParcelProperties");
|
StringBuilder sb = eq.StartEvent("ParcelProperties");
|
||||||
|
|
||||||
LLSDxmlEncode.AddArray("ParcelData", sb);
|
LLSDxmlEncode.AddArrayAndMap("ParcelData", sb);
|
||||||
LLSDxmlEncode.AddMap(sb);
|
|
||||||
|
|
||||||
LLSDxmlEncode.AddElem("LocalID", landData.LocalID, sb);
|
LLSDxmlEncode.AddElem("LocalID", landData.LocalID, sb);
|
||||||
LLSDxmlEncode.AddElem("AABBMax", landData.AABBMax, sb);
|
LLSDxmlEncode.AddElem("AABBMax", landData.AABBMax, sb);
|
||||||
|
@ -5339,7 +5330,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LLSDxmlEncode.AddElem("PassHours", landData.PassHours, sb);
|
LLSDxmlEncode.AddElem("PassHours", landData.PassHours, sb);
|
||||||
LLSDxmlEncode.AddElem("PassPrice", landData.PassPrice, sb);
|
LLSDxmlEncode.AddElem("PassPrice", landData.PassPrice, sb);
|
||||||
LLSDxmlEncode.AddElem("PublicCount", (int)0, sb); //TODO
|
LLSDxmlEncode.AddElem("PublicCount", (int)0, sb); //TODO
|
||||||
LLSDxmlEncode.AddElem("Privacy", false, sb); //TODO ??
|
|
||||||
LLSDxmlEncode.AddElem("RegionDenyAnonymous", (regionFlags & (uint)RegionFlags.DenyAnonymous) != 0, sb);
|
LLSDxmlEncode.AddElem("RegionDenyAnonymous", (regionFlags & (uint)RegionFlags.DenyAnonymous) != 0, sb);
|
||||||
//LLSDxmlEncode.AddElem("RegionDenyIdentified", (regionFlags & (uint)RegionFlags.DenyIdentified) != 0, sb);
|
//LLSDxmlEncode.AddElem("RegionDenyIdentified", (regionFlags & (uint)RegionFlags.DenyIdentified) != 0, sb);
|
||||||
LLSDxmlEncode.AddElem("RegionDenyIdentified", false, sb);
|
LLSDxmlEncode.AddElem("RegionDenyIdentified", false, sb);
|
||||||
|
@ -5367,11 +5357,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LLSDxmlEncode.AddElem("AnyAVSounds", landData.AnyAVSounds, sb);
|
LLSDxmlEncode.AddElem("AnyAVSounds", landData.AnyAVSounds, sb);
|
||||||
LLSDxmlEncode.AddElem("GroupAVSounds", landData.GroupAVSounds, sb);
|
LLSDxmlEncode.AddElem("GroupAVSounds", landData.GroupAVSounds, sb);
|
||||||
|
|
||||||
LLSDxmlEncode.AddEndMap(sb);
|
LLSDxmlEncode.AddEndMapAndArray(sb);
|
||||||
LLSDxmlEncode.AddEndArray(sb);
|
|
||||||
|
|
||||||
LLSDxmlEncode.AddArray("MediaData", sb);
|
LLSDxmlEncode.AddArrayAndMap("MediaData", sb);
|
||||||
LLSDxmlEncode.AddMap(sb);
|
|
||||||
|
|
||||||
LLSDxmlEncode.AddElem("MediaDesc", landData.MediaDescription, sb);
|
LLSDxmlEncode.AddElem("MediaDesc", landData.MediaDescription, sb);
|
||||||
LLSDxmlEncode.AddElem("MediaHeight", landData.MediaHeight, sb);
|
LLSDxmlEncode.AddElem("MediaHeight", landData.MediaHeight, sb);
|
||||||
|
@ -5381,117 +5369,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LLSDxmlEncode.AddElem("ObscureMedia", landData.ObscureMedia, sb);
|
LLSDxmlEncode.AddElem("ObscureMedia", landData.ObscureMedia, sb);
|
||||||
LLSDxmlEncode.AddElem("ObscureMusic", landData.ObscureMusic, sb);
|
LLSDxmlEncode.AddElem("ObscureMusic", landData.ObscureMusic, sb);
|
||||||
|
|
||||||
LLSDxmlEncode.AddEndMap(sb);
|
LLSDxmlEncode.AddEndMapAndArray(sb);
|
||||||
LLSDxmlEncode.AddEndArray(sb);
|
|
||||||
|
|
||||||
LLSDxmlEncode.AddArray("AgeVerificationBlock", sb);
|
LLSDxmlEncode.AddArrayAndMap("AgeVerificationBlock", sb);
|
||||||
LLSDxmlEncode.AddMap(sb);
|
|
||||||
|
|
||||||
//LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb);
|
//LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb);
|
||||||
LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", false, sb);
|
LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", false, sb);
|
||||||
|
|
||||||
LLSDxmlEncode.AddEndMap(sb);
|
LLSDxmlEncode.AddEndMapAndArray(sb);
|
||||||
LLSDxmlEncode.AddEndArray(sb);
|
|
||||||
|
|
||||||
OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb));
|
OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb));
|
||||||
eq.Enqueue(ev, AgentId);
|
eq.Enqueue(ev, AgentId);
|
||||||
|
|
||||||
/*
|
|
||||||
updateMessage.AABBMax = landData.AABBMax;
|
|
||||||
updateMessage.AABBMin = landData.AABBMin;
|
|
||||||
updateMessage.Area = landData.Area;
|
|
||||||
updateMessage.AuctionID = landData.AuctionID;
|
|
||||||
updateMessage.AuthBuyerID = landData.AuthBuyerID;
|
|
||||||
updateMessage.Bitmap = landData.Bitmap;
|
|
||||||
updateMessage.Desc = landData.Description;
|
|
||||||
updateMessage.Category = landData.Category;
|
|
||||||
updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
|
|
||||||
updateMessage.ClaimPrice = landData.ClaimPrice;
|
|
||||||
updateMessage.GroupID = landData.GroupID;
|
|
||||||
updateMessage.IsGroupOwned = landData.IsGroupOwned;
|
|
||||||
updateMessage.LandingType = (LandingType) landData.LandingType;
|
|
||||||
updateMessage.LocalID = landData.LocalID;
|
|
||||||
|
|
||||||
if (landData.Area > 0)
|
|
||||||
{
|
|
||||||
updateMessage.MaxPrims = parcelObjectCapacity;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
updateMessage.MaxPrims = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale);
|
|
||||||
updateMessage.MediaID = landData.MediaID;
|
|
||||||
updateMessage.MediaURL = landData.MediaURL;
|
|
||||||
updateMessage.MusicURL = landData.MusicURL;
|
|
||||||
updateMessage.Name = landData.Name;
|
|
||||||
updateMessage.OtherCleanTime = landData.OtherCleanTime;
|
|
||||||
updateMessage.OtherCount = 0; //TODO: Unimplemented
|
|
||||||
updateMessage.OwnerID = landData.OwnerID;
|
|
||||||
updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
|
|
||||||
updateMessage.ParcelPrimBonus = simObjectBonusFactor;
|
|
||||||
updateMessage.PassHours = landData.PassHours;
|
|
||||||
updateMessage.PassPrice = landData.PassPrice;
|
|
||||||
updateMessage.PublicCount = 0; //TODO: Unimplemented
|
|
||||||
|
|
||||||
updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
|
|
||||||
updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
|
|
||||||
|
|
||||||
//updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0;
|
|
||||||
//updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0;
|
|
||||||
|
|
||||||
updateMessage.RentPrice = 0;
|
|
||||||
updateMessage.RequestResult = (ParcelResult) request_result;
|
|
||||||
updateMessage.SalePrice = landData.SalePrice;
|
|
||||||
updateMessage.SelfCount = 0; //TODO: Unimplemented
|
|
||||||
updateMessage.SequenceID = sequence_id;
|
|
||||||
|
|
||||||
if (landData.SimwideArea > 0)
|
|
||||||
{
|
|
||||||
updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
updateMessage.SimWideMaxPrims = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateMessage.SnapSelection = snap_selection;
|
|
||||||
updateMessage.SnapshotID = landData.SnapshotID;
|
|
||||||
updateMessage.Status = (ParcelStatus) landData.Status;
|
|
||||||
updateMessage.UserLocation = landData.UserLocation;
|
|
||||||
updateMessage.UserLookAt = landData.UserLookAt;
|
|
||||||
|
|
||||||
updateMessage.MediaType = landData.MediaType;
|
|
||||||
updateMessage.MediaDesc = landData.MediaDescription;
|
|
||||||
updateMessage.MediaWidth = landData.MediaWidth;
|
|
||||||
updateMessage.MediaHeight = landData.MediaHeight;
|
|
||||||
updateMessage.MediaLoop = landData.MediaLoop;
|
|
||||||
updateMessage.ObscureMusic = landData.ObscureMusic;
|
|
||||||
updateMessage.ObscureMedia = landData.ObscureMedia;
|
|
||||||
|
|
||||||
updateMessage.SeeAVs = landData.SeeAVs;
|
|
||||||
updateMessage.AnyAVSounds = landData.AnyAVSounds;
|
|
||||||
updateMessage.GroupAVSounds = landData.GroupAVSounds;
|
|
||||||
|
|
||||||
updateMessage.OwnerPrims = pc.Owner;
|
|
||||||
updateMessage.GroupPrims = pc.Group;
|
|
||||||
updateMessage.OtherPrims = pc.Others;
|
|
||||||
updateMessage.SelectedPrims = pc.Selected;
|
|
||||||
updateMessage.TotalPrims = pc.Total;
|
|
||||||
updateMessage.SimWideTotalPrims = pc.Simulator;
|
|
||||||
|
|
||||||
//m_log.DebugFormat("[YYY]: SimWideMaxPrims={0} OwnerPrims={1} TotalPrims={2} SimWideTotalPrims={3} MaxPrims={4}",
|
|
||||||
// updateMessage.SimWideMaxPrims, updateMessage.OwnerPrims, updateMessage.TotalPrims, updateMessage.SimWideTotalPrims, updateMessage.MaxPrims);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
eq.ParcelProperties(updateMessage, this.AgentId);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
m_log.Error("[LLCLIENTVIEW]: Unable to send parcel data via eventqueue - exception: " + ex.ToString());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)
|
public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)
|
||||||
|
|
Loading…
Reference in New Issue