[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
+16
View File
@@ -3981,6 +3981,22 @@ bool ZoneDatabase::GetFactionName(int32 faction_id, char* name, uint32 buflen) {
}
std::string ZoneDatabase::GetFactionName(int32 faction_id)
{
std::string faction_name;
if (
faction_id <= 0 ||
faction_id > static_cast<int>(max_faction) ||
!faction_array[faction_id]
) {
return faction_name;
}
faction_name = faction_array[faction_id]->name;
return faction_name;
}
//o--------------------------------------------------------------
//| Name: GetNPCFactionList; Dec. 16, 2001
//o--------------------------------------------------------------