forked from mirror/openmw-tes3mp
[Server] Add GetActorCell() script function
This commit is contained in:
parent
e53916da10
commit
1ce60fbf30
2 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,11 @@ unsigned char ActorFunctions::GetLastActorListAction() noexcept
|
|||
return mwmp::Networking::getPtr()->getLastActorList()->action;
|
||||
}
|
||||
|
||||
const char *ActorFunctions::GetActorCell(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).cell.getDescription().c_str();
|
||||
}
|
||||
|
||||
const char *ActorFunctions::GetActorRefId(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).refId.c_str();
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
{"GetActorListSize", ActorFunctions::GetActorListSize},\
|
||||
{"GetLastActorListAction", ActorFunctions::GetLastActorListAction},\
|
||||
\
|
||||
{"GetActorCell", ActorFunctions::GetActorCell},\
|
||||
{"GetActorRefId", ActorFunctions::GetActorRefId},\
|
||||
{"GetActorRefNumIndex", ActorFunctions::GetActorRefNumIndex},\
|
||||
{"GetActorMpNum", ActorFunctions::GetActorMpNum},\
|
||||
|
@ -32,6 +33,7 @@ public:
|
|||
static unsigned int GetActorListSize() noexcept;
|
||||
static unsigned char GetLastActorListAction() noexcept;
|
||||
|
||||
static const char *GetActorCell(unsigned int i) noexcept;
|
||||
static const char *GetActorRefId(unsigned int i) noexcept;
|
||||
static int GetActorRefNumIndex(unsigned int i) noexcept;
|
||||
static int GetActorMpNum(unsigned int i) noexcept;
|
||||
|
|
Loading…
Reference in a new issue