mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-31 17:36:44 +00:00
[Server] Add ObjectFunctions for setting summoner identity for spawns
This commit is contained in:
parent
c6542ffec4
commit
47b666c1f9
2 changed files with 49 additions and 1 deletions
|
@ -409,13 +409,34 @@ void ObjectFunctions::SetObjectSummonDuration(float summonDuration) noexcept
|
|||
tempObject.summonDuration = summonDuration;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectSummonerPid(unsigned short pid) noexcept
|
||||
{
|
||||
Player *player;
|
||||
GET_PLAYER(pid, player, );
|
||||
|
||||
tempObject.master.isPlayer = true;
|
||||
tempObject.master.guid = player->guid;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectSummonerRefNum(int refNum) noexcept
|
||||
{
|
||||
tempObject.master.isPlayer = false;
|
||||
tempObject.master.refNum = refNum;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectSummonerMpNum(int mpNum) noexcept
|
||||
{
|
||||
tempObject.master.isPlayer = false;
|
||||
tempObject.master.mpNum = mpNum;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectActivatingPid(unsigned short pid) noexcept
|
||||
{
|
||||
Player *player;
|
||||
GET_PLAYER(pid, player, );
|
||||
|
||||
tempObject.activatingActor.guid = player->guid;
|
||||
tempObject.activatingActor.isPlayer = true;
|
||||
tempObject.activatingActor.guid = player->guid;
|
||||
}
|
||||
|
||||
void ObjectFunctions::SetObjectDoorState(int doorState) noexcept
|
||||
|
|
|
@ -88,6 +88,9 @@
|
|||
\
|
||||
{"SetObjectSummonState", ObjectFunctions::SetObjectSummonState},\
|
||||
{"SetObjectSummonDuration", ObjectFunctions::SetObjectSummonDuration},\
|
||||
{"SetObjectSummonerPid", ObjectFunctions::SetObjectSummonerPid},\
|
||||
{"SetObjectSummonerRefNum", ObjectFunctions::SetObjectSummonerRefNum},\
|
||||
{"SetObjectSummonerMpNum", ObjectFunctions::SetObjectSummonerMpNum},\
|
||||
\
|
||||
{"SetObjectActivatingPid", ObjectFunctions::SetObjectActivatingPid},\
|
||||
\
|
||||
|
@ -789,6 +792,30 @@ public:
|
|||
*/
|
||||
static void SetObjectSummonDuration(float summonDuration) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the player ID of the summoner of the temporary object stored on the server.
|
||||
*
|
||||
* \param pid The player ID of the summoner.
|
||||
* \return void
|
||||
*/
|
||||
static void SetObjectSummonerPid(unsigned short pid) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the refNum of the actor summoner of the temporary object stored on the server.
|
||||
*
|
||||
* \param refNum The refNum of the summoner.
|
||||
* \return void
|
||||
*/
|
||||
static void SetObjectSummonerRefNum(int refNum) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the mpNum of the actor summoner of the temporary object stored on the server.
|
||||
*
|
||||
* \param mpNum The mpNum of the summoner.
|
||||
* \return void
|
||||
*/
|
||||
static void SetObjectSummonerMpNum(int mpNum) noexcept;
|
||||
|
||||
/**
|
||||
* \brief Set the player ID of the player activating the temporary object stored on the
|
||||
* server. Currently only used for ObjectActivate packets.
|
||||
|
|
Loading…
Reference in a new issue