mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9791] Fixed problem with character deleting at some server platforms.
This commit is contained in:
parent
0cbcfef0fb
commit
065a6732e1
2 changed files with 3 additions and 3 deletions
|
|
@ -4223,7 +4223,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||||
}
|
}
|
||||||
// The character gets unlinked from the account, the name gets freed up and appears as deleted ingame
|
// The character gets unlinked from the account, the name gets freed up and appears as deleted ingame
|
||||||
case 1:
|
case 1:
|
||||||
CharacterDatabase.PExecute("UPDATE characters SET deleteInfos_Name=name, deleteInfos_Account=account, deleteDate=%u, name='', account=0 WHERE guid=%u", uint64(time(NULL)), guid);
|
CharacterDatabase.PExecute("UPDATE characters SET deleteInfos_Name=name, deleteInfos_Account=account, deleteDate='" UI64FMTD "', name='', account=0 WHERE guid=%u", uint64(time(NULL)), guid);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sLog.outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
|
sLog.outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
|
||||||
|
|
@ -4258,7 +4258,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
|
||||||
{
|
{
|
||||||
sLog.outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
|
sLog.outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
|
||||||
|
|
||||||
QueryResult *resultChars = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < %u", uint64(time(NULL) - time_t(keepDays * DAY)));
|
QueryResult *resultChars = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < '" UI64FMTD "'", uint64(time(NULL) - time_t(keepDays * DAY)));
|
||||||
if (resultChars)
|
if (resultChars)
|
||||||
{
|
{
|
||||||
sLog.outString("Player::DeleteOldChars: Found %u character(s) to delete",resultChars->GetRowCount());
|
sLog.outString("Player::DeleteOldChars: Found %u character(s) to delete",resultChars->GetRowCount());
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9790"
|
#define REVISION_NR "9791"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue