Item
The Item class represent a single in-game Item object. Examples of Item are: Swords, bags, bandages, reagents, clothing. While the Item.Serial is unique for each Item, Item.ItemID is the unique for the Item apparence, or image. Sometimes is also called ID or Graphics ID. Item can also be house foriture as well as decorative items on the ground, like lamp post and banches. However, for Item on the ground that cannot be picked up, they might be part of the world map, see Statics class.
TODO: Item Constructors
Properties
Item
.
Amount
Int32
Item
.
Amount
Int32
Read amount from item type object.
Item
.
Container
Int32
Item
.
Container
Int32
Serial of the container which contains the object.
Item
.
Contains
List[Item]
Item
.
Contains
List[Item]
Contains the list of Item inside a container.
Item
.
Deleted
Boolean
Item
.
Deleted
Boolean
Item
.
Direction
String
Item
.
Direction
String
Item direction.
Item
.
Durability
Int32
Item
.
Durability
Int32
Get the current durability of an Item. (0: no durability)
Item
.
GridNum
Byte
Item
.
GridNum
Byte
Returns the GridNum of the item. (need better documentation)
Item
.
Hue
Int32
Item
.
Hue
Int32
Item
.
Image
Bitmap
Item
.
Image
Bitmap
Get the in-game image on an Item as Bitmap object. See MSDN: https://docs.microsoft.com/dotnet/api/system.drawing.bitmap
Item
.
IsBagOfSending
Boolean
Item
.
IsBagOfSending
Boolean
True: if the item is a bag of sending - False: otherwise.
Item
.
IsContainer
Boolean
Item
.
IsContainer
Boolean
True: if the item is a container - False: otherwise.
Item
.
IsCorpse
Boolean
Item
.
IsCorpse
Boolean
True: if the item is a corpse - False: otherwise.
Item
.
IsDoor
Boolean
Item
.
IsDoor
Boolean
True: if the item is a door - False: otherwise.
Item
.
IsInBank
Boolean
Item
.
IsInBank
Boolean
True: if the item is in the Player's bank - False: otherwise.
Item
.
IsLootable
Boolean
Item
.
IsLootable
Boolean
True: For regualar items - False: for hair, beards, etc.
Item
.
IsPotion
Boolean
Item
.
IsPotion
Boolean
True: if the item is a potion - False: otherwise.
Item
.
IsResource
Boolean
Item
.
IsResource
Boolean
True: if the item is a resource (ore, sand, wood, stone, fish) - False: otherwise
Item
.
IsSearchable
Boolean
Item
.
IsSearchable
Boolean
True: if the item is a pouch - False: otherwise.
Item
.
IsTwoHanded
Boolean
Item
.
IsTwoHanded
Boolean
True: if the item is a 2-handed weapon - False: otherwise.
Item
.
IsVirtueShield
Boolean
Item
.
IsVirtueShield
Boolean
True: if the item is a virtue shield - False: otherwise.
Item
.
ItemID
Int32
Item
.
ItemID
Int32
Represents the type of Item, usually unique for the Item image. Sometime called ID or Graphics ID.
Item
.
Layer
String
Item
.
Layer
String
Gets the Layer, for werable items only. (need better documentation)
Item
.
Light
Byte
Item
.
Light
Byte
Item light's direction (e.g. will affect corpse's facing direction)
Item
.
MaxDurability
Int32
Item
.
MaxDurability
Int32
Get the maximum durability of an Item. (0: no durability)
Item
.
Movable
Boolean
Item
.
Movable
Boolean
Item is movable
Item
.
Name
String
Item
.
Name
String
Item name
Item
.
OnGround
Boolean
Item
.
OnGround
Boolean
True: if the item is on the ground - False: otherwise.
Item
.
Position
Point3D
Item
.
Position
Point3D
Item
.
Properties
List[Property]
Item
.
Properties
List[Property]
Get the list of Properties of an Item.
Item
.
PropsUpdated
Boolean
Item
.
PropsUpdated
Boolean
True: if Properties are updated - False: otherwise.
Item
.
RootContainer
Int32
Item
.
RootContainer
Int32
Get serial of root container of item.
Item
.
Serial
Int32
Item
.
Serial
Int32
Item
.
Updated
Boolean
Item
.
Updated
Boolean
Check if the Item already have been updated with all the properties. (need better documentation)
Item
.
Visible
Boolean
Item
.
Visible
Boolean
Item is Visible
Item
.
Weight
Int32
Item
.
Weight
Int32
Get the weight of a item. (0: no weight)
Methods
Item
.
DistanceTo
(
mob
)
Item
.
DistanceTo
(
mob
)
Return the distance in number of tiles, from Item to Mobile.
Parameters
mob
Mobile
Item
Target as Item Target as Mobile
Return
Int32
Distance in number of tiles.
Item
.
GetWorldPosition
()
Item
.
GetWorldPosition
()
Return
Point3D

Item
.
IsChildOf
(
container
)
Item
.
IsChildOf
(
container
)
Check if an Item is contained in a container. Can be a Item or a Mobile (wear by).
Parameters
container
Mobile
Item
Mobile as container. Item as container.
Return
Boolean
True: if is contained - False: otherwise.
Item
.
ToString
()
Item
.
ToString
()
Return
String