Jump to content

Recommended Posts

Hello. I want to put the offline shop into my server. 

That's my leisure activities.

 

but i now stucked  here.

I should put 

#ifdef ENABLE_PREMIUM_PRIVATE_SHOP
		if(pi->bIsPrivateShop)

in the code

But its starting with 

		if (pi->ip[0] == 0)

 

how should put the codes ?

Is it right, if i would like that way?

 

if (pi->ip[0] == 0)
#ifdef ENABLE_PREMIUM_PRIVATE_SHOP
        else if(pi->bIsPrivateShop) 

i didn't compile, and save 'till i don't know its works or not .

Sorry, i forget the whole lines

 

Original  code

		if (pi->ip[0] == 0)
			pkPeer->EncodeHeader(HEADER_DG_SAFEBOX_LOAD, dwHandle, sizeof(TSafeboxTable) + sizeof(TPlayerItem) * s_items.size());
		else
			pkPeer->EncodeHeader(HEADER_DG_MALL_LOAD, dwHandle, sizeof(TSafeboxTable) + sizeof(TPlayerItem) * s_items.size());

		pkPeer->Encode(pi->pSafebox, sizeof(TSafeboxTable));

		if (!s_items.empty())
			pkPeer->Encode(&s_items[0], sizeof(TPlayerItem) * s_items.size());

		delete pi;

 

What i have to change:

 

#ifdef ENABLE_PREMIUM_PRIVATE_SHOP
		if(pi->bIsPrivateShop)
			pkPeer->EncodeHeader(HEADER_DG_PREMIUM_PRIVATE_SHOP_LOAD, dwHandle, sizeof(TSafeboxTable) + sizeof(TPlayerItem) * s_items.size());
		else
			pkPeer->EncodeHeader(pi->ip[0] == 0 ? HEADER_DG_SAFEBOX_LOAD : HEADER_DG_MALL_LOAD, dwHandle, sizeof(TSafeboxTable) + sizeof(TPlayerItem) * s_items.size());			
#else
		pkPeer->EncodeHeader(pi->ip[0] == 0 ? HEADER_DG_SAFEBOX_LOAD : HEADER_DG_MALL_LOAD, dwHandle, sizeof(TSafeboxTable) + sizeof(TPlayerItem) * s_items.size());
#endif

 

 

Ofc, i coukd change to my files, how its uses the codes, but idk how to define double statments

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • Active Member
35 minutes ago, Megvagyokkoszi said:

Its the free version. I don't want to pay, becuz i don't planed to open a server 

Free = Better demon 

you go buy for better and greater security

if buy offlineshop not search people from turkey-romania-germany = not good method you buy from people arabic

Link to comment
Share on other sites

What?Why should i buy? I said i don't want open a metin2 server, its just , for me a hobby when i boring. So please don't try to convict me to buy anything.  Becuz i don't want buy something, what not gives back money, i don't want open a metin2 server.... I just want to learn something....

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.