[Server] Create ActorFunctions placeholder

0.6.1
David Cernat 8 years ago
parent 4f3d05eed2
commit a24ef3a25e

@ -0,0 +1,28 @@
#include <regex>
#include <apps/openmw-mp/Player.hpp>
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
#include <apps/openmw-mp/Networking.hpp>
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Base/BaseActor.hpp>
#include "Actors.hpp"
using namespace mwmp;
ActorList actorList;
BaseActor tempActor;
void ActorFunctions::InitActorList(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
actorList.cell.blank();
actorList.baseActors.clear();
actorList.guid = player->guid;
}
unsigned int ActorFunctions::GetActorListSize() noexcept
{
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count;
}

@ -0,0 +1,19 @@
#ifndef OPENMW_ACTORFUNCTIONS_HPP
#define OPENMW_ACTORFUNCTIONS_HPP
#define ACTORAPI \
{"InitActorList", ActorFunctions::InitActorList},\
\
{"GetActorListSize", ActorFunctions::GetActorListSize}
class ActorFunctions
{
public:
static void InitActorList(unsigned short pid) noexcept;
static unsigned int GetActorListSize() noexcept;
};
#endif //OPENMW_ACTORFUNCTIONS_HPP

@ -13,6 +13,7 @@
#include <Script/Functions/Items.hpp>
#include <Script/Functions/Quests.hpp>
#include <Script/Functions/Spells.hpp>
#include <Script/Functions/Actors.hpp>
#include <Script/Functions/World.hpp>
#include <Script/Functions/Miscellaneous.hpp>
#include <RakNetTypes.h>
@ -101,6 +102,7 @@ public:
GUIAPI,
CHARCLASSAPI,
WORLDAPI,
ACTORAPI,
MISCELLANEOUSAPI
};

Loading…
Cancel
Save