#include <ExperienceTracker.h>
Inherits MemoryPoolObject, and Snapshot.
Public Member Functions | |
| ExperienceTracker (Object *parent) | |
| VeterancyLevel | getVeterancyLevel () const |
| What level am I? | |
| Int | getExperienceValue (const Object *killer) const |
| How much do give for being killed. | |
| Int | getCurrentExperience (void) const |
| Bool | isTrainable () const |
| How much experience do I have at the moment? | |
| Bool | isAcceptingExperiencePoints () const |
| Either I am trainable, or I have a Sink set up. | |
| void | setVeterancyLevel (VeterancyLevel newLevel, Bool provideFeedback=TRUE) |
| Set Level to this. | |
| void | setMinVeterancyLevel (VeterancyLevel newLevel) |
| Set Level to AT LEAST this... if we are already >= this level, do nothing. | |
| void | addExperiencePoints (Int experienceGain, Bool canScaleForBonus=TRUE) |
| Gain this many exp. | |
| Bool | gainExpForLevel (Int levelsToGain, Bool canScaleForBonus=TRUE) |
| Gain enough exp to gain a level. return false if can't gain a level. | |
| Bool | canGainExpForLevel (Int levelsToGain) const |
| return same value as gainExpForLevel, but don't change anything | |
| void | setExperienceAndLevel (Int experienceIn, Bool provideFeedback=TRUE) |
| void | setExperienceSink (ObjectID sink) |
| My experience actually goes to this person (loose couple) | |
| Real | getExperienceScalar () const |
| void | setExperienceScalar (Real scalar) |
| void | crc (Xfer *xfer) |
| run the "light" crc check on this data structure | |
| void | xfer (Xfer *xfer) |
| void | loadPostProcess (void) |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Additional Inherited Members | |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Definition at line 42 of file ExperienceTracker.h.
| ExperienceTracker::ExperienceTracker | ( | Object * | parent | ) |
Definition at line 46 of file ExperienceTracker.cpp.
Gain this many exp.
Definition at line 148 of file ExperienceTracker.cpp.
return same value as gainExpForLevel, but don't change anything
Definition at line 138 of file ExperienceTracker.cpp.
|
virtual |
run the "light" crc check on this data structure
Implements Snapshot.
Definition at line 234 of file ExperienceTracker.cpp.
Gain enough exp to gain a level. return false if can't gain a level.
Definition at line 122 of file ExperienceTracker.cpp.
|
inline |
Definition at line 50 of file ExperienceTracker.h.
|
inline |
Definition at line 62 of file ExperienceTracker.h.
How much do give for being killed.
Definition at line 61 of file ExperienceTracker.cpp.
|
inline |
What level am I?
Definition at line 48 of file ExperienceTracker.h.
| Bool ExperienceTracker::isAcceptingExperiencePoints | ( | ) | const |
Either I am trainable, or I have a Sink set up.
Definition at line 77 of file ExperienceTracker.cpp.
| Bool ExperienceTracker::isTrainable | ( | ) | const |
How much experience do I have at the moment?
Can I gain experience?
Definition at line 71 of file ExperienceTracker.cpp.
|
virtual |
post process phase for loading save games. All save systems have their xfer run using XferLoad mode, and then all systems each have their post process run
Implements Snapshot.
Definition at line 272 of file ExperienceTracker.cpp.
Definition at line 193 of file ExperienceTracker.cpp.
|
inline |
Definition at line 63 of file ExperienceTracker.h.
| void ExperienceTracker::setExperienceSink | ( | ObjectID | sink | ) |
My experience actually goes to this person (loose couple)
Definition at line 83 of file ExperienceTracker.cpp.
| void ExperienceTracker::setMinVeterancyLevel | ( | VeterancyLevel | newLevel | ) |
Set Level to AT LEAST this... if we are already >= this level, do nothing.
Definition at line 90 of file ExperienceTracker.cpp.
| void ExperienceTracker::setVeterancyLevel | ( | VeterancyLevel | newLevel, |
| Bool | provideFeedback = TRUE ) |
Set Level to this.
Definition at line 106 of file ExperienceTracker.cpp.
|
virtual |
Xfer method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 246 of file ExperienceTracker.cpp.