mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Commands] Cleanup #copycharacter Command (#3479)
# Notes - Cleanup messages and logic.
This commit is contained in:
parent
d3c3d7b384
commit
7427318213
@ -2,26 +2,31 @@
|
||||
|
||||
void command_copycharacter(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (sep->argnum < 3) {
|
||||
if (
|
||||
sep->argnum < 3 ||
|
||||
sep->IsNumber(1) ||
|
||||
sep->IsNumber(2) ||
|
||||
sep->IsNumber(3)
|
||||
) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
"Usage: [source_character_name] [destination_character_name] [destination_account_name]"
|
||||
"Usage: #copycharacter [source_character_name] [destination_character_name] [destination_account_name]"
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string source_character_name = sep->arg[1];
|
||||
std::string destination_character_name = sep->arg[2];
|
||||
std::string destination_account_name = sep->arg[3];
|
||||
const std::string& source_character_name = sep->arg[1];
|
||||
const std::string& destination_character_name = sep->arg[2];
|
||||
const std::string& destination_account_name = sep->arg[3];
|
||||
|
||||
bool result = database.CopyCharacter(
|
||||
const bool result = database.CopyCharacter(
|
||||
source_character_name,
|
||||
destination_character_name,
|
||||
destination_account_name
|
||||
);
|
||||
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Character Copy [{}] to [{}] via account [{}] [{}]",
|
||||
source_character_name,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user