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
}