本文整理汇总了C#中Server.Items.MegaSpawner.ConvertOldSettings方法的典型用法代码示例。如果您正苦于以下问题:C# MegaSpawner.ConvertOldSettings方法的具体用法?C# MegaSpawner.ConvertOldSettings怎么用?C# MegaSpawner.ConvertOldSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.MegaSpawner
的用法示例。
在下文中一共展示了MegaSpawner.ConvertOldSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
//.........这里部分代码省略.........
case Setting.AddContainer:
{
List.Add( reader.ReadString() );
List.Add( reader.ReadInt() );
List.Add( reader.ReadString() );
List.Add( reader.ReadInt() );
List.Add( reader.ReadInt() );
int settingCount = reader.ReadInt();
for ( int j = 6; j < settingCount; j++ )
{
ArrayList ItemsList = new ArrayList();
ItemsList.Add( reader.ReadString() );
ItemsList.Add( reader.ReadInt() );
ItemsList.Add( reader.ReadInt() );
List.Add( ItemsList );
}
break;
}
}
megaSpawner.SettingsList.Add( List );
}
}
else
{
for ( int i = 0; i < settingsCount; i++ )
megaSpawner.SettingsList.Add( reader.ReadString() );
megaSpawner.ConvertOldSettings();
}
}
if ( megaSpawner.Workspace )
{
megaSpawner.Delete();
}
else
{
megaSpawner.MoveToWorld( location, map );
megaSpawner.Start();
if ( megaSpawner.Imported != "" )
MC.FileImportAdd( megaSpawner.Imported, megaSpawner.ImportVersion );
megaSpawner.CompileSettings();
megaSpawner.CheckEntryErrors();
megaSpawner.SettingsList.Sort( new MC.SettingsSorter() );
if ( megaSpawner.OverrideIndividualEntries )
{
for ( int i = 0; i < megaSpawner.OverrideAmount; i++ )
{
megaSpawner.OverrideRespawnEntryList.Add( "" );
megaSpawner.OverrideRespawnTimeList.Add( 0 );
megaSpawner.OverrideSpawnCounterList.Add( DateTime.Now );
megaSpawner.OverrideSpawnTimeList.Add( 0 );
megaSpawner.OverrideDespawnTimeList.Add( 0 );
}
}
else
示例2: ImportMegaSpawner
//.........这里部分代码省略.........
{
foreach ( XmlElement contItem in contList.GetElementsByTagName( "ContainerItem" ) )
{
ArrayList ItemsList = new ArrayList();
try{ ItemsList.Add( GetInnerText( contItem["AddItem"] ) ); }
catch{ errors++; totalErrors++; }
try{ ItemsList.Add( int.Parse( GetInnerText( contItem["MinStackAmount"] ) ) ); }
catch{ errors++; totalErrors++; }
try{ ItemsList.Add( int.Parse( GetInnerText( contItem["MaxStackAmount"] ) ) ); }
catch{ errors++; totalErrors++; }
List.Add( ItemsList );
}
}
catch{}
if ( err == errors )
megaSpawner.SettingsList.Add( List );
}
}
catch{}
}
else
{
foreach ( XmlElement setting in settingsList.GetElementsByTagName( "Setting" ) )
{
try{ megaSpawner.SettingsList.Add( setting.InnerText ); }
catch{ errors++; totalErrors++; }
}
megaSpawner.ConvertOldSettings();
}
}
if ( errors > 0 )
{
megaSpawner.Delete();
amountOfSpawners--;
}
else
{
megaSpawner.MoveToWorld( location, map );
if ( location.Z == -999 )
megaSpawner.Location = GetLocation( megaSpawner, location );
if ( megaSpawner.Location.Z == -999 )
{
megaSpawner.Delete();
amountOfSpawners--;
autoFailures++;
return;
}
megaSpawner.CheckDupedSettings();
megaSpawner.CompileSettings();
megaSpawner.SettingsList.Sort( new MC.SettingsSorter() );
if ( megaSpawner.OverrideIndividualEntries )