Ensure task copied inventory is named correctly

This commit is contained in:
Casper Warden
2023-11-22 00:42:05 +00:00
parent c487df6d4f
commit d841bb86b6
4 changed files with 125 additions and 15 deletions

View File

@@ -2000,7 +2000,7 @@ export class GameObject implements IGameObjectData
return GameObject.takeManyToInventory(this.region, [this], folder);
}
async dropInventoryIntoContents(inventoryItem: InventoryItem | UUID, newName?: string): Promise<void>
async dropInventoryIntoContents(inventoryItem: InventoryItem | UUID): Promise<void>
{
const transactionID = UUID.zero();
@@ -2043,7 +2043,7 @@ export class GameObject implements IGameObjectData
Flags: inventoryItem.flags,
SaleType: inventoryItem.saleType,
SalePrice: inventoryItem.salePrice,
Name: Utils.StringToBuffer(newName ?? inventoryItem.name),
Name: Utils.StringToBuffer(inventoryItem.name),
Description: Utils.StringToBuffer(inventoryItem.description),
CreationDate: inventoryItem.created.getTime() / 1000,
CRC: inventoryItem.getCRC()