diff options
author | Teravus Ovares | 2008-05-14 03:57:30 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-14 03:57:30 +0000 |
commit | 9e1cc72c6e291d1e8430e8de0b071c654a72ca59 (patch) | |
tree | ab88df13ce96c295e99a7ea6373b34bfe77cc230 | |
parent | Update svn properties. (diff) | |
download | opensim-SC-9e1cc72c6e291d1e8430e8de0b071c654a72ca59.zip opensim-SC-9e1cc72c6e291d1e8430e8de0b071c654a72ca59.tar.gz opensim-SC-9e1cc72c6e291d1e8430e8de0b071c654a72ca59.tar.bz2 opensim-SC-9e1cc72c6e291d1e8430e8de0b071c654a72ca59.tar.xz |
* Refactored OutPacket and FirstName/LastName out of Friends Module.
Diffstat (limited to '')
5 files changed, 66 insertions, 29 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ec67f9a..87e8ace 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -663,7 +663,7 @@ namespace OpenSim.Framework | |||
663 | event ChatFromViewer OnChatFromViewer; | 663 | event ChatFromViewer OnChatFromViewer; |
664 | [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")] | 664 | [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")] |
665 | event TextureRequest OnRequestTexture; | 665 | event TextureRequest OnRequestTexture; |
666 | [Obsolete("LLClientView Specific - Remove bitbuckets.")] | 666 | [Obsolete("LLClientView Specific - Remove bitbuckets. Adam, can you be more specific here.. as I don't see any bit buckets.")] |
667 | event RezObject OnRezObject; | 667 | event RezObject OnRezObject; |
668 | [Obsolete("LLClientView Specific - Replace with more suitable arguments.")] | 668 | [Obsolete("LLClientView Specific - Replace with more suitable arguments.")] |
669 | event ModifyTerrain OnModifyTerrain; | 669 | event ModifyTerrain OnModifyTerrain; |
@@ -965,7 +965,9 @@ namespace OpenSim.Framework | |||
965 | LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, | 965 | LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, |
966 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, | 966 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, |
967 | uint BaseMask); | 967 | uint BaseMask); |
968 | 968 | void SendAgentOffline(LLUUID[] agentIDs); | |
969 | |||
970 | void SendAgentOnline(LLUUID[] agentIDs); | ||
969 | 971 | ||
970 | byte[] GetThrottlesPacked(float multiplier); | 972 | byte[] GetThrottlesPacked(float multiplier); |
971 | 973 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index eb415e4..e1e8854 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5704,6 +5704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5704 | 5704 | ||
5705 | OutPacket(logReply, ThrottleOutPacketType.Task); | 5705 | OutPacket(logReply, ThrottleOutPacketType.Task); |
5706 | } | 5706 | } |
5707 | |||
5707 | public void SendHealth(float health) | 5708 | public void SendHealth(float health) |
5708 | { | 5709 | { |
5709 | HealthMessagePacket healthpacket = (HealthMessagePacket)PacketPool.Instance.GetPacket(PacketType.HealthMessage); | 5710 | HealthMessagePacket healthpacket = (HealthMessagePacket)PacketPool.Instance.GetPacket(PacketType.HealthMessage); |
@@ -5711,6 +5712,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5711 | OutPacket(healthpacket, ThrottleOutPacketType.Task); | 5712 | OutPacket(healthpacket, ThrottleOutPacketType.Task); |
5712 | } | 5713 | } |
5713 | 5714 | ||
5715 | public void SendAgentOnline(LLUUID[] agentIDs) | ||
5716 | { | ||
5717 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | ||
5718 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length]; | ||
5719 | for (int i = 0; i < agentIDs.Length; i++) | ||
5720 | { | ||
5721 | OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock(); | ||
5722 | onpbl.AgentID = agentIDs[i]; | ||
5723 | onpb[i] = onpbl; | ||
5724 | } | ||
5725 | onp.AgentBlock = onpb; | ||
5726 | OutPacket(onp, ThrottleOutPacketType.Task); | ||
5727 | } | ||
5728 | |||
5729 | public void SendAgentOffline(LLUUID[] agentIDs) | ||
5730 | { | ||
5731 | OfflineNotificationPacket offp = new OfflineNotificationPacket(); | ||
5732 | OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length]; | ||
5733 | for (int i = 0; i < agentIDs.Length; i++) | ||
5734 | { | ||
5735 | OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); | ||
5736 | onpbl.AgentID = agentIDs[i]; | ||
5737 | offpb[i] = onpbl; | ||
5738 | } | ||
5739 | offp.AgentBlock = offpb; | ||
5740 | OutPacket(offp, ThrottleOutPacketType.Task); | ||
5741 | } | ||
5714 | public ClientInfo GetClientInfo() | 5742 | public ClientInfo GetClientInfo() |
5715 | { | 5743 | { |
5716 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); | 5744 | //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 2d6e27f..8c96392 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | |||
@@ -164,13 +164,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
164 | if (fli.Friend == client.AgentId) | 164 | if (fli.Friend == client.AgentId) |
165 | { | 165 | { |
166 | fli.onlinestatus = true; | 166 | fli.onlinestatus = true; |
167 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | 167 | LLUUID[] Agents = new LLUUID[1]; |
168 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[1]; | 168 | Agents[0] = client.AgentId; |
169 | OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock(); | 169 | av.ControllingClient.SendAgentOnline(Agents); |
170 | onpbl.AgentID = client.AgentId; | 170 | |
171 | onpb[0] = onpbl; | ||
172 | onp.AgentBlock = onpb; | ||
173 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); | ||
174 | } | 171 | } |
175 | } | 172 | } |
176 | } | 173 | } |
@@ -179,16 +176,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
179 | 176 | ||
180 | if (UpdateUsers.Count > 0) | 177 | if (UpdateUsers.Count > 0) |
181 | { | 178 | { |
182 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | 179 | |
183 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[UpdateUsers.Count]; | 180 | client.SendAgentOnline(UpdateUsers.ToArray()); |
184 | for (int i = 0; i < UpdateUsers.Count; i++) | 181 | |
185 | { | ||
186 | OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock(); | ||
187 | onpbl.AgentID = UpdateUsers[i]; | ||
188 | onpb[i] = onpbl; | ||
189 | } | ||
190 | onp.AgentBlock = onpb; | ||
191 | client.OutPacket(onp, ThrottleOutPacketType.Task); | ||
192 | } | 182 | } |
193 | } | 183 | } |
194 | 184 | ||
@@ -278,13 +268,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
278 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); | 268 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); |
279 | if (av != null) | 269 | if (av != null) |
280 | { | 270 | { |
281 | OfflineNotificationPacket onp = new OfflineNotificationPacket(); | 271 | LLUUID[] agents = new LLUUID[1]; |
282 | OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1]; | 272 | agents[0] = AgentId; |
283 | OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); | 273 | av.ControllingClient.SendAgentOffline(agents); |
284 | onpbl.AgentID = AgentId; | ||
285 | onpb[0] = onpbl; | ||
286 | onp.AgentBlock = onpb; | ||
287 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); | ||
288 | } | 274 | } |
289 | } | 275 | } |
290 | } | 276 | } |
@@ -388,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
388 | msg.timestamp = timestamp; | 374 | msg.timestamp = timestamp; |
389 | if (client != null) | 375 | if (client != null) |
390 | { | 376 | { |
391 | msg.fromAgentName = client.FirstName + " " + client.LastName; // fromAgentName; | 377 | msg.fromAgentName = client.Name; // fromAgentName; |
392 | } | 378 | } |
393 | else | 379 | else |
394 | { | 380 | { |
@@ -439,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
439 | GridInstantMessage msg = new GridInstantMessage(); | 425 | GridInstantMessage msg = new GridInstantMessage(); |
440 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 426 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; |
441 | msg.fromAgentID = agentID.UUID; | 427 | msg.fromAgentID = agentID.UUID; |
442 | msg.fromAgentName = client.FirstName + " " + client.LastName; | 428 | msg.fromAgentName = client.Name; |
443 | msg.fromAgentSession = client.SessionId.UUID; | 429 | msg.fromAgentSession = client.SessionId.UUID; |
444 | msg.fromGroup = false; | 430 | msg.fromGroup = false; |
445 | msg.imSessionID = transactionID.UUID; | 431 | msg.imSessionID = transactionID.UUID; |
@@ -477,7 +463,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
477 | GridInstantMessage msg = new GridInstantMessage(); | 463 | GridInstantMessage msg = new GridInstantMessage(); |
478 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 464 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; |
479 | msg.fromAgentID = agentID.UUID; | 465 | msg.fromAgentID = agentID.UUID; |
480 | msg.fromAgentName = client.FirstName + " " + client.LastName; | 466 | msg.fromAgentName = client.Name; |
481 | msg.fromAgentSession = client.SessionId.UUID; | 467 | msg.fromAgentSession = client.SessionId.UUID; |
482 | msg.fromGroup = false; | 468 | msg.fromGroup = false; |
483 | msg.imSessionID = transactionID.UUID; | 469 | msg.imSessionID = transactionID.UUID; |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 632b7a6..e5d295b 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -83,6 +83,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
83 | Position, m_scene.RegionInfo.RegionID, new byte[0]); | 83 | Position, m_scene.RegionInfo.RegionID, new byte[0]); |
84 | } | 84 | } |
85 | 85 | ||
86 | public void SendAgentOffline(LLUUID[] agentIDs) | ||
87 | { | ||
88 | |||
89 | } | ||
90 | |||
91 | public void SendAgentOnline(LLUUID[] agentIDs) | ||
92 | { | ||
93 | |||
94 | } | ||
95 | |||
86 | public LLUUID GetDefaultAnimation(string name) | 96 | public LLUUID GetDefaultAnimation(string name) |
87 | { | 97 | { |
88 | return LLUUID.Zero; | 98 | return LLUUID.Zero; |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 4fa1302..19494c2 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -563,6 +563,17 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
563 | { | 563 | { |
564 | } | 564 | } |
565 | 565 | ||
566 | |||
567 | public void SendAgentOffline(LLUUID[] agentIDs) | ||
568 | { | ||
569 | |||
570 | } | ||
571 | |||
572 | public void SendAgentOnline(LLUUID[] agentIDs) | ||
573 | { | ||
574 | |||
575 | } | ||
576 | |||
566 | private void Update() | 577 | private void Update() |
567 | { | 578 | { |
568 | frame++; | 579 | frame++; |