Planeshift
|
A structure that holds the knowledge/practice/rank of each player skill. More...
#include <pscharacter.h>
Public Member Functions | |
void | CalculateCosts (psCharacter *user) |
bool | CanTrain () |
Checks to see if this skill can be trained any more at the current rank. | |
bool | CheckDoRank (psCharacter *user) |
Check if skill will rank and rank it up. | |
void | Clear () |
bool | Practice (unsigned int amount, unsigned int &actuallyAdded, psCharacter *user) |
Practice this skill. | |
Skill () | |
void | Train (int yIncrease) |
Train a skill by a particular amount. | |
Public Attributes | |
bool | dirtyFlag |
Flag if this was changed after load from database. | |
psSkillInfo * | info |
Database information about the skill. | |
SkillRank | rank |
Skill rank (buffable) | |
unsigned short | y |
Knowledge Level. | |
unsigned short | yCost |
Cost in y points. | |
unsigned short | yCostNext |
Cost in y points of next level. | |
unsigned short | z |
Practice value. | |
unsigned short | zCost |
Cost in Z points. | |
unsigned short | zCostNext |
Cost in Z points of next level. |
A structure that holds the knowledge/practice/rank of each player skill.
Definition at line 322 of file pscharacter.h.
Skill::Skill | ( | ) | [inline] |
Definition at line 336 of file pscharacter.h.
void Skill::CalculateCosts | ( | psCharacter * | user | ) |
bool Skill::CanTrain | ( | ) | [inline] |
Checks to see if this skill can be trained any more at the current rank.
Definition at line 352 of file pscharacter.h.
bool Skill::CheckDoRank | ( | psCharacter * | user | ) |
Check if skill will rank and rank it up.
This checks a couple of things. 1) If the player has the required knowledge to allow for training. 2) If the amount of practice causes a rank change it will increase the rank of the skill and reset the knowledge/practice levels.
user | The character this was for. |
void Skill::Clear | ( | ) | [inline] |
Definition at line 340 of file pscharacter.h.
bool Skill::Practice | ( | unsigned int | amount, |
unsigned int & | actuallyAdded, | ||
psCharacter * | user | ||
) |
Practice this skill.
This checks a couple of things. 1) If the player has the required knowledge to allow for training. 2) If the amount of practice causes a rank change it will increase the rank of the skill and reset the knowledge/practice levels.
amount | The amount of practice on this skill. |
actuallyAdded | [CHANGES] If the amount added causes a rank change only the amount required is added and this variable stores that. |
user | The character this was for. |
void Skill::Train | ( | int | yIncrease | ) |
Train a skill by a particular amount.
This does range checking on the training level and will cap it at the max allowable level.
yIncrease | The amount to try to increase the skill by. |
bool Skill::dirtyFlag |
Flag if this was changed after load from database.
Definition at line 332 of file pscharacter.h.
Database information about the skill.
Definition at line 334 of file pscharacter.h.
Skill rank (buffable)
Definition at line 326 of file pscharacter.h.
Knowledge Level.
Definition at line 325 of file pscharacter.h.
unsigned short Skill::yCost |
Cost in y points.
Definition at line 329 of file pscharacter.h.
unsigned short Skill::yCostNext |
Cost in y points of next level.
Definition at line 331 of file pscharacter.h.
Practice value.
Definition at line 324 of file pscharacter.h.
unsigned short Skill::zCost |
Cost in Z points.
Definition at line 328 of file pscharacter.h.
unsigned short Skill::zCostNext |
Cost in Z points of next level.
Definition at line 330 of file pscharacter.h.