Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen

This commit is contained in:
John Hurliman
2009-11-05 13:10:58 -08:00
parent e6d7303b29
commit afef1ac191
31 changed files with 105 additions and 122 deletions

View File

@@ -1483,12 +1483,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
// Create new asset
AssetBase asset = new AssetBase();
asset.Name = notecardName;
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard);
asset.Description = "Script Generated Notecard";
asset.Type = 7;
asset.FullID = UUID.Random();
string notecardData = "";
string notecardData = String.Empty;
for (int i = 0; i < contents.Length; i++) {
notecardData += contents.GetLSLStringItem(i) + "\n";