Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 13:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Offline Shop duplicate bug

Discussion on Offline Shop duplicate bug within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
humanforu's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 146
Received Thanks: 15
Offline Shop duplicate bug

Hello there ,
I have a bug of duplication in offline shop.
a players duplicates items using ken offline shop with refresh unsold items
* i just need one command or coding that is if offline shop is opened that refresh unsold items must not allow items to remove that's it
or
* refresh unsold item box must not open when offline shop is opened and also if refresh unsold box is opened then offline shop should not be created
can anyone made coding for that so it will avoid that duplication?




Will be happy if anyone helps

regards

Hawk
humanforu is offline  
Old 10/25/2017, 14:18   #2
 
FetteRatte.'s Avatar
 
elite*gold: 285
Join Date: Sep 2016
Posts: 148
Received Thanks: 208
Quote:
Originally Posted by humanforu View Post
Hello there ,
I have a bug of duplication in offline shop.
a players duplicates items using ken offline shop with refresh unsold items
* i just need one command or coding that is if offline shop is opened that refresh unsold items must not allow items to remove that's it
or
* refresh unsold item box must not open when offline shop is opened and also if refresh unsold box is opened then offline shop should not be created
can anyone made coding for that so it will avoid that duplication?




Will be happy if anyone helps

regards

Hawk
Try to add "AND status=1" to the querys in offlineshop_manager.cpp at "void COfflineShopManager::TakeItem(LPCHARACTER ch, BYTE bPos)"

second method (not tested)

open input_main.cpp and edit:
Code:
		case SHOP_SUBHEADER_CG_TAKE_ITEM:
		{
			if (uiBytes < sizeof(BYTE))
				return -1;

			BYTE bPos = *c_pData;
			sys_log(0, "INPUT: %s OFFLINE_SHOP_TAKE_ITEM", ch->GetName());
			COfflineShopManager::instance().TakeItem(ch, bPos);
			return (sizeof(BYTE));
		}
to
Code:
		case SHOP_SUBHEADER_CG_TAKE_ITEM:
		{
			if (uiBytes < sizeof(BYTE))
				return -1;

			BYTE bPos = *c_pData;
			if (!COfflineShopManager::instance().HasOfflineShop(ch)){
				sys_log(0, "INPUT: %s OFFLINE_SHOP_TAKE_ITEM", ch->GetName());
				COfflineShopManager::instance().TakeItem(ch, bPos);
			}
			return (sizeof(BYTE));
		}
and
Code:
		case SHOP_SUBHEADER_CG_REFRESH_UNSOLD_ITEMS:
		{
			sys_log(0, "INPUT: %s OFFLINE_SHOP_REFRESH_UNSOLD_ITEMS", ch->GetName());
			COfflineShopManager::instance().RefreshUnsoldItems(ch);
			return 0;
		}
to
Code:
		case SHOP_SUBHEADER_CG_REFRESH_UNSOLD_ITEMS:
		{
			if (!COfflineShopManager::instance().HasOfflineShop(ch)){
				sys_log(0, "INPUT: %s OFFLINE_SHOP_REFRESH_UNSOLD_ITEMS", ch->GetName());
				COfflineShopManager::instance().RefreshUnsoldItems(ch);
			}
			return 0;
		}
FetteRatte. is offline  
Thanks
3 Users
Old 10/26/2017, 06:33   #3
 
humanforu's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 146
Received Thanks: 15
Quote:
Originally Posted by GucciMane. View Post
Try to add "AND status=1" to the querys in offlineshop_manager.cpp at "void COfflineShopManager::TakeItem(LPCHARACTER ch, BYTE bPos)"

second method (not tested)

open input_main.cpp and edit:
Code:
		case SHOP_SUBHEADER_CG_TAKE_ITEM:
		{
			if (uiBytes < sizeof(BYTE))
				return -1;

			BYTE bPos = *c_pData;
			sys_log(0, "INPUT: %s OFFLINE_SHOP_TAKE_ITEM", ch->GetName());
			COfflineShopManager::instance().TakeItem(ch, bPos);
			return (sizeof(BYTE));
		}
to
Code:
		case SHOP_SUBHEADER_CG_TAKE_ITEM:
		{
			if (uiBytes < sizeof(BYTE))
				return -1;

			BYTE bPos = *c_pData;
			if (!COfflineShopManager::instance().HasOfflineShop(ch)){
				sys_log(0, "INPUT: %s OFFLINE_SHOP_TAKE_ITEM", ch->GetName());
				COfflineShopManager::instance().TakeItem(ch, bPos);
			}
			return (sizeof(BYTE));
		}
and
Code:
		case SHOP_SUBHEADER_CG_REFRESH_UNSOLD_ITEMS:
		{
			sys_log(0, "INPUT: %s OFFLINE_SHOP_REFRESH_UNSOLD_ITEMS", ch->GetName());
			COfflineShopManager::instance().RefreshUnsoldItems(ch);
			return 0;
		}
to
Code:
		case SHOP_SUBHEADER_CG_REFRESH_UNSOLD_ITEMS:
		{
			if (!COfflineShopManager::instance().HasOfflineShop(ch)){
				sys_log(0, "INPUT: %s OFFLINE_SHOP_REFRESH_UNSOLD_ITEMS", ch->GetName());
				COfflineShopManager::instance().RefreshUnsoldItems(ch);
			}
			return 0;
		}
Thanks dude i already added status = 1 and its solved anyway thanks for this coding
humanforu is offline  
Reply


Similar Threads Similar Threads
[SEARCH]Gold bug , castel bug ans speed repair bug for key bug or crystal bug
04/23/2020 - Browsergames - 3 Replies
Hi I search key or crystal bug :) I will give gold , castel and speed repair bug Please send me skype : ciechomek111



All times are GMT +2. The time now is 13:06.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.