mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Changed more timer usages to 64bit, changed getQuestInfo exd to grab correct field for name
This commit is contained in:
parent
f55b0df155
commit
c864ecf2d2
3 changed files with 10 additions and 14 deletions
|
@ -21,7 +21,7 @@ std::string Core::Event::getEventName( uint32_t eventId )
|
||||||
if( !questInfo )
|
if( !questInfo )
|
||||||
return unknown + "Quest";
|
return unknown + "Quest";
|
||||||
|
|
||||||
std::string name = questInfo->name;
|
std::string name = questInfo->id;
|
||||||
std::size_t pos = name.find_first_of( "_" );
|
std::size_t pos = name.find_first_of( "_" );
|
||||||
|
|
||||||
return questInfo->name.substr( 0, pos );
|
return questInfo->name.substr( 0, pos );
|
||||||
|
|
|
@ -11,16 +11,12 @@
|
||||||
|
|
||||||
extern Core::Logger g_log;
|
extern Core::Logger g_log;
|
||||||
|
|
||||||
Core::Session::Session( uint32_t sessionId )
|
Core::Session::Session( uint32_t sessionId ) :
|
||||||
: m_sessionId( sessionId )
|
m_sessionId( sessionId ),
|
||||||
, m_lastDataTime( static_cast< uint32_t >( Util::getTimeSeconds() ) )
|
m_lastDataTime( Util::getTimeSeconds() ),
|
||||||
, m_lastSqlTime( static_cast< uint32_t >( Util::getTimeSeconds() ) )
|
m_lastSqlTime( Util::getTimeSeconds() ),
|
||||||
, m_isValid( false )
|
m_isValid( false )
|
||||||
{
|
{
|
||||||
|
|
||||||
// boost::posix_time::ptime now = boost::date_time::not_a_date_time;
|
|
||||||
// now = boost::posix_time::microsec_clock::universal_time();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::Session::~Session()
|
Core::Session::~Session()
|
||||||
|
@ -91,7 +87,7 @@ int64_t Core::Session::getLastDataTime() const
|
||||||
return m_lastDataTime;
|
return m_lastDataTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Core::Session::getLastSqlTime() const
|
int64_t Core::Session::getLastSqlTime() const
|
||||||
{
|
{
|
||||||
return m_lastSqlTime;
|
return m_lastSqlTime;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +104,7 @@ void Core::Session::updateLastDataTime()
|
||||||
|
|
||||||
void Core::Session::updateLastSqlTime()
|
void Core::Session::updateLastSqlTime()
|
||||||
{
|
{
|
||||||
m_lastSqlTime = static_cast< uint32_t >( Util::getTimeSeconds() );
|
m_lastSqlTime = Util::getTimeSeconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::Session::startReplay( const std::string& path )
|
void Core::Session::startReplay( const std::string& path )
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Core {
|
||||||
Network::GameConnectionPtr getChatConnection() const;
|
Network::GameConnectionPtr getChatConnection() const;
|
||||||
|
|
||||||
int64_t getLastDataTime() const;
|
int64_t getLastDataTime() const;
|
||||||
uint32_t getLastSqlTime() const;
|
int64_t getLastSqlTime() const;
|
||||||
|
|
||||||
void updateLastDataTime();
|
void updateLastDataTime();
|
||||||
void updateLastSqlTime();
|
void updateLastSqlTime();
|
||||||
|
@ -50,7 +50,7 @@ namespace Core {
|
||||||
|
|
||||||
int64_t m_lastDataTime;
|
int64_t m_lastDataTime;
|
||||||
|
|
||||||
uint32_t m_lastSqlTime;
|
int64_t m_lastSqlTime;
|
||||||
bool m_isValid;
|
bool m_isValid;
|
||||||
|
|
||||||
bool m_isReplaying;
|
bool m_isReplaying;
|
||||||
|
|
Loading…
Add table
Reference in a new issue