當前位置: 首頁>>代碼示例>>C#>>正文


C# MegaSpawner.CheckDupedSettings方法代碼示例

本文整理匯總了C#中Server.Items.MegaSpawner.CheckDupedSettings方法的典型用法代碼示例。如果您正苦於以下問題:C# MegaSpawner.CheckDupedSettings方法的具體用法?C# MegaSpawner.CheckDupedSettings怎麽用?C# MegaSpawner.CheckDupedSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Items.MegaSpawner的用法示例。


在下文中一共展示了MegaSpawner.CheckDupedSettings方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ImportMegaSpawner


//.........這裏部分代碼省略.........
                            }
                        }
                        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 );
                            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();
                            ArrayList spawnTimeList = new ArrayList();
                            ArrayList respawnOnSaveList = new ArrayList();
                            ArrayList despawnTimeList = new ArrayList();

                            for ( int j = 0; j < (int) megaSpawner.AmountList[i]; j++ )
                            {
                                respawnEntryList.Add( (string) megaSpawner.EntryList[i] );
                                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() );
                        }
                    }

                    SpawnerList.Add( megaSpawner );

                    if ( megaSpawner.Active )
                    {
                        megaSpawner.Respawn();
                    }

                    HideSpawnerList.Add( (bool) false );
                    MSGCheckBoxesList.Add( (bool) false );

                    MC.FileImportAdd( megaSpawner.Imported, megaSpawner.ImportVersion );
                }
            }
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:101,代碼來源:LoadFileGump.cs


注:本文中的Server.Items.MegaSpawner.CheckDupedSettings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。