- Mesaj
- 5.652
- Çözümler
- 235
- Beğeni
- 6.778
- Puan
- 3.850
- Ticaret Puanı
- 7
selamlar. doğru gözüken bir uyarlama fakat eşyayı okumuyor ben mi bir yerde yanlış yapıyorum diye size de sormak istedim. countspecifyitem den eşyaları okuyor. eşya aslında var ama okuyamıyor sanırım. anlamadım. düşüncesi olan? eklediğim konu aşağıda.
C++:
if (dwWItemVnum > 0)
if (ch->CountSpecifyItem(dwWItemVnum) < (int)dwPrice)
return SHOP_SUBHEADER_GC_NOT_ENOUGH_ITEM;
C++:
int CHARACTER::CountSpecifyItem(DWORD vnum) const
{
int count = 0;
LPITEM item;
for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
{
item = GetInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
{
continue;
}
else
{
count += item->GetCount();
}
}
}
#ifdef ENABLE_SPECIAL_STORAGE
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetUpgradeInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetBookInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetStoneInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetFlowerInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetAttrInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetChestInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
#endif
return count;
}
Geçenlerde arayan arkadaş vardı. Aradığım şeyler için 60-70 sayfa gezince bunu da buldum. Burada paylaşayım dedim. aXseee 'den alıntıdır.
Burayı görüntülemek için üye girişi yapmalı veya kayıt olmalısınız.
- hasanmacit
- metin2 metin2 eşya ile eşya satın alma metin2 item on shop like rubinum metin2 rubinum gibi npcden eşya ile eşya alma mmotutkunlari mmotutkunları eşya ile eşya satın alma mmotutkunları metin2 mmotutkunları rubinum rubinum
- Yanıt: 5
- Forum: Metin2 Sistemleri (C++ / Python)