mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
[Server] Add script functions relating to summons' effect & spell IDs
This commit is contained in:
parent
d78bdefc01
commit
9a772d737f
@ -189,6 +189,16 @@ double ObjectFunctions::GetObjectSummonDuration(unsigned int index) noexcept
|
|||||||
return readObjectList->baseObjects.at(index).summonDuration;
|
return readObjectList->baseObjects.at(index).summonDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double ObjectFunctions::GetObjectSummonEffectId(unsigned int index) noexcept
|
||||||
|
{
|
||||||
|
return readObjectList->baseObjects.at(index).summonEffectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *ObjectFunctions::GetObjectSummonSpellId(unsigned int index) noexcept
|
||||||
|
{
|
||||||
|
return readObjectList->baseObjects.at(index).summonSpellId.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
bool ObjectFunctions::DoesObjectHavePlayerSummoner(unsigned int index) noexcept
|
bool ObjectFunctions::DoesObjectHavePlayerSummoner(unsigned int index) noexcept
|
||||||
{
|
{
|
||||||
return readObjectList->baseObjects.at(index).master.isPlayer;
|
return readObjectList->baseObjects.at(index).master.isPlayer;
|
||||||
@ -404,6 +414,16 @@ void ObjectFunctions::SetObjectSummonState(bool summonState) noexcept
|
|||||||
tempObject.isSummon = summonState;
|
tempObject.isSummon = summonState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectFunctions::SetObjectSummonEffectId(int summonEffectId) noexcept
|
||||||
|
{
|
||||||
|
tempObject.summonEffectId = summonEffectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectFunctions::SetObjectSummonSpellId(const char* summonSpellId) noexcept
|
||||||
|
{
|
||||||
|
tempObject.summonSpellId = summonSpellId;
|
||||||
|
}
|
||||||
|
|
||||||
void ObjectFunctions::SetObjectSummonDuration(double summonDuration) noexcept
|
void ObjectFunctions::SetObjectSummonDuration(double summonDuration) noexcept
|
||||||
{
|
{
|
||||||
tempObject.summonDuration = summonDuration;
|
tempObject.summonDuration = summonDuration;
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
{"GetObjectActivatingName", ObjectFunctions::GetObjectActivatingName},\
|
{"GetObjectActivatingName", ObjectFunctions::GetObjectActivatingName},\
|
||||||
\
|
\
|
||||||
{"GetObjectSummonState", ObjectFunctions::GetObjectSummonState},\
|
{"GetObjectSummonState", ObjectFunctions::GetObjectSummonState},\
|
||||||
|
{"GetObjectSummonEffectId", ObjectFunctions::GetObjectSummonEffectId},\
|
||||||
|
{"GetObjectSummonSpellId", ObjectFunctions::GetObjectSummonSpellId},\
|
||||||
{"GetObjectSummonDuration", ObjectFunctions::GetObjectSummonDuration},\
|
{"GetObjectSummonDuration", ObjectFunctions::GetObjectSummonDuration},\
|
||||||
{"DoesObjectHavePlayerSummoner", ObjectFunctions::DoesObjectHavePlayerSummoner},\
|
{"DoesObjectHavePlayerSummoner", ObjectFunctions::DoesObjectHavePlayerSummoner},\
|
||||||
{"GetObjectSummonerPid", ObjectFunctions::GetObjectSummonerPid},\
|
{"GetObjectSummonerPid", ObjectFunctions::GetObjectSummonerPid},\
|
||||||
@ -87,6 +89,8 @@
|
|||||||
{"SetObjectRotation", ObjectFunctions::SetObjectRotation},\
|
{"SetObjectRotation", ObjectFunctions::SetObjectRotation},\
|
||||||
\
|
\
|
||||||
{"SetObjectSummonState", ObjectFunctions::SetObjectSummonState},\
|
{"SetObjectSummonState", ObjectFunctions::SetObjectSummonState},\
|
||||||
|
{"SetObjectSummonEffectId", ObjectFunctions::SetObjectSummonEffectId},\
|
||||||
|
{"SetObjectSummonSpellId", ObjectFunctions::SetObjectSummonSpellId},\
|
||||||
{"SetObjectSummonDuration", ObjectFunctions::SetObjectSummonDuration},\
|
{"SetObjectSummonDuration", ObjectFunctions::SetObjectSummonDuration},\
|
||||||
{"SetObjectSummonerPid", ObjectFunctions::SetObjectSummonerPid},\
|
{"SetObjectSummonerPid", ObjectFunctions::SetObjectSummonerPid},\
|
||||||
{"SetObjectSummonerRefNum", ObjectFunctions::SetObjectSummonerRefNum},\
|
{"SetObjectSummonerRefNum", ObjectFunctions::SetObjectSummonerRefNum},\
|
||||||
@ -408,6 +412,22 @@ public:
|
|||||||
*/
|
*/
|
||||||
static bool GetObjectSummonState(unsigned int index) noexcept;
|
static bool GetObjectSummonState(unsigned int index) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the summon effect ID of the object at a certain index in the read object list.
|
||||||
|
*
|
||||||
|
* \param index The index of the object.
|
||||||
|
* \return The summon effect ID.
|
||||||
|
*/
|
||||||
|
static double GetObjectSummonEffectId(unsigned int index) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the summon spell ID of the object at a certain index in the read object list.
|
||||||
|
*
|
||||||
|
* \param index The index of the object.
|
||||||
|
* \return The summon spell ID.
|
||||||
|
*/
|
||||||
|
static const char *GetObjectSummonSpellId(unsigned int index) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the summon duration of the object at a certain index in the read object list.
|
* \brief Get the summon duration of the object at a certain index in the read object list.
|
||||||
*
|
*
|
||||||
@ -784,6 +804,22 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void SetObjectSummonState(bool summonState) noexcept;
|
static void SetObjectSummonState(bool summonState) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Set the summon effect ID of the temporary object stored on the server.
|
||||||
|
*
|
||||||
|
* \param summonEffectId The summon effect ID.
|
||||||
|
* \return void
|
||||||
|
*/
|
||||||
|
static void SetObjectSummonEffectId(int summonEffectId) noexcept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Set the summon spell ID of the temporary object stored on the server.
|
||||||
|
*
|
||||||
|
* \param summonSpellId The summon spell ID.
|
||||||
|
* \return void
|
||||||
|
*/
|
||||||
|
static void SetObjectSummonSpellId(const char* summonSpellId) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set the summon duration of the temporary object stored on the server.
|
* \brief Set the summon duration of the temporary object stored on the server.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user