[Commands] Cleanup #reloadzps Command. (#2129)

* [Commands] Cleanup #reloadzps Command.
- Cleanup messages and logic.
- Make reloading of zone points global instead of zone specific.

* Further cleanup.
- Add zone->GetZoneDescription().
- Add mob->GetTargetDescription(mob).

* Final cleanup.

* Typo.
This commit is contained in:
Kinglykrab
2022-05-07 03:23:15 -04:00
committed by GitHub
parent 0b3065d7a9
commit 7df9b2974b
111 changed files with 2035 additions and 2864 deletions
+4 -7
View File
@@ -154,16 +154,13 @@ void command_faction(Client *c, const Seperator *sep)
}
else if (!strcasecmp(sep->arg[1], "view")) {
if (c->GetTarget() && c->GetTarget()->IsNPC()) {
Mob *target = c->GetTarget();
uint32 npc_id = target->GetNPCTypeID();
uint32 npc_faction_id = target->CastToNPC()->GetPrimaryFaction();
std::string npc_name = target->GetCleanName();
auto target = c->GetTarget();
auto npc_faction_id = target->CastToNPC()->GetPrimaryFaction();
c->Message(
Chat::White,
fmt::format(
"{} ({}) has a Primary Faction of {} ({}).",
npc_name,
npc_id,
"{} has a Primary Faction of {} ({}).",
c->GetTargetDescription(target),
content_db.GetFactionName(npc_faction_id),
npc_faction_id
).c_str()