mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Command] Fix #copycharacter command crash (#2446)
This commit is contained in:
parent
1ce272a1c3
commit
78a9de124e
@ -2199,9 +2199,9 @@ int Database::GetInstanceID(uint32 char_id, uint32 zone_id) {
|
||||
* @return
|
||||
*/
|
||||
bool Database::CopyCharacter(
|
||||
std::string source_character_name,
|
||||
std::string destination_character_name,
|
||||
std::string destination_account_name
|
||||
const std::string& source_character_name,
|
||||
const std::string& destination_character_name,
|
||||
const std::string& destination_account_name
|
||||
)
|
||||
{
|
||||
auto results = QueryDatabase(
|
||||
@ -2213,6 +2213,7 @@ bool Database::CopyCharacter(
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
LogError("No character found with name [{}]", source_character_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
@ -2227,6 +2228,7 @@ bool Database::CopyCharacter(
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
LogError("No account found with name [{}]", destination_account_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
row = results.begin();
|
||||
|
||||
@ -113,9 +113,9 @@ public:
|
||||
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const std::string &hacked, const char *zone);
|
||||
bool UpdateName(const char *oldname, const char *newname);
|
||||
bool CopyCharacter(
|
||||
std::string source_character_name,
|
||||
std::string destination_character_name,
|
||||
std::string destination_account_name
|
||||
const std::string& source_character_name,
|
||||
const std::string& destination_character_name,
|
||||
const std::string& destination_account_name
|
||||
);
|
||||
|
||||
/* General Information Queries */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user