[Help] Penya buy bug

05/01/2020 15:45 aoyamananami#1
I encounter a penya buy bug, i vend on privateshop and set the price to 1b , and i use another/dual account to buy it and my vendor receive 2b. Does anyone have this fix please help.
05/01/2020 23:43 FIorist#2
Quote:
Originally Posted by aoyamananami View Post
I encounter a penya buy bug, i vend on privateshop and set the price to 1b , and i use another/dual account to buy it and my vendor receive 2b. Does anyone have this fix please help.

I'm not sure, but you may have the AddGold string duplicated somewhere at MoverItem.cpp

Try checking this file and finding an extra line in it:
MoverItem.cpp

Code:
m_pOwner->AddGold(pItemBase->m_nCost * nNum);
05/01/2020 23:51 aoyamananami#3
Quote:
Originally Posted by Zzz.. View Post
I'm not sure, but you may have the AddGold string duplicated somewhere at MoverItem.cpp

Try checking this file and finding an extra line in it:
MoverItem.cpp

Code:
m_pOwner->AddGold(pItemBase->m_nCost * nNum);
Ill try this,for now ive just disabled the price on penya, by editing the max exceed of selling price from 2.1b to 1penya so theh cant sell item using penya then they obligate to sell item using other currency.

Edit
Like what youve said, ive seen the duplicated, thank you very much, i didnt even see that duplicate. Now it will never x2 if they buy it . Thanks again
05/02/2020 00:12 Ecrypter#4
Quote:
Originally Posted by aoyamananami View Post
I encounter a penya buy bug, i vend on privateshop and set the price to 1b , and i use another/dual account to buy it and my vendor receive 2b. Does anyone have this fix please help.
i've encounter this before but its fix. this is the issue of player own shop right? .
05/02/2020 01:15 aoyamananami#5
Quote:
Originally Posted by Ecrypter View Post
i've encounter this before but its fix. this is the issue of player own shop right? .
Yses, known as privateshop.
05/02/2020 16:28 Ecrypter#6
Quote:
Originally Posted by aoyamananami View Post
Yses, known as privateshop.

Go to your MoverItem.cpp in _common folder

find :
PHP Code:
#ifdef __WORLDSERVER
#include "user.h"
extern    CUserMng            g_UserMng;
#endif    // WORLDSERVER 
Change to this
PHP Code:
#ifdef __WORLDSERVER
#include "user.h"
#include "DPDatabaseClient.h"
extern    CUserMng            g_UserMng;
extern  CDPDatabaseClient   g_dpDBClient;
#endif    // WORLDSERVER 
leave this part
PHP Code:
            cBuyItem.m_nItemNum nNextPrice;
            if( !
m_pOwner->CreateItem( &cBuyItem ) )
                
g_dpDBClient.SendQueryPostMailm_pOwner->m_idPlayerNULLcBuyItemNULL"Shop Item""Your items." ); 
look this:
PHP Code:
    pBuyer->AddGold( -( pItemBase->m_nCost nNum ) );
    
m_pOwner->AddGoldpItemBase->m_nCost nNum ); 
Change to this:
PHP Code:
//    pBuyer->AddGold( -( pItemBase->m_nCost * nNum ) );
//    m_pOwner->AddGold( pItemBase->m_nCost * nNum ); 
05/02/2020 20:01 aoyamananami#7
Quote:
Originally Posted by Ecrypter View Post
Go to your MoverItem.cpp in _common folder

find :
PHP Code:
#ifdef __WORLDSERVER
#include "user.h"
extern    CUserMng            g_UserMng;
#endif    // WORLDSERVER 
Change to this
PHP Code:
#ifdef __WORLDSERVER
#include "user.h"
#include "DPDatabaseClient.h"
extern    CUserMng            g_UserMng;
extern  CDPDatabaseClient   g_dpDBClient;
#endif    // WORLDSERVER 
leave this part
PHP Code:
            cBuyItem.m_nItemNum nNextPrice;
            if( !
m_pOwner->CreateItem( &cBuyItem ) )
                
g_dpDBClient.SendQueryPostMailm_pOwner->m_idPlayerNULLcBuyItemNULL"Shop Item""Your items." ); 
look this:
PHP Code:
    pBuyer->AddGold( -( pItemBase->m_nCost nNum ) );
    
m_pOwner->AddGoldpItemBase->m_nCost nNum ); 
Change to this:
PHP Code:
//    pBuyer->AddGold( -( pItemBase->m_nCost * nNum ) );
//    m_pOwner->AddGold( pItemBase->m_nCost * nNum ); 
Like what i said above i already fixed it