Emu Server Check for No Drop Exploit
As of Emu Server build 1090 there is now a check for this exploit and if you try to either drop and item or drop a bag with an item it poofs and you get the message, "No Drop Exploit: Items Destroyed.".
Here's the code they've included to check for this;
// Drop item from inventory to ground (generally only dropped from SLOT_CURSOR)
void Client:
ropItem(sint16 slot_id)
{
if (GetInv().CheckNoDrop(slot_id)) {
Message(0, "No Drop Exploit: Items Destroyed.");
GetInv().DeleteItem(slot_id);
return;
}
Putting the item in a bag is caught by this code;
// Checks All items in a bag for No Drop
bool Inventory::CheckNoDrop(sint16 slot_id) {
ItemInst* inst = GetItem(slot_id);
if (!inst) return false;
if (!inst->GetItem()->NoDrop) return true;
if (inst->GetItem()->ItemClass == 1) {
for (int16 i=0; i<10; i++) {
ItemInst* bagitem = GetItem(Inventory::CalcSlotId(slot_id, i));
if (bagitem && !bagitem->GetItem()->NoDrop) return true;
}
}
return false;
}
Simple but effective. I'm wondering if the work around for this might be to make the bag not appear to be a bag and bypass the check of items inside the bag. Can ItemClass be changed from 1 to skip this check and let the bag be dropped with a No Drop item in it?
if (inst->GetItem()->ItemClass == 1) {
Your thoughts would be appreciated!