mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
!= UUID.Zero is slow
This commit is contained in:
@@ -477,7 +477,7 @@ namespace OpenSim.Groups
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemID != UUID.Zero && ownerID != UUID.Zero)
|
||||
if (!itemID.IsZero() && !ownerID.IsZero())
|
||||
{
|
||||
item = scene.InventoryService.GetItem(ownerID, itemID);
|
||||
if(item != null)
|
||||
@@ -927,7 +927,7 @@ namespace OpenSim.Groups
|
||||
UUID groupID = m_groupData.CreateGroup(remoteClient.AgentId, name, charter, showInList, insigniaID, membershipFee, openEnrollment,
|
||||
allowPublish, maturePublish, remoteClient.AgentId, out reason);
|
||||
|
||||
if (groupID != UUID.Zero)
|
||||
if (!groupID.IsZero())
|
||||
{
|
||||
if (money != null && money.GroupCreationCharge > 0)
|
||||
money.ApplyCharge(remoteClient.AgentId, money.GroupCreationCharge, MoneyTransactionType.GroupCreate, name);
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace OpenSim.Groups
|
||||
|
||||
public ExtendedGroupRecord GetGroupRecord(string RequestingAgentID, UUID GroupID, string GroupName)
|
||||
{
|
||||
if (GroupID != UUID.Zero)
|
||||
if (!GroupID.IsZero())
|
||||
return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupID);
|
||||
else if (GroupName != null)
|
||||
return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupName);
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Groups
|
||||
{
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
sendData["AgentID"] = AgentID;
|
||||
if (GroupID != UUID.Zero)
|
||||
if (!GroupID.IsZero())
|
||||
sendData["GroupID"] = GroupID.ToString();
|
||||
sendData["RequestingAgentID"] = RequestingAgentID;
|
||||
Dictionary<string, object> ret = MakeRequest("GETMEMBERSHIP", sendData);
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace OpenSim.Groups
|
||||
|
||||
}
|
||||
|
||||
if (grec.GroupID != UUID.Zero)
|
||||
if (!grec.GroupID.IsZero())
|
||||
{
|
||||
grec = m_GroupsService.GetGroupRecord(RequestingAgentID, grec.GroupID);
|
||||
if (grec == null)
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace OpenSim.Groups
|
||||
if (group == null)
|
||||
return UUID.Zero;
|
||||
|
||||
if (group.GroupID != UUID.Zero)
|
||||
if (!group.GroupID.IsZero())
|
||||
{
|
||||
m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT);
|
||||
m_Cache.Remove("memberships-" + RequestingAgentID.ToString());
|
||||
@@ -101,7 +101,7 @@ namespace OpenSim.Groups
|
||||
//ExtendedGroupRecord group = m_GroupsService.UpdateGroup(RequestingAgentID, groupID, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish);
|
||||
ExtendedGroupRecord group = d();
|
||||
|
||||
if (group != null && group.GroupID != UUID.Zero)
|
||||
if (group != null && !group.GroupID.IsZero())
|
||||
m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT);
|
||||
|
||||
return true;
|
||||
@@ -115,10 +115,10 @@ namespace OpenSim.Groups
|
||||
object group = null;
|
||||
bool firstCall = false;
|
||||
string cacheKey = "group-";
|
||||
if (GroupID != UUID.Zero)
|
||||
cacheKey += GroupID.ToString();
|
||||
else
|
||||
if (GroupID.IsZero())
|
||||
cacheKey += GroupName;
|
||||
else
|
||||
cacheKey += GroupID.ToString();
|
||||
|
||||
//m_log.DebugFormat("[XXX]: GetGroupRecord {0}", cacheKey);
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ namespace OpenSim.Groups
|
||||
if (rdata != null)
|
||||
foreach (RoleMembershipData r in rdata)
|
||||
{
|
||||
if (r.RoleID != UUID.Zero)
|
||||
if (!r.RoleID.IsZero())
|
||||
{
|
||||
newRoleID = r.RoleID;
|
||||
break;
|
||||
@@ -837,7 +837,7 @@ namespace OpenSim.Groups
|
||||
_AddAgentToGroupRole(RequestingAgentID, AgentID, GroupID, UUID.Zero);
|
||||
|
||||
// Add principal to role, if different from everyone role
|
||||
if (RoleID != UUID.Zero)
|
||||
if (!RoleID.IsZero())
|
||||
_AddAgentToGroupRole(RequestingAgentID, AgentID, GroupID, RoleID);
|
||||
|
||||
// Make this the active group
|
||||
|
||||
Reference in New Issue
Block a user