Planeshift
psServerVitals Class Reference

Server side of the character vitals manager. More...

#include <servervitals.h>

Public Member Functions

void AdjustVital (int vitalName, int dirtyFlag, float delta)
 
void ClearStatsDirtyFlags (unsigned int dirtyFlags)
 Cleare the dirty flags for vitals. More...
 
unsigned int GetStatsDirtyFlags () const
 Return the dirty flags for vitals. More...
 
 psServerVitals (psCharacter *character)
 
bool SendStatDRMessage (uint32_t clientnum, EID eid, unsigned int flags, csRef< PlayerGroup > group=NULL)
 Handles new Vital data construction for the server. More...
 
void SetAllStatsDirty ()
 Set all vitals dirty. More...
 
void SetExp (unsigned int exp)
 
void SetPP (unsigned int pp)
 
void SetVital (int vitalName, int dirtyFlag, float value)
 
bool Update (csTicks now)
 
- 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

Server side of the character vitals manager.

Does a lot more accessing of the data to set particular things. Also does construction of data to send to a client.

Definition at line 81 of file servervitals.h.

Constructor & Destructor Documentation

psServerVitals::psServerVitals ( psCharacter character)

Member Function Documentation

void psServerVitals::AdjustVital ( int  vitalName,
int  dirtyFlag,
float  delta 
)
void psServerVitals::ClearStatsDirtyFlags ( unsigned int  dirtyFlags)

Cleare the dirty flags for vitals.

unsigned int psServerVitals::GetStatsDirtyFlags ( ) const

Return the dirty flags for vitals.

bool psServerVitals::SendStatDRMessage ( uint32_t  clientnum,
EID  eid,
unsigned int  flags,
csRef< PlayerGroup group = NULL 
)

Handles new Vital data construction for the server.

void psServerVitals::SetAllStatsDirty ( )

Set all vitals dirty.

void psServerVitals::SetExp ( unsigned int  exp)
void psServerVitals::SetPP ( unsigned int  pp)
void psServerVitals::SetVital ( int  vitalName,
int  dirtyFlag,
float  value 
)
bool psServerVitals::Update ( csTicks  now)

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