1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:23:52 +00:00

[Server] Add ReadCellActorList() script function

This commit is contained in:
David Cernat 2017-05-01 00:49:58 +03:00
parent a73cbac226
commit 217894100a
2 changed files with 9 additions and 0 deletions

View file

@ -25,6 +25,13 @@ void ActorFunctions::ReadLastActorList() noexcept
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
{
Player *player;

View file

@ -3,6 +3,7 @@
#define ACTORAPI \
{"ReadLastActorList", ActorFunctions::ReadLastActorList},\
{"ReadCellActorList", ActorFunctions::ReadCellActorList},\
{"InitializeActorList", ActorFunctions::InitializeActorList},\
\
{"GetActorListSize", ActorFunctions::GetActorListSize},\
@ -57,6 +58,7 @@ class ActorFunctions
public:
static void ReadLastActorList() noexcept;
static void ReadCellActorList(const char* cellDescription) noexcept;
static void InitializeActorList(unsigned short pid) noexcept;
static unsigned int GetActorListSize() noexcept;