#pragma once #include #include #include #include "StaticRegistry.h" class Dimension; class WorldUpdate : public Framework::ReferenceCounter { private: int affectedDimensionId; Framework::Vec3 minAffected; Framework::Vec3 maxAffected; int type; protected: virtual void write( Framework::StreamWriter* zWriter ) = 0; public: WorldUpdate( int type, int dimensionId, Framework::Vec3 minAffected, Framework::Vec3 maxAffected ); virtual void onUpdate( Dimension* zDimension ) = 0; void writeAndCheck( Framework::StreamWriter* zWriter ); int getAffectedDimension() const; const Framework::Vec3& getMinAffectedPoint() const; const Framework::Vec3& getMaxAffectedPoint() const; int getType() const; int distanceTo( int x, int y ) const; }; class WorldUpdateType : public Framework::ReferenceCounter { protected: WorldUpdateType( int id ); };