[Commands] Cleanup #shownpcgloballoot and #showzonegloballoot Commands (#3440)

# Notes
- Cleanup messages and logic.
- Utilize Dialogue Window tables.
This commit is contained in:
Alex King
2023-06-24 14:03:37 -04:00
committed by GitHub
parent 64ae7e4529
commit 4330494f57
4 changed files with 61 additions and 63 deletions
+2 -11
View File
@@ -7,17 +7,8 @@ void command_shownpcgloballoot(Client *c, const Seperator *sep)
return;
}
auto target = c->GetTarget()->CastToNPC();
const auto t = c->GetTarget()->CastToNPC();
c->Message(
Chat::White,
fmt::format(
"Global loot for {} ({}).",
target->GetCleanName(),
target->GetNPCTypeID()
).c_str()
);
zone->ShowNPCGlobalLoot(c, target);
zone->ShowNPCGlobalLoot(c, t);
}
-9
View File
@@ -2,15 +2,6 @@
void command_showzonegloballoot(Client *c, const Seperator *sep)
{
c->Message(
Chat::White,
fmt::format(
"Global loot for {} ({}).",
zone->GetLongName(),
zone->GetZoneID()
).c_str()
);
zone->ShowZoneGlobalLoot(c);
}