Char class functions¶
-
class CharClassFunctions¶
Public Static Functions
-
static const char *GetDefaultClass(unsigned short pid) noexcept¶
Get the default class used by a player.
- Parameters
pid – The player ID.
- Returns
The ID of the default class.
-
static const char *GetClassName(unsigned short pid) noexcept¶
Get the name of the custom class used by a player.
- Parameters
pid – The player ID.
- Returns
The name of the custom class.
-
static const char *GetClassDesc(unsigned short pid) noexcept¶
Get the description of the custom class used by a player.
- Parameters
pid – The player ID.
- Returns
The description of the custom class.
-
static int GetClassMajorAttribute(unsigned short pid, unsigned char slot)¶
Get the ID of one of the two major attributes of a custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the major attribute (0 or 1).
- Returns
The ID of the major attribute.
-
static int GetClassSpecialization(unsigned short pid) noexcept¶
Get the specialization ID of the custom class used by a player.
- Parameters
pid – The player ID.
- Returns
The specialization ID of the custom class (0 for Combat, 1 for Magic, 2 for Stealth).
-
static int GetClassMajorSkill(unsigned short pid, unsigned char slot)¶
Get the ID of one of the five major skills of a custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the major skill (0 to 4).
- Returns
The ID of the major skill.
-
static int GetClassMinorSkill(unsigned short pid, unsigned char slot)¶
Get the ID of one of the five minor skills of a custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the minor skill (0 to 4).
- Returns
The ID of the minor skill.
-
static int IsClassDefault(unsigned short pid) noexcept¶
Check whether the player is using a default class instead of a custom one.
- Parameters
pid – The player ID.
- Returns
Whether the player is using a default class.
-
static void SetDefaultClass(unsigned short pid, const char *id) noexcept¶
Set the default class used by a player.
If this is left blank, the custom class data set for the player will be used instead.
- Parameters
pid – The player ID.
id – The ID of the default class.
- Returns
void
-
static void SetClassName(unsigned short pid, const char *name) noexcept¶
Set the name of the custom class used by a player.
- Parameters
pid – The player ID.
name – The name of the custom class.
- Returns
void
-
static void SetClassDesc(unsigned short pid, const char *desc) noexcept¶
Set the description of the custom class used by a player.
- Parameters
pid – The player ID.
desc – The description of the custom class.
- Returns
void
-
static void SetClassMajorAttribute(unsigned short pid, unsigned char slot, int attrId)¶
Set the ID of one of the two major attributes of the custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the major attribute (0 or 1).
attrId – The ID to use for the attribute.
- Returns
void
-
static void SetClassSpecialization(unsigned short pid, int spec) noexcept¶
Set the specialization of the custom class used by a player.
- Parameters
pid – The player ID.
spec – The specialization ID to use (0 for Combat, 1 for Magic, 2 for Stealth).
- Returns
void
-
static void SetClassMajorSkill(unsigned short pid, unsigned char slot, int skillId)¶
Set the ID of one of the five major skills of the custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the major skill (0 to 4).
skillId – The ID to use for the skill.
- Returns
void
-
static void SetClassMinorSkill(unsigned short pid, unsigned char slot, int skillId)¶
Set the ID of one of the five minor skills of the custom class used by a player.
- Parameters
pid – The player ID.
slot – The slot of the minor skill (0 to 4).
skillId – The ID to use for the skill.
- Returns
void
-
static void SendClass(unsigned short pid) noexcept¶
Send a PlayerCharClass packet about a player.
It is only sent to the affected player.
- Parameters
pid – The player ID.
- Returns
void
-
static const char *GetDefaultClass(unsigned short pid) noexcept¶