예제 #1
0
        public Loader()
        {
            Contract.Requires(DBC.DBCPath != null);

            DBC.Vehicle            = DBCReader.ReadDBC <VehicleEntry>(DBC.VehicleStrings);
            DBC.VehicleSeat        = DBCReader.ReadDBC <VehicleSeatEntry>(null);
            DBC.VehicleUIIndicator = DBCReader.ReadDBC <VehicleUIIndicatorEntry>(null);
            DBC.VehicleUIIndSeat   = DBCReader.ReadDBC <VehicleUIIndSeatEntry>(null);

            SQL.CreatureTemplate = SQLReader.LoadCreatureTemplates();
            SQL.SpellClick       = SQLReader.LoadSpellClick();
            SQL.Accessories      = SQLReader.LoadVehicleAccessories();
        }
예제 #2
0
 public DBCLoader()
 {
     try
     {
         DBCStore.DBC.Spell            = DBCReader.ReadDBC <SpellEntry>(DBCStore.DBC.SpellStrings);
         DBCStore.DBC.Map              = DBCReader.ReadDBC <MapEntry>(DBCStore.DBC.MapStrings);
         DBCStore.DBC.LFGDungeons      = DBCReader.ReadDBC <LFGDungeonsEntry>(DBCStore.DBC.LFGDungeonsStrings);
         DBCStore.DBC.BattlemasterList = DBCReader.ReadDBC <BattlemasterListEntry>(DBCStore.DBC.BattlemasterListStrings);
     }
     catch (IOException e)
     {
         Console.WriteLine("DBC loading failed at exception {0}. DBC will be disabled.", e.GetType());
         Console.WriteLine(e.Message);
         DBCStore.DBC.Enabled = false;
     }
 }
예제 #3
0
    public void Initialize()
    {
        if (Directory.Exists(@"Data\DBC"))
        {
            DBC.Spell      = DBCReader.ReadDBC <SpellEntry>(DBC.SpellStrings);
            DBC.SkillLine  = DBCReader.ReadDBC <SkillLineEntry>(DBC.SkillLineStrings);
            DBC.SpellRange = DBCReader.ReadDBC <SpellRangeEntry>(DBC.SpellRangeStrings);

            DBC.SpellDuration    = DBCReader.ReadDBC <SpellDurationEntry>(null);
            DBC.SkillLineAbility = DBCReader.ReadDBC <SkillLineAbilityEntry>(null);
            DBC.SpellRadius      = DBCReader.ReadDBC <SpellRadiusEntry>(null);
            DBC.SpellCastTimes   = DBCReader.ReadDBC <SpellCastTimesEntry>(null);


            Logging.Write(string.Format("Loaded {0} Spells from DBC", DBC.Spell.Count));
            Logging.Write(string.Format("Loaded {0} SkillLines from DBC", DBC.SkillLine.Count));
            Logging.Write(string.Format("Loaded {0} SpellRanges from DBC", DBC.SpellRange.Count));
            Logging.Write(string.Format("Loaded {0} SpellDurations from DBC", DBC.SpellDuration.Count));
            Logging.Write(string.Format("Loaded {0} SkillLineAbilitys from DBC", DBC.SkillLineAbility.Count));
            Logging.Write(string.Format("Loaded {0} SpellRadiuss from DBC", DBC.SpellRadius.Count));
            Logging.Write(string.Format("Loaded {0} SpellCastTimes from DBC", DBC.SpellCastTimes.Count));
        }
        else
        {
            Logging.WriteError("DBC Folder doesn't exist!");
        }

        DataMgr.Init();


        engine = new Engine(false);
        engine.States.Add(new CombatState {
            Priority = int.MaxValue
        });

        engine.States.Sort();
        engine.StartEngine(10, "Carlcombat", true);
    }