diff options
author | UbitUmarov | 2017-01-07 21:05:12 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-07 21:05:12 +0000 |
commit | 694720d7a98c3864abdb8e5062aa644e432bc1f6 (patch) | |
tree | 1e42a0cc41df1d626852e85f0b129e813d6ab315 /OpenSim/Region/CoreModules/Avatar | |
parent | Merge branch 'master' into httptests (diff) | |
parent | Correct casing on isGod and isViewerUIGod (diff) | |
download | opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.zip opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.gz opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.bz2 opensim-SC-694720d7a98c3864abdb8e5062aa644e432bc1f6.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
6 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 0826a08..fb408a4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -364,7 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
364 | return false; | 364 | return false; |
365 | 365 | ||
366 | // npcs dont have baked cache | 366 | // npcs dont have baked cache |
367 | if (((ScenePresence)sp).isNPC) | 367 | if (((ScenePresence)sp).IsNPC) |
368 | return true; | 368 | return true; |
369 | 369 | ||
370 | // uploaded baked textures will be in assets local cache | 370 | // uploaded baked textures will be in assets local cache |
@@ -507,7 +507,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
507 | { | 507 | { |
508 | int hits = 0; | 508 | int hits = 0; |
509 | 509 | ||
510 | if (((ScenePresence)sp).isNPC) | 510 | if (((ScenePresence)sp).IsNPC) |
511 | return true; | 511 | return true; |
512 | 512 | ||
513 | lock (m_setAppearanceLock) | 513 | lock (m_setAppearanceLock) |
@@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
701 | 701 | ||
702 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) | 702 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) |
703 | { | 703 | { |
704 | if (((ScenePresence)sp).isNPC) | 704 | if (((ScenePresence)sp).IsNPC) |
705 | return 0; | 705 | return 0; |
706 | 706 | ||
707 | int texturesRebaked = 0; | 707 | int texturesRebaked = 0; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index adf5c68..ea90185 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
229 | fromPos = avatar.AbsolutePosition; | 229 | fromPos = avatar.AbsolutePosition; |
230 | fromName = avatar.Name; | 230 | fromName = avatar.Name; |
231 | fromID = c.Sender.AgentId; | 231 | fromID = c.Sender.AgentId; |
232 | if (avatar.GodController.GodLevel >= 200) | 232 | if (avatar.IsViewerUIGod) |
233 | { // let gods speak to outside or things may get confusing | 233 | { // let gods speak to outside or things may get confusing |
234 | fromNamePrefix = m_adminPrefix; | 234 | fromNamePrefix = m_adminPrefix; |
235 | checkParcelHide = false; | 235 | checkParcelHide = false; |
@@ -305,7 +305,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
305 | { | 305 | { |
306 | if (checkParcelHide) | 306 | if (checkParcelHide) |
307 | { | 307 | { |
308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodController.GodLevel < 200) | 308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && !presence.IsViewerUIGod) |
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) | 311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs index 9843f2e..4a55a7e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
118 | // If we're in god mode, we reverse the meaning. Offer | 118 | // If we're in god mode, we reverse the meaning. Offer |
119 | // calling card becomes "Take a calling card" for that | 119 | // calling card becomes "Take a calling card" for that |
120 | // person, no matter if they agree or not. | 120 | // person, no matter if they agree or not. |
121 | if (sp.GodController.GodLevel >= 200) | 121 | if (sp.IsViewerUIGod) |
122 | { | 122 | { |
123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); | 123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); |
124 | return; | 124 | return; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 8116b3c..f699c0c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
165 | UUID agentID, UUID sessionID, UUID token, bool godLike) | 165 | UUID agentID, UUID sessionID, UUID token, bool godLike) |
166 | { | 166 | { |
167 | ScenePresence sp = m_scene.GetScenePresence(agentID); | 167 | ScenePresence sp = m_scene.GetScenePresence(agentID); |
168 | if(sp == null || sp.IsDeleted || sp.isNPC) | 168 | if(sp == null || sp.IsDeleted || sp.IsNPC) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | if (sessionID != sp.ControllingClient.SessionId) | 171 | if (sessionID != sp.ControllingClient.SessionId) |
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
173 | 173 | ||
174 | sp.GrantGodlikePowers(token, godLike); | 174 | sp.GrantGodlikePowers(token, godLike); |
175 | 175 | ||
176 | if (godLike && sp.GodController.GodLevel < 200 && DialogModule != null) | 176 | if (godLike && !sp.IsViewerUIGod && DialogModule != null) |
177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); | 177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
178 | } | 178 | } |
179 | 179 | ||
@@ -194,14 +194,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
194 | int godlevel = 200; | 194 | int godlevel = 200; |
195 | // update level so higher gods can kick lower ones | 195 | // update level so higher gods can kick lower ones |
196 | ScenePresence god = m_scene.GetScenePresence(godID); | 196 | ScenePresence god = m_scene.GetScenePresence(godID); |
197 | if(god != null && god.GodController.EffectiveLevel > godlevel) | 197 | if(god != null && god.GodController.GodLevel > godlevel) |
198 | godlevel = god.GodController.EffectiveLevel; | 198 | godlevel = god.GodController.GodLevel; |
199 | 199 | ||
200 | if(agentID == ALL_AGENTS) | 200 | if(agentID == ALL_AGENTS) |
201 | { | 201 | { |
202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) | 202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) |
203 | { | 203 | { |
204 | if (p.UUID != godID && godlevel > p.GodController.EffectiveLevel) | 204 | if (p.UUID != godID && godlevel > p.GodController.GodLevel) |
205 | doKickmodes(godID, p, kickflags, reason); | 205 | doKickmodes(godID, p, kickflags, reason); |
206 | }); | 206 | }); |
207 | return; | 207 | return; |
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | 226 | ||
227 | if (godlevel <= sp.GodController.EffectiveLevel) // no god wars | 227 | if (godlevel <= sp.GodController.GodLevel) // no god wars |
228 | return; | 228 | return; |
229 | 229 | ||
230 | if(sp.UUID == godID) | 230 | if(sp.UUID == godID) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index bd95ff0..6f79676 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
169 | 169 | ||
170 | GridInstantMessage m; | 170 | GridInstantMessage m; |
171 | 171 | ||
172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodController.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid))) | 172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.IsViewerUIGod && (!scene.Permissions.IsAdministrator(targetid))) |
173 | { | 173 | { |
174 | m = new GridInstantMessage(scene, client.AgentId, | 174 | m = new GridInstantMessage(scene, client.AgentId, |
175 | client.FirstName+" "+client.LastName, targetid, | 175 | client.FirstName+" "+client.LastName, targetid, |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 138c0f7..bc8aeca 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
356 | return; | 356 | return; |
357 | 357 | ||
358 | ScenePresence p = FindPresence(targetID); | 358 | ScenePresence p = FindPresence(targetID); |
359 | if (p != null && p.isNPC) | 359 | if (p != null && p.IsNPC) |
360 | { | 360 | { |
361 | remoteClient.SendAvatarClassifiedReply(targetID, classifieds); | 361 | remoteClient.SendAvatarClassifiedReply(targetID, classifieds); |
362 | return; | 362 | return; |
@@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
751 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); | 751 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); |
752 | 752 | ||
753 | ScenePresence p = FindPresence(targetId); | 753 | ScenePresence p = FindPresence(targetId); |
754 | if (p != null && p.isNPC) | 754 | if (p != null && p.IsNPC) |
755 | { | 755 | { |
756 | remoteClient.SendAvatarPicksReply(targetId, picks); | 756 | remoteClient.SendAvatarPicksReply(targetId, picks); |
757 | return; | 757 | return; |
@@ -1165,7 +1165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1165 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) | 1165 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) |
1166 | { | 1166 | { |
1167 | ScenePresence p = FindPresence(queryTargetID); | 1167 | ScenePresence p = FindPresence(queryTargetID); |
1168 | if (p != null && p.isNPC) | 1168 | if (p != null && p.IsNPC) |
1169 | { | 1169 | { |
1170 | remoteClient.SendAgentAlertMessage( | 1170 | remoteClient.SendAgentAlertMessage( |
1171 | "Notes for NPCs not available", false); | 1171 | "Notes for NPCs not available", false); |
@@ -1329,7 +1329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | ScenePresence p = FindPresence(avatarID); | 1331 | ScenePresence p = FindPresence(avatarID); |
1332 | if (p != null && p.isNPC) | 1332 | if (p != null && p.IsNPC) |
1333 | { | 1333 | { |
1334 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, | 1334 | remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, |
1335 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10, | 1335 | Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10, |