* Added Incomplete Handling of the RegionInfoRequest packet

* Added Incomplete Handling of the EstateCovenantRequest packet 
* Added Incomplete Handling of the EstateOwnerMessageRequest.ChangeEstateCovenantid method
* Fixed a race condition with avatar animations
afrisby
Teravus Ovares 2007-12-18 12:08:34 +00:00
parent 7948033565
commit ccc8ffaaec
7 changed files with 101 additions and 14 deletions

View File

@ -320,6 +320,10 @@ namespace OpenSim.Framework
public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
public delegate void RegionInfoRequest(IClientAPI remote_client, LLUUID sessionID);
public delegate void EstateCovenantRequest(IClientAPI remote_client, LLUUID sessionID);
public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape);
@ -466,6 +470,10 @@ namespace OpenSim.Framework
event ParcelSelectObjects OnParcelSelectObjects;
event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
event EstateOwnerMessageRequest OnEstateOwnerMessage;
event RegionInfoRequest OnRegionInfoRequest;
event EstateCovenantRequest OnEstateCovenantRequest;
LLVector3 StartPos { get; set; }
@ -551,6 +559,7 @@ namespace OpenSim.Framework
void SendNameReply(LLUUID profileId, string firstname, string lastname);
void SendAlertMessage(string message);
void SendAgentAlertMessage(string message, bool modal);
void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
bool AddMoney(int debit);

View File

@ -199,6 +199,7 @@ namespace OpenSim.Framework
public bool commFailTF = false;
public LLUUID MasterAvatarAssignedUUID = LLUUID.Zero;
public LLUUID CovenantID = LLUUID.Zero;
public string MasterAvatarFirstName = "";
public string MasterAvatarLastName = "";
public string MasterAvatarSandboxPassword = "";
@ -316,7 +317,8 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true);
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToStringHyphenated(), true);
configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToStringHyphenated(), true);
configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
@ -370,6 +372,10 @@ namespace OpenSim.Framework
case "master_avatar_uuid":
this.MasterAvatarAssignedUUID = (LLUUID)configuration_result;
break;
case "estate_covanant_uuid":
this.CovenantID = (LLUUID)configuration_result;
break;
case "master_avatar_first":
this.MasterAvatarFirstName = (string)configuration_result;
break;

View File

@ -529,6 +529,9 @@ namespace OpenSim.Region.ClientStack
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
public event EstateOwnerMessageRequest OnEstateOwnerMessage;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
#region Scene/Avatar to Client
@ -3216,7 +3219,21 @@ namespace OpenSim.Region.ClientStack
OnEstateOwnerMessage(messagePacket, this);
}
break;
case PacketType.RequestRegionInfo:
RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
if (OnRegionInfoRequest != null)
{
OnRegionInfoRequest(this, mPacket.SessionID);
}
break;
case PacketType.EstateCovenantRequest:
// TODO: handle this packet
EstateCovenantRequestPacket.AgentDataBlock epack = ((EstateCovenantRequestPacket)Pack).AgentData;
if (OnEstateCovenantRequest != null)
{
OnEstateCovenantRequest(this, epack.SessionID);
}
break;
case PacketType.AgentThrottle:
AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles);
@ -3278,10 +3295,7 @@ namespace OpenSim.Region.ClientStack
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet");
break;
case PacketType.EstateCovenantRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled EstateCovenantRequest packet");
break;
case PacketType.CreateGroupRequest:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet");
@ -3343,10 +3357,6 @@ namespace OpenSim.Region.ClientStack
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet");
break;
case PacketType.RequestRegionInfo:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled RequestRegionInfo packet");
break;
case PacketType.InventoryDescendents:
// TODO: handle this packet
MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet");

View File

@ -177,6 +177,12 @@ namespace OpenSim.Region.Environment
estateRestartSim(packet);
}
break;
case "estatechangecovenantid":
if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
{
EstateChangeCovenant(packet);
}
break;
default:
MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
break;
@ -340,8 +346,54 @@ namespace OpenSim.Region.Environment
}
}
private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
{
foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
{
LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
m_regInfo.CovenantID = newCovenantID;
}
}
public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
{
RegionInfoPacket rinfopack = new RegionInfoPacket();
RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
rinfoblk.BillableFactor = 0;
rinfoblk.EstateID = 02;
rinfoblk.MaxAgents = 100;
rinfoblk.ObjectBonusFactor = 1.0f;
rinfoblk.ParentEstateID = 0;
rinfoblk.PricePerMeter = 0;
rinfoblk.RedirectGridX = 0;
rinfoblk.RedirectGridY = 0;
rinfoblk.RegionFlags = (uint)m_regInfo.EstateSettings.regionFlags;
rinfoblk.SimAccess = (byte)m_regInfo.EstateSettings.simAccess;
rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour;
rinfoblk.TerrainLowerLimit = 20;
rinfoblk.TerrainRaiseLimit = 20;
rinfoblk.UseEstateSun = true;
rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight;
rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName);
rinfopack.RegionInfo = rinfoblk;
client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
}
public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
{
EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
edata.CovenantID = m_regInfo.CovenantID;
edata.CovenantTimestamp = 0;
edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID;
edata.EstateName = Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName);
einfopack.Data = edata;
client.OutPacket(einfopack, ThrottleOutPacketType.Task);
}
#endregion
#region Outgoing Packets

View File

@ -60,6 +60,8 @@ namespace OpenSim.Region.Environment.Scenes
// MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
lock (ScenePresence.Animations.AnimsLLUUID)
{
foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID)
{
AnimsNames.Add(kp.Value, kp.Key);
@ -67,3 +69,4 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
}

View File

@ -1122,6 +1122,8 @@ namespace OpenSim.Region.Environment.Scenes
client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest;
client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest;
client.OnRequestGodlikePowers += handleRequestGodlikePowers;
client.OnGodKickUser += handleGodlikeKickUser;
client.OnObjectPermissions += HandleObjectPermissionsUpdate;

View File

@ -137,6 +137,9 @@ namespace SimpleApp
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
public event ObjectDeselect OnObjectDeselect;
public event EstateOwnerMessageRequest OnEstateOwnerMessage;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
#pragma warning restore 67
@ -364,7 +367,9 @@ namespace SimpleApp
public void SendAgentAlertMessage(string message, bool modal)
{
}
public void SendSystemAlertMessage(string message)
{
}
public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message,
string url)
{