mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
[Bug Fix] Fix #guild rename, #killallnpcs, and #worldwide message errors. (#1904)
- #guild rename was checking argument count and not allowing you to rename guilds to names that had spaces. - #killallnpcs was crashing zones when used sometimes due to getting a nullptr somewhere in the loop. - #worldwide message was using just the first word of the message sent using the command, not all of them.
This commit is contained in:
parent
e45f02af95
commit
c99c5c1f1c
@ -225,10 +225,7 @@ void command_guild(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
guild_mgr.ListGuilds(c);
|
guild_mgr.ListGuilds(c);
|
||||||
} else if (is_rename) {
|
} else if (is_rename) {
|
||||||
if (
|
if (!sep->IsNumber(2)) {
|
||||||
arguments != 3 ||
|
|
||||||
!sep->IsNumber(2)
|
|
||||||
) {
|
|
||||||
c->Message(Chat::White, "Usage: #guild rename [Guild ID] [New Guild Name]");
|
c->Message(Chat::White, "Usage: #guild rename [Guild ID] [New Guild Name]");
|
||||||
} else {
|
} else {
|
||||||
auto guild_id = std::stoul(sep->arg[2]);
|
auto guild_id = std::stoul(sep->arg[2]);
|
||||||
|
|||||||
@ -10,6 +10,10 @@ void command_killallnpcs(Client *c, const Seperator *sep)
|
|||||||
int killed_count = 0;
|
int killed_count = 0;
|
||||||
for (auto& npc_entity : entity_list.GetNPCList()) {
|
for (auto& npc_entity : entity_list.GetNPCList()) {
|
||||||
auto entity_id = npc_entity.first;
|
auto entity_id = npc_entity.first;
|
||||||
|
if (!entity_id) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto npc = npc_entity.second;
|
auto npc = npc_entity.second;
|
||||||
if (!npc) {
|
if (!npc) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -62,7 +62,7 @@ void command_worldwide(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
else if (sub_command == "message") {
|
else if (sub_command == "message") {
|
||||||
if (sep->arg[2]) {
|
if (sep->arg[2]) {
|
||||||
std::string message = sep->arg[2];
|
std::string message = sep->argplus[2];
|
||||||
quest_manager.WorldWideMessage(
|
quest_manager.WorldWideMessage(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user