Jump to content

Recommended Posts

  • Forum Moderator

c517a1375e0a6974b55b8166621815d5.gif

  • Srcs\Server\game\src\shop.cpp
//Search for:
    ch->Save();
//Add after:
#ifdef ENABLE_SHOP_AUTO_CLOSE
	if (IsPCShop())
	{
		BYTE bShopItemCount = 0;
		for (DWORD i = 0; i < m_itemVector.size() && i < SHOP_HOST_ITEM_MAX_NUM; ++i)
		{
			if (m_itemVector[i].pkItem)
				++bShopItemCount;
		}
		
		if (bShopItemCount == 0) // Last item
		{
			m_pkPC->CloseMyShop();
			m_pkPC->ChatPacket(CHAT_TYPE_NOTICE, "Your store was closed automatically, reason: sold out.");
		}
	}
#endif
  • Srcs\Server\common\service.h
#define ENABLE_SHOP_AUTO_CLOSE

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2

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.