Planeshift
|
A list of skills. More...
#include <pscharacter.h>
Public Member Functions | |
int | AddSkillPractice (psSkillInfo *skill, unsigned int val) |
Add skill practice. | |
int | AddSkillPractice (PSSKILL skill, unsigned int val) |
Add skill practice. | |
bool | AddToSkillPractice (PSSKILL skill, unsigned int val, unsigned int &added) |
Add some practice to a skill. | |
void | Calculate () |
Update the costs for all the skills. | |
bool | CanTrain (PSSKILL skill) |
Figure out if this skill can be trained. | |
void | CheckDoRank (PSSKILL skill) |
Checks if a skill should rank and ranks it. | |
Skill & | Get (PSSKILL skill) |
unsigned int | GetBestSkillSlot (bool withBuff) |
Get the slot that is the best skill in the set. | |
unsigned int | GetSkillKnowledge (PSSKILL skill) |
Get the current knowledge level of a skill. | |
unsigned int | GetSkillPractice (PSSKILL skill) |
Get the current practice level of a skill. | |
SkillRank & | GetSkillRank (PSSKILL which) |
Get the current rank of a skill. | |
void | SetSkillInfo (PSSKILL which, psSkillInfo *info, bool recalculatestats=true) |
Sets the common skill info for this skill ( data from the database ). | |
void | SetSkillKnowledge (PSSKILL which, int y_value) |
Set a skill knowledge level. | |
void | SetSkillPractice (PSSKILL which, int z_value) |
Sets the practice level for the skill. | |
void | SetSkillRank (PSSKILL which, unsigned int rank, bool recalculatestats=true) |
Set a skill rank level. | |
SkillSet (psCharacter *self) | |
Constructor. | |
void | Train (PSSKILL skill, int yIncrease) |
Trains a skill. | |
Protected Attributes | |
csArray< Skill > | skills |
Array to store all the skills. |
A list of skills.
This maintains a list of all the skills and the player's current levels in them.
Definition at line 407 of file pscharacter.h.
SkillSet::SkillSet | ( | psCharacter * | self | ) |
Constructor.
self | The psCharacter this skillset is associated with. |
int SkillSet::AddSkillPractice | ( | psSkillInfo * | skill, |
unsigned int | val | ||
) |
Add skill practice.
Add some practice to a skill.
skill | The skill we want to practice |
val | The amount we want to practice the skill by. This value could be capped if the amount of practice causes a rank up. |
added | [CHANGES] The amount the skill changed by ( if any ) |
void SkillSet::Calculate | ( | ) |
Update the costs for all the skills.
bool SkillSet::CanTrain | ( | PSSKILL | skill | ) |
Figure out if this skill can be trained.
Checks the current knowledge of the skill. If it is already maxed out then can train no more.
skill | The skill we want to train. |
void SkillSet::CheckDoRank | ( | PSSKILL | skill | ) |
Checks if a skill should rank and ranks it.
It checks if practice and knowledge is reached to rank the skill.
skill | The skill we want to check. |
Get the slot that is the best skill in the set.
withBuff | Apply any skill buffs? |
Get the current knowledge level of a skill.
skill | the enum of the skill that we want. |
Get the current practice level of a skill.
skill | the enum of the skill that we want. |
Get the current rank of a skill.
which | The skill that we want the rank for. |
void SkillSet::SetSkillInfo | ( | PSSKILL | which, |
psSkillInfo * | info, | ||
bool | recalculatestats = true |
||
) |
Sets the common skill info for this skill ( data from the database ).
which | The skill we want to set |
info | The info structure to assign to this skill. |
recalculatestats | if true, stats of player will be recalculated taking into account the new skill |
Set a skill knowledge level.
Sets a skill to a particular knowledge level. This does no checking of allowed values. It just sets it to a particular value.
which | Skill name. One of the PSSKILL enum values. |
y_value | The value to set this skill knowledge at. |
Sets the practice level for the skill.
Does no error or range checking on the z value. Simply assigns.
which | The skill we want to set. |
z_value | The practice level of that skill. |
Set a skill rank level.
Sets a skill to a particular rank level. This does no checking of allowed values. It just sets it to a particular value.
which | Skill name. One of the PSSKILL enum values. |
rank | The value to set this skill rank at. |
recalculatestats | if true, stats of player will be recalculated taking into account the new skill rank |
Trains a skill.
It will only train up to the cost of the next rank. So the yIncrease is capped by the cost and anything over will be lost.
skill | The skill we want to train. |
yIncrease | The amount we want to train this skill by. |
csArray<Skill> SkillSet::skills [protected] |
Array to store all the skills.
Definition at line 410 of file pscharacter.h.