Fill in the new OwnerData field in the LLUDP ScriptDialog message.

If we don't do this then viewer 2.8 crashes.
Resolves http://opensimulator.org/mantis/view.php?id=5510
bulletsim
Justin Clark-Casey (justincc) 2011-05-31 19:25:01 +01:00
parent 392d270264
commit 8129e64e2a
8 changed files with 49 additions and 14 deletions

View File

@ -1159,7 +1159,19 @@ namespace OpenSim.Framework
void SendAgentAlertMessage(string message, bool modal); void SendAgentAlertMessage(string message, bool modal);
void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, /// <summary>
/// Open a dialog box on the client.
/// </summary>
/// <param name="objectname"></param>
/// <param name="objectID"></param>
/// <param name="ownerID">/param>
/// <param name="ownerFirstName"></param>
/// <param name="ownerLastName"></param>
/// <param name="msg"></param>
/// <param name="textureID"></param>
/// <param name="ch"></param>
/// <param name="buttonlabels"></param>
void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
string[] buttonlabels); string[] buttonlabels);
bool AddMoney(int debit); bool AddMoney(int debit);

View File

@ -2213,7 +2213,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(loadURL, ThrottleOutPacketType.Task); OutPacket(loadURL, ThrottleOutPacketType.Task);
} }
public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) public void SendDialog(
string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg,
UUID textureID, int ch, string[] buttonlabels)
{ {
ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
dialog.Data.ObjectID = objectID; dialog.Data.ObjectID = objectID;
@ -2231,6 +2233,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]); buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]);
} }
dialog.Buttons = buttons; dialog.Buttons = buttons;
dialog.OwnerData = new ScriptDialogPacket.OwnerDataBlock[1];
dialog.OwnerData[0] = new ScriptDialogPacket.OwnerDataBlock();
dialog.OwnerData[0].OwnerID = ownerID;
OutPacket(dialog, ThrottleOutPacketType.Task); OutPacket(dialog, ThrottleOutPacketType.Task);
} }
@ -2293,8 +2300,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OrbitalPosition = (OrbitalPosition - m_sunPainDaHalfOrbitalCutoff) * 0.6666666667f + m_sunPainDaHalfOrbitalCutoff; OrbitalPosition = (OrbitalPosition - m_sunPainDaHalfOrbitalCutoff) * 0.6666666667f + m_sunPainDaHalfOrbitalCutoff;
} }
SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage);
viewertime.TimeInfo.SunDirection = Position; viewertime.TimeInfo.SunDirection = Position;
viewertime.TimeInfo.SunAngVelocity = Velocity; viewertime.TimeInfo.SunAngVelocity = Velocity;

View File

@ -124,7 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
ScenePresence sp = m_scene.GetScenePresence(avatarID); ScenePresence sp = m_scene.GetScenePresence(avatarID);
if (sp != null) if (sp != null)
sp.ControllingClient.SendDialog(objectName, objectID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); sp.ControllingClient.SendDialog(
objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels);
} }
public void SendUrlToUser( public void SendUrlToUser(

View File

@ -540,7 +540,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{ {
} }

View File

@ -1177,7 +1177,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
IRC_SendChannelPrivmsg(objectname,url); IRC_SendChannelPrivmsg(objectname,url);
} }
public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{ {
} }

View File

@ -1231,6 +1231,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID); List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
GroupMembershipData[] membershipArray; GroupMembershipData[] membershipArray;
// c_scene and property accessor 'is_god' are in support of the opertions to bypass 'hidden' group attributes for
// those with a GodLike aspect.
Scene c_scene = (Scene) requestingClient.Scene;
bool is_god = c_scene.Permissions.IsGod(requestingClient.AgentId);
if(is_god) {
Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
{
return membership.ListInProfile;
};
membershipArray = membershipData.ToArray();
}
else
{
if (requestingClient.AgentId != dataForAgentID) if (requestingClient.AgentId != dataForAgentID)
{ {
Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership) Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
@ -1244,7 +1260,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
{ {
membershipArray = membershipData.ToArray(); membershipArray = membershipData.ToArray();
} }
}
if (m_debugEnabled) if (m_debugEnabled)
{ {
m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
@ -1257,6 +1273,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
return membershipArray; return membershipArray;
} }
private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle) private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
{ {
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

View File

@ -631,7 +631,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{ {
} }
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{ {
} }

View File

@ -637,7 +637,7 @@ namespace OpenSim.Tests.Common.Mock
{ {
} }
public virtual void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
{ {
} }