TrinityCore
vmapexport.cpp File Reference
#include "adtfile.h"
#include "Banner.h"
#include "Common.h"
#include "cascfile.h"
#include "DB2CascFileSource.h"
#include "ExtractorDB2LoadInfo.h"
#include "StringFormat.h"
#include "VMapDefinitions.h"
#include "vmapexport.h"
#include "Locales.h"
#include "Util.h"
#include "wdtfile.h"
#include "wmo.h"
#include <algorithm>
#include <CascLib.h>
#include <boost/filesystem/operations.hpp>
#include <fstream>
#include <list>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cstdio>
#include <cerrno>
#include <sys/stat.h>
+ Include dependency graph for vmapexport.cpp:

Go to the source code of this file.

Classes

struct  MapEntry
 

Macros

#define CASC_LOCALES_COUNT   17
 

Functions

bool OpenCascStorage (int locale)
 
uint32 GetInstalledLocalesMask ()
 
uint32 GenerateUniqueObjectId (uint32 clientId, uint16 clientDoodadId, bool isWmo)
 
bool FileExists (char const *file)
 
bool ExtractSingleWmo (std::string &fname)
 
void ParsMapFiles ()
 
bool processArgv (int argc, char **argv, const char *versionString)
 
static bool RetardCheck ()
 
int main (int argc, char **argv)
 

Variables

std::shared_ptr< CASC::StorageCascStorage
 
std::vector< MapEntrymap_ids
 
std::unordered_set< uint32maps_that_are_parents
 
boost::filesystem::path input_path
 
bool preciseVectorData = false
 
char const * CascProduct = "wow"
 
char const * CascRegion = "eu"
 
bool UseRemoteCasc = false
 
uint32 DbcLocale = 0
 
std::unordered_map< std::string, WMODoodadDataWmoDoodads
 
char const * szWorkDirWmo = "./Buildings"
 
char const * CascLocaleNames [CASC_LOCALES_COUNT]
 
uint32 WowLocaleToCascLocaleFlags [12]
 
uint32 uniqueObjectIdGenerator = std::numeric_limits<uint32>::max() - 1
 
std::map< std::pair< uint32, uint16 >, uint32uniqueObjectIds
 

Macro Definition Documentation

◆ CASC_LOCALES_COUNT

#define CASC_LOCALES_COUNT   17

Definition at line 76 of file vmapexport.cpp.

Function Documentation

◆ ExtractSingleWmo()

bool ExtractSingleWmo ( std::string &  fname)

Definition at line 188 of file vmapexport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FileExists()

bool FileExists ( char const *  file)

Definition at line 178 of file vmapexport.cpp.

+ Here is the caller graph for this function:

◆ GenerateUniqueObjectId()

uint32 GenerateUniqueObjectId ( uint32  clientId,
uint16  clientDoodadId,
bool  isWmo 
)

Definition at line 170 of file vmapexport.cpp.

+ Here is the caller graph for this function:

◆ GetInstalledLocalesMask()

uint32 GetInstalledLocalesMask ( )

Definition at line 137 of file vmapexport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 450 of file vmapexport.cpp.

+ Here is the call graph for this function:

◆ OpenCascStorage()

bool OpenCascStorage ( int  locale)

Definition at line 106 of file vmapexport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParsMapFiles()

void ParsMapFiles ( )

Definition at line 271 of file vmapexport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processArgv()

bool processArgv ( int  argc,
char **  argv,
const char *  versionString 
)

Definition at line 333 of file vmapexport.cpp.

+ Here is the caller graph for this function:

◆ RetardCheck()

static bool RetardCheck ( )
static

Definition at line 418 of file vmapexport.cpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ CascLocaleNames

char const* CascLocaleNames[CASC_LOCALES_COUNT]
Initial value:
=
{
"none", "enUS",
"koKR", "unknown",
"frFR", "deDE",
"zhCN", "esES",
"zhTW", "enGB",
"enCN", "enTW",
"esMX", "ruRU",
"ptBR", "itIT",
"ptPT"
}

Definition at line 77 of file vmapexport.cpp.

◆ CascProduct

char const* CascProduct = "wow"

Definition at line 66 of file vmapexport.cpp.

◆ CascRegion

char const* CascRegion = "eu"

Definition at line 67 of file vmapexport.cpp.

◆ CascStorage

std::shared_ptr<CASC::Storage> CascStorage

Definition at line 51 of file vmapexport.cpp.

◆ DbcLocale

uint32 DbcLocale = 0

Definition at line 69 of file vmapexport.cpp.

◆ input_path

boost::filesystem::path input_path

Definition at line 64 of file vmapexport.cpp.

◆ map_ids

std::vector<MapEntry> map_ids

Definition at line 62 of file vmapexport.cpp.

◆ maps_that_are_parents

std::unordered_set<uint32> maps_that_are_parents

Definition at line 63 of file vmapexport.cpp.

◆ preciseVectorData

bool preciseVectorData = false

Definition at line 65 of file vmapexport.cpp.

◆ szWorkDirWmo

char const* szWorkDirWmo = "./Buildings"

Definition at line 74 of file vmapexport.cpp.

◆ uniqueObjectIdGenerator

uint32 uniqueObjectIdGenerator = std::numeric_limits<uint32>::max() - 1

Definition at line 167 of file vmapexport.cpp.

◆ uniqueObjectIds

std::map<std::pair<uint32, uint16>, uint32> uniqueObjectIds

Definition at line 168 of file vmapexport.cpp.

◆ UseRemoteCasc

bool UseRemoteCasc = false

Definition at line 68 of file vmapexport.cpp.

◆ WmoDoodads

std::unordered_map<std::string, WMODoodadData> WmoDoodads

Definition at line 70 of file vmapexport.cpp.

◆ WowLocaleToCascLocaleFlags

uint32 WowLocaleToCascLocaleFlags[12]
Initial value:
=
{
CASC_LOCALE_ENUS | CASC_LOCALE_ENGB,
CASC_LOCALE_KOKR,
CASC_LOCALE_FRFR,
CASC_LOCALE_DEDE,
CASC_LOCALE_ZHCN,
CASC_LOCALE_ZHTW,
CASC_LOCALE_ESES,
CASC_LOCALE_ESMX,
CASC_LOCALE_RURU,
0,
CASC_LOCALE_PTBR | CASC_LOCALE_PTPT,
CASC_LOCALE_ITIT,
}

Definition at line 90 of file vmapexport.cpp.