Loot/Errors

* gracefully handle loot referencing nonexistent items
This commit is contained in:
Sarjuuk
2024-04-18 14:12:20 +02:00
committed by GitHub
parent 97d59dbb98
commit 67d4f12cfe

View File

@@ -308,6 +308,12 @@ class Loot
if (empty($loot['reference'])) // regular drop
{
if (!isset($foo[$loot['content']]))
{
trigger_error('Item #'.$loot['content'].' referenced by loot does not exist!', E_USER_WARNING);
continue;
}
if (!User::isInGroup(U_GROUP_EMPLOYEE))
{
if (!isset($this->results[$loot['content']]))