openmw-tes3coop/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp
Koncord fe2dd1bad4 [Server] Use correct cells in "send" functions
Remove unused return type from ON_PLAYER_SENDMESSAGE
2017-08-29 03:34:36 +08:00

35 lines
1,012 B
C++

#ifndef OPENMW_PROCESSORACTOREQUIPMENT_HPP
#define OPENMW_PROCESSORACTOREQUIPMENT_HPP
#include <apps/openmw-mp/Actors.hpp>
#include "../ActorProcessor.hpp"
namespace mwmp
{
class ProcessorActorEquipment : public ActorProcessor
{
public:
ProcessorActorEquipment()
{
BPP_INIT(ID_ACTOR_EQUIPMENT)
}
void Do(ActorPacket &packet, std::shared_ptr<Player> player, BaseActorList &actorList) override
{
std::vector<std::shared_ptr<Actor>> actors;
for (auto &baseActor : actorList.baseActors)
{
Actor *actor = new Actor;
actor->actor = baseActor;
actors.emplace_back(actor);
}
Networking::get().getState().getEventCtrl().Call<CoreEvent::ON_ACTOR_EQUIPMENT>(player, actors);
Networking::get().getState().getActorCtrl().sendActors(player, actors, actorList.cell, true);
}
};
}
#endif //OPENMW_PROCESSORACTOREQUIPMENT_HPP