• Issues an immediate order for the unit to use item pointed at position (x,y).

    This is the same as left-clicking and using an item in inventory. Units that cannot use items will not do anything.

    Examples:

    • Potion of Healing 'phea': Restores HP

    • Dagger of Escape 'desc': Casts immediately towards (x,y), even if too far, item on cooldown. Does not cast if position is already reached (no cooldown).

    • Inferno Stone 'infs': runs towards (x,y) and once in range, casts to spawn an Infernal. If already in range, casts immediately.

    Parameters

    • whichUnit: Unit<UnitEventMap>

      Target unit.

    • whichItem: Item<ItemEventMap>

      Handle to item instance.

    • x: number

      Point at X map coordinate to use the item.

    • y: number

      Point at Y map coordinate to use the item.

    Returns boolean

    Bug

    Seems to always return false (tested v1.32.10).

    Note

    See: UnitUseItem, UnitUseItemTarget.

Generated using TypeDoc