Dialogue functions¶
-
class DialogueFunctions¶
Public Static Functions
-
static void ClearTopicChanges(unsigned short pid) noexcept¶
Clear the last recorded topic changes for a player.
This is used to initialize the sending of new PlayerTopic packets.
- Parameters
pid – The player ID whose topic changes should be used.
- Returns
void
-
static unsigned int GetTopicChangesSize(unsigned short pid) noexcept¶
Get the number of indexes in a player’s latest topic changes.
- Parameters
pid – The player ID whose topic changes should be used.
- Returns
The number of indexes.
-
static void AddTopic(unsigned short pid, const char *topicId) noexcept¶
Add a new topic to the topic changes for a player.
- Parameters
pid – The player ID whose topic changes should be used.
topicId – The topicId of the topic.
- Returns
void
-
static const char *GetTopicId(unsigned short pid, unsigned int index) noexcept¶
Get the topicId at a certain index in a player’s latest topic changes.
- Parameters
pid – The player ID whose topic changes should be used.
index – The index of the topic.
- Returns
The topicId.
-
static void SendTopicChanges(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept¶
Send a PlayerTopic packet with a player’s recorded topic changes.
- Parameters
pid – The player ID whose topic changes should be used.
sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).
skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).
- Returns
void
-
static void PlayAnimation(unsigned short pid, const char *groupname, int mode, int count, bool persist) noexcept¶
Play a certain animation on a player’s character by sending a PlayerAnimation packet.
- Parameters
pid – The player ID of the character playing the animation.
groupname – The groupname of the animation.
mode – The mode of the animation.
count – The number of times the animation should be played.
persist – Whether the animation should persist or not.
- Returns
void
-
static void PlaySpeech(unsigned short pid, const char *sound) noexcept¶
Play a certain sound for a player as spoken by their character by sending a PlayerSpeech packet.
- Parameters
pid – The player ID of the character playing the sound.
sound – The path of the sound file.
- Returns
void
-
static void ClearTopicChanges(unsigned short pid) noexcept¶