- Mesh upload support
- LLMesh asset decoding and encoding (inc. LLPhysicsConvex, LLSkin, LLSubMesh) - Query inventory folder by type - onSelectedObject event - fetchInventoryItem command - Fix packing/unpacking of object shape - Time sync with SimulatorViewerTimeMessage - Changed several classes to a .from style rather than setting up in the constructor (exception friendly) - Whole bunch of other improvements - Object building
This commit is contained in:
@@ -5,7 +5,7 @@ import {AssetType, InventoryItemFlags} from '..';
|
||||
|
||||
export class InventoryItem
|
||||
{
|
||||
assetID: UUID = UUID.zero();;
|
||||
assetID: UUID = UUID.zero();
|
||||
inventoryType: InventoryType;
|
||||
name: string;
|
||||
salePrice: number;
|
||||
@@ -39,4 +39,30 @@ export class InventoryItem
|
||||
group: UUID.zero(),
|
||||
groupOwned: false
|
||||
};
|
||||
}
|
||||
|
||||
getCRC(): number
|
||||
{
|
||||
let crc = 0;
|
||||
crc += this.assetID.CRC();
|
||||
crc += this.parentID.CRC();
|
||||
crc += this.itemID.CRC();
|
||||
crc += this.permissions.creator.CRC();
|
||||
crc += this.permissions.owner.CRC();
|
||||
crc += this.permissions.group.CRC();
|
||||
crc += this.permissions.ownerMask;
|
||||
crc += this.permissions.nextOwnerMask;
|
||||
crc += this.permissions.everyoneMask;
|
||||
crc += this.permissions.groupMask;
|
||||
crc += this.flags;
|
||||
crc += this.inventoryType;
|
||||
crc += this.type;
|
||||
crc += Math.round(this.created.getTime() / 1000);
|
||||
crc += this.salePrice;
|
||||
crc += this.saleType * 0x07073096;
|
||||
while (crc > 4294967295)
|
||||
{
|
||||
crc -= 4294967295;
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user