Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
IVMapManager.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef _IVMAPMANAGER_H
7#define _IVMAPMANAGER_H
8
9#include <string>
10#include "Define.h"
11
12//===========================================================
13
17
18namespace VMAP
19{
20
27
28 #define VMAP_INVALID_HEIGHT -100000.0f // for check
29 #define VMAP_INVALID_HEIGHT_VALUE -200000.0f // real assigned value in unknown height case
30
31 //===========================================================
33 {
34 private:
37
38 public:
40
41 virtual ~IVMapManager(void) { }
42
43 virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
44
45 virtual bool existsMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
46
47 virtual void unloadMap(unsigned int pMapId, int x, int y) = 0;
48 virtual void unloadMap(unsigned int pMapId) = 0;
49
50 virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2) = 0;
51 virtual float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist) = 0;
56 virtual bool getObjectHitPos(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float pModifyDist) = 0;
60 virtual bool processCommand(char *pCommand)= 0;
61
71 void setEnableHeightCalc(bool pVal) { iEnableHeightCalc = pVal; }
72
74 bool isHeightCalcEnabled() const { return(iEnableHeightCalc); }
76
77 virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const =0;
82 virtual bool getAreaInfo(unsigned int pMapId, float x, float y, float &z, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const=0;
83 virtual bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 ReqLiquidType, float &level, float &floor, uint32 &type) const=0;
84 };
85
86}
87#endif
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
virtual float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist)=0
virtual bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 ReqLiquidType, float &level, float &floor, uint32 &type) const =0
bool isHeightCalcEnabled() const
virtual int loadMap(const char *pBasePath, unsigned int pMapId, int x, int y)=0
virtual bool existsMap(const char *pBasePath, unsigned int pMapId, int x, int y)=0
void setEnableLineOfSightCalc(bool pVal)
bool isMapLoadingEnabled() const
bool isLineOfSightCalcEnabled() const
virtual bool processCommand(char *pCommand)=0
virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const =0
virtual void unloadMap(unsigned int pMapId, int x, int y)=0
virtual bool getAreaInfo(unsigned int pMapId, float x, float y, float &z, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const =0
virtual void unloadMap(unsigned int pMapId)=0
virtual bool getObjectHitPos(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, float &rx, float &ry, float &rz, float pModifyDist)=0
void setEnableHeightCalc(bool pVal)
virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2)=0
virtual ~IVMapManager(void)
VMAP_LOAD_RESULT
@ VMAP_LOAD_RESULT_ERROR
@ VMAP_LOAD_RESULT_OK
@ VMAP_LOAD_RESULT_IGNORED