diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 496931c6..5efaed73 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -100,8 +100,8 @@ namespace Packets { InventoryTransactionFinish = 0x017C, // updated 4.2 InventoryTransaction = 0x017D, // updated 4.2 CurrencyCrystalInfo = 0x017E, // updated 4.2 - InventoryActionAck = 0x1139, - UpdateInventorySlot = 0x0180, // updated 4.2 + InventoryActionAck = 0x0180, // updated 4.2? + UpdateInventorySlot = 0x0181, // updated 4.2 EventPlay = 0x018E, // updated 4.2 EventStart = 0x0198, // updated 4.2 diff --git a/src/servers/sapphire_zone/ServerZone.cpp b/src/servers/sapphire_zone/ServerZone.cpp index 712fa37d..ad0fc840 100644 --- a/src/servers/sapphire_zone/ServerZone.cpp +++ b/src/servers/sapphire_zone/ServerZone.cpp @@ -269,7 +269,7 @@ void Core::ServerZone::mainLoop() this_thread::sleep_for( chrono::milliseconds( 50 ) ); - auto currTime = static_cast< uint32_t >( Util::getTimeSeconds() ); + auto currTime = Util::getTimeSeconds(); g_territoryMgr.updateTerritoryInstances( currTime ); @@ -320,7 +320,8 @@ void Core::ServerZone::mainLoop() // remove sessions that simply timed out if( diff > 20 ) { - g_log.info("[" + std::to_string(it->second->getId() ) + "] Session time out" ); + g_log.info("[" + std::to_string( it->second->getId() ) + "] Session time out" ); + it->second->close(); // if( it->second.unique() ) { diff --git a/src/servers/sapphire_zone/ServerZone.h b/src/servers/sapphire_zone/ServerZone.h index 64db1136..acaf0d7e 100644 --- a/src/servers/sapphire_zone/ServerZone.h +++ b/src/servers/sapphire_zone/ServerZone.h @@ -51,7 +51,7 @@ namespace Core { uint16_t m_port; std::string m_ip; - uint32_t m_lastDBPingTime; + int64_t m_lastDBPingTime; bool m_bRunning; diff --git a/src/servers/sapphire_zone/Session.cpp b/src/servers/sapphire_zone/Session.cpp index a10d0434..cb86ce4c 100644 --- a/src/servers/sapphire_zone/Session.cpp +++ b/src/servers/sapphire_zone/Session.cpp @@ -86,7 +86,7 @@ uint32_t Core::Session::getId() const return m_sessionId; } -uint32_t Core::Session::getLastDataTime() const +int64_t Core::Session::getLastDataTime() const { return m_lastDataTime; } @@ -103,7 +103,7 @@ bool Core::Session::isValid() const void Core::Session::updateLastDataTime() { - m_lastDataTime = static_cast< uint32_t >( Util::getTimeSeconds() ); + m_lastDataTime = Util::getTimeSeconds(); } void Core::Session::updateLastSqlTime() diff --git a/src/servers/sapphire_zone/Session.h b/src/servers/sapphire_zone/Session.h index 1d59665b..d879f129 100644 --- a/src/servers/sapphire_zone/Session.h +++ b/src/servers/sapphire_zone/Session.h @@ -20,7 +20,7 @@ namespace Core { Network::GameConnectionPtr getZoneConnection() const; Network::GameConnectionPtr getChatConnection() const; - uint32_t getLastDataTime() const; + int64_t getLastDataTime() const; uint32_t getLastSqlTime() const; void updateLastDataTime(); @@ -48,7 +48,7 @@ namespace Core { Entity::PlayerPtr m_pPlayer; - uint32_t m_lastDataTime; + int64_t m_lastDataTime; uint32_t m_lastSqlTime; bool m_isValid;