You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
7 years ago
|
//
|
||
|
// Created by koncord on 25.08.17.
|
||
|
//
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
#include <components/openmw-mp/Base/BaseActor.hpp>
|
||
|
#include "NetActor.hpp"
|
||
|
|
||
|
class LuaState;
|
||
|
class Player;
|
||
|
|
||
|
class Actor: public NetActor
|
||
|
{
|
||
|
friend class ActorController;
|
||
|
public:
|
||
|
static void Init(LuaState &lua);
|
||
|
public:
|
||
|
Actor();
|
||
|
std::string getRefId() const;
|
||
|
void setRefId(const std::string &refId);
|
||
|
|
||
|
int getRefNumIndex() const;
|
||
|
void setRefNumIndex(int refNumIndex);
|
||
|
int getMpNum() const;
|
||
|
void setMpNum(int mpNum);
|
||
|
bool doesHavePosition() const; // ????
|
||
|
bool doesHaveStatsDynamic() const; // ????
|
||
|
|
||
|
std::shared_ptr<mwmp::BaseActor> actor;
|
||
|
};
|
||
|
|
||
|
class ActorController
|
||
|
{
|
||
|
public:
|
||
|
static void Init(LuaState &lua);
|
||
|
public:
|
||
|
|
||
|
ActorController();
|
||
|
~ActorController();
|
||
|
|
||
|
std::shared_ptr<Actor> createActor();
|
||
|
void sendActors(std::shared_ptr<Player> player, std::vector<std::shared_ptr<Actor>> actors, bool sendToAll = false);
|
||
|
void sendList(std::shared_ptr<Player> player, std::vector<std::shared_ptr<Actor>> actors, bool sendToAll = false);
|
||
|
|
||
|
void requestList(std::shared_ptr<Player> player);
|
||
|
|
||
|
std::vector<std::shared_ptr<Actor>> getActors(std::shared_ptr<Player> player);
|
||
|
|
||
|
private:
|
||
|
mwmp::BaseActorList actorList;
|
||
|
};
|
||
|
|
||
|
|