Merge commit 'c4efb97d49dec736151dfa3fa102efe6a5f6fbab' into bigmerge

avinationmerge
Melanie 2011-10-11 21:22:58 +01:00
commit 9d22110c23
12 changed files with 362 additions and 148 deletions

View File

@ -467,7 +467,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return; return;
} }
// m_log.WarnFormat("[AVFACTORY]: Received request for wearables of {0}", client.AgentId); // m_log.DebugFormat("[AVFACTORY]: Received request for wearables of {0}", client.Name);
client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++);
} }

View File

@ -1265,6 +1265,7 @@ namespace OpenSim.Region.Framework.Scenes
first, last); first, last);
m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", first, last); m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", first, last);
m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; m_regInfo.EstateSettings.EstateOwner = account.PrincipalID;

View File

@ -28,15 +28,15 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using log4net;
using Nini.Config; using Nini.Config;
using OpenMetaverse;
using OpenSim.Data; using OpenSim.Data;
using OpenSim.Framework;
using OpenSim.Services.Interfaces; using OpenSim.Services.Interfaces;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using GridRegion = OpenSim.Services.Interfaces.GridRegion; using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using OpenMetaverse;
using log4net;
namespace OpenSim.Services.UserAccountService namespace OpenSim.Services.UserAccountService
{ {
public class UserAccountService : UserAccountServiceBase, IUserAccountService public class UserAccountService : UserAccountServiceBase, IUserAccountService
@ -44,10 +44,16 @@ namespace OpenSim.Services.UserAccountService
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static UserAccountService m_RootInstance; private static UserAccountService m_RootInstance;
/// <summary>
/// Should we create default entries (minimum body parts/clothing, avatar wearable entries) for a new avatar?
/// </summary>
private bool m_CreateDefaultAvatarEntries;
protected IGridService m_GridService; protected IGridService m_GridService;
protected IAuthenticationService m_AuthenticationService; protected IAuthenticationService m_AuthenticationService;
protected IGridUserService m_GridUserService; protected IGridUserService m_GridUserService;
protected IInventoryService m_InventoryService; protected IInventoryService m_InventoryService;
protected IAvatarService m_AvatarService;
public UserAccountService(IConfigSource config) public UserAccountService(IConfigSource config)
: base(config) : base(config)
@ -77,6 +83,12 @@ namespace OpenSim.Services.UserAccountService
if (invServiceDll != string.Empty) if (invServiceDll != string.Empty)
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config }); m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
string avatarServiceDll = userConfig.GetString("AvatarService", string.Empty);
if (avatarServiceDll != string.Empty)
m_AvatarService = LoadPlugin<IAvatarService>(avatarServiceDll, new Object[] { config });
m_CreateDefaultAvatarEntries = userConfig.GetBoolean("CreateDefaultAvatarEntries", false);
if (MainConsole.Instance != null) if (MainConsole.Instance != null)
{ {
MainConsole.Instance.Commands.AddCommand("UserService", false, MainConsole.Instance.Commands.AddCommand("UserService", false,
@ -102,9 +114,7 @@ namespace OpenSim.Services.UserAccountService
"show account <first> <last>", "show account <first> <last>",
"Show account details for the given user", HandleShowAccount); "Show account details for the given user", HandleShowAccount);
} }
} }
} }
#region IUserAccountService #region IUserAccountService
@ -512,12 +522,20 @@ namespace OpenSim.Services.UserAccountService
{ {
success = m_InventoryService.CreateUserInventory(account.PrincipalID); success = m_InventoryService.CreateUserInventory(account.PrincipalID);
if (!success) if (!success)
{
m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.", m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
firstName, lastName); firstName, lastName);
} }
else if (m_CreateDefaultAvatarEntries)
{
CreateDefaultAppearanceEntries(account.PrincipalID);
}
}
m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName); m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName);
} else { }
else
{
m_log.ErrorFormat("[USER ACCOUNT SERVICE]: Account creation failed for account {0} {1}", firstName, lastName); m_log.ErrorFormat("[USER ACCOUNT SERVICE]: Account creation failed for account {0} {1}", firstName, lastName);
} }
} }
@ -526,5 +544,125 @@ namespace OpenSim.Services.UserAccountService
m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName); m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName);
} }
} }
private void CreateDefaultAppearanceEntries(UUID principalID)
{
m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID);
InventoryFolderBase bodyPartsFolder = m_InventoryService.GetFolderForType(principalID, AssetType.Bodypart);
InventoryItemBase eyes = new InventoryItemBase(UUID.Random(), principalID);
eyes.AssetID = new UUID("4bb6fa4d-1cd2-498a-a84c-95c1a0e745a7");
eyes.Name = "Default Eyes";
eyes.CreatorId = principalID.ToString();
eyes.AssetType = (int)AssetType.Bodypart;
eyes.InvType = (int)InventoryType.Wearable;
eyes.Folder = bodyPartsFolder.ID;
eyes.BasePermissions = (uint)PermissionMask.All;
eyes.CurrentPermissions = (uint)PermissionMask.All;
eyes.EveryOnePermissions = (uint)PermissionMask.All;
eyes.GroupPermissions = (uint)PermissionMask.All;
eyes.NextPermissions = (uint)PermissionMask.All;
eyes.Flags = (uint)WearableType.Eyes;
m_InventoryService.AddItem(eyes);
InventoryItemBase shape = new InventoryItemBase(UUID.Random(), principalID);
shape.AssetID = AvatarWearable.DEFAULT_BODY_ASSET;
shape.Name = "Default Shape";
shape.CreatorId = principalID.ToString();
shape.AssetType = (int)AssetType.Bodypart;
shape.InvType = (int)InventoryType.Wearable;
shape.Folder = bodyPartsFolder.ID;
shape.BasePermissions = (uint)PermissionMask.All;
shape.CurrentPermissions = (uint)PermissionMask.All;
shape.EveryOnePermissions = (uint)PermissionMask.All;
shape.GroupPermissions = (uint)PermissionMask.All;
shape.NextPermissions = (uint)PermissionMask.All;
shape.Flags = (uint)WearableType.Shape;
m_InventoryService.AddItem(shape);
InventoryItemBase skin = new InventoryItemBase(UUID.Random(), principalID);
skin.AssetID = AvatarWearable.DEFAULT_SKIN_ASSET;
skin.Name = "Default Skin";
skin.CreatorId = principalID.ToString();
skin.AssetType = (int)AssetType.Bodypart;
skin.InvType = (int)InventoryType.Wearable;
skin.Folder = bodyPartsFolder.ID;
skin.BasePermissions = (uint)PermissionMask.All;
skin.CurrentPermissions = (uint)PermissionMask.All;
skin.EveryOnePermissions = (uint)PermissionMask.All;
skin.GroupPermissions = (uint)PermissionMask.All;
skin.NextPermissions = (uint)PermissionMask.All;
skin.Flags = (uint)WearableType.Skin;
m_InventoryService.AddItem(skin);
InventoryItemBase hair = new InventoryItemBase(UUID.Random(), principalID);
hair.AssetID = AvatarWearable.DEFAULT_HAIR_ASSET;
hair.Name = "Default Hair";
hair.CreatorId = principalID.ToString();
hair.AssetType = (int)AssetType.Bodypart;
hair.InvType = (int)InventoryType.Wearable;
hair.Folder = bodyPartsFolder.ID;
hair.BasePermissions = (uint)PermissionMask.All;
hair.CurrentPermissions = (uint)PermissionMask.All;
hair.EveryOnePermissions = (uint)PermissionMask.All;
hair.GroupPermissions = (uint)PermissionMask.All;
hair.NextPermissions = (uint)PermissionMask.All;
hair.Flags = (uint)WearableType.Hair;
m_InventoryService.AddItem(hair);
InventoryFolderBase clothingFolder = m_InventoryService.GetFolderForType(principalID, AssetType.Clothing);
InventoryItemBase shirt = new InventoryItemBase(UUID.Random(), principalID);
shirt.AssetID = AvatarWearable.DEFAULT_SHIRT_ASSET;
shirt.Name = "Default Shirt";
shirt.CreatorId = principalID.ToString();
shirt.AssetType = (int)AssetType.Clothing;
shirt.InvType = (int)InventoryType.Wearable;
shirt.Folder = clothingFolder.ID;
shirt.BasePermissions = (uint)PermissionMask.All;
shirt.CurrentPermissions = (uint)PermissionMask.All;
shirt.EveryOnePermissions = (uint)PermissionMask.All;
shirt.GroupPermissions = (uint)PermissionMask.All;
shirt.NextPermissions = (uint)PermissionMask.All;
shirt.Flags = (uint)WearableType.Shirt;
m_InventoryService.AddItem(shirt);
InventoryItemBase pants = new InventoryItemBase(UUID.Random(), principalID);
pants.AssetID = AvatarWearable.DEFAULT_PANTS_ASSET;
pants.Name = "Default Pants";
pants.CreatorId = principalID.ToString();
pants.AssetType = (int)AssetType.Clothing;
pants.InvType = (int)InventoryType.Wearable;
pants.Folder = clothingFolder.ID;
pants.BasePermissions = (uint)PermissionMask.All;
pants.CurrentPermissions = (uint)PermissionMask.All;
pants.EveryOnePermissions = (uint)PermissionMask.All;
pants.GroupPermissions = (uint)PermissionMask.All;
pants.NextPermissions = (uint)PermissionMask.All;
pants.Flags = (uint)WearableType.Pants;
m_InventoryService.AddItem(pants);
if (m_AvatarService != null)
{
m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default avatar entries for {0}", principalID);
AvatarWearable[] wearables = new AvatarWearable[6];
wearables[AvatarWearable.EYES] = new AvatarWearable(eyes.ID, eyes.AssetID);
wearables[AvatarWearable.BODY] = new AvatarWearable(shape.ID, shape.AssetID);
wearables[AvatarWearable.SKIN] = new AvatarWearable(skin.ID, skin.AssetID);
wearables[AvatarWearable.HAIR] = new AvatarWearable(hair.ID, hair.AssetID);
wearables[AvatarWearable.SHIRT] = new AvatarWearable(shirt.ID, shirt.AssetID);
wearables[AvatarWearable.PANTS] = new AvatarWearable(pants.ID, pants.AssetID);
AvatarAppearance ap = new AvatarAppearance();
for (int i = 0; i < 6; i++)
{
ap.SetWearable(i, wearables[i]);
}
m_AvatarService.SetAppearance(principalID, ap);
}
}
} }
} }

View File

@ -4,7 +4,7 @@
<Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66"/> <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66"/>
<Key Name="name" Value="Hair"/> <Key Name="name" Value="Hair"/>
<Key Name="assetType" Value="13" /> <Key Name="assetType" Value="13" />
<Key Name="fileName" Value="newhair.dat"/> <Key Name="fileName" Value="base_hair.dat"/>
</Section> </Section>
<Section Name="Skin"> <Section Name="Skin">
@ -34,6 +34,14 @@
<Key Name="assetType" Value="13" /> <Key Name="assetType" Value="13" />
<Key Name="fileName" Value="base_shape.dat"/> <Key Name="fileName" Value="base_shape.dat"/>
</Section> </Section>
<Section Name="Eyes">
<Key Name="assetID" Value="4bb6fa4d-1cd2-498a-a84c-95c1a0e745a7"/>
<Key Name="name" Value="Eyes"/>
<Key Name="assetType" Value="13" />
<Key Name="fileName" Value="base_eyes.dat"/>
</Section>
<!-- <!--
<Section Name="Jim Shape"> <Section Name="Jim Shape">
<Key Name="assetID" Value="66c41e39-38f9-f75a-024e-585989bfab74"/> <Key Name="assetID" Value="66c41e39-38f9-f75a-024e-585989bfab74"/>

View File

@ -0,0 +1,26 @@
LLWearable version 22
New Eyes
permissions 0
{
base_mask 7fffffff
owner_mask 7fffffff
group_mask 00000000
everyone_mask 00000000
next_owner_mask 00082000
creator_id 11111111-1111-0000-0000-000100bba000
owner_id 11111111-1111-0000-0000-000100bba000
last_owner_id 00000000-0000-0000-0000-000000000000
group_id 00000000-0000-0000-0000-000000000000
}
sale_info 0
{
sale_type not
sale_price 10
}
type 3
parameters 2
98 0
99 0
textures 1
3 6522e74d-1660-4e7f-b601-6f48c1659a77

View File

@ -0,0 +1,26 @@
LLWearable version 22
New Eyes
permissions 0
{
base_mask 7fffffff
owner_mask 7fffffff
group_mask 00000000
everyone_mask 00000000
next_owner_mask 00082000
creator_id 11111111-1111-0000-0000-000100bba000
owner_id 11111111-1111-0000-0000-000100bba000
last_owner_id 00000000-0000-0000-0000-000000000000
group_id 00000000-0000-0000-0000-000000000000
}
sale_info 0
{
sale_type not
sale_price 10
}
type 3
parameters 2
98 0
99 0
textures 1
3 6522e74d-1660-4e7f-b601-6f48c1659a77

View File

@ -1,105 +1,165 @@
LLWearable version 22 LLWearable version 22
Female Shape and Outfit 3 Shape New Shape
Created by system from avatar's appearance.
permissions 0 permissions 0
{ {
base_mask 00000000 base_mask 7fffffff
owner_mask 00000000 owner_mask 7fffffff
group_mask 00000000 group_mask 00000000
everyone_mask 00000000 everyone_mask 00000000
next_owner_mask 00000000 next_owner_mask 00082000
creator_id 11111111-1111-0000-0000-000100bba000 creator_id 11111111-1111-0000-0000-000100bba000
owner_id 11111111-1111-0000-0000-000100bba000 owner_id 11111111-1111-0000-0000-000100bba000
last_owner_id 11111111-1111-0000-0000-000100bba000 last_owner_id 00000000-0000-0000-0000-000000000000
group_id 00000000-0000-0000-0000-000000000000 group_id 00000000-0000-0000-0000-000000000000
} }
sale_info 0 sale_info 0
{ {
sale_type not sale_type not
sale_price 0 sale_price 10
} }
type 0 type 0
parameters 82 parameters 142
1 .21 1 0
2 -.5 2 0
4 -.11 4 0
5 -.1 5 0
6 -.3 6 0
7 -.4 7 0
8 -.5 8 0
10 .7 10 0
11 .34 11 0
12 -.5 12 0
13 0 13 0
14 .04 14 0
15 .58 15 0
17 .56 17 0
18 -.26 18 0
19 -.73 19 0
20 -.34 20 0
21 -.01 21 0
22 1 22 0
23 -.5 23 0
24 -.63 24 0
25 .44 25 0
27 .05 26 0
33 -.24 27 0
34 -.7 28 0
35 -.16 29 .12
36 -.2 30 .12
37 -.98 32 0
38 -.5 33 0
34 0
35 0
36 -.5
37 0
38 0
40 0
80 0 80 0
105 .07 100 0
155 -.22 104 0
105 .5
106 0
151 0
152 0
153 0
155 0
156 0
157 0 157 0
185 -1 185 0
193 .86 186 0
196 -.74 187 0
505 .65 188 0
506 .12 189 0
507 -1.5 193 .5
194 .67
195 .33
196 0
505 .5
506 0
507 0
515 0 515 0
517 .16 517 0
518 .8 518 0
629 0 626 0
627 0
629 .5
630 0
631 0
633 0
634 0
635 0
637 0 637 0
646 .4 646 0
647 1 647 0
649 .36 648 0
650 .85 649 .5
652 .49 650 0
653 -1 651 0
652 .5
653 0
655 -.08
656 0 656 0
659 .65 657 0
658 0
659 .5
660 0
661 0
662 .5 662 .5
663 0 663 0
664 0 664 0
665 0 665 0
675 -.15 675 0
676 .26 676 0
678 .28 677 0
682 .27 678 .5
683 -.19 679 -.08
684 -.09 680 -.08
681 -.08
682 .5
683 -.15
684 0
685 0 685 0
690 .45 686 0
692 .4 687 0
693 -0 688 0
753 -.5 689 0
756 -.08 690 .5
758 .24 691 0
759 .6 692 0
760 .11 693 .6
764 -.38 694 -.08
765 -.3 695 0
769 .42 753 0
773 .51 756 0
795 .16 758 0
796 .11 759 .5
799 .36 760 0
764 0
765 0
767 0
768 0
769 .5
770 0
772 0
773 .5
794 .17
795 .25
796 0
797 0
798 0
799 .5
841 0 841 0
842 -.82 842 0
843 0
853 0
854 0
855 0
879 0 879 0
880 0 880 0
1103 0
1104 0
1105 0
1200 0
1201 0
textures 0 textures 0

View File

@ -1,63 +0,0 @@
LLWearable version 22
New Hair
permissions 0
{
base_mask 7fffffff
owner_mask 7fffffff
group_mask 00000000
everyone_mask 00000000
next_owner_mask 00082000
creator_id a52db6d0-e96c-4454-85e5-3523722daa25
owner_id a52db6d0-e96c-4454-85e5-3523722daa25
last_owner_id 00000000-0000-0000-0000-000000000000
group_id 00000000-0000-0000-0000-000000000000
}
sale_info 0
{
sale_type not
sale_price 10
}
type 2
parameters 39
16 0
31 .5
112 0
113 0
114 .5
115 0
119 .5
130 .45
131 .5
132 .39
133 .25
134 .5
135 .55
136 .5
137 .5
140 0
141 0
142 0
143 .13
166 0
167 0
168 0
169 0
177 0
181 .14
182 .7
183 .05
184 0
192 0
674 -.3
750 .7
752 .5
754 0
755 .05
757 -1
762 0
763 .55
785 0
789 0
textures 1
4 7ca39b4c-bd19-4699-aff7-f93fd03d3e7b

View File

@ -430,6 +430,13 @@
<Key Name="fileName" Value="default_avatar.jp2" /> <Key Name="fileName" Value="default_avatar.jp2" />
</Section> </Section>
<Section Name="Default Iris">
<Key Name="assetID" Value="6522e74d-1660-4e7f-b601-6f48c1659a77"/>
<Key Name="name" Value="Default Iris"/>
<Key Name="assetType" Value="0" />
<Key Name="fileName" Value="default_iris.jp2" />
</Section>
<Section Name="Cypress 1"> <Section Name="Cypress 1">
<Key Name="assetID" Value="fb2ae204-3fd1-df33-594f-c9f882830e66"/> <Key Name="assetID" Value="fb2ae204-3fd1-df33-594f-c9f882830e66"/>
<Key Name="name" Value="Cypress 1"/> <Key Name="name" Value="Cypress 1"/>

Binary file not shown.

View File

@ -70,6 +70,7 @@
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
[GridUserService] [GridUserService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService" LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"

View File

@ -561,4 +561,14 @@
<Key Name="assetType" Value="0" /> <Key Name="assetType" Value="0" />
<Key Name="inventoryType" Value="0" /> <Key Name="inventoryType" Value="0" />
</Section> </Section>
<Section Name="Default Iris Texture">
<Key Name="inventoryID" Value="00000000-0000-2222-9999-000000000013"/>
<Key Name="assetID" Value="6e610cae-3b0d-4729-b482-2c31ab2e49f9"/>
<Key Name="folderID" Value="00000112-000f-0000-0000-000100bba001"/>
<Key Name="description" Value=""/>
<Key Name="name" Value="Default Iris Texture" />
<Key Name="assetType" Value="0" />
<Key Name="inventoryType" Value="0" />
</Section>
</Nini> </Nini>