mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
[Server] Add server functions for getting & setting dialogue choices
Fix typo in description for SetObjectSoul()
This commit is contained in:
parent
9dcb0f4c32
commit
e100ed7b63
2 changed files with 29 additions and 1 deletions
|
@ -154,6 +154,11 @@ int ObjectFunctions::GetObjectLockLevel(unsigned int index) noexcept
|
|||
return readObjectList->baseObjects.at(index).lockLevel;
|
||||
}
|
||||
|
||||
const char* ObjectFunctions::GetObjectDialogueChoice(unsigned int index) noexcept
|
||||
{
|
||||
return readObjectList->baseObjects.at(index).dialogueChoice.c_str();
|
||||
}
|
||||
|
||||
unsigned int ObjectFunctions::GetObjectGoldPool(unsigned int index) noexcept
|
||||
{
|
||||
return readObjectList->baseObjects.at(index).goldPool;
|
||||
|
@ -495,6 +500,11 @@ void ObjectFunctions::SetObjectLockLevel(int lockLevel) noexcept
|
|||
tempObject.lockLevel = lockLevel;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectDialogueChoice(const char* dialogueChoice) noexcept
|
||||
{
|
||||
tempObject.dialogueChoice = dialogueChoice;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectGoldPool(unsigned int goldPool) noexcept
|
||||
{
|
||||
tempObject.goldPool = goldPool;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
{"GetObjectState", ObjectFunctions::GetObjectState},\
|
||||
{"GetObjectDoorState", ObjectFunctions::GetObjectDoorState},\
|
||||
{"GetObjectLockLevel", ObjectFunctions::GetObjectLockLevel},\
|
||||
{"GetObjectDialogueChoice", ObjectFunctions::GetObjectDialogueChoice},\
|
||||
{"GetObjectGoldPool", ObjectFunctions::GetObjectGoldPool},\
|
||||
{"GetObjectLastGoldRestockHour", ObjectFunctions::GetObjectLastGoldRestockHour},\
|
||||
{"GetObjectLastGoldRestockDay", ObjectFunctions::GetObjectLastGoldRestockDay},\
|
||||
|
@ -105,6 +106,7 @@
|
|||
{"SetObjectScale", ObjectFunctions::SetObjectScale},\
|
||||
{"SetObjectState", ObjectFunctions::SetObjectState},\
|
||||
{"SetObjectLockLevel", ObjectFunctions::SetObjectLockLevel},\
|
||||
{"SetObjectDialogueChoice", ObjectFunctions::SetObjectDialogueChoice},\
|
||||
{"SetObjectGoldPool", ObjectFunctions::SetObjectGoldPool},\
|
||||
{"SetObjectLastGoldRestockHour", ObjectFunctions::SetObjectLastGoldRestockHour},\
|
||||
{"SetObjectLastGoldRestockDay", ObjectFunctions::SetObjectLastGoldRestockDay},\
|
||||
|
@ -390,6 +392,14 @@ public:
|
|||
*/
|
||||
static int GetObjectLockLevel(unsigned int index) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Get the dialogue choice for the object at a certain index in the read object list.
|
||||
*
|
||||
* \param index The index of the object.
|
||||
* \return The dialogue choice.
|
||||
*/
|
||||
static const char *GetObjectDialogueChoice(unsigned int index) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Get the gold pool of the object at a certain index in the read object list.
|
||||
*
|
||||
|
@ -946,7 +956,7 @@ public:
|
|||
/**
|
||||
* \brief Set the soul of the temporary object stored on the server.
|
||||
*
|
||||
* \param refId The soul.
|
||||
* \param soul The ID of the soul.
|
||||
* \return void
|
||||
*/
|
||||
static void SetObjectSoul(const char* soul) noexcept;
|
||||
|
@ -989,6 +999,14 @@ public:
|
|||
*/
|
||||
static void SetObjectLockLevel(int lockLevel) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the dialogue choice for the temporary object stored on the server.
|
||||
*
|
||||
* \param dialogueChoice The dialogue choice.
|
||||
* \return void
|
||||
*/
|
||||
static void SetObjectDialogueChoice(const char* dialogueChoice) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the gold pool of the temporary object stored on the server.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue