replace godlevel compares by the new faster bool isViewerUIGod

This commit is contained in:
UbitUmarov
2017-01-07 18:41:46 +00:00
parent 5bcb1c0e72
commit effa32cfa4
8 changed files with 13 additions and 13 deletions

View File

@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
fromPos = avatar.AbsolutePosition;
fromName = avatar.Name;
fromID = c.Sender.AgentId;
if (avatar.GodController.GodLevel >= 200)
if (avatar.isViewerUIGod)
{ // let gods speak to outside or things may get confusing
fromNamePrefix = m_adminPrefix;
checkParcelHide = false;
@@ -305,7 +305,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
{
if (checkParcelHide)
{
if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodController.GodLevel < 200)
if (sourceParcelID != Presencecheck.LandData.GlobalID && !presence.isViewerUIGod)
return;
}
if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true)

View File

@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
// If we're in god mode, we reverse the meaning. Offer
// calling card becomes "Take a calling card" for that
// person, no matter if they agree or not.
if (sp.GodController.GodLevel >= 200)
if (sp.isViewerUIGod)
{
CreateCallingCard(client.AgentId, destID, UUID.Zero, true);
return;

View File

@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
sp.GrantGodlikePowers(token, godLike);
if (godLike && sp.GodController.GodLevel < 200 && DialogModule != null)
if (godLike && !sp.isViewerUIGod && DialogModule != null)
DialogModule.SendAlertToUser(agentID, "Request for god powers denied");
}

View File

@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
GridInstantMessage m;
if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodController.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid)))
if (scene.Permissions.IsAdministrator(client.AgentId) && presence.isViewerUIGod && (!scene.Permissions.IsAdministrator(targetid)))
{
m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid,