diff options
author | UbitUmarov | 2019-09-15 16:49:58 +0100 |
---|---|---|
committer | UbitUmarov | 2019-09-15 16:49:58 +0100 |
commit | 63b0bd7f6b6b110a565cdb0e2e896d473c096a76 (patch) | |
tree | 27b24cebc63179be67a53098692016289b2ecfee /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | allow particles scale max to be 7.96m, supported by protocol (diff) | |
download | opensim-SC-63b0bd7f6b6b110a565cdb0e2e896d473c096a76.zip opensim-SC-63b0bd7f6b6b110a565cdb0e2e896d473c096a76.tar.gz opensim-SC-63b0bd7f6b6b110a565cdb0e2e896d473c096a76.tar.bz2 opensim-SC-63b0bd7f6b6b110a565cdb0e2e896d473c096a76.tar.xz |
fix saving appearence to notecard, so they can work on older regions
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ebd281e..a4d873e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3456,10 +3456,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3456 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); | 3456 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); |
3457 | } | 3457 | } |
3458 | 3458 | ||
3459 | public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard) | 3459 | public LSL_Key osAgentSaveAppearance(LSL_Key avatarKey, string notecard) |
3460 | { | 3460 | { |
3461 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance"); | 3461 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance"); |
3462 | 3462 | ||
3463 | UUID avatarId; | ||
3464 | if (!UUID.TryParse(avatarKey, out avatarId)) | ||
3465 | return new LSL_Key(UUID.Zero.ToString()); | ||
3466 | |||
3463 | return SaveAppearanceToNotecard(avatarId, notecard); | 3467 | return SaveAppearanceToNotecard(avatarId, notecard); |
3464 | } | 3468 | } |
3465 | 3469 | ||
@@ -3470,8 +3474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3470 | if (appearanceModule != null) | 3474 | if (appearanceModule != null) |
3471 | { | 3475 | { |
3472 | appearanceModule.SaveBakedTextures(sp.UUID); | 3476 | appearanceModule.SaveBakedTextures(sp.UUID); |
3473 | EntityTransferContext ctx = new EntityTransferContext(); | 3477 | OSDMap appearancePacked = sp.Appearance.PackForNotecard(); |
3474 | OSDMap appearancePacked = sp.Appearance.Pack(ctx); | ||
3475 | 3478 | ||
3476 | TaskInventoryItem item | 3479 | TaskInventoryItem item |
3477 | = SaveNotecard(notecard, "Avatar Appearance", Util.GetFormattedXml(appearancePacked as OSD), true); | 3480 | = SaveNotecard(notecard, "Avatar Appearance", Util.GetFormattedXml(appearancePacked as OSD), true); |
@@ -3494,15 +3497,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3494 | return SaveAppearanceToNotecard(sp, notecard); | 3497 | return SaveAppearanceToNotecard(sp, notecard); |
3495 | } | 3498 | } |
3496 | 3499 | ||
3497 | protected LSL_Key SaveAppearanceToNotecard(LSL_Key rawAvatarId, string notecard) | ||
3498 | { | ||
3499 | UUID avatarId; | ||
3500 | if (!UUID.TryParse(rawAvatarId, out avatarId)) | ||
3501 | return new LSL_Key(UUID.Zero.ToString()); | ||
3502 | |||
3503 | return SaveAppearanceToNotecard(avatarId, notecard); | ||
3504 | } | ||
3505 | |||
3506 | /// <summary> | 3500 | /// <summary> |
3507 | /// Get the gender as specified in avatar appearance for a given avatar key | 3501 | /// Get the gender as specified in avatar appearance for a given avatar key |
3508 | /// </summary> | 3502 | /// </summary> |