- Katılım
- 9 May 2019
- Konular
- 24
- Mesajlar
- 235
- Online süresi
- 17g 41857s
- Reaksiyon Skoru
- 40
- Altın Konu
- 0
- Başarım Puanı
- 87
- TM Yaşı
- 6 Yıl 11 Ay 17 Gün
- MmoLira
- 2,526
- DevLira
- 6
Metin2 EP, Valorant VP dahil tüm oyun ürünlerini en uygun fiyatlarla bulabilir, Item ve Karakterlerinizi hızlıca satabilirsiniz. HEMEN TIKLA!
Konudaki Çözüm olarak verilen kodu alıp varolanla değiştim sonra ortaya çıkan bu hata
ACMD(do_sort_items):
ACMD(do_sort_items)
{
if (ch->IsDead() || ch->GetExchange() || ch->IsOpenSafebox() || ch->IsCubeOpen())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Sistem> Bu islemi yapmak icin aktif olan pencereleri kapatiniz"));
return;
}
for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
{
LPITEM item = ch->GetInventoryItem(i);
if (!item)
continue;
if (item->isLocked())
continue;
if (item->GetCount() == 200)
continue;
if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
{
for (int j = i; j < INVENTORY_MAX_NUM; ++j)
{
LPITEM item2 = ch->GetInventoryItem(j);
if (!item2)
continue;
if (item2->isLocked())
continue;
if (item2->GetVnum() == item->GetVnum())
{
bool bStopSockets = false;
for (int k = 0; k < ITEM_SOCKET_MAX_NUM; ++k)
{
if (item2->GetSocket(k) != item->GetSocket(k))
{
bStopSockets = true;
break;
}
}
if (bStopSockets)
continue;
BYTE bAddCount = MIN(200 - item->GetCount(), item2->GetCount());
item->SetCount(item->GetCount() + bAddCount);
item2->SetCount(item2->GetCount() - bAddCount);
continue;
}
}
}
}
}
bu sekılde komple blogu değiştir dene




