コード例 #1
0
ファイル: TestAccount.cs プロジェクト: NecroSharper/WCell
        public CharacterRecord AddRecord()
        {
            var record = Setup.CreateCharRecord();

            ArchetypeMgr.EnsureInitialize();
            TestCharacter.PrepareRecord(this, record,
                                        ArchetypeMgr.GetArchetype(RaceId.Human, ClassId.Warrior), true);
            Characters.Add(record);
            return(record);
        }
コード例 #2
0
ファイル: SpellLineWriter.cs プロジェクト: NecroSharper/WCell
        public static void CreateMaps()
        {
            if (Maps != null)
            {
                return;
            }

            RealmDBMgr.Initialize();
            ContentMgr.Initialize();
            SpellHandler.LoadSpells();
            SpellHandler.Initialize2();

            World.InitializeWorld();
            World.LoadDefaultMaps();
            ArchetypeMgr.EnsureInitialize();                            // for default spells

            NPCMgr.LoadNPCDefs();                                       // for trainers

            Maps = new Dictionary <string, HashSet <Spell> > [(int)ClassId.End];

            FindTalents();
            FindAbilities();

            foreach (var spell in SpellHandler.ById)
            {
                if (spell != null && spell.Ability != null && LineSkills.Contains(spell.Ability.Skill.Id))
                {
                    AddSpell(spell, true);
                }
            }

            // remove empty lines
            foreach (var dict in Maps)
            {
                if (dict != null)
                {
                    foreach (var pair in dict.ToArray())
                    {
                        if (pair.Value.Count == 0)
                        {
                            dict.Remove(pair.Key);
                        }
                    }
                }
            }
        }
コード例 #3
0
ファイル: WhoListTest.cs プロジェクト: NecroSharper/WCell
 public static void Init(TestContext testContext)
 {
     Setup.EnsureBasicSetup();
     FactionMgr.Initialize();
     ArchetypeMgr.EnsureInitialize();
 }