Core/Items: Fixed sending child items by mail if loading from db fails

Port From (https://github.com/TrinityCore/TrinityCore/commit/7038c74f438ba9e9a04984083d46563bc2903432)
This commit is contained in:
hondacrx
2020-05-22 13:57:45 -04:00
parent 162e29774d
commit 13cb4fb0ee
+6 -1
View File
@@ -97,7 +97,12 @@ namespace Game.Entities
item.CopyArtifactDataFromParent(parent);
}
else
err = InventoryResult.WrongBagType3; // send by mail
{
Log.outError(LogFilter.Player, $"Player._LoadInventory: Player '{GetName()}' ({GetGUID().ToString()}) has child item ({item.GetGUID()}, entry: {item.GetEntry()}) which can't be loaded into inventory because parent item was not found (Bag {bagGuid}, slot: {slot}). Item will be sent by mail.");
item.DeleteFromInventoryDB(trans);
problematicItems.Enqueue(item);
continue;
}
}
// Item is not in bag