Char class functions

class CharClassFunctions

Public Static Functions

const char *GetDefaultClass(unsigned short pid)

Get the default class used by a player.

Return
The ID of the default class.
Parameters
  • pid: The player ID.

const char *GetClassName(unsigned short pid)

Get the name of the custom class used by a player.

Return
The name of the custom class.
Parameters
  • pid: The player ID.

const char *GetClassDesc(unsigned short pid)

Get the description of the custom class used by a player.

Return
The description of the custom class.
Parameters
  • pid: The player ID.

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.

Return
The ID of the major attribute.
Parameters
  • pid: The player ID.
  • slot: The slot of the major attribute (0 or 1).

int GetClassSpecialization(unsigned short pid)

Get the specialization ID of the custom class used by a player.

Return
The specialization ID of the custom class (0 for Combat, 1 for Magic, 2 for Stealth).
Parameters
  • pid: The player ID.

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.

Return
The ID of the major skill.
Parameters
  • pid: The player ID.
  • slot: The slot of the major skill (0 to 4).

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.

Return
The ID of the minor skill.
Parameters
  • pid: The player ID.
  • slot: The slot of the minor skill (0 to 4).

int IsClassDefault(unsigned short pid)

Check whether the player is using a default class instead of a custom one.

Return
Whether the player is using a default class.
Parameters
  • pid: The player ID.

void SetDefaultClass(unsigned short pid, const char *id)

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.

Return
void
Parameters
  • pid: The player ID.
  • id: The ID of the default class.

void SetClassName(unsigned short pid, const char *name)

Set the name of the custom class used by a player.

Return
void
Parameters
  • pid: The player ID.
  • name: The name of the custom class.

void SetClassDesc(unsigned short pid, const char *desc)

Set the description of the custom class used by a player.

Return
void
Parameters
  • pid: The player ID.
  • desc: The description of the custom class.

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.

Return
void
Parameters
  • pid: The player ID.
  • slot: The slot of the major attribute (0 or 1).
  • attrId: The ID to use for the attribute.

void SetClassSpecialization(unsigned short pid, int spec)

Set the specialization of the custom class used by a player.

Return
void
Parameters
  • pid: The player ID.
  • spec: The specialization ID to use (0 for Combat, 1 for Magic, 2 for Stealth).

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.

Return
void
Parameters
  • pid: The player ID.
  • slot: The slot of the major skill (0 to 4).
  • skillId: The ID to use for the skill.

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.

Return
void
Parameters
  • pid: The player ID.
  • slot: The slot of the minor skill (0 to 4).
  • skillId: The ID to use for the skill.

void SendClass(unsigned short pid)

Send a PlayerCharClass packet about a player.

It is only sent to the affected player.

Return
void
Parameters
  • pid: The player ID.