#include <item.h>
Inheritance diagram for TArmor:
Public Methods | |
TArmor () | |
TArmor (const TArmor &OldArmor) | |
virtual | ~TArmor () |
virtual bool | load (TDataPackageList *in) |
virtual bool | save (TDataPackageList *out) const |
virtual TItem::tItemType | getItemType () const |
virtual void | setHitPoints (const int2 HitPoints) |
virtual int2 | getHitPoints () const |
virtual void | setArmorType (TArmorType *ArmorType) |
virtual const TArmorType * | getArmorType () const |
virtual int2 | getArmorEfficiency (const TItem::tWeaponType WeaponType) const |
virtual bool | operator== (const TArmor &Armor) const |
virtual TArmor & | operator= (const TArmor &Armor) |
Protected Attributes | |
int2 | fHitPoints |
TLink< TArmorType > | fArmorType |
|
This constructor generates a new TArmor object with all properties resetted. This means you have to set all properties like name and mass afterwards with help of the respective set<something> methods. |
|
This constructor creates also a new armor, but the attributes are copied from the armor given in OldArmor. Mostly implemented to provide a copy constructor.
|
|
Destructs the object. Has nothing else to do, because no memory has to be freed or similar stuff. |
|
With the method getArmorEfficiency you can get the efficiency value of the armor against a certain weapon type.
|
|
With the method getArmotType you can get the type of the armor. The type is returned as object of type TDefenseType.
|
|
With the method getHitPoints you can get the amount of hit points the armor has.
|
|
The method getItemType returns the type of the item, in this case TItem::ARMOR for armor.
Reimplemented from TItem. |
|
The method Load loads a TArmor object from the data packages in the list.
Reimplemented from TItem. |
|
This is the assignment operator for TArmor. |
|
With the method operator== you can compare two TArmor objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TArmor object by adding the data packages to the list.
Reimplemented from TItem. |
|
With the method setArmorType you can set the type of the armor. The type is expected as object of type TDefenseType.
|
|
The method setHitPoints sets the amount of hit points the armor has.
|
|
the type of the armor (see TDefenseType) |
|
the hit points the armor has |