Planeshift
psClientVitals Class Reference

Handles the incoming vital data from the server to update it's local values. More...

#include <clientvitals.h>

Public Member Functions

void HandleDeath (const char *labelname)
 Reset virtuals on death. More...
 
void HandleDRData (psStatDRMessage &msg, const char *labelname)
 Handles new Vital data from the server. More...
 
void Predict (csTicks now, const char *labelname)
 Predicts the new values of the various Vitals. More...
 
 psClientVitals ()
 
- Public Member Functions inherited from psVitalManager< Vital >
unsigned int GetExp ()
 Get players experience points. More...
 
float GetHP ()
 
float GetMana ()
 
float GetMStamina ()
 
unsigned int GetPP ()
 Gets a players current progression points. More...
 
float GetPStamina ()
 
VitalGetVital (int vital)
 Get a reference to a particular vital. More...
 
 psVitalManager ()
 
void ResetVitals ()
 Reset to the "original" vitals (for use when killing NPCs). More...
 
void SetOrigVitals ()
 Saves the current vitals as the "original". More...
 
void SetVitals (const psVitalManager &newVitalMgr)
 
 ~psVitalManager ()
 

Additional Inherited Members

- Protected Attributes inherited from psVitalManager< Vital >
unsigned int experiencePoints
 Players current experience points. More...
 
csTicks lastDRUpdate
 
Vital origVitals [VITAL_COUNT]
 
unsigned int progressionPoints
 Players progression Points. More...
 
Vital vitals [VITAL_COUNT]
 A list of player vitals. More...
 

Detailed Description

Handles the incoming vital data from the server to update it's local values.

Definition at line 50 of file clientvitals.h.

Constructor & Destructor Documentation

psClientVitals::psClientVitals ( )

Member Function Documentation

void psClientVitals::HandleDeath ( const char *  labelname)

Reset virtuals on death.

Parameters
labelnameThe label to be appended to published values
void psClientVitals::HandleDRData ( psStatDRMessage msg,
const char *  labelname 
)

Handles new Vital data from the server.

Parameters
msgThe Vital message from the server with the correct values for this Vital.
labelnameThe label to be appended to published values
void psClientVitals::Predict ( csTicks  now,
const char *  labelname 
)

Predicts the new values of the various Vitals.

This helps limit the lag time in getting new values for these Vitals.

Parameters
nowThe current ticks to use from last valid data from the server.
labelnameThe label to be appended to published values

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