Probleme special storage.

  • Autor subiect yonr1
  • Dată creare
  • Răspunsuri: Răspunsuri 6
  • Vizualizări: Vizualizări 342
Stare
Nu este deschis pentru răspunsuri viitoare.

yonr1

Member
27 Dec 2018
152
2
18
30
bucuresti
Monede Dragon
0
am bagat acest sistem, special storage Infomanii - Din pasiune pentru jocuri !
si am ceasta erroare la compilare

input_main.cpp: In member function 'int CInputMain::Shop(CHARACTER*, const char*, size_t)':
input_main.cpp:1121: error: 'class CShopManager' has no member named 'Buy'

la linia asta

int CInputMain::Shop(LPCHARACTER ch, const char * data, size_t uiBytes)
{
TPacketCGShop * p = (TPacketCGShop *) data;

if (uiBytes < sizeof(TPacketCGShop))
return -1;

if (test_server)
sys_log(0, "CInputMain::Shop() ==> SubHeader %d", p->subheader);

const char * c_pData = data + sizeof(TPacketCGShop);
uiBytes -= sizeof(TPacketCGShop);

switch (p->subheader)
{
case SHOP_SUBHEADER_CG_END:
sys_log(1, "INPUT: %s SHOP: END", ch->GetName());
CShopManager::instance().StopShopping(ch);
return 0;

case SHOP_SUBHEADER_CG_BUY:
{
if (uiBytes < sizeof(BYTE) + sizeof(BYTE))
return -1;

BYTE bPos = *(c_pData + 1);
sys_log(1, "INPUT: %s SHOP: BUY %d", ch->GetName(), bPos);
CShopManager::instance().Buy(ch, bPos);
return (sizeof(BYTE) + sizeof(BYTE));
}

case SHOP_SUBHEADER_CG_SELL:
{
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);
}
#ifdef ENABLE_SPECIAL_STORAGE
case SHOP_SUBHEADER_CG_SELL2:
{
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
case SHOP_SUBHEADER_CG_SELL2:
{
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
default:
sys_err("CInputMain::Shop : Unknown subheader %d : %s", p->subheader, ch->GetName());
break;
}

return 0;
}
 
Ultima editare:
Hello @yonr1,

We are changing the status of this ticket to closed as we have not heard back from you in 7 days.
 
Stare
Nu este deschis pentru răspunsuri viitoare.