From f7e44250bf6058a7f232b5555d709787f1a2eb6b Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 26 Oct 2008 19:32:41 +0000
Subject: Committing a small fix for EventData along with more plumbing work
---
OpenSim/Framework/EventData.cs | 2 +-
OpenSim/Framework/IClientAPI.cs | 2 +-
.../Region/ClientStack/LindenUDP/LLClientView.cs | 4 ++--
.../Avatar/InstantMessage/InstantMessageModule.cs | 10 +++++++---
.../Environment/Modules/World/NPC/NPCAvatar.cs | 2 +-
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 ++++++++++++++++++++--
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +-
OpenSim/Region/Interfaces/IGroupsModule.cs | 1 +
8 files changed, 34 insertions(+), 11 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/EventData.cs b/OpenSim/Framework/EventData.cs
index bbca240..70554d0 100644
--- a/OpenSim/Framework/EventData.cs
+++ b/OpenSim/Framework/EventData.cs
@@ -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;
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 471def5..46615cc 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -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,
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d24b54d..3c9034b 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2308,7 +2308,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
///
- 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();
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
index 3e45f7f..2553266 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -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;
}
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 5c22bb1..3e78396 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -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)
{
}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index a8476fd..38427cf 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -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();
+ 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
///
public void MakeRootAgent(Vector3 pos, bool isFlying)
{
+ IGroupsModule gm = m_scene.RequestModuleInterface();
+ if (gm != null)
+ m_grouptitle = gm.GetGroupTitle(m_uuid);
+
m_scene.SetRootAgentScene(m_uuid);
IAvatarFactory ava = m_scene.RequestModuleInterface();
@@ -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();
}
///
@@ -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)
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index ad2fcdf..600cc1b 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -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)
{
}
diff --git a/OpenSim/Region/Interfaces/IGroupsModule.cs b/OpenSim/Region/Interfaces/IGroupsModule.cs
index f5193c3..d428297 100644
--- a/OpenSim/Region/Interfaces/IGroupsModule.cs
+++ b/OpenSim/Region/Interfaces/IGroupsModule.cs
@@ -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);
}
--
cgit v1.1