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:
@@ -97,7 +97,12 @@ namespace Game.Entities
|
|||||||
item.CopyArtifactDataFromParent(parent);
|
item.CopyArtifactDataFromParent(parent);
|
||||||
}
|
}
|
||||||
else
|
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
|
// Item is not in bag
|
||||||
|
|||||||
Reference in New Issue
Block a user