#include <item.h>
Inheritance diagram for TShield:
Public Methods | |
TShield () | |
TShield (const TShield &OldShield) | |
virtual | ~TShield () |
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 | setShieldType (TShieldType *ShieldType) |
virtual const TShieldType * | getShieldType () const |
virtual int2 | getShieldEfficiency (const TItem::tWeaponType WeaponType) const |
virtual bool | operator== (const TShield &Shield) const |
virtual TShield & | operator= (const TShield &Shield) |
Protected Attributes | |
int2 | fHitPoints |
TLink< TShieldType > | fShieldType |
|
This constructor generates a new TShield 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 shield, but the attributes are copied from the shield given in OldShield. 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 getHitPoints you can get amount of hit points the shield has.
|
|
The method getItemType returns the type of the item, in this case TItem::SHIELD for shield.
Reimplemented from TItem. |
|
With the method getShieldEfficiency you can get the efficiency value of the shield against a certain weapon type.
|
|
With the method getArmotType you can get the type of the shield. The type is returned as object of type TDefenseType.
|
|
The method Load loads a TShield object from the data packages in the list.
Reimplemented from TItem. |
|
This is the assignment operator for TShield. |
|
With the method operator== you can compare two TShield objects. This is of course the behaviour one would expect from "operator==".
|
|
The method Save saves a TShield object by adding the data packages to the list.
Reimplemented from TItem. |
|
The method setHitPoints sets the amount of hit points the shield has.
|
|
With the method setShieldType you can set the type of the shield. The type is expected as object of type TDefenseType.
|
|
the amount of hit points the shield has |
|
the type of the shield (see TDefenseType) |