[Commands] Cleanup #setskill Command. (#1704)

* [Commands] Cleanup #setskill Command.
- Cleanup message and logic.

* Optimize GetSkillName().
This commit is contained in:
Kinglykrab
2021-11-10 21:20:40 -05:00
committed by GitHub
parent 32d606c667
commit b17c24d2df
2 changed files with 48 additions and 25 deletions
+2 -6
View File
@@ -263,12 +263,8 @@ const std::map<EQ::skills::SkillType, std::string>& EQ::skills::GetSkillTypeMap(
std::string EQ::skills::GetSkillName(SkillType skill)
{
if (skill >= Skill1HBlunt && skill <= Skill2HPiercing) {
std::map<SkillType, std::string> skills = GetSkillTypeMap();
for (auto current_skill : skills) {
if (skill == current_skill.first) {
return current_skill.second;
}
}
auto skills = GetSkillTypeMap();
return skills[skill];
}
return std::string();
}