Quest functions¶
-
class QuestFunctions¶
Public Static Functions
-
static void ClearJournalChanges(unsigned short pid) noexcept¶
Clear the last recorded journal changes for a player.
This is used to initialize the sending of new PlayerJournal packets.
- Parameters
pid – The player ID whose journal changes should be used.
- Returns
void
-
static unsigned int GetJournalChangesSize(unsigned short pid) noexcept¶
Get the number of indexes in a player’s latest journal changes.
- Parameters
pid – The player ID whose journal changes should be used.
- Returns
The number of indexes.
-
static void AddJournalEntry(unsigned short pid, const char *quest, unsigned int index, const char *actorRefId) noexcept¶
Add a new journal item of type ENTRY to the journal changes for a player, with a specific timestamp.
- Parameters
pid – The player ID whose journal changes should be used.
quest – The quest of the journal item.
index – The quest index of the journal item.
actorRefId – The actor refId of the journal item.
- Returns
void
-
static void AddJournalEntryWithTimestamp(unsigned short pid, const char *quest, unsigned int index, const char *actorRefId, unsigned int daysPassed, unsigned int month, unsigned int day) noexcept¶
Add a new journal item of type ENTRY to the journal changes for a player, with a specific timestamp.
- Parameters
pid – The player ID whose journal changes should be used.
quest – The quest of the journal item.
index – The quest index of the journal item.
actorRefId – The actor refId of the journal item.
daysPassed – The daysPassed for the journal item.
month – The month for the journal item.
day – The day of the month for the journal item.
- Returns
void
-
static void AddJournalIndex(unsigned short pid, const char *quest, unsigned int index) noexcept¶
Add a new journal item of type INDEX to the journal changes for a player.
- Parameters
pid – The player ID whose journal changes should be used.
quest – The quest of the journal item.
index – The quest index of the journal item.
- Returns
void
-
static void SetReputation(unsigned short pid, int value) noexcept¶
Set the reputation of a certain player.
- Parameters
pid – The player ID.
value – The reputation.
- Returns
void
-
static const char *GetJournalItemQuest(unsigned short pid, unsigned int index) noexcept¶
Get the quest at a certain index in a player’s latest journal changes.
- Parameters
pid – The player ID whose journal changes should be used.
index – The index of the journalItem.
- Returns
The quest.
-
static int GetJournalItemIndex(unsigned short pid, unsigned int index) noexcept¶
Get the quest index at a certain index in a player’s latest journal changes.
- Parameters
pid – The player ID whose journal changes should be used.
index – The index of the journalItem.
- Returns
The quest index.
-
static int GetJournalItemType(unsigned short pid, unsigned int index) noexcept¶
Get the journal item type at a certain index in a player’s latest journal changes.
- Parameters
pid – The player ID whose journal changes should be used.
index – The index of the journalItem.
- Returns
The type (0 for ENTRY, 1 for INDEX).
-
static const char *GetJournalItemActorRefId(unsigned short pid, unsigned int index) noexcept¶
Get the actor refId at a certain index in a player’s latest journal changes.
Every journal change has an associated actor, which is usually the quest giver.
- Parameters
pid – The player ID whose journal changes should be used.
index – The index of the journalItem.
- Returns
The actor refId.
-
static int GetReputation(unsigned short pid) noexcept¶
Get the a certain player’s reputation.
- Parameters
pid – The player ID.
- Returns
The reputation.
-
static void SendJournalChanges(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept¶
Send a PlayerJournal packet with a player’s recorded journal changes.
- Parameters
pid – The player ID whose journal 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 SendReputation(unsigned short pid, bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept¶
Send a PlayerReputation packet with a player’s recorded reputation.
- Parameters
pid – The player ID whose reputation 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 ClearJournalChanges(unsigned short pid) noexcept¶