示例#1
0
        public static void LoadSpells(bool init)
        {
            if (!loaded)
            {
                InitEffectHandlers();
                //LoadOtherDBCs();

                SpellEffect.InitMiscValueTypes();
                loaded = true;
                //Spell.InitDbcs();
                //new DBCReader<Spell.SpellDBCConverter>(RealmServerConfiguration.GetDBCFile(WCellConstants.DBC_SPELL));

                //ContentMgr.Load<SpellLearnRelation>();
                //InitSummonHandlers();
                LoadOverrides();
                //SkillHandler.Initialize();
                //TalentMgr.Initialize();

                SpellLines.InitSpellLines();

                //ContentMgr.Load<SpellProcEventEntry>();
                ProcEventHelper.PatchSpells(ById);
            }

            if (init)
            {
                Initialize2();
            }
        }
示例#2
0
 /// <summary>
 /// Apply custom proc settings from SpellProcEventEntry to all spells
 /// </summary>
 public static void PatchSpells(Spell[] spells)
 {
     foreach (SpellId key in ProcEventHelper.Entries.Keys)
     {
         Spell spell = spells[(int)key];
         if (spell != null)
         {
             SpellProcEventEntry entry = ProcEventHelper.Entries[spell.SpellId];
             if (spell.Line == null)
             {
                 ProcEventHelper.PatchSpell(spell, entry);
             }
             else
             {
                 spell.Line.LineId.Apply((Action <Spell>)(spellToPatch =>
                                                          ProcEventHelper.PatchSpell(spellToPatch, entry)));
             }
         }
     }
 }