[Server] Add GetActorCell() script function

0.6.1
David Cernat 8 years ago
parent e53916da10
commit 1ce60fbf30

@ -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…
Cancel
Save