diff --git a/zone/client.cpp b/zone/client.cpp index 61e6a3dc6..3fcd5f443 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2613,10 +2613,11 @@ void Client::SetPVP(bool toggle, bool message) { m_pp.pvp = toggle ? 1 : 0; if (message) { - if(GetPVP()) - this->MessageString(Chat::Shout,PVP_ON); - else - Message(Chat::Red, "You no longer follow the ways of discord."); + if(GetPVP()) { + MessageString(Chat::Shout, PVP_ON); + } else { + Message(Chat::Shout, "You now follow the ways of Order."); + } } SendAppearancePacket(AT_PVP, GetPVP()); diff --git a/zone/command.cpp b/zone/command.cpp index 60aa37b65..f91094ad1 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -283,7 +283,7 @@ int command_init(void) command_add("profanity", "Manage censored language.", AccountStatus::GMLeadAdmin, command_profanity) || command_add("push", "Lets you do spell push", AccountStatus::GMLeadAdmin, command_push) || command_add("proximity", "Shows NPC proximity", AccountStatus::GMLeadAdmin, command_proximity) || - command_add("pvp", "[on/off] - Set your or your player target's PVP status", AccountStatus::GMAdmin, command_pvp) || + command_add("pvp", "[On|Off] - Set you or your player target's PVP status", AccountStatus::GMAdmin, command_pvp) || command_add("qglobal", "[on/off/view] - Toggles qglobal functionality on an NPC", AccountStatus::GMAdmin, command_qglobal) || command_add("questerrors", "Shows quest errors.", AccountStatus::GMAdmin, command_questerrors) || command_add("race", "[racenum] - Change your or your target's race. Use racenum 0 to return to normal", AccountStatus::Guide, command_race) || diff --git a/zone/gm_commands/pvp.cpp b/zone/gm_commands/pvp.cpp index 1f31f29b9..5ba3d092a 100755 --- a/zone/gm_commands/pvp.cpp +++ b/zone/gm_commands/pvp.cpp @@ -2,19 +2,27 @@ void command_pvp(Client *c, const Seperator *sep) { - bool state = atobool(sep->arg[1]); - Client *t = c; + int arguments = sep->argnum; + if (!arguments) { + c->Message(Chat::White, "Usage: #pvp [On|Off]"); + return; + } + bool pvp_state = atobool(sep->arg[1]); + Client* target = c; if (c->GetTarget() && c->GetTarget()->IsClient()) { - t = c->GetTarget()->CastToClient(); + target = c->GetTarget()->CastToClient(); } - if (sep->arg[1][0] != 0) { - t->SetPVP(state); - c->Message(Chat::White, "%s now follows the ways of %s.", t->GetName(), state ? "discord" : "order"); - } - else { - c->Message(Chat::White, "Usage: #pvp [on/off]"); + target->SetPVP(pvp_state); + if (c != target) { + c->Message( + Chat::White, + fmt::format( + "{} now follows the ways of {}.", + target->GetCleanName(), + pvp_state ? "Discord" : "Order" + ).c_str() + ); } } -