Shapeshift functions¶
-
class ShapeshiftFunctions¶
Public Static Functions
-
static double GetScale(unsigned short pid) noexcept¶
Get the scale of a player.
- Parameters
pid – The player ID.
- Returns
The scale.
-
static bool IsWerewolf(unsigned short pid) noexcept¶
Check whether a player is a werewolf.
This is based on the last PlayerShapeshift packet received or sent for that player.
- Parameters
pid – The player ID.
- Returns
The werewolf state.
-
static const char *GetCreatureRefId(unsigned short pid) noexcept¶
Get the refId of the creature the player is disguised as.
- Parameters
pid – The player ID.
- Returns
The creature refId.
-
static bool GetCreatureNameDisplayState(unsigned short pid) noexcept¶
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.
- Parameters
pid – The player ID.
- Returns
The creature name display state.
-
static void SetScale(unsigned short pid, double scale) noexcept¶
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.
- Parameters
pid – The player ID.
scale – The new scale.
- Returns
void
-
static void SetWerewolfState(unsigned short pid, bool isWerewolf) noexcept¶
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.
- Parameters
pid – The player ID.
isWerewolf – The new werewolf state.
- Returns
void
-
static void SetCreatureRefId(unsigned short pid, const char *refId) noexcept¶
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.
- Parameters
pid – The player ID.
refId – The creature refId.
- Returns
void
-
static void SetCreatureNameDisplayState(unsigned short pid, bool displayState) noexcept¶
Set whether a player’s name is replaced by that of the creature they are disguised as when other players hover over them.
- Parameters
pid – The player ID.
displayState – The creature name display state.
- Returns
void
-
static 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.
- Parameters
pid – The player ID.
- Returns
void
-
static double GetScale(unsigned short pid) noexcept¶