Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ItemManager

Hierarchy

  • ItemManager

Implements

Index

Constructors

constructor

  • Returns ItemManager

Methods

addToContainerInternal

  • addToContainerInternal(item: IItem, container: IContainer, movingMultiple?: boolean, skipMessage?: boolean): void

breakContainerOnTile

  • breakContainerOnTile(itemContainer: IItem, x: number, y: number, z: number): void

checkMilestones

computeContainerWeight

  • computeContainerWeight(container: IContainer): number

countItemsInContainer

countItemsInContainerByGroup

craft

create

createFake

decayItems

  • decayItems(): boolean

derefenceContainerReference

generateLookups

  • generateLookups(): void

getAbsentPlayerWithItemInInventory

  • Parameters

    Returns IPlayer | undefined

getContainerReference

  • Parameters

    • container: IContainer | undefined
    • Optional parentObject: any
    • Default value showWarnings: boolean = true

    Returns ContainerReference

getDefaultDurability

  • getDefaultDurability(): number

getDefaultItemFromItemGroup

getDisassemblyComponents

getDisassemblyComponentsAsItemTypes

getItemInContainer

  • getItemInContainer(container: IContainer, itemTypeSearch: ItemType, ignoreItem?: IItem, excludeProtectedItems?: boolean): IItem | undefined
  • Parameters

    • container: IContainer
    • itemTypeSearch: ItemType
    • Optional ignoreItem: IItem
    • Default value excludeProtectedItems: boolean = false

    Returns IItem | undefined

getItemInContainerByGroup

  • getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup, ignoreItemId?: number, excludeProtectedItems?: boolean): IItem | undefined

getItemInInventoryByGroup

  • Parameters

    Returns IItem | undefined

getItemTypeGroupName

getItemsInContainer

  • getItemsInContainer(container: IContainer, includeSubContainers?: boolean, excludeProtectedItems?: boolean): IItemArray

getItemsInContainerByGroup

getItemsInContainerByType

  • getItemsInContainerByType(container: IContainer, itemType: ItemType, includeSubContainers?: boolean, excludeProtectedItems?: boolean): IItemArray

getItemsString

getOrderedContainerItems

  • getOrderedContainerItems(container: IContainer, excludeProtectedItems?: boolean): IItem[]

getPlayerWithItemInInventory

getQualityBasedOnSkill

  • getQualityBasedOnSkill(itemQuality: ItemQuality | undefined, skillValue: number, qualityBypass?: boolean): ItemQuality | undefined

getRandomQuality

getTileContainer

  • getTileContainer(x: number, y: number, z: number): IContainer

getWeight

hasAdditionalRequirements

hasRoomInContainer

  • hasRoomInContainer(extraWeight: number, container: IContainer, itemToMove?: IItem): boolean

isContainableInAdjacentContainer

isContainableInContainer

isContainer

isInGroup

isInInventory

isItemInContainer

isItemTypeGroup

isItemTypeInGroup

isTileContainer

  • isTileContainer(container: IContainer | undefined): boolean

loadReferences

  • loadReferences(): void

loadTileReferences

  • loadTileReferences(): void

moveAllFromContainerToContainer

  • moveAllFromContainerToContainer(player: IPlayer | undefined, fromContainer: IContainer, toContainer: IContainer, itemType?: ItemType | undefined, ofQuality?: ItemQuality | undefined, checkWeight?: boolean, onMoveItem?: function): void
  • Parameters

    • player: IPlayer | undefined
    • fromContainer: IContainer
    • toContainer: IContainer
    • Optional itemType: ItemType | undefined
    • Optional ofQuality: ItemQuality | undefined
    • Default value checkWeight: boolean = true
    • Optional onMoveItem: function
        • Parameters

          Returns void

    Returns void

moveAllFromContainerToInventory

moveToContainer

placeItemsAroundLocation

  • placeItemsAroundLocation(container: IContainer, x: number, y: number, z: number, skipMessage?: boolean): void
  • Drop items in a 3x3 square around the location

    Parameters

    • container: IContainer
    • x: number
    • y: number
    • z: number
    • Default value skipMessage: boolean = true

    Returns void

reduceDismantleWeight

  • reduceDismantleWeight(createdItems: IItemArray, itemWeight: number, mod?: number): void

remove

  • remove(item: IItem): void

removeContainerItems

  • removeContainerItems(container: IContainer): void

resetMapsInContainer

  • resetMapsInContainer(container: IContainer): void

saveTileReferences

  • saveTileReferences(): void

spawn

  • spawn(itemTypes: ItemType[] | undefined, x: number, y: number, z: number): void
  • Parameters

    • itemTypes: ItemType[] | undefined
    • x: number
    • y: number
    • z: number

    Returns void

updateItemOrder

  • updateItemOrder(container: IContainer, itemOrder: number[] | undefined): void

weightTree

  • weightTree(itemType: ItemType, weightType?: WeightType, debug?: boolean, depth?: number): number
  • Parameters

    • itemType: ItemType
    • Default value weightType: WeightType = WeightType.Normal
    • Default value debug: boolean = false
    • Default value depth: number = 0

    Returns number

Generated using TypeDoc