[Server] Add script function for checking if object's summoner is player

0.6.3
David Cernat 7 years ago
parent d162f6fd3a
commit f9ebe400f7

@ -123,6 +123,11 @@ double ObjectFunctions::GetObjectSummonDuration(unsigned int i) noexcept
return readObjectList->baseObjects.at(i).summonDuration;
}
bool ObjectFunctions::DoesObjectHavePlayerSummoner(unsigned int i) noexcept
{
return readObjectList->baseObjects.at(i).master.isPlayer;
}
double ObjectFunctions::GetObjectPosX(unsigned int i) noexcept
{
return readObjectList->baseObjects.at(i).position.pos[0];

@ -26,6 +26,7 @@
{"GetObjectLockLevel", ObjectFunctions::GetObjectLockLevel},\
{"GetObjectSummonState", ObjectFunctions::GetObjectSummonState},\
{"GetObjectSummonDuration", ObjectFunctions::GetObjectSummonDuration},\
{"DoesObjectHavePlayerSummoner", ObjectFunctions::DoesObjectHavePlayerSummoner},\
{"GetObjectPosX", ObjectFunctions::GetObjectPosX},\
{"GetObjectPosY", ObjectFunctions::GetObjectPosY},\
{"GetObjectPosZ", ObjectFunctions::GetObjectPosZ},\
@ -257,7 +258,7 @@ public:
* \brief Check whether the object at a certain index in the read object list's object changes
* is a summon.
*
* Only living actors can have be summoned.
* Only living actors can be summoned.
*
* \return The summon state.
*/
@ -274,6 +275,16 @@ public:
*/
static double GetObjectSummonDuration(unsigned int i) noexcept;
/**
* \brief Check whether the object at a certain index in the read object list's object changes
* has a player as its summoner.
*
* Only living actors can be summoned.
*
* \return The summon state.
*/
static bool DoesObjectHavePlayerSummoner(unsigned int i) noexcept;
/**
* \brief Get the X position of the object at a certain index in the read object list's object
* changes.

Loading…
Cancel
Save