Jump to content

Recommended Posts

  • Premium

Basically, the server has a heartbeat at which it processes the entries in the database, if you kill the process via SSH before the heartbeat finishes, you will lose all your items and progress.

 

Best way is to /shutdown in game then killall in ssh, WITHOUT arguments, only killall cause it will be graceful everytime.

  • Good 1
  • 3 weeks later...
struct SendDisconnectFunc
{
	void operator()(LPDESC d)
	{
		if(d->GetCharacter())
		{
			d->GetCharacter()->SaveReal();
			DWORD pid = d->GetCharacter()->GetPlayerID();
			db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD));
			db_clientdesc->Packet(&pid, sizeof(DWORD));

			if(d->GetCharacter()->GetGMLevel() == GM_PLAYER)
			{
				d->GetCharacter()->ChatPacket(CHAT_TYPE_COMMAND, "quit Shutdown(SendDisconnectFunc)");
			}
		}
	}
};

 

  • Not Good 1
  • Developer
43 minutes ago, DrTurk said:

struct SendDisconnectFunc
{
	void operator()(LPDESC d)
	{
		if(d->GetCharacter())
		{
			d->GetCharacter()->SaveReal();
			DWORD pid = d->GetCharacter()->GetPlayerID();
			db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD));
			db_clientdesc->Packet(&pid, sizeof(DWORD));

			if(d->GetCharacter()->GetGMLevel() == GM_PLAYER)
			{
				d->GetCharacter()->ChatPacket(CHAT_TYPE_COMMAND, "quit Shutdown(SendDisconnectFunc)");
			}
		}
	}
};

 

I see what you did there, but this doesn't help at all, what if the player disconnected before the shutdown ?
As we said before, best way is to shutdown in-game, wait a few minutes and then just gracefully kill the cores.

r

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.