i think need add delay for closed user if item are sold.
but ofc we are fix it soon :D for me offtrade not needed function... only for trading (zen/wcoin).
Delay for PShop open, because you no have time for start offtrade or correct price you item.
This delay created only by me :D with my "true" skill xD
Test it:
search for:
Code:
LogAddTD("[PShop] [%s][%s] is Receiving PShop List From [%s][%s]",
gObj[aSourceIndex].AccountID, gObj[aSourceIndex].Name, lpObj->AccountID, lpObj->Name);
gObj[aSourceIndex].m_bPShopWantDeal = true;
gObj[aSourceIndex].m_iPShopDealerIndex = lpObj->m_Index;
memcpy(gObj[aSourceIndex].m_szPShopDealerName, lpObj->Name, MAX_ACCOUNT_LEN);
::CGPShopAnsBuyList(aSourceIndex, lpObj->m_Index, 1, false);
and change this function to:
Code:
if ( gOpenDelay > lpObj->gOpenDelayTick )
{
int Delay = gOpenDelay - lpObj->gOpenDelayTick;
char Text[100];
sprintf(Text, "Protect disabled after: %dsecond(s)", Delay);
GCServerMsgStringSend(Text, aSourceIndex, 1);
::CGPShopAnsBuyList(aSourceIndex, -1, 3, 0);
return;
}
else
{
LogAddTD("[PShop] [%s][%s] is Receiving PShop List From [%s][%s]",
gObj[aSourceIndex].AccountID, gObj[aSourceIndex].Name, lpObj->AccountID, lpObj->Name);
gObj[aSourceIndex].m_bPShopWantDeal = true;
gObj[aSourceIndex].m_iPShopDealerIndex = lpObj->m_Index;
memcpy(gObj[aSourceIndex].m_szPShopDealerName, lpObj->Name, MAX_ACCOUNT_LEN);
::CGPShopAnsBuyList(aSourceIndex, lpObj->m_Index, 1, false);
}
search for lpObj->OffExpSpeed = 0;
and after add this:
lpObj->gOpenDelayTick = 0;
in user.cpp search:
if(lpObj->Connected > PLAYER_LOGGED && lpObj->Type == OBJ_USER)
in this function u see check OffExp,TickTimes(n)
after this check add this:
Code:
if( lpObj->m_bPShopOpen )
{
lpObj->gOpenDelayTick++;
}
else
{
lpObj->gOpenDelayTick = 0;
}
in user.h add:
int gOpenDelayTick;
after
DWORD m_PotionTick;
ofc need create config variable:
in GameMain.cpp add:
int gOpenDelay;
after
BOOL gDoPShopOpen;
in next u need search 3xTimes
gDoPShopOpen = GetPrivateProfileInt("GameServerInfo","PersonalShopOpen", 0, gDirPath.GetNewPath("commonserver.cfg"));
and add this after (in all of 3x):
gOpenDelay = GetPrivateProfileInt("GameServerInfo","PersonalShopDelay", 0, gDirPath.GetNewPath("commonserver.cfg"));
search for:
extern BOOL gDoPShopOpen;
and add after:
extern int gOpenDelay;
if you do this u need add in CommonServer.cfg
PersonalShopDelay = 60 //-> Personal shop open delay [0-65535]