Setting precise date of creation in NPC's profile.

Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
melanie
Mandarinka Tasty 2016-12-10 21:15:22 +01:00 committed by UbitUmarov
parent 96bdc5e185
commit 5b7986e6be
4 changed files with 11 additions and 1 deletions

View File

@ -1009,7 +1009,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
if (p != null && p.isNPC)
{
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977",
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
UUID.Zero, UUID.Zero, "", UUID.Zero);
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",

View File

@ -59,6 +59,7 @@ namespace OpenSim.Region.Framework.Interfaces
UUID ActiveGroupId { get; set; }
UUID Owner { get; }
string profileAbout { get; set; }
string Born { get; set; }
}
public interface INPCModule

View File

@ -70,6 +70,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
private readonly UUID m_ownerID;
private UUID m_hostGroupID;
private string m_profileAbout = "";
private string m_born;
public List<uint> SelectedObjects {get; private set;}
public NPCAvatar(
@ -611,6 +612,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
set { }
}
public string Born
{
get { return m_born; }
set { m_born = value; }
}
public bool IsGroupMember(UUID groupID)
{
return (m_hostGroupID == groupID);

View File

@ -168,6 +168,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
AvatarAppearance appearance)
{
NPCAvatar npcAvatar = null;
string born = DateTime.UtcNow.ToString();
try
{
@ -222,6 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
ScenePresence sp;
if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
{
npcAvatar.Born = born;
npcAvatar.ActiveGroupId = groupID;
sp.CompleteMovement(npcAvatar, false);
sp.Grouptitle = groupTitle;