TItem Class Reference

An Object that acts as an item. More...

#import <item.h>

Inheritance diagram for TItem:

TObject TConsumable TWeapon TDrink TFood TAlcohol TDrug List of all members.

Public Member Functions

(id) - init:level:hp_max:price:weight:weight_unit:name:
(id) - free
(int) - get_lvl
(char *) - get_name
(int) - get_hp
(int) - get_hp_max
(char *) - get_description
(int) - get_price
(int) - get_weight
(char *) - get_weight_unit
(void) - set_properties:hp:
(void) - set_description:
(void) - set_equipable_locations:locations:
 Sets the variable equipable_locations.

Protected Attributes

int lvl
int hp
int hp_max
int price
int weight
char * weight_unit
char * name
char * desc
int * equipable_locations
 An array of defined locations where this item can be equiped.
int len
 Size of the equipable_locations array.

Detailed Description

An Object that acts as an item.

This class is quite generic. Subclasses such as TFood and TWeapon are more specific and usefull. TItem will normally never be created, only be used as a container class.

Definition at line 35 of file item.h.


Member Function Documentation

- (void) set_equipable_locations: (int *) 
locations: (int)  len
 
 

Sets the variable equipable_locations.

If there was a previous array there, it will be free'd and replaced.

Parameters:
locations An integer array of locations that this item can be equiped at.
len Size of the array.

Definition at line 143 of file item.m.

References free.


The documentation for this class was generated from the following files:
Generated on Wed Dec 21 13:16:08 2005 for Toten by  doxygen 1.4.5 SourceForge.net Logo