mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -37,6 +37,21 @@ namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public interface IAvatarService
|
||||
{
|
||||
/// <summary>
|
||||
/// Called by the login service
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <returns></returns>
|
||||
AvatarAppearance GetAppearance(UUID userID);
|
||||
|
||||
/// <summary>
|
||||
/// Called by everyone who can change the avatar data (so, regions)
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="appearance"></param>
|
||||
/// <returns></returns>
|
||||
bool SetAppearance(UUID userID, AvatarAppearance appearance);
|
||||
|
||||
/// <summary>
|
||||
/// Called by the login service
|
||||
/// </summary>
|
||||
@@ -217,23 +232,26 @@ namespace OpenSim.Services.Interfaces
|
||||
foreach (KeyValuePair<string, string> _kvp in Data)
|
||||
if (_kvp.Key.StartsWith("_ap_"))
|
||||
attchs[_kvp.Key] = _kvp.Value;
|
||||
Hashtable aaAttachs = new Hashtable();
|
||||
|
||||
foreach (KeyValuePair<string, string> _kvp in attchs)
|
||||
{
|
||||
string pointStr = _kvp.Key.Substring(4);
|
||||
int point = 0;
|
||||
if (!Int32.TryParse(pointStr, out point))
|
||||
continue;
|
||||
Hashtable tmp = new Hashtable();
|
||||
|
||||
UUID uuid = UUID.Zero;
|
||||
UUID.TryParse(_kvp.Value, out uuid);
|
||||
tmp["item"] = uuid;
|
||||
tmp["asset"] = UUID.Zero.ToString();
|
||||
aaAttachs[point] = tmp;
|
||||
|
||||
appearance.SetAttachment(point,uuid,UUID.Zero);
|
||||
}
|
||||
appearance.SetAttachments(aaAttachs);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
// We really should report something here, returning null
|
||||
// will at least break the wrapper
|
||||
return null;
|
||||
}
|
||||
|
||||
return appearance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user