[Commands] Cleanup #npcstats Command. (#1690)

- Cleanup menu and add stats that were not there before.
- Only display some data if necessary (i.e only show loot/money if they have loot/money)
- Add skill name helper method.
- Add faction name helper method.
- Add Charmed stats and other getter methods.
- Cleanup QueryLoot() method.
This commit is contained in:
Kinglykrab
2021-11-07 17:20:43 -05:00
committed by GitHub
parent e1de3d2ae0
commit 194c71727d
8 changed files with 697 additions and 156 deletions
+1 -9
View File
@@ -1012,15 +1012,7 @@ std::string QuestManager::getspellname(uint32 spell_id) {
}
std::string QuestManager::getskillname(int skill_id) {
if (skill_id >= 0 && skill_id < EQ::skills::SkillCount) {
std::map<EQ::skills::SkillType, std::string> Skills = EQ::skills::GetSkillTypeMap();
for (auto skills_iter : Skills) {
if (skill_id == skills_iter.first) {
return skills_iter.second;
}
}
}
return std::string();
return EQ::skills::GetSkillName(static_cast<EQ::skills::SkillType>(skill_id));
}
void QuestManager::safemove() {