Sziasztok!
Ahogy szépen építem a forrásom, igyekszem nem "Kontár" munkt végezni.
Adott ugye a téma: https://metin2dev.org/board/index.php?/topic/272-collection-short-guides-and-tips/ (https://metin2dev.org/board/index.php?/topic/272-collection-short-guides-and-tips/)
Drop hack kivédése...azonban akárhogy írom meg a kódot nem fut le.
Hiba:
Idézchar_item.cpp:5458: error: expected unqualified-id before 'if'
gmake: *** [OBJDIR/char_item.o] Error 1
Valakinek esetleg valami ötlet?
(Minden mást amit ott írt a Sanchez beraktam..
Funkció:
Az 5458. sortól:
Idézif (pkItemToDrop->AddToGround (GetMapIndex(), pxPos))
{
if (thecore_pulse() > LastDropTime + 25)
{
CountDrops = 0;
}
if (thecore_pulse() < LastDropTime + 25 && CountDrops >= 4)
{
CountDrops = 0;
sys_err("%s[%d] has been disconnected because of drophack using", GetName(), GetPlayerID());
GetDesc()->SetPhase(PHASE_CLOSE);
return false;
}
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("¶łľîÁř ľĆŔĚĹŰŔş 3şĐ ČÄ »ç¶óÁý´Ď´Ů."));
pkItemToDrop->StartDestroyEvent(30);
ITEM_MANAGER::instance().FlushDelayedSave (pkItemToDrop);
char szHint[32 + 1];
snprintf (szHint, sizeof (szHint), "%s %u %u", pkItemToDrop->GetName(), pkItemToDrop->GetCount(), pkItemToDrop->GetOriginalVnum());
LogManager::instance().ItemLog (this, pkItemToDrop, "DROP", szHint);
LastDropTime = thecore_pulse();
CountDrops++;
}
Idézchar_item.cpp:5458: error: expected unqualified-id before 'if'
Tehát pár sok kellene az 5458 előttiekből is.