Localised error message
This commit is contained in:
parent
804e973124
commit
335806bfd8
@ -141,6 +141,7 @@
|
||||
"inventory-unable_to_inspect_item_not_in_db": "Unable to inspect item: %s as it cannot be found in the items DB",
|
||||
"inventory-unable_to_remove_item_id_not_found": "Unable to remove item with Id: {{childId}} from profile: {{profileId}} as it could not be found",
|
||||
"inventory-unable_to_remove_item_no_id_given": "Unable to remove item as no itemId supplied",
|
||||
"inventory-unable_to_remove_item_restart_immediately": "Unable to remove item: {{item}} from mail: {{mailId}} as item could not be found, RESTART GAME CLIENT IMMEDIATELY to prevent data corruption",
|
||||
"inventory-unable_to_sort_inventory_restart_game": "Unable to find inventory item: %s to auto-sort, YOU MUST RELOAD YOUR GAME IMMEDIATELY TO AVOID CORRUPTING YOUR PROFILE",
|
||||
"inventory-unable_to_toggle_item_not_found": "Unable to toggle inventory item with id: %s, item not found",
|
||||
"item-durability_value_invalid_use_default": "getRepairableItemQualityValue() weapon tpl: %s durability value is invalid, defaulting to 1",
|
||||
|
@ -551,7 +551,7 @@ export class InventoryHelper
|
||||
const dialogs = Object.values(fullProfile.dialogues);
|
||||
for (const dialog of dialogs)
|
||||
{
|
||||
const messageWithReward = dialog.messages.find((x) => x._id === removeRequest.fromOwner.id);
|
||||
const messageWithReward = dialog.messages.find((message) => message._id === removeRequest.fromOwner.id);
|
||||
if (messageWithReward)
|
||||
{
|
||||
// Find item + any possible children and remove them from mails items array
|
||||
@ -566,8 +566,10 @@ export class InventoryHelper
|
||||
if (indexOfItemToRemove === -1)
|
||||
{
|
||||
this.logger.error(
|
||||
`Unable to remove item: ${removeRequest.item} from mail: ${removeRequest.fromOwner.id} as item could not be found, restart client immediately to prevent data corruption`,
|
||||
this.localisationService.getText("inventory-unable_to_remove_item_restart_immediately",
|
||||
{ item: removeRequest.item, mailId: removeRequest.fromOwner.id }),
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
messageWithReward.items.data.splice(indexOfItemToRemove, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user