Exemple #1
0
        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);
        }
        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);
                        }
                    }
                }
            }
        }
Exemple #3
0
 public static void Init(TestContext testContext)
 {
     Setup.EnsureBasicSetup();
     FactionMgr.Initialize();
     ArchetypeMgr.EnsureInitialize();
 }