2017-05-16 16:25:31 +00:00
|
|
|
#ifndef OPENMW_PROCESSORACTOREQUIPMENT_HPP
|
|
|
|
#define OPENMW_PROCESSORACTOREQUIPMENT_HPP
|
|
|
|
|
2017-08-27 16:15:56 +00:00
|
|
|
#include <apps/openmw-mp/Actors.hpp>
|
2017-07-03 17:13:10 +00:00
|
|
|
#include "../ActorProcessor.hpp"
|
2017-05-16 16:25:31 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorActorEquipment : public ActorProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorActorEquipment()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_ACTOR_EQUIPMENT)
|
|
|
|
}
|
|
|
|
|
2017-08-27 16:15:56 +00:00
|
|
|
void Do(ActorPacket &packet, std::shared_ptr<Player> player, BaseActorList &actorList) override
|
2017-05-16 16:25:31 +00:00
|
|
|
{
|
2017-08-27 16:15:56 +00:00
|
|
|
std::vector<std::shared_ptr<Actor>> actors;
|
2017-05-16 16:25:31 +00:00
|
|
|
|
2017-08-27 16:15:56 +00:00
|
|
|
for (auto &baseActor : actorList.baseActors)
|
2017-05-26 19:54:51 +00:00
|
|
|
{
|
2017-08-27 16:15:56 +00:00
|
|
|
Actor *actor = new Actor;
|
|
|
|
actor->actor = baseActor;
|
|
|
|
actors.emplace_back(actor);
|
2017-05-26 19:54:51 +00:00
|
|
|
}
|
2017-08-27 16:15:56 +00:00
|
|
|
|
|
|
|
Networking::get().getState().getEventCtrl().Call<CoreEvent::ON_ACTOR_EQUIPMENT>(player, actors);
|
|
|
|
|
2017-08-28 19:34:36 +00:00
|
|
|
Networking::get().getState().getActorCtrl().sendActors(player, actors, actorList.cell, true);
|
2017-05-16 16:25:31 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORACTOREQUIPMENT_HPP
|