Core/Refactor: Part 3

This commit is contained in:
hondacrx
2018-05-16 19:57:48 -04:00
parent 225a5d27f7
commit 5dacd669b5
112 changed files with 564 additions and 561 deletions
+5 -5
View File
@@ -859,7 +859,7 @@ namespace Game
//to set mailtimer to return mails every day between 4 and 5 am
//mailtimer is increased when updating auctions
//one second is 1000 -(tested on win system)
/// @todo Get rid of magic numbers
// @todo Get rid of magic numbers
var localTime = Time.UnixTimeToDateTime(m_gameTime).ToLocalTime();
mail_timer = ((((localTime.Hour + 20) % 24) * Time.Hour * Time.InMilliseconds) / m_timers[WorldTimers.Auctions].GetInterval());
//1440
@@ -1212,7 +1212,7 @@ namespace Game
{
m_timers[WorldTimers.Blackmarket].Reset();
///- Update blackmarket, refresh auctions if necessary
//- Update blackmarket, refresh auctions if necessary
if ((blackmarket_timer * m_timers[WorldTimers.Blackmarket].GetInterval() >= WorldConfig.GetIntValue(WorldCfg.BlackmarketUpdatePeriod) * Time.Hour * Time.InMilliseconds) || blackmarket_timer == 0)
{
Global.BlackMarketMgr.RefreshAuctions();
@@ -1230,7 +1230,7 @@ namespace Game
UpdateSessions(diff);
RecordTimeDiff("UpdateSessions");
/// <li> Update uptime table
// <li> Update uptime table
if (m_timers[WorldTimers.UpTime].Passed())
{
uint tmpDiff = (uint)(m_gameTime - m_startTime);
@@ -1248,7 +1248,7 @@ namespace Game
DB.Login.Execute(stmt);
}
/// <li> Clean logs table
// <li> Clean logs table
if (WorldConfig.GetIntValue(WorldCfg.LogdbCleartime) > 0) // if not enabled, ignore the timer
{
if (m_timers[WorldTimers.CleanDB].Passed())
@@ -1580,7 +1580,7 @@ namespace Game
uint duration_secs = Time.TimeStringToSecs(duration);
/// Pick a player to ban if not online
// Pick a player to ban if not online
if (!pBanned)
{
guid = ObjectManager.GetPlayerGUIDByName(name);
+2 -2
View File
@@ -69,7 +69,7 @@ namespace Game
if (_player)
LogoutPlayer(true);
/// - If have unclosed socket, close it
// - If have unclosed socket, close it
for (byte i = 0; i < 2; ++i)
{
if (m_Socket[i] != null)
@@ -633,7 +633,7 @@ namespace Game
_accountLoginCallback = null;
}
//! HandlePlayerLoginOpcode
// HandlePlayerLoginOpcode
if (_charLoginCallback != null && _charLoginCallback.IsCompleted)
{
HandlePlayerLogin((LoginQueryHolder)_charLoginCallback.Result);