mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10924] Send time diff between Update() calls for object - should help with mob respawn on inactive grids etc. Based on patches by VladimirMangos and cipherCOM. All issues from previous patches should be finally fixed now.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
72b1d30a1c
commit
b11820593c
39 changed files with 284 additions and 149 deletions
|
|
@ -186,7 +186,7 @@ bool DatabaseMysql::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD **p
|
|||
// guarded block for thread-safe mySQL request
|
||||
ACE_Guard<ACE_Thread_Mutex> query_connection_guard(mMutex);
|
||||
|
||||
uint32 _s = getMSTime();
|
||||
uint32 _s = WorldTimer::getMSTime();
|
||||
|
||||
if(mysql_query(mMysql, sql))
|
||||
{
|
||||
|
|
@ -196,7 +196,7 @@ bool DatabaseMysql::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD **p
|
|||
}
|
||||
else
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", WorldTimer::getMSTimeDiff(_s,WorldTimer::getMSTime()), sql );
|
||||
}
|
||||
|
||||
*pResult = mysql_store_result(mMysql);
|
||||
|
|
@ -290,7 +290,7 @@ bool DatabaseMysql::DirectExecute(const char* sql)
|
|||
// guarded block for thread-safe mySQL request
|
||||
ACE_Guard<ACE_Thread_Mutex> query_connection_guard(mMutex);
|
||||
|
||||
uint32 _s = getMSTime();
|
||||
uint32 _s = WorldTimer::getMSTime();
|
||||
|
||||
if(mysql_query(mMysql, sql))
|
||||
{
|
||||
|
|
@ -300,7 +300,7 @@ bool DatabaseMysql::DirectExecute(const char* sql)
|
|||
}
|
||||
else
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", WorldTimer::getMSTimeDiff(_s,WorldTimer::getMSTime()), sql );
|
||||
}
|
||||
// end guarded block
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue