add npc create option OS_NPC_OBJECT_GROUP. with it the npc will be created with the group of the object with the script, if that object owner is member of that group. This should allow parcel access by group to work now, and not much else. The groupTitle will also be set, it the region option NoNPCGroup is not active.

This commit is contained in:
UbitUmarov
2016-01-01 23:41:25 +00:00
parent f8f28311bf
commit ee15c51ba4
4 changed files with 122 additions and 87 deletions

View File

@@ -64,6 +64,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
private UUID m_uuid = UUID.Random();
private readonly Scene m_scene;
private readonly UUID m_ownerID;
private UUID m_hostGroupID;
public List<uint> SelectedObjects {get; private set;}
@@ -77,6 +78,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
m_scene = scene;
m_ownerID = ownerID;
SenseAsAgent = senseAsAgent;
m_hostGroupID = UUID.Zero;
}
public NPCAvatar(
@@ -89,6 +91,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
m_scene = scene;
m_ownerID = ownerID;
SenseAsAgent = senseAsAgent;
m_hostGroupID = UUID.Zero;
}
public IScene Scene
@@ -576,7 +579,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
}
public UUID ActiveGroupId
{
get { return UUID.Zero; }
get { return m_hostGroupID; }
set { m_hostGroupID = value; }
}
public string ActiveGroupName
@@ -591,7 +595,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public bool IsGroupMember(UUID groupID)
{
return false;
return (m_hostGroupID == groupID);
}
public ulong GetGroupPowers(UUID groupID)