forked from mirror/openmw-tes3mp
[Server] Add ReadCellActorList() script function
This commit is contained in:
parent
a73cbac226
commit
217894100a
2 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,13 @@ void ActorFunctions::ReadLastActorList() noexcept
|
||||||
readActorList = mwmp::Networking::getPtr()->getLastActorList();
|
readActorList = mwmp::Networking::getPtr()->getLastActorList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActorFunctions::ReadCellActorList(const char* cellDescription) noexcept
|
||||||
|
{
|
||||||
|
ESM::Cell esmCell = Utils::getCellFromDescription(cellDescription);
|
||||||
|
Cell *serverCell = CellController::get()->getCell(&esmCell);
|
||||||
|
readActorList = serverCell->getActorList();
|
||||||
|
}
|
||||||
|
|
||||||
void ActorFunctions::InitializeActorList(unsigned short pid) noexcept
|
void ActorFunctions::InitializeActorList(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#define ACTORAPI \
|
#define ACTORAPI \
|
||||||
{"ReadLastActorList", ActorFunctions::ReadLastActorList},\
|
{"ReadLastActorList", ActorFunctions::ReadLastActorList},\
|
||||||
|
{"ReadCellActorList", ActorFunctions::ReadCellActorList},\
|
||||||
{"InitializeActorList", ActorFunctions::InitializeActorList},\
|
{"InitializeActorList", ActorFunctions::InitializeActorList},\
|
||||||
\
|
\
|
||||||
{"GetActorListSize", ActorFunctions::GetActorListSize},\
|
{"GetActorListSize", ActorFunctions::GetActorListSize},\
|
||||||
|
@ -57,6 +58,7 @@ class ActorFunctions
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void ReadLastActorList() noexcept;
|
static void ReadLastActorList() noexcept;
|
||||||
|
static void ReadCellActorList(const char* cellDescription) noexcept;
|
||||||
static void InitializeActorList(unsigned short pid) noexcept;
|
static void InitializeActorList(unsigned short pid) noexcept;
|
||||||
|
|
||||||
static unsigned int GetActorListSize() noexcept;
|
static unsigned int GetActorListSize() noexcept;
|
||||||
|
|
Loading…
Reference in a new issue