Project-Diablo-2 / BH

A modified version of slashdiablo's BH for Project Diablo 2
GNU Affero General Public License v3.0
24 stars 25 forks source link

Only process filter rules when we have item attrs #21

Closed fergushev closed 1 year ago

fergushev commented 1 year ago

The old packet behavior was already doing this, I just missed it when I moved things over.

if (ItemAttributeMap.find(item->code) == ItemAttributeMap.end()) {
    HandleUnknownItemCode(item->code, "from packet");
    *success = false;
    return;
}

It would only trigger the loot filter rules when success == true, so this code block would prevent the crashes we've been seeing.