mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-28 04:02:25 +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
|
* @return
|
||||||
*/
|
*/
|
||||||
bool Database::CopyCharacter(
|
bool Database::CopyCharacter(
|
||||||
std::string source_character_name,
|
const std::string& source_character_name,
|
||||||
std::string destination_character_name,
|
const std::string& destination_character_name,
|
||||||
std::string destination_account_name
|
const std::string& destination_account_name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto results = QueryDatabase(
|
auto results = QueryDatabase(
|
||||||
@ -2213,6 +2213,7 @@ bool Database::CopyCharacter(
|
|||||||
|
|
||||||
if (results.RowCount() == 0) {
|
if (results.RowCount() == 0) {
|
||||||
LogError("No character found with name [{}]", source_character_name);
|
LogError("No character found with name [{}]", source_character_name);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
@ -2227,6 +2228,7 @@ bool Database::CopyCharacter(
|
|||||||
|
|
||||||
if (results.RowCount() == 0) {
|
if (results.RowCount() == 0) {
|
||||||
LogError("No account found with name [{}]", destination_account_name);
|
LogError("No account found with name [{}]", destination_account_name);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
row = results.begin();
|
row = results.begin();
|
||||||
|
|||||||
@ -113,9 +113,9 @@ public:
|
|||||||
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const std::string &hacked, const char *zone);
|
bool SetMQDetectionFlag(const char *accountname, const char *charactername, const std::string &hacked, const char *zone);
|
||||||
bool UpdateName(const char *oldname, const char *newname);
|
bool UpdateName(const char *oldname, const char *newname);
|
||||||
bool CopyCharacter(
|
bool CopyCharacter(
|
||||||
std::string source_character_name,
|
const std::string& source_character_name,
|
||||||
std::string destination_character_name,
|
const std::string& destination_character_name,
|
||||||
std::string destination_account_name
|
const std::string& destination_account_name
|
||||||
);
|
);
|
||||||
|
|
||||||
/* General Information Queries */
|
/* General Information Queries */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user