mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
moved char id storage
This commit is contained in:
parent
22a00de8cd
commit
e2bfdcd174
@ -5890,6 +5890,7 @@ void GameMessages::HandleReportBug(RakNet::BitStream* inStream, Entity* entity)
|
||||
std::string nOtherPlayerID;
|
||||
std::string selection;
|
||||
uint32_t messageLength;
|
||||
int32_t reporterID;
|
||||
|
||||
//Reading:
|
||||
inStream->Read(messageLength);
|
||||
@ -5901,11 +5902,7 @@ void GameMessages::HandleReportBug(RakNet::BitStream* inStream, Entity* entity)
|
||||
}
|
||||
|
||||
auto character = entity->GetCharacter();
|
||||
if (character) {
|
||||
body.append(GeneralUtils::ASCIIToUTF16(" charID: "));
|
||||
body.append(GeneralUtils::ASCIIToUTF16(std::to_string(character->GetID())));
|
||||
body.push_back(' ');
|
||||
}
|
||||
if (character) reporterID = character->GetID();
|
||||
|
||||
uint32_t clientVersionLength;
|
||||
inStream->Read(clientVersionLength);
|
||||
@ -5944,11 +5941,12 @@ void GameMessages::HandleReportBug(RakNet::BitStream* inStream, Entity* entity)
|
||||
}
|
||||
|
||||
try {
|
||||
sql::PreparedStatement* insertBug = Database::CreatePreppedStmt("INSERT INTO `bug_reports`(body, client_version, other_player_id, selection) VALUES (?, ?, ?, ?)");
|
||||
sql::PreparedStatement* insertBug = Database::CreatePreppedStmt("INSERT INTO `bug_reports`(body, client_version, other_player_id, selection, reporter_id) VALUES (?, ?, ?, ?, ?)");
|
||||
insertBug->setString(1, GeneralUtils::UTF16ToWTF8(body));
|
||||
insertBug->setString(2, clientVersion);
|
||||
insertBug->setString(3, nOtherPlayerID);
|
||||
insertBug->setString(4, selection);
|
||||
insertBug->setInt(5, reporterID);
|
||||
insertBug->execute();
|
||||
delete insertBug;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user