d2item

package
v0.0.0-...-7f92c57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package d2item provides a generic interface for what the OpenDiablo2 engine considers to be an item.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Equipper

type Equipper interface {
	EquippedItems() []Item
	CarriedItems() []Item
}

Equipper is an interface for something that can equip items

type Item

type Item interface {
	Context() StatContext
	SetContext(StatContext)

	Label() string
	Description() string
}

Item describes all types of item that can be placed in the player inventory grid (not just things that can be equipped!)

type StatContext

type StatContext interface {
	Equipper
	BaseStatList() d2stats.StatList
	StatList() d2stats.StatList
}

StatContext is anything which has a `StatList` method which yields a StatList. This is used for resolving stat dependencies for showing actual values, like stats that are based off of the current character level

Directories

Path Synopsis
Package diablo2item provides the Diablo 2 implementation of items for the OpenDiablo2 interfaces
Package diablo2item provides the Diablo 2 implementation of items for the OpenDiablo2 interfaces

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL