* Refactored OutPacket and FirstName/LastName out of Friends Module.
parent
92128d4ef9
commit
9e1cc72c6e
|
@ -663,7 +663,7 @@ namespace OpenSim.Framework
|
||||||
event ChatFromViewer OnChatFromViewer;
|
event ChatFromViewer OnChatFromViewer;
|
||||||
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
|
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]
|
||||||
event TextureRequest OnRequestTexture;
|
event TextureRequest OnRequestTexture;
|
||||||
[Obsolete("LLClientView Specific - Remove bitbuckets.")]
|
[Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")]
|
||||||
event RezObject OnRezObject;
|
event RezObject OnRezObject;
|
||||||
[Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
|
[Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
|
||||||
event ModifyTerrain OnModifyTerrain;
|
event ModifyTerrain OnModifyTerrain;
|
||||||
|
@ -965,7 +965,9 @@ namespace OpenSim.Framework
|
||||||
LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
|
LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
|
||||||
string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
|
string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
|
||||||
uint BaseMask);
|
uint BaseMask);
|
||||||
|
void SendAgentOffline(LLUUID[] agentIDs);
|
||||||
|
|
||||||
|
void SendAgentOnline(LLUUID[] agentIDs);
|
||||||
|
|
||||||
byte[] GetThrottlesPacked(float multiplier);
|
byte[] GetThrottlesPacked(float multiplier);
|
||||||
|
|
||||||
|
|
|
@ -5704,6 +5704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
OutPacket(logReply, ThrottleOutPacketType.Task);
|
OutPacket(logReply, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendHealth(float health)
|
public void SendHealth(float health)
|
||||||
{
|
{
|
||||||
HealthMessagePacket healthpacket = (HealthMessagePacket)PacketPool.Instance.GetPacket(PacketType.HealthMessage);
|
HealthMessagePacket healthpacket = (HealthMessagePacket)PacketPool.Instance.GetPacket(PacketType.HealthMessage);
|
||||||
|
@ -5711,6 +5712,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(healthpacket, ThrottleOutPacketType.Task);
|
OutPacket(healthpacket, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendAgentOnline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
OnlineNotificationPacket onp = new OnlineNotificationPacket();
|
||||||
|
OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length];
|
||||||
|
for (int i = 0; i < agentIDs.Length; i++)
|
||||||
|
{
|
||||||
|
OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock();
|
||||||
|
onpbl.AgentID = agentIDs[i];
|
||||||
|
onpb[i] = onpbl;
|
||||||
|
}
|
||||||
|
onp.AgentBlock = onpb;
|
||||||
|
OutPacket(onp, ThrottleOutPacketType.Task);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendAgentOffline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
OfflineNotificationPacket offp = new OfflineNotificationPacket();
|
||||||
|
OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length];
|
||||||
|
for (int i = 0; i < agentIDs.Length; i++)
|
||||||
|
{
|
||||||
|
OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock();
|
||||||
|
onpbl.AgentID = agentIDs[i];
|
||||||
|
offpb[i] = onpbl;
|
||||||
|
}
|
||||||
|
offp.AgentBlock = offpb;
|
||||||
|
OutPacket(offp, ThrottleOutPacketType.Task);
|
||||||
|
}
|
||||||
public ClientInfo GetClientInfo()
|
public ClientInfo GetClientInfo()
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN");
|
//MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN");
|
||||||
|
|
|
@ -164,13 +164,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
if (fli.Friend == client.AgentId)
|
if (fli.Friend == client.AgentId)
|
||||||
{
|
{
|
||||||
fli.onlinestatus = true;
|
fli.onlinestatus = true;
|
||||||
OnlineNotificationPacket onp = new OnlineNotificationPacket();
|
LLUUID[] Agents = new LLUUID[1];
|
||||||
OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[1];
|
Agents[0] = client.AgentId;
|
||||||
OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock();
|
av.ControllingClient.SendAgentOnline(Agents);
|
||||||
onpbl.AgentID = client.AgentId;
|
|
||||||
onpb[0] = onpbl;
|
|
||||||
onp.AgentBlock = onpb;
|
|
||||||
av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,16 +176,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
|
|
||||||
if (UpdateUsers.Count > 0)
|
if (UpdateUsers.Count > 0)
|
||||||
{
|
{
|
||||||
OnlineNotificationPacket onp = new OnlineNotificationPacket();
|
|
||||||
OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[UpdateUsers.Count];
|
client.SendAgentOnline(UpdateUsers.ToArray());
|
||||||
for (int i = 0; i < UpdateUsers.Count; i++)
|
|
||||||
{
|
|
||||||
OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock();
|
|
||||||
onpbl.AgentID = UpdateUsers[i];
|
|
||||||
onpb[i] = onpbl;
|
|
||||||
}
|
|
||||||
onp.AgentBlock = onpb;
|
|
||||||
client.OutPacket(onp, ThrottleOutPacketType.Task);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,13 +268,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
|
ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
|
||||||
if (av != null)
|
if (av != null)
|
||||||
{
|
{
|
||||||
OfflineNotificationPacket onp = new OfflineNotificationPacket();
|
LLUUID[] agents = new LLUUID[1];
|
||||||
OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1];
|
agents[0] = AgentId;
|
||||||
OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock();
|
av.ControllingClient.SendAgentOffline(agents);
|
||||||
onpbl.AgentID = AgentId;
|
|
||||||
onpb[0] = onpbl;
|
|
||||||
onp.AgentBlock = onpb;
|
|
||||||
av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
msg.timestamp = timestamp;
|
msg.timestamp = timestamp;
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
msg.fromAgentName = client.FirstName + " " + client.LastName; // fromAgentName;
|
msg.fromAgentName = client.Name; // fromAgentName;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -439,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
GridInstantMessage msg = new GridInstantMessage();
|
GridInstantMessage msg = new GridInstantMessage();
|
||||||
msg.toAgentID = m_pendingFriendRequests[transactionID].UUID;
|
msg.toAgentID = m_pendingFriendRequests[transactionID].UUID;
|
||||||
msg.fromAgentID = agentID.UUID;
|
msg.fromAgentID = agentID.UUID;
|
||||||
msg.fromAgentName = client.FirstName + " " + client.LastName;
|
msg.fromAgentName = client.Name;
|
||||||
msg.fromAgentSession = client.SessionId.UUID;
|
msg.fromAgentSession = client.SessionId.UUID;
|
||||||
msg.fromGroup = false;
|
msg.fromGroup = false;
|
||||||
msg.imSessionID = transactionID.UUID;
|
msg.imSessionID = transactionID.UUID;
|
||||||
|
@ -477,7 +463,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
GridInstantMessage msg = new GridInstantMessage();
|
GridInstantMessage msg = new GridInstantMessage();
|
||||||
msg.toAgentID = m_pendingFriendRequests[transactionID].UUID;
|
msg.toAgentID = m_pendingFriendRequests[transactionID].UUID;
|
||||||
msg.fromAgentID = agentID.UUID;
|
msg.fromAgentID = agentID.UUID;
|
||||||
msg.fromAgentName = client.FirstName + " " + client.LastName;
|
msg.fromAgentName = client.Name;
|
||||||
msg.fromAgentSession = client.SessionId.UUID;
|
msg.fromAgentSession = client.SessionId.UUID;
|
||||||
msg.fromGroup = false;
|
msg.fromGroup = false;
|
||||||
msg.imSessionID = transactionID.UUID;
|
msg.imSessionID = transactionID.UUID;
|
||||||
|
|
|
@ -83,6 +83,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
|
||||||
Position, m_scene.RegionInfo.RegionID, new byte[0]);
|
Position, m_scene.RegionInfo.RegionID, new byte[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendAgentOffline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendAgentOnline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public LLUUID GetDefaultAnimation(string name)
|
public LLUUID GetDefaultAnimation(string name)
|
||||||
{
|
{
|
||||||
return LLUUID.Zero;
|
return LLUUID.Zero;
|
||||||
|
|
|
@ -563,6 +563,17 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SendAgentOffline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendAgentOnline(LLUUID[] agentIDs)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
frame++;
|
frame++;
|
||||||
|
|
Loading…
Reference in New Issue