2017-02-06 15:40:32 +00:00
|
|
|
#ifndef OPENMW_WORLDEVENT_HPP
|
|
|
|
#define OPENMW_WORLDEVENT_HPP
|
2017-01-27 18:57:47 +00:00
|
|
|
|
2017-02-06 10:53:41 +00:00
|
|
|
#include <components/openmw-mp/Base/BaseEvent.hpp>
|
2017-01-27 18:57:47 +00:00
|
|
|
#include "../mwworld/cellstore.hpp"
|
|
|
|
#include <RakNetTypes.h>
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class Networking;
|
2017-02-06 15:40:32 +00:00
|
|
|
class WorldEvent : public BaseEvent
|
2017-01-27 18:57:47 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2017-02-23 07:18:48 +00:00
|
|
|
WorldEvent();
|
2017-02-06 15:40:32 +00:00
|
|
|
virtual ~WorldEvent();
|
2017-01-27 18:57:47 +00:00
|
|
|
|
2017-04-05 06:04:41 +00:00
|
|
|
void reset();
|
2017-01-28 10:34:45 +00:00
|
|
|
void addObject(WorldObject worldObject);
|
|
|
|
|
2017-02-14 17:31:56 +00:00
|
|
|
void editContainers(MWWorld::CellStore* cellStore);
|
2017-04-05 04:54:23 +00:00
|
|
|
|
2017-01-28 10:34:45 +00:00
|
|
|
void placeObjects(MWWorld::CellStore* cellStore);
|
2017-05-29 03:59:05 +00:00
|
|
|
void spawnObjects(MWWorld::CellStore* cellStore);
|
2017-01-28 10:34:45 +00:00
|
|
|
void deleteObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void lockObjects(MWWorld::CellStore* cellStore);
|
2017-05-25 21:21:24 +00:00
|
|
|
void triggerTrapObjects(MWWorld::CellStore* cellStore);
|
2017-01-28 10:34:45 +00:00
|
|
|
void scaleObjects(MWWorld::CellStore* cellStore);
|
2017-07-13 06:46:30 +00:00
|
|
|
void setObjectStates(MWWorld::CellStore* cellStore);
|
2017-01-28 10:34:45 +00:00
|
|
|
void moveObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void rotateObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void animateObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void activateDoors(MWWorld::CellStore* cellStore);
|
|
|
|
|
|
|
|
void setLocalShorts(MWWorld::CellStore* cellStore);
|
|
|
|
void setLocalFloats(MWWorld::CellStore* cellStore);
|
|
|
|
void setMemberShorts();
|
|
|
|
void setGlobalShorts();
|
|
|
|
|
|
|
|
void playMusic();
|
|
|
|
void playVideo();
|
2017-01-27 18:57:47 +00:00
|
|
|
|
2017-05-06 17:44:14 +00:00
|
|
|
void addObjectPlace(const MWWorld::Ptr& ptr);
|
2017-05-29 03:59:05 +00:00
|
|
|
void addObjectSpawn(const MWWorld::Ptr& ptr);
|
2017-05-30 07:11:01 +00:00
|
|
|
void addObjectSpawn(const MWWorld::Ptr& ptr, const MWWorld::Ptr& master);
|
2017-05-06 17:44:14 +00:00
|
|
|
void addObjectDelete(const MWWorld::Ptr& ptr);
|
|
|
|
void addObjectLock(const MWWorld::Ptr& ptr, int lockLevel);
|
2017-05-25 22:28:43 +00:00
|
|
|
void addObjectTrap(const MWWorld::Ptr& ptr, const ESM::Position& pos, bool isDisarmed);
|
2017-05-06 17:44:14 +00:00
|
|
|
void addObjectScale(const MWWorld::Ptr& ptr, float scale);
|
2017-07-13 06:46:30 +00:00
|
|
|
void addObjectState(const MWWorld::Ptr& ptr, bool objectState);
|
2017-05-06 17:44:14 +00:00
|
|
|
void addObjectAnimPlay(const MWWorld::Ptr& ptr, std::string group, int mode);
|
|
|
|
void addDoorState(const MWWorld::Ptr& ptr, int state);
|
|
|
|
void addMusicPlay(std::string filename);
|
|
|
|
void addVideoPlay(std::string filename, bool allowSkipping);
|
|
|
|
void addScriptLocalShort(const MWWorld::Ptr& ptr, int index, int shortVal);
|
|
|
|
void addScriptLocalFloat(const MWWorld::Ptr& ptr, int index, float floatVal);
|
|
|
|
void addScriptMemberShort(std::string refId, int index, int shortVal);
|
|
|
|
void addScriptGlobalShort(std::string varName, int shortVal);
|
|
|
|
|
|
|
|
void sendObjectPlace();
|
2017-05-29 03:59:05 +00:00
|
|
|
void sendObjectSpawn();
|
2017-05-06 17:44:14 +00:00
|
|
|
void sendObjectDelete();
|
|
|
|
void sendObjectLock();
|
2017-05-25 21:21:24 +00:00
|
|
|
void sendObjectTrap();
|
2017-05-06 17:44:14 +00:00
|
|
|
void sendObjectScale();
|
2017-07-13 06:46:30 +00:00
|
|
|
void sendObjectState();
|
2017-05-06 17:44:14 +00:00
|
|
|
void sendObjectAnimPlay();
|
|
|
|
void sendDoorState();
|
|
|
|
void sendMusicPlay();
|
|
|
|
void sendVideoPlay();
|
|
|
|
void sendScriptLocalShort();
|
|
|
|
void sendScriptLocalFloat();
|
|
|
|
void sendScriptMemberShort();
|
|
|
|
void sendScriptGlobalShort();
|
2017-04-05 06:12:02 +00:00
|
|
|
|
2017-05-06 17:44:14 +00:00
|
|
|
void sendContainers(MWWorld::CellStore* cellStore);
|
2017-04-05 06:12:02 +00:00
|
|
|
|
2017-01-27 18:57:47 +00:00
|
|
|
private:
|
|
|
|
Networking *getNetworking();
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-02-06 15:40:32 +00:00
|
|
|
#endif //OPENMW_WORLDEVENT_HPP
|