public void LoadSpellLearnSkills() { SpellLearnSkillDic.Clear(); // search auto-learned skills and add its to map also for use in unlearn spells/talents uint dbc_count = 0; foreach (var spell in SpellInfoList.Values) { for (int i = 0; i < SharedConst.MaxSpellEffects; ++i) { if (spell.Effects[i] == null) { continue; } if (spell.Id == 668) { continue; } if (spell.Effects[i].Effect == (uint)SpellEffects.Skill) { var dbc_node = new SpellLearnSkillNode(); dbc_node.skill = (uint)spell.Effects[i].MiscValue; dbc_node.step = (uint)spell.Effects[i].CalcValue(); if (dbc_node.skill != (uint)Skill.Riding) { dbc_node.value = 1; } else { dbc_node.value = dbc_node.step * 75; } dbc_node.maxvalue = dbc_node.step * 75; SpellLearnSkillDic.Add(spell.Id, dbc_node); ++dbc_count; break; } } } Log.outInfo("Loaded {0} Spell Learn Skills from DBC", dbc_count); Log.outInit(); }
public SpellLearnSkillNode GetSpellLearnSkill(uint spell_id) { return(SpellLearnSkillDic.LookupByKey(spell_id)); }