1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-22 06:53:51 +00:00
openmw-tes3mp/components/openmw-mp/Packets/World/WorldPacket.hpp
Koncord 2cb0ea20f0 [General] Modernize packets
Use explicit for constructors
Use override instead virtual for inherited methods
Mark final derived classes as "final"
2017-12-09 10:13:27 +08:00

35 lines
836 B
C++

#ifndef OPENMW_WORLDPACKET_HPP
#define OPENMW_WORLDPACKET_HPP
#include <string>
#include <RakNetTypes.h>
#include <BitStream.h>
#include <PacketPriority.h>
#include <components/openmw-mp/Base/BaseEvent.hpp>
#include <components/openmw-mp/Packets/BasePacket.hpp>
namespace mwmp
{
class WorldPacket: public BasePacket
{
public:
explicit WorldPacket(RakNet::RakPeerInterface *peer);
~WorldPacket() override = default;
void setEvent(BaseEvent *event);
void Packet(RakNet::BitStream *bs, bool send) override;
protected:
virtual void Object(WorldObject &worldObject, bool send);
bool PacketHeader(RakNet::BitStream *bs, bool send);
BaseEvent *event;
static const int maxObjects = 3000;
bool hasCellData;
};
}
#endif //OPENMW_WORLDPACKET_HPP