Dialogue functions¶
-
class
DialogueFunctions
¶ Public Static Functions
-
void
ClearTopicChanges
(unsigned short pid)¶ Clear the last recorded topic changes for a player.
This is used to initialize the sending of new PlayerTopic packets.
- Return
- void
- Parameters
pid
: The player ID whose topic changes should be used.
-
unsigned int
GetTopicChangesSize
(unsigned short pid)¶ Get the number of indexes in a player’s latest topic changes.
- Return
- The number of indexes.
- Parameters
pid
: The player ID whose topic changes should be used.
-
void
AddTopic
(unsigned short pid, const char *topicId)¶ Add a new topic to the topic changes for a player.
- Return
- void
- Parameters
pid
: The player ID whose topic changes should be used.topicId
: The topicId of the topic.
-
const char *
GetTopicId
(unsigned short pid, unsigned int index)¶ Get the topicId at a certain index in a player’s latest topic changes.
- Return
- The topicId.
- Parameters
pid
: The player ID whose topic changes should be used.index
: The index of the topic.
-
void
SendTopicChanges
(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer)¶ Send a PlayerTopic packet with a player’s recorded topic changes.
- Return
- void
- 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).
-
void
PlayAnimation
(unsigned short pid, const char *groupname, int mode, int count, bool persist)¶ Play a certain animation on a player’s character by sending a PlayerAnimation packet.
- Return
- void
- 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.bool
: Whether the animation should persist or not.
-
void
PlaySpeech
(unsigned short pid, const char *sound)¶ Play a certain sound for a player as spoken by their character by sending a PlayerSpeech packet.
- Return
- void
- Parameters
pid
: The player ID of the character playing the sound.sound
: The path of the sound file.
-
void