mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 23:27:45 +00:00
fix UPDATE_DATE in charainfo not being updated
This commit is contained in:
parent
cfc8373f5d
commit
564256385c
2 changed files with 12 additions and 3 deletions
|
@ -44,7 +44,7 @@ void Core::Db::CharaDbConnection::doPrepareStatements()
|
|||
"ActiveTitle = ?, TitleList = ?, Achievement = ?, Aetheryte = ?, HowTo = ?, Minions = ?, Mounts = ?, "
|
||||
"EquippedMannequin = ?, ConfigFlags = ?, QuestCompleteFlags = ?, OpeningSequence = ?, "
|
||||
"QuestTracking = ?, GrandCompany = ?, GrandCompanyRank = ?, Discovery = ?, GMRank = ?, Unlocks = ?, "
|
||||
"CFPenaltyUntil = ? WHERE CharacterId = ?;", CONNECTION_ASYNC );
|
||||
"CFPenaltyUntil = ?, UPDATE_DATE = ? WHERE CharacterId = ?;", CONNECTION_ASYNC );
|
||||
|
||||
|
||||
prepareStatement( CHARA_SEL_MINIMAL, "SELECT Name, Customize, ModelEquip, TerritoryId, GuardianDeity, "
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <set>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
|
||||
|
||||
#include <servers/Server_Common/Common.h>
|
||||
|
@ -403,7 +403,16 @@ void Core::Entity::Player::updateSql()
|
|||
|
||||
stmt->setInt( 53, m_cfPenaltyUntil );
|
||||
|
||||
stmt->setInt( 54, m_id );
|
||||
// 54 = UPDATE_DATE
|
||||
auto date_time = boost::posix_time::microsec_clock::universal_time();
|
||||
std::string time_out = boost::str(
|
||||
boost::format{ "%1%-%2%-%3% %4%:%5%:%6%" }
|
||||
% date_time.date().year() % date_time.date().month().as_number() % date_time.date().day().as_number()
|
||||
% date_time.time_of_day().hours() % date_time.time_of_day().minutes() % date_time.time_of_day().seconds()
|
||||
);
|
||||
stmt->setString( 54, time_out );
|
||||
|
||||
stmt->setInt( 55, m_id );
|
||||
|
||||
g_charaDb.execute( stmt );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue