Jump to content

Clear Old Guilds Lands by Inactivity


Recommended Posts

  • Premium

Open db/ClientManagerBoot.cpp

 

bool CClientManager::InitializeLandTable()
{
	using namespace building;

under this add
 

	CDBManager::instance().DirectQuery(	"update land "
			"INNER JOIN guild ON land.guild_id = guild.id "
			"INNER JOIN player ON guild.`master` = player.id "
			"set guild_id=0 "
			"where guild_id > 0 and "
			"DATE_SUB(NOW(),INTERVAL 21 DAY) > last_play; " );
	CDBManager::instance().DirectQuery(	"DELETE object "
			"FROM object "
			"INNER JOIN land ON land.id = object.land_id "
			"WHERE land.guild_id=0; "	);

Extracted from Inception source.

  • Metin2 Dev 1
  • Sad 1
  • Love 8


 

Link to comment
Share on other sites

Announcements



×
×
  • 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.