Committing a small fix for EventData along with more plumbing work

0.6.0-stable
Melanie Thielker 2008-10-26 19:32:41 +00:00
parent ba79c26d2d
commit f7e44250bf
8 changed files with 34 additions and 11 deletions

View File

@ -42,7 +42,7 @@ namespace OpenSim.Framework
public string name;
public string category;
public string description;
public DateTime date;
public string date;
public uint dateUTC;
public uint duration;
public uint cover;

View File

@ -683,7 +683,7 @@ namespace OpenSim.Framework
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
void SendPayPrice(UUID objectID, int[] payPrice);
void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID, uint avatarLocalID,
void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID,
Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation);
void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,

View File

@ -2308,7 +2308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="avatarID"></param>
/// <param name="avatarLocalID"></param>
/// <param name="Pos"></param>
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
{
ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
@ -2323,7 +2323,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
objupdate.ObjectData[0].FullID = avatarID;
objupdate.ObjectData[0].ParentID = parentID;
objupdate.ObjectData[0].NameValue =
Utils.StringToBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName);
Utils.StringToBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + "\nTitle STRING RW SV " + grouptitle);
Vector3 pos2 = new Vector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
byte[] pb = pos2.GetBytes();

View File

@ -118,13 +118,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|| dialog == (byte) InstantMessageDialog.InventoryOffered
|| dialog == (byte) InstantMessageDialog.InventoryAccepted
|| dialog == (byte) InstantMessageDialog.InventoryDeclined
|| dialog == (byte) InstantMessageDialog.GroupNoticeInventoryAccepted
|| dialog == (byte) InstantMessageDialog.GroupNoticeInventoryDeclined
|| dialog == (byte) InstantMessageDialog.GroupInvitationAccept
|| dialog == (byte) InstantMessageDialog.GroupInvitationDecline
|| dialog == (byte) InstantMessageDialog.GroupNotice);
// IM dialogs need to be pre-processed and have their sessionID filled by the server
// so the sim can match the transaction on the return packet.
// Don't send a Friend Dialog IM with a UUID.Zero session.
if (!(dialogHandledElsewhere && imSessionID == UUID.Zero))
if (!dialogHandledElsewhere)
{
// Try root avatar only first
foreach (Scene scene in m_scenes)
@ -137,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
toAgentID, imSessionID, fromAgentName, dialog,
timestamp);
timestamp, fromGroup, binaryBucket);
// Message sent
return;
}
@ -154,7 +158,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
toAgentID, imSessionID, fromAgentName, dialog,
timestamp);
timestamp, fromGroup, binaryBucket);
// Message sent
return;
}

View File

@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
{
}

View File

@ -284,6 +284,14 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_lastname; }
}
private string m_grouptitle;
public string Grouptitle
{
get { return m_grouptitle; }
set { m_grouptitle = value; }
}
public float DrawDistance
{
get { return m_DrawDistance; }
@ -484,6 +492,10 @@ namespace OpenSim.Region.Environment.Scenes
m_regionInfo = reginfo;
m_localId = m_scene.NextLocalId;
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
if (gm != null)
m_grouptitle = gm.GetGroupTitle(m_uuid);
AbsolutePosition = m_controllingClient.StartPos;
TrySetMovementAnimation("STAND"); // TODO: I think, this won't send anything, as we are still a child here...
@ -691,6 +703,10 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void MakeRootAgent(Vector3 pos, bool isFlying)
{
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
if (gm != null)
m_grouptitle = gm.GetGroupTitle(m_uuid);
m_scene.SetRootAgentScene(m_uuid);
IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>();
@ -1755,7 +1771,7 @@ namespace OpenSim.Region.Environment.Scenes
// Note: because Quaternion is a struct, it can't be null
Quaternion rot = m_bodyRot;
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
LocalId, m_pos, m_appearance.Texture.ToBytes(),
m_parentID, rot);
m_scene.AddAgentUpdates(1);
@ -1804,6 +1820,8 @@ namespace OpenSim.Region.Environment.Scenes
}
m_scene.AddAgentUpdates(avatars.Count);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
SendAnimPack();
}
/// <summary>
@ -1818,7 +1836,7 @@ namespace OpenSim.Region.Environment.Scenes
// Note: because Quaternion is a struct, it can't be null
Quaternion rot = m_bodyRot;
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
if (!m_isChildAgent)

View File

@ -459,7 +459,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
{
}

View File

@ -50,6 +50,7 @@ namespace OpenSim.Region.Interfaces
UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
string GetGroupTitle(UUID avatarID);
void GroupNoticeRequest(IClientAPI remoteClient, UUID groupNoticeID);
void SendAgentGroupDataUpdate(IClientAPI remoteClient);
}