[Mini-Release] OfflineShop - Function open <Bug fix>

06/21/2016 03:53 VegaS ♆#1
- [ File: /Src/common/service.h ]

#1.) Add this:

​
Code:
#define __OFFLINE_SHOP_FIX_OPEN	
#define __OFFLINE_SHOP_VALUE_MAX 2000000000
#define __OFFLINE_SHOP_WARNING "[Protect Offline] Have more than 2.000.000.000 Yang!"
- [ File: /Src/game/src/char.cpp ]

#1.) Search function:

Code:
​
	if (!LC_IsBrazil())
	{
		DWORD nTotalMoney = 0;
		for (BYTE n = 0; n < bItemCount; ++n)
			nTotalMoney += (pTable + n)->price;

		if (GOLD_MAX - 1 <= nTotalMoney)
		{
			sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName());
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다"));
			return;
		}
	}

​
#2.) Replace function with this:

Code:
​
#ifdef __OFFLINE_SHOP_FIX_OPEN
	int64_t szTotalMoney = 0;

	for (int n = 0; n < bItemCount; ++n)
	{
		szTotalMoney += static_cast<int64_t>((pTable+n)->price);
	}
	std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT money FROM player.player WHERE id = %u", GetPlayerID()));
	if (pMsg->Get()->uiNumRows == 0)
		return;	
	
	DWORD dwCurrentMoney = 0;
	MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
	str_to_number(dwCurrentMoney, row[0]);	

	szTotalMoney += static_cast<int64_t>(dwCurrentMoney);
	if (__OFFLINE_SHOP_VALUE_MAX <= szTotalMoney)
	{
		ChatPacket(CHAT_TYPE_INFO, __OFFLINE_SHOP_WARNING);
		return;
	}
#else		
	if (!LC_IsBrazil())
	{
		DWORD nTotalMoney = 0;
		for (BYTE n = 0; n < bItemCount; ++n)
			nTotalMoney += (pTable + n)->price;
		if (GOLD_MAX - 1 <= nTotalMoney)
		{
			sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName());
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다"));
			return;
		}
	}
#endif	

​
​
06/21/2016 11:01 VegaS ♆#2
#old#epic#shit#
06/21/2016 12:44 aok96boom#3
Quote:
Originally Posted by [SGA]Vegas View Post
Man does not know which of us fell in the comment shit to me.

But it can be seen as an imbecile because you're a parallel world, and you do not read this topic well.

I said at the beginning of the topic as clear: A boy came up to me if I could help him with his problem solving. I told myself: * Why not buy the latest update from ken, because it's system can not help you with this .. *

And the guy told me that Ken disappeared several months and only provides support, we a lot people in the list that we have solved the problems on the ground that he is gone. You do not see how you retarded?

And I did that for free! I help a lot of people on skype and forums and what I was led to do this.

Why did I release this fixed? Because I specified that this type after I offered the resolution and went on forums in Romania, being a country of shit and I hate their own country, went and did topic in advertisements with the headline: * Sell Fixed exploit shop offline ken *, you seems normal to someone this? once you've helped free? I say no.

I did this money? 90% of people who own online shop is his ken, so I said if he disappeared and he has not fixed it yet on that version, I wanted to paint it a free fixed net. In the last update he increased the limit to shopoffline yang, but this bug still exists even in the latest version of.


If you think that this topic please influences with something nice to do a request for its removal, but do not think it is needed.

Ken is my friend, not an enemy, I have nothing against him and I will not have money for asking if this could fix me swear all day, but I did it for free and it made me a fix.

If you have something personal with me, I invite Skype 24/24 subject to debate.
If you just wanted you to go with me in mind, a good day.
Google translate detected
06/21/2016 14:51 VegaS ♆#4
Quote:
Originally Posted by aok96boom View Post
Google translate detected
I do not like people hating.

Code:
My English is crap.
You make +1 message for say that? you and your friend. Stop with this shit, child.
I do not really like the language, but are forced to speak.
Have a nice day hater.
06/21/2016 18:03 He3o Crysis#5
Quote:
Originally Posted by BizepsSupportAccount View Post
First of all.

Your not stupid or? Ahm i think your not Stupid.
Do you ever thought about Ken? Its his System which was leaked and People like you should burn in
hell xD
Nobody wishes death upon anyone :rolleyes:
Just sad because you paid 150,- for a system that isn't worth its price?

Why would you use Kens system anyway?
Direct queries and code flaws everywhere + not utilizing the dbcache correctly.

Selling systems always bears the risk that said system gets leaked.
He won't complain and I wouldn't do either, because he made enough money with it.
(150€/sale - ~2 hrs worktime -> 75€/h)

Why would you be mad anyway if someone publishes a fix for Kens Offlineshop system?
Without the source of the offlineshop (just google it, "offlineshop metin2 c++" - not easy to miss :p)
the fix is useless anyway.
06/21/2016 20:10 Gl0bal#6
Quote:
Originally Posted by BizepsSupportAccount View Post
halt die Schn* geh dahin wo du hergekommen bist.
[Only registered and activated users can see links. Click Here To Register...]
Alles klar.
Du bringst uns weiter.

Wer einigermaßen C++ beherrscht (also nicht du) sieht nun mal, dass dieser Ansatz für die Offlineshops nicht alt zu gut ist und der Code an sich auch eher mittelmäßig ist. Dafür ist der Preis tatsächlich recht hoch.

MfG Gl0bal
06/21/2016 20:37 VegaS ♆#7
I specified, sir BizepsSupportAccount if you have something personal with me or one of the members here please nice to talk these things over Skype. No need to live in a topic of mine and make off-topic just to get into especially as a child.

Have a wonderful day you and your hell.

#A moderator please clean this topic.