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