hello everyone
I added k inventory but
I can sell anything from normal inventory to NPC but If we sell any item from the k inventory to NPC,throws it to the login screen.
game syserr
packet.h
I think there is an bug in the input_main file
case SHOP_SUBHEADER_CG_SELL:
{
#ifdef ENABLE_SPECIAL_STORAGE
if (uiBytes < sizeof(BYTE) + sizeof(BYTE) + sizeof(BYTE))
return -1;
const BYTE wPos = *reinterpret_cast<const BYTE*>(c_pData);
const BYTE bCount = *(c_pData + sizeof(BYTE));
const BYTE bType = *(c_pData + sizeof(BYTE) + sizeof(BYTE));
sys_log(0, "INPUT: %s SHOP: SELL", ch->GetName());
CShopManager::instance().Sell(ch, wPos, bCount, bType);
return sizeof(BYTE) + sizeof(BYTE) + sizeof(BYTE);
#else
if (uiBytes < sizeof(BYTE))
return -1;
BYTE pos = *c_pData;
sys_log(0, "INPUT: %s SHOP: SELL", ch->GetName());
CShopManager::instance().Sell(ch, pos);
return sizeof(BYTE);
#endif
}
case SHOP_SUBHEADER_CG_SELL2:
{
#ifdef ENABLE_SPECIAL_STORAGE
if (uiBytes < sizeof(BYTE) + sizeof(BYTE) + sizeof(BYTE))
return -1;
const BYTE wPos = *reinterpret_cast<const BYTE*>(c_pData);
const BYTE bCount = *(c_pData + sizeof(BYTE));
const BYTE bType = *(c_pData + sizeof(BYTE) + sizeof(BYTE));
sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName());
CShopManager::instance().Sell(ch, wPos, bCount, bType);
return sizeof(BYTE) + sizeof(BYTE) + sizeof(BYTE);
#else
if (uiBytes < sizeof(BYTE) + sizeof(BYTE))
return -1;
BYTE pos = *(c_pData++);
BYTE count = *(c_pData);
sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName());
CShopManager::instance().Sell(ch, pos, count);
return sizeof(BYTE) + sizeof(BYTE);
#endif
help me pls