water_map.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef EQEMU_WATER_MAP_H
  2. #define EQEMU_WATER_MAP_H
  3. #include "../../common/types.h"
  4. #include "position.h"
  5. #include <string>
  6. enum WaterRegionType : int {
  7. RegionTypeUnsupported = -2,
  8. RegionTypeUntagged = -1,
  9. RegionTypeNormal = 0,
  10. RegionTypeWater = 1,
  11. RegionTypeLava = 2,
  12. RegionTypeZoneLine = 3,
  13. RegionTypePVP = 4,
  14. RegionTypeSlime = 5,
  15. RegionTypeIce = 6,
  16. RegionTypeVWater = 7
  17. };
  18. class WaterMap
  19. {
  20. public:
  21. WaterMap() { }
  22. virtual ~WaterMap() { }
  23. static WaterMap* LoadWaterMapfile(std::string zone_name);
  24. virtual WaterRegionType ReturnRegionType(const glm::vec3& location) const = 0;
  25. virtual bool InWater(const glm::vec3& location) const = 0;
  26. virtual bool InVWater(const glm::vec3& location) const = 0;
  27. virtual bool InLava(const glm::vec3& location) const = 0;
  28. virtual bool InLiquid(const glm::vec3& location) const = 0;
  29. virtual bool InPvP(const glm::vec3& location) const = 0;
  30. virtual bool InZoneLine(const glm::vec3& location) const = 0;
  31. protected:
  32. virtual bool Load(FILE *fp) { return false; }
  33. };
  34. #endif