Перейти к основному содержанию

Armor.IArmorJSCallback

Index

Methods

Methods

hurt

  • Called when player deals damage if player wears the armor.


    Parameters

    • params: IArmorHurtParams

      additional data about damage

    • slot: ItemInstance

      current armor item instance

    • index: number

      armor slot, one of the EArmorType values

    • durability: number

      maximum damage the armor

    Returns boolean

    true, if changes to the item parameter should be applied, false otherwise.

tick

  • tick(slot: ItemInstance, index: number, durability: number): boolean
  • Called every tick if player wears the armor.


    Parameters

    • slot: ItemInstance

      current armor item instance

    • index: number

      armor slot, one of the EArmorType values

    • durability: number

      maximum damage the armor

    Returns boolean

    true, if changes to the item parameter should be applied, false otherwise.