/// <summary> /// 人物技能模板信息和魔法模板信息 /// </summary> private void LoadSkillTemplateAndSpellTemplate() { ////////////////////////////////////////////////////////////////////////// // 开始人物技能模板信息和魔法模板信息 for (uint iIndex = 0; iIndex < DBCInstances.SkillLineEntry.Count; ++iIndex) { SkillLineEntry skillLineEntry = DBCInstances.SkillLineEntry.LookupRowEntry(iIndex); if (skillLineEntry == null) { continue; } WowSkillTemplate wowSkillTemplate = new WowSkillTemplate(); wowSkillTemplate.Serial = skillLineEntry.ID; m_GlobalSkillTemplates.AddSkillTemplate(wowSkillTemplate.Serial, wowSkillTemplate); } for (uint iIndex = 0; iIndex < DBCInstances.SpellEntry.Count; ++iIndex) { SpellEntry spellEntry = DBCInstances.SpellEntry.LookupRowEntry(iIndex); if (spellEntry == null) { continue; } WowSpellTemplate wowSpellTemplate = new WowSpellTemplate(); wowSpellTemplate.Serial = spellEntry.ID; m_GlobalSpellTemplates.AddSpellTemplate(wowSpellTemplate.Serial, wowSpellTemplate); } LOGs.WriteLine(LogMessageType.MSG_INFO, "Wow世界:读取脚本内全部的 人物技能模板信息和魔法模板信息 完成"); }
public bool IsPrimaryProfessionSkill(uint skill) { SkillLineEntry pSkill = DBCStorage.SkillLineStorage.LookupByKey(skill); if (pSkill.id == 0) { return(false); } if (pSkill.categoryId != (uint)SkillCategory.Profession) { return(false); } return(true); }
public SkillType GetSkillType(SkillLineEntry pSkill, bool racial) { switch ((SkillCategory)pSkill.categoryId) { case SkillCategory.Languages: return(SkillType.Language); case SkillCategory.Weapon: return(SkillType.Level); case SkillCategory.Armor: case SkillCategory.Class: if (pSkill.id != (uint)Skill.Lockpicking) { return(SkillType.Mono); } else { return(SkillType.Level); } case SkillCategory.Secondary: case SkillCategory.Profession: // not set skills for professions and racial abilities if (IsProfessionSkill(pSkill.id)) { return(SkillType.Rank); } else if (racial) { return(SkillType.None); } else { return(SkillType.Mono); } default: case SkillCategory.Attributes: //not found in dbc case SkillCategory.Generic: //only GENERIC(DND) return(SkillType.None); } }