本文整理汇总了C#中Server.Items.MegaSpawner.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# MegaSpawner.Delete方法的具体用法?C# MegaSpawner.Delete怎么用?C# MegaSpawner.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.MegaSpawner
的用法示例。
在下文中一共展示了MegaSpawner.Delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
//.........这里部分代码省略.........
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
{
for ( int i = 0; i < megaSpawner.EntryList.Count; i++ )
{
ArrayList respawnEntryList = new ArrayList();
ArrayList respawnTimeList = new ArrayList();
ArrayList spawnCounterList = new ArrayList();
示例2: Importv1
//.........这里部分代码省略.........
megaSpawner.GroupSpawnList.Add( (bool) false ); // Group Spawn List
megaSpawner.MinStackAmountList.Add( 0 );
megaSpawner.MaxStackAmountList.Add( 0 );
megaSpawner.MovableList.Add( (bool) true );
megaSpawner.MinDespawnList.Add( 1800 );
megaSpawner.MaxDespawnList.Add( 3600 );
megaSpawner.DespawnList.Add( (bool) false );
megaSpawner.DespawnGroupList.Add( (bool) false );
megaSpawner.DespawnTimeExpireList.Add( (bool) true );
ArrayList respawnEntryList = new ArrayList();
ArrayList respawnTimeList = new ArrayList();
ArrayList spawnCounterList = new ArrayList();
ArrayList spawnTimeList = new ArrayList();
ArrayList respawnOnSaveList = new ArrayList();
ArrayList despawnTimeList = new ArrayList();
for ( int j = 0; j < (int) megaSpawner.AmountList[cnt]; j++ )
{
respawnEntryList.Add( (string) megaSpawner.EntryList[cnt] );
respawnTimeList.Add( 0 );
spawnCounterList.Add( DateTime.Now );
spawnTimeList.Add( 0 );
respawnOnSaveList.Add( (bool) false );
despawnTimeList.Add( 0 );
}
megaSpawner.RespawnEntryList.Add( respawnEntryList );
megaSpawner.RespawnTimeList.Add( respawnTimeList );
megaSpawner.SpawnCounterList.Add( spawnCounterList );
megaSpawner.SpawnTimeList.Add( spawnTimeList );
megaSpawner.RespawnOnSaveList.Add( respawnOnSaveList );
megaSpawner.DespawnTimeList.Add( despawnTimeList );
megaSpawner.SpawnedEntries.Add( new ArrayList() );
megaSpawner.LastMovedList.Add( new ArrayList() );
}
if ( errors > 0 )
{
megaSpawner.Delete();
amountOfSpawners--;
}
else
{
SpawnerList.Add( megaSpawner );
megaSpawner.MoveToWorld( new Point3D( locX, locY, locZ ), spawnerMap );
if ( megaSpawner.Active )
{
megaSpawner.Start();
megaSpawner.Respawn();
}
HideSpawnerList.Add( (bool) false );
MSGCheckBoxesList.Add( (bool) false );
MC.FileImportAdd( megaSpawner.Imported, megaSpawner.ImportVersion );
}
}
r.Close();
TimeSpan finishTime = DateTime.Now - beginTime;
MessagesTitle = "Import Spawners";
if ( amountOfSpawners > 0 )
{
Messages = String.Format( "File type identified as a Mega Spawner v1 file. {0} Mega Spawner{1} imported. The process took {2} second{3}.", amountOfSpawners, amountOfSpawners == 1 ? "" : "s", (int) finishTime.TotalSeconds, (int) finishTime.TotalSeconds == 1 ? "" : "s" );
}
else
{
Messages = String.Format( "File type identified as a Mega Spawner v1 file. No Mega Spawners were imported due to errors in the file. The process took {0} second{1}.", (int) finishTime.TotalSeconds, (int) finishTime.TotalSeconds == 1 ? "" : "s" );
MC.FileImportRemove( CropDirectory( fileName ) );
}
DateTime beginDupeTime = DateTime.Now;
Messages = DupeSpawnerCheck( SpawnerList, Messages );
TimeSpan finishDupeTime = DateTime.Now - beginDupeTime;
Messages = String.Format( "{0} The duped spawner check process took {1} second{2}.", Messages, (int) finishDupeTime.TotalSeconds, (int) finishDupeTime.TotalSeconds == 1 ? "" : "s" );
if ( totalErrors > 0 )
Messages = String.Format( "{0} {1} error{2} been detected.", Messages, totalErrors, totalErrors == 1 ? " has" : "s have" );
MC.CheckFileImportList( fileName );
ArgsList[2] = MessagesTitle;
ArgsList[4] = Messages;
ArgsList[6] = HideSpawnerList;
ArgsList[13] = MSGCheckBoxesList;
mobile.CloseGump( typeof ( LoadFileGump ) );
mobile.SendGump( new FileMenuGump( mobile, ArgsList ) );
}
示例3: SpawnerCompare
public static int SpawnerCompare( MegaSpawner fromCompare, MegaSpawner toCompare, bool delete )
{
if ( !ListCompare( fromCompare.EntryList, toCompare.EntryList ) )
return 0;
if ( !ListCompare( fromCompare.SpawnRangeList, toCompare.SpawnRangeList ) )
return 0;
if ( !ListCompare( fromCompare.WalkRangeList, toCompare.WalkRangeList ) )
return 0;
if ( !ListCompare( fromCompare.AmountList, toCompare.AmountList ) )
return 0;
if ( !ListCompare( fromCompare.MinDelayList, toCompare.MinDelayList ) )
return 0;
if ( !ListCompare( fromCompare.MaxDelayList, toCompare.MaxDelayList ) )
return 0;
if ( !ListCompare( fromCompare.SpawnTypeList, toCompare.SpawnTypeList ) )
return 0;
if ( !ListCompare( fromCompare.ActivatedList, toCompare.ActivatedList ) )
return 0;
if ( !ListCompare( fromCompare.EventRangeList, toCompare.EventRangeList ) )
return 0;
if ( !ListCompare( fromCompare.EventKeywordList, toCompare.EventKeywordList ) )
return 0;
if ( !ListCompare( fromCompare.KeywordCaseSensitiveList, toCompare.KeywordCaseSensitiveList ) )
return 0;
if ( !ListCompare( fromCompare.EventAmbushList, toCompare.EventAmbushList ) )
return 0;
if ( !ListCompare( fromCompare.BeginTimeBasedList, toCompare.BeginTimeBasedList ) )
return 0;
if ( !ListCompare( fromCompare.EndTimeBasedList, toCompare.EndTimeBasedList ) )
return 0;
if ( !ListCompare( fromCompare.GroupSpawnList, toCompare.GroupSpawnList ) )
return 0;
if ( !ListCompare( fromCompare.MinStackAmountList, toCompare.MinStackAmountList ) )
return 0;
if ( !ListCompare( fromCompare.MaxStackAmountList, toCompare.MaxStackAmountList ) )
return 0;
if ( !ListCompare( fromCompare.MovableList, toCompare.MovableList ) )
return 0;
if ( !ListCompare( fromCompare.MinDespawnList, toCompare.MinDespawnList ) )
return 0;
if ( !ListCompare( fromCompare.MaxDespawnList, toCompare.MaxDespawnList ) )
return 0;
if ( !ListCompare( fromCompare.DespawnList, toCompare.DespawnList ) )
return 0;
if ( !ListCompare( fromCompare.DespawnGroupList, toCompare.DespawnGroupList ) )
return 0;
if ( !ListCompare( fromCompare.DespawnTimeExpireList, toCompare.DespawnTimeExpireList ) )
return 0;
if ( !ListCompare( fromCompare.SettingsList, toCompare.SettingsList ) )
return 0;
if ( delete )
toCompare.Delete();
return 1;
}
示例4: ImportMegaSpawner
//.........这里部分代码省略.........
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 )
{
for ( int i = 0; i < megaSpawner.OverrideAmount; i++ )
{
megaSpawner.OverrideRespawnEntryList.Add( "" );
megaSpawner.OverrideRespawnTimeList.Add( 0 );
megaSpawner.OverrideSpawnCounterList.Add( DateTime.Now );