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. More... | |
bool | CheckDoRank (psCharacter *user) |
Check if skill will rank and rank it up. More... | |
void | Clear () |
bool | Practice (unsigned int amount, unsigned int &actuallyAdded, psCharacter *user) |
Practice this skill. More... | |
Skill () | |
void | Train (int yIncrease) |
Train a skill by a particular amount. More... | |
Public Attributes | |
bool | dirtyFlag |
Flag if this was changed after load from database. More... | |
psSkillInfo * | info |
Database information about the skill. More... | |
SkillRank | rank |
Skill rank (buffable) More... | |
unsigned short | y |
Knowledge Level. More... | |
unsigned short | yCost |
Cost in y points. More... | |
unsigned short | yCostNext |
Cost in y points of next level. More... | |
unsigned short | z |
Practice value. More... | |
unsigned short | zCost |
Cost in Z points. More... | |
unsigned short | zCostNext |
Cost in Z points of next level. More... | |
A structure that holds the knowledge/practice/rank of each player skill.
Definition at line 322 of file pscharacter.h.
|
inline |
Definition at line 336 of file pscharacter.h.
void Skill::CalculateCosts | ( | psCharacter * | user | ) |
|
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. |
|
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.
psSkillInfo* Skill::info |
Database information about the skill.
Definition at line 334 of file pscharacter.h.
SkillRank Skill::rank |
Skill rank (buffable)
Definition at line 326 of file pscharacter.h.
unsigned short Skill::y |
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.
unsigned short Skill::z |
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.