Planeshift
Public Member Functions | Protected Attributes

psVitalManager< Vital > Class Template Reference

Manages a set of Vitals and does the predictions and updates on them when new data comes from the server. More...

#include <vitals.h>

List of all members.

Public Member Functions

unsigned int GetExp ()
 Get players experience points.
float GetHP ()
float GetMana ()
float GetMStamina ()
unsigned int GetPP ()
 Gets a players current progression points.
float GetPStamina ()
VitalGetVital (int vital)
 Get a reference to a particular vital.
 psVitalManager ()
void ResetVitals ()
 Reset to the "original" vitals (for use when killing NPCs).
void SetOrigVitals ()
 Saves the current vitals as the "original".
void SetVitals (const psVitalManager &newVitalMgr)
 ~psVitalManager ()

Protected Attributes

unsigned int experiencePoints
 Players current experience points.
csTicks lastDRUpdate
Vital origVitals [VITAL_COUNT]
unsigned int progressionPoints
 Players progression Points.
Vital vitals [VITAL_COUNT]
 A list of player vitals.

Detailed Description

template<typename Vital>
class psVitalManager< Vital >

Manages a set of Vitals and does the predictions and updates on them when new data comes from the server.

Definition at line 68 of file vitals.h.


Constructor & Destructor Documentation

template<typename Vital >
psVitalManager< Vital >::psVitalManager ( ) [inline]

Definition at line 71 of file vitals.h.

template<typename Vital >
psVitalManager< Vital >::~psVitalManager ( ) [inline]

Definition at line 77 of file vitals.h.


Member Function Documentation

template<typename Vital >
unsigned int psVitalManager< Vital >::GetExp ( ) [inline]

Get players experience points.

Definition at line 134 of file vitals.h.

template<typename Vital >
float psVitalManager< Vital >::GetHP ( ) [inline]

Definition at line 113 of file vitals.h.

template<typename Vital >
float psVitalManager< Vital >::GetMana ( ) [inline]

Definition at line 118 of file vitals.h.

template<typename Vital >
float psVitalManager< Vital >::GetMStamina ( ) [inline]

Definition at line 128 of file vitals.h.

template<typename Vital >
unsigned int psVitalManager< Vital >::GetPP ( ) [inline]

Gets a players current progression points.

Definition at line 137 of file vitals.h.

template<typename Vital >
float psVitalManager< Vital >::GetPStamina ( ) [inline]

Definition at line 123 of file vitals.h.

template<typename Vital >
Vital& psVitalManager< Vital >::GetVital ( int  vital) [inline]

Get a reference to a particular vital.

Parameters:
vital
See also:
PS_VITALS
Returns:
The vital reference.

Definition at line 106 of file vitals.h.

template<typename Vital >
void psVitalManager< Vital >::ResetVitals ( ) [inline]

Reset to the "original" vitals (for use when killing NPCs).

Definition at line 88 of file vitals.h.

template<typename Vital >
void psVitalManager< Vital >::SetOrigVitals ( ) [inline]

Saves the current vitals as the "original".

Definition at line 95 of file vitals.h.

template<typename Vital >
void psVitalManager< Vital >::SetVitals ( const psVitalManager< Vital > &  newVitalMgr) [inline]

Definition at line 79 of file vitals.h.


Member Data Documentation

template<typename Vital >
unsigned int psVitalManager< Vital >::experiencePoints [protected]

Players current experience points.

Definition at line 147 of file vitals.h.

template<typename Vital >
csTicks psVitalManager< Vital >::lastDRUpdate [protected]

Definition at line 140 of file vitals.h.

template<typename Vital >
Vital psVitalManager< Vital >::origVitals[VITAL_COUNT] [protected]

Definition at line 144 of file vitals.h.

template<typename Vital >
unsigned int psVitalManager< Vital >::progressionPoints [protected]

Players progression Points.

Definition at line 150 of file vitals.h.

template<typename Vital >
Vital psVitalManager< Vital >::vitals[VITAL_COUNT] [protected]

A list of player vitals.

Definition at line 143 of file vitals.h.


The documentation for this class was generated from the following file: