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);
|
|
|
|
void deleteObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void lockObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void unlockObjects(MWWorld::CellStore* cellStore);
|
|
|
|
void scaleObjects(MWWorld::CellStore* cellStore);
|
|
|
|
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);
|
|
|
|
void addObjectDelete(const MWWorld::Ptr& ptr);
|
|
|
|
void addObjectLock(const MWWorld::Ptr& ptr, int lockLevel);
|
|
|
|
void addObjectUnlock(const MWWorld::Ptr& ptr);
|
|
|
|
void addObjectScale(const MWWorld::Ptr& ptr, float scale);
|
|
|
|
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();
|
|
|
|
void sendObjectDelete();
|
|
|
|
void sendObjectLock();
|
|
|
|
void sendObjectUnlock();
|
|
|
|
void sendObjectScale();
|
|
|
|
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
|