openmw-tes3coop/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp

28 lines
728 B
C++
Raw Normal View History

#ifndef OPENMW_PROCESSORACTOREQUIPMENT_HPP
#define OPENMW_PROCESSORACTOREQUIPMENT_HPP
#include "apps/openmw-mp/ActorProcessor.hpp"
namespace mwmp
{
class ProcessorActorEquipment : public ActorProcessor
{
public:
ProcessorActorEquipment()
{
BPP_INIT(ID_ACTOR_EQUIPMENT)
}
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
{
// Send only to players who have the cell loaded
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
if (serverCell != nullptr)
serverCell->sendToLoaded(&packet, &actorList);
}
};
}
#endif //OPENMW_PROCESSORACTOREQUIPMENT_HPP