Shapeshift functions

class ShapeshiftFunctions

Public Static Functions

double GetScale(unsigned short pid)

Get the scale of a player.

Return
The scale.
Parameters
  • pid: The player ID.

bool IsWerewolf(unsigned short pid)

Check whether a player is a werewolf.

This is based on the last PlayerShapeshift packet received or sent for that player.

Return
The werewolf state.
Parameters
  • pid: The player ID.

const char *GetCreatureRefId(unsigned short pid)

Get the refId of the creature the player is disguised as.

Return
The creature refId.
Parameters
  • pid: The player ID.

bool GetCreatureNameDisplayState(unsigned short pid)

Check whether a player’s name is replaced by that of the creature they are disguised as when other players hover over them.

This is based on the last PlayerShapeshift packet received or sent for that player.

Return
The creature name display state.
Parameters
  • pid: The player ID.

void SetScale(unsigned short pid, double scale)

Set the scale of a player.

This changes the scale recorded for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • scale: The new scale.

void SetWerewolfState(unsigned short pid, bool isWerewolf)

Set the werewolf state of a player.

This changes the werewolf state recorded for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • isWerewolf: The new werewolf state.

void SetCreatureRefId(unsigned short pid, const char *refId)

Set the refId of the creature a player is disguised as.

This changes the creature refId recorded for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • refId: The creature refId.
  • displaysCreatureName: Whether the player’s name appears as that of the creature when hovered over by others.

void SetCreatureNameDisplayState(unsigned short pid, bool displayState)

Set whether a player’s name is replaced by that of the creature they are disguised as when other players hover over them.

Return
void
Parameters
  • pid: The player ID.
  • displayState: The creature name display state.

void SendShapeshift(unsigned short pid)

Send a PlayerShapeshift packet about a player.

This sends the packet to all players connected to the server. It is currently used only to communicate werewolf states.

Return
void
Parameters
  • pid: The player ID.