AreaID info dump menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    QKdefus's Avatar Active Member
    Reputation
    54
    Join Date
    May 2010
    Posts
    96
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AreaID info dump

    [Kalimdor]
    AreaID=MapName(Zone)

    14=Kalimdor(Durotar)
    15=Kalimdor(Dustwallow Marsh)
    16=Kalimdor(Azshara)
    17=Kalimdor(Northern Barrens)
    141=Kalimdor(Teldrassil)
    148=Kalimdor(Darkshore)
    215=Kalimdor(Mulgore)
    331=Kalimdor(Ashenvale)
    357=Kalimdor(Feralas)
    361=Kalimdor(Felwood)
    400=Kalimdor(Thousand Needles)
    405=Kalimdor(Desolace)
    406=Kalimdor(Stonetalon Mountains)
    440=Kalimdor(Tanaris)
    490=Kalimdor(Un'Goro Crater)
    493=Kalimdor(Moonglade)
    616=Kalimdor(Mount Hyjal)
    618=Kalimdor(Winterspring)
    1377=Kalimdor(Silithus)
    1637=Kalimdor(Orgrimmar)
    1638=Kalimdor(Thunder Bluff)
    1657=Kalimdor(Darnassus)
    4709=Kalimdor(Southern Barrens)
    5034=Kalimdor(Uldum)

    [Azeroth]
    AreaID=MapName(Zone)

    1=Azeroth(Dun Morogh)
    3=Azeroth(Badlands)
    8=Azeroth(Swamp of Sorrows)
    10=Azeroth(Duskwood)
    11=Azeroth(Wetlands)
    12=Azeroth(Elwynn Forest)
    28=Azeroth(Western Plaguelands)
    33=Azeroth(Northern Stranglethorn)
    38=Azeroth(Loch Modan)
    40=Azeroth(Westfall)
    41=Azeroth(Deadwind Pass)
    44=Azeroth(Redridge Mountains)
    45=Azeroth(Arathi Highlands)
    46=Azeroth(Burning Steppes)
    47=Azeroth(The Hinterlands)
    51=Azeroth(Searing Gorge)
    85=Azeroth(Tirisfal Glades)
    130=Azeroth(Silverpine Forest)
    139=Azeroth(Eastern Plaguelands)
    214=Azeroth(The Great Sea)
    267=Azeroth(Hillsbrad Foothills)
    1497=Azeroth(Undercity)
    1519=Azeroth(Stormwind City)
    1537=Azeroth(City of Ironforge)
    2017=Azeroth(Stratholme)
    2037=Azeroth(Quel'thalas)
    4815=Azeroth(Kelp'thar Forest)
    4922=Azeroth(Twilight Highlands)
    5144=Azeroth(Shimmering Expanse)
    5145=Azeroth(Abyssal Depths)
    5287=Azeroth(The Cape of Stranglethorn)

    [Outland]
    AreaID=MapName(Zone)

    3483=Expansion01(Hellfire Peninsula)
    3518=Expansion01(Nagrand)
    3519=Expansion01(Terokkar Forest)
    3520=Expansion01(Shadowmoon Valley)
    3521=Expansion01(Zangarmarsh)
    3522=Expansion01(Blade's Edge Mountains)
    3523=Expansion01(Netherstorm)
    3540=Expansion01(Twisting Nether)
    3703=Expansion01(Shattrath City)

    [Northrend]
    AreaID=MapName(Zone)

    65=Northrend(Dragonblight)
    66=Northrend(Zul'Drak)
    67=Northrend(The Storm Peaks)
    210=Northrend(Icecrown)
    394=Northrend(Grizzly Hills)
    495=Northrend(Howling Fjord)
    2817=Northrend(Crystalsong Forest)
    3537=Northrend(Borean Tundra)
    3711=Northrend(Sholazar Basin)
    4197=Northrend(Wintergrasp)
    4395=Northrend(Dalaran)

    [Cataclysm]
    AreaID=MapName(Zone)

    4815=Azeroth(Kelp'thar Forest)
    5042=Deephome(Deepholm)
    5144=Azeroth(Shimmering Expanse)
    5145=Azeroth(Abyssal Depths)
    5389=TolBarad(Tol Barad Peninsula)

    [PVP]
    AreaID=MapName(Zone)

    2597=PVPZone01(Alterac Valley)
    3277=PVPZone03(Warsong Gulch)
    3358=PVPZone04(Arathi Basin)
    3820=NetherstormBG(Eye of the Storm)
    4384=NorthrendBG(Strand of the Ancients)
    4710=IsleofConquest(Isle of Conquest)
    5031=CataclysmCTF(Twin Peaks)
    5095=TolBarad(Tol Barad)
    5449=Gilneas_BG_2(The Battle for Gilneas)

    [Exploration]
    AreaID=MapName(Zone)

    876=Kalimdor(GM Island)
    Last edited by QKdefus; 01-26-2011 at 04:17 PM.

    AreaID info dump
  2. #2
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Good job, thank

  3. #3
    Mc-fly's Avatar Sergeant
    Reputation
    14
    Join Date
    Dec 2009
    Posts
    64
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very good, thanks

  4. #4
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Someone have the map name for Eye Of The Storm?

    3820=????(Eye Of The Storm)

  5. #5
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    It was in the OPs list...

    Originally Posted by QKdefus View Post
    [PVP]
    AreaID=MapName(Zone)

    3820=NetherstormBG(Eye of the Storm)

  6. #6
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ^^ I have saved a dump and I have not look this page again, sorry.

  7. #7
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you want dump All Area easy whit wowmapper replace "Sample_D3dByAreaId.cpp" by this (to .obj file for recast/detour):

    Code:
    /** NO PUBLIC EXAMPLE! Just for testing purposes!!! You have been warned! **/
    
    #include "../src/mpqhandler.h"
    #include "../src/wdt.h"
    #include "../src/adt.h"
    #include "../src/obj0.h"
    #include "../src/m2.h"
    #include "../src/wmomodel.h"
    #include <string>
    #include "windows.h"
    
    //- Functions ------------------------------------------------------------------
    /** Just a list of MPQs we want to load. **/
    void loadAllMpqs( MpqHandler &mpq_h );
    /** Load MPQ by filename. **/
    void loadMpq( MpqHandler &mpq_h, const std::string &filename );
    /** Load *.adt and *.obj0 files from MPQ. **/
    bool loadAdt( MpqHandler &mpq_h, const std::string &name,
                  BufferS_t *adt_buf, BufferS_t *obj_buf );
    /** Load WMOs and doodads here. **/
    void loadObjectReferences( MpqHandler &mpq_h, Obj0 &obj0, Indices32_t *indices,
                               Vertices_t *vertices, Normals_t *normals );
    /** Filter terrain by area ID and add them to our coordinate vector. **/
    void getCoordsByAreaId( MpqHandler &mpq_h, const AdtCoords_t &original_coords,
                            const std::string &zone_path, uint32_t area_id,
                            AdtCoords_t *coords, uint32_t x = -1, uint32_t y = -1, bool dumpAll = false);
    /** Used to retrieve doodad geometry. **/
    bool getDoodadGeometry( MpqHandler &mpq_h, const std::string &doodad_name,
                            Indices32_t *doodad_indices, Vertices_t *doodad_vertices,
                            Normals_t *doodad_normals );
    
    //- WoW related ----------------------------------------------------------------
    UidMap_t uid_map;
    BufferS_t adt_buf, obj_buf;
    
    //------------------------------------------------------------------------------
    
    int mainLaunch(std::string _zone_path,  int32_t _areaId, int32_t _xTile, int32_t _yTile, bool _dumpAll, bool _showMap, bool _saveTile) {
    	// Load MPQ file
    	MpqHandler mpq_h("E:\\jeux\\World of Warcraft\\Data" );
    	loadAllMpqs( mpq_h );
    
    	// load WDT file which tells us what ADT tiles to load
    	BufferS_t file_buffer;
    	std::string zone_path(_zone_path);
    	mpq_h.getFile( zone_path + ".wdt", &file_buffer );
    
    	// Others Option
    	int32_t areaId = _areaId;
    	int32_t xTile = _xTile;
    	int32_t yTile = _yTile;
    	bool dumpAll = _dumpAll;
    	bool showMap = _showMap;
    	bool saveTile = _saveTile; // Save to .obj file
    
    	// create geometry buffer
    	Vertices_t vertices;
    	Indices32_t indices;
    	Normals_t normals;
    	CreateDirectoryA("dump", NULL);
    
    	// parse WDT files
    	Wdt wdt( file_buffer );
    
    	// GET COORDS BY AREA ID! AREA ID -> 12 (Elwynn Forrest), 14 (Durotar)
    	AdtCoords_t coords;
    	getCoordsByAreaId( mpq_h, wdt.getAdtCoords(), zone_path, areaId, &coords, xTile, yTile, dumpAll );
    
    	if ( coords.size() <= 0 ) {
    	std::cout << "Zone not found." << std::endl;
    	return 0;
    	}
    
    	// load found areas and get geometry
    	for ( AdtCoords_t::const_iterator iter = coords.begin();
    		iter != coords.end();
    		++iter ) {
    	// clear buffers
    	adt_buf.clear();
    	obj_buf.clear();
    	// create file string
    	std::stringstream adt_ss;
    	adt_ss << zone_path << "_" << iter->x << "_" << iter->y;
    
    	// load adt and obj files from mpq
    	loadAdt( mpq_h, adt_ss.str(), &adt_buf, &obj_buf );
    	Adt adt( adt_buf );
    
    	// get terrain geometry
    	if (saveTile && (areaId < 0 || xTile >= 0))
    	{
    		vertices.clear();
    		indices.clear();
    		normals.clear();
    	}
    	const AdtTerrain_t &adt_terr = adt.getTerrain();
    	for ( AdtTerrain_t::const_iterator terr = adt_terr.begin();
    		  terr != adt_terr.end();
    		  ++terr ) {
    	  mergeIndices( terr->indices, vertices.size(), &indices );
    	  mergeVertices( terr->vertices, &vertices );
    	  mergeNormals( terr->normals, &normals );
    	}
    
    	// parse object references
    	if ( obj_buf.size() ) {
    	  Obj0 obj0( obj_buf );
    	  loadObjectReferences( mpq_h, obj0, &indices, &vertices, &normals );
    	}
    
    	if (saveTile && (areaId < 0 || xTile >= 0))
    	{
    	  // Save to .obj Tile
    	  std::stringstream fileName;
    	  fileName.clear();
    	  fileName << "dump\\" << iter->x << "_" << iter->y << ".obj";
    	  std::cout << "Save to \"" << fileName.str() << "\" file." << std::endl;
    	  
    	  std::fstream fs1((const char*)(fileName.str().c_str()), std::fstream::out|std::fstream::binary);
    	  for (int i = 0; i < vertices.size(); i++)
    	  {
    		  fs1 << "v " << (vertices[i].x) << ' ' << vertices[i].y << ' ' << (vertices[i].z) << '\n';
    	  }
    	  for (int i = 0; i < indices.size();)
    	  {
    		 fs1 << "f " << indices[i++]+1;
    		 fs1 << ' ' << indices[i++]+1;
    		 fs1 << ' ' << indices[i++]+1 << '\n';
    	  }
    	}
    	}
    
    	if (saveTile && areaId >= 0)
    	{
    	  // Save to .obj AreaID
    	  std::stringstream fileName;
    	  fileName.clear();
    	  fileName << "dump\\" << areaId << ".obj";
    	  std::cout << "Save to \"" << fileName.str() << "\" file." << std::endl;
    	  
    	  std::fstream fs1((const char*)(fileName.str().c_str()), std::fstream::out|std::fstream::binary);
    	  for (int i = 0; i < vertices.size(); i++)
    	  {
    		  fs1 << "v " << (vertices[i].x) << ' ' << vertices[i].y << ' ' << (vertices[i].z) << '\n';
    	  }
    	  for (int i = 0; i < indices.size();)
    	  {
    		 fs1 << "f " << indices[i++]+1;
    		 fs1 << ' ' << indices[i++]+1;
    		 fs1 << ' ' << indices[i++]+1 << '\n';
    	  }
    	}
    
    	/*
    	if (showMap && !saveTile)
    	{
    	  // initialize renderer
    	  Renderer renderer( 800, 600, "WoWMapper" );
    	  if ( !renderer.initialize() ) {
    		return -1;
    	  }
    
    	  // look at geometry
    	  renderer.getCamera().setPosition( vertices[0] );
    
    	  // create direct3d buffers
    	  size_t ib_size = sizeof( uint32_t ) * indices.size();
    	  size_t vb_size = sizeof( CustomVertex_s ) * vertices.size();
    	  DWORD format = D3DFVF_XYZ | D3DFVF_NORMAL;
    
    	  // create d3d buffers and get device
    	  IDirect3DIndexBuffer9 *ib = NULL;
    	  IDirect3DVertexBuffer9 *vb = NULL;
    	  renderer.createBuffers( ib_size, vb_size, format, &ib, &vb );
    	  IDirect3DDevice9 *d3d_dev9 = renderer.getDevice();
    
    	  // print num triangles
    	  std::cout << "Num Triangles: " << indices.size()/3 << std::endl;
    
    	  // copy vertex buffer
    	  CustomVertex_s *vtx_buf;
    	  vb->Lock( 0, 0, (void**)&vtx_buf, 0 );
    	  for ( int i = 0; i < vertices.size(); i++ ) {
    		vtx_buf[i].pos.x = vertices[i].x;
    		vtx_buf[i].pos.y = vertices[i].y;
    		vtx_buf[i].pos.z = vertices[i].z;
    		vtx_buf[i].normal.x = normals[i].x;
    		vtx_buf[i].normal.y = normals[i].y;
    		vtx_buf[i].normal.z = normals[i].z;
    	  }
    	  vb->Unlock();
    
    	  // copy index buffer
    	  void *idx_buf;
    	  ib->Lock( 0, 0, (void**)&idx_buf, 0 );
    	  memcpy( idx_buf, &indices[0], indices.size() * sizeof( uint32_t ) );
    	  ib->Unlock();
    
    	  uint32_t num_batches = indices.size() / 0xffff;
    	 
    	  // render loop
    	  while( 1 ) {    
    		renderer.begin();
    		renderer.initScene();
    
    		// set buffers
    		d3d_dev9->SetStreamSource( 0, vb, 0, sizeof( CustomVertex_s ) );
    		d3d_dev9->SetFVF( format );
    		d3d_dev9->SetIndices( ib );
    	    
    		// draw batches, i know some are missing but that's ok here
    		for ( uint32_t n = 0; n < num_batches; n++ ) {
    		  d3d_dev9->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0, 0, 0xffff, n*0xffff, 0xffff/3 );
    		}
    
    		renderer.end();
    	  }
    
    	  mpq_h.clear();
    	}
    	else
    	{
    		std::cout << "Finish" << std::endl;
    		std::cin ;
    	}
    	*/
      return 0;
    }
    
    int main( int arch, char **argv ) 
    {
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", -1, -1, -1, true, false, true); // Dump all tiled of Expansion01
    
    	/*
    	//[Kalimdor]
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 14, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 15, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 16, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 17, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 141, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 148, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 215, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 331, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 357, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 361, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 400, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 405, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 406, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 440, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 490, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 493, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 616, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 618, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 1377, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 1637, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 1638, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 1657, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 4709, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Kalimdor\\Kalimdor", 5034, -1, -1, false, false, true);
    	
    	//[Azeroth]
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 1, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 3, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 8, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 10, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 11, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 12, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 28, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 33, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 38, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 40, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 41, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 44, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 45, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 46, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 47, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 51, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 85, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 130, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 139, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 214, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 267, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 1497, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 1519, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 1537, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 2017, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 2037, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 4815, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 4922, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 5144, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 5145, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 5287, -1, -1, false, false, true);
    	
    	//[Outland]
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3483, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3518, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3519, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3520, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3521, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3522, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3523, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3540, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Expansion01\\Expansion01", 3703, -1, -1, false, false, true);
    	
    	//[Northrend]
    	//mainLaunch("world\\maps\\Northrend\\Northrend", 65, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 66, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 67, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 210, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 394, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 495, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 2817, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 3537, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Northrend\\Northrend", 3711, -1, -1, false, false, true);
    	//mainLaunch("world\\maps\\Northrend\\Northrend", 4197, -1, -1, false, false, true);
    	
    	mainLaunch("world\\maps\\Northrend\\Northrend", 4395, -1, -1, false, false, true);
    	
    	//[Cataclysm]
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 4815, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Deephome\\Deephome", 5042, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 5144, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Azeroth\\Azeroth", 5145, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\TolBarad\\TolBarad", 5389, -1, -1, false, false, true);
    	
    	//[PVP]
    	mainLaunch("world\\maps\\PVPZone01\\PVPZone01", 2597, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\PVPZone03\\PVPZone03", 3277, -1, -1, false, false, true);
    	mainLaunch("world\\mapsPVPZone04\\PVPZone04", 3358, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\NetherstormBG\\NetherstormBG", 3820, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\NorthrendBG\\NorthrendBG", 4384, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\IsleofConquest\\IsleofConquest", 4710, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\CataclysmCTF\\CataclysmCTF", 5031, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\TolBarad\\TolBarad", 5095, -1, -1, false, false, true);
    	mainLaunch("world\\maps\\Gilneas_BG_2\\Gilneas_BG_2", 5449, -1, -1, false, false, true);
    
    	*/
    }
    
    //------------------------------------------------------------------------------
    void loadAllMpqs( MpqHandler &mpq_h ) {
    
      loadMpq( mpq_h, "wow-update-13329.MPQ" );
      loadMpq( mpq_h, "wow-update-13287.MPQ" );
      loadMpq( mpq_h, "wow-update-13205.MPQ" );
      loadMpq( mpq_h, "wow-update-13164.MPQ" );
      loadMpq( mpq_h, "expansion3.MPQ" );
      loadMpq( mpq_h, "expansion2.MPQ" );
      loadMpq( mpq_h, "expansion1.MPQ" );
      loadMpq( mpq_h, "world.MPQ" );
      loadMpq( mpq_h, "art.MPQ" );
    }
    
    //------------------------------------------------------------------------------
    void loadMpq( MpqHandler &mpq_h, const std::string &filename ) {
      std::cout << "Load \"" << filename << "\"";
      std::cout << " (" << mpq_h.addFile( filename ) << ")" <<std::endl;
    }
    
    //------------------------------------------------------------------------------
    bool loadAdt( MpqHandler &mpq_h, const std::string &name,
                  BufferS_t *adt_buf, BufferS_t *obj_buf ) {
      std::string adt_str = name + std::string( ".adt" );
      std::string obj_str = name + std::string( "_obj0.adt" );
      
      return mpq_h.getFile( adt_str, adt_buf ) && mpq_h.getFile( obj_str, obj_buf );
    }
    
    //------------------------------------------------------------------------------
    void loadObjectReferences( MpqHandler &mpq_h, Obj0 &obj0, Indices32_t *indices,
                               Vertices_t *vertices, Normals_t *normals ) {
      // get doodads/WMOs of ADT
      const ObjectReferences_t &obj_refs = obj0.getObjectRefs();
      for ( ObjectReferences_t::const_iterator ref = obj_refs.begin();
            ref != obj_refs.end();
            ++ref ) {
        // get unique doodads here, notice: you can speed things up if you buffer
        // already loaded objects here :)
        for ( int d = 0; d < ref->doodadIndices.size(); d++ ) {
          Doodad_s doodad;
          obj0.getDoodad( ref->doodadIndices[d], &doodad );
    
          // find unique identifier in map, only one uid can be present
          UidMap_t::iterator found = uid_map.find( doodad.info.uid );
    
          // unique identifier not found: insert UID in map
          if ( found == uid_map.end() ) {
            uid_map.insert( UidMap_t::value_type( doodad.info.uid, (void*)0 ) );
    
            BufferS_t doodad_buf;
            mpq_h.getFile( doodad.name, &doodad_buf );
    
            // doodad buffers
            Indices32_t m2_i;
            Vertices_t m2_v;
            Normals_t m2_n;
    
            // if doodad geometry is present: transform and merge
            if ( getDoodadGeometry( mpq_h, doodad.name, &m2_i, &m2_v, &m2_n ) ) {
              // bring vertices to our coordinate system
              transformVertices( doodad.info.pos, doodad.info.rot,
                                 doodad.info.scale / 1024, &m2_v ); 
    
    
              mergeIndices( m2_i, vertices->size(), indices );
              mergeVertices( m2_v, vertices );
              mergeNormals( m2_n, normals );
            }
          }
        }
    
        // get unique WMOs here, same thing as above: buffer -> +speed !
        for ( int d = 0; d < ref->wmoIndices.size(); d++ ) {
          uint32_t obj_index = ref->wmoIndices[d];
          // get wmo from object file
          Wmo_s wmo;
          obj0.getWmo( obj_index, &wmo );
    
          // find WMOs UID in our map
          UidMap_t::iterator found = uid_map.find( wmo.info.uid );
    
          // same procedure as above
          if ( found == uid_map.end() ) {
            uid_map.insert( UidMap_t::value_type( wmo.info.uid, (void*)0 ) );
    
            BufferS_t wmo_buf;
            mpq_h.getFile( wmo.name, &wmo_buf );
    
            // parse wmo data
            WmoModel wmo_model( wmo_buf );
            wmo_model.loadGroups( wmo.name, mpq_h );
    
            // wmo buffers
            Indices32_t wmo_i;
            Vertices_t wmo_v;
            Normals_t wmo_n;
    
            wmo_model.getIndices( &wmo_i );
            wmo_model.getVertices( &wmo_v );
            wmo_model.getNormals( &wmo_n );
    
            // bring vertices to our coordinate system
            const ModfChunk_s::WmoInfo_s &info = obj0.wmoInfo()[obj_index];
            transformVertices( info.pos, info.rot, 1.0f, &wmo_v );
    
            mergeIndices( wmo_i, vertices->size(), indices );
            mergeVertices( wmo_v, vertices );
            mergeNormals( wmo_n, normals );
    
            // get interior doodads for WMOs
            const ModnChunk_s &modn_chunk = wmo_model.getModnChunk();
            const ModdChunk_s::DoodadInformations_t &modd_infos = wmo_model.getModdChunk().infos;        
            for ( ModdChunk_s::DoodadInformations_t::const_iterator iter = modd_infos.begin();
                  iter != modd_infos.end();
                  ++iter ) {
              // doodad name
              std::string doodad_name( (const char*)&modn_chunk.doodadNames[iter->id] );
              doodad_name.replace( doodad_name.size() - 4, 4, ".M2" );
              BufferS_t doodad_buf;
              mpq_h.getFile( doodad_name, &doodad_buf );
    
              // load doodad if buffer has data
              if ( doodad_buf.size() ) {
                M2 m2( doodad_buf );
    
                Indices32_t m2_i;
                Vertices_t m2_v;
                Normals_t m2_n;
    
                m2.getBoundingIndices( &m2_i );
                m2.getBoundingVertices( &m2_v );
                m2.getBoundingNormals( &m2_n );
    
                // interior doodads have to be transformed by their parent WMO's
                // transformation first
                for ( int i = 0; i < m2_v.size(); i++ ) {
                  glm::vec3 &vtx = m2_v[i];
                  vtx = glm::rotate( iter->rotation, vtx ) * iter->scale + iter->position;
                }
    
                // now transform by 
                transformVertices( info.pos, info.rot, 1.0f, &m2_v );
    
                mergeIndices( m2_i, vertices->size(), indices );
                mergeVertices( m2_v, vertices );
                mergeNormals( m2_n, normals );
              }
            }
          }
        }
      }
    }
    
    //------------------------------------------------------------------------------
    void getCoordsByAreaId( MpqHandler &mpq_h, const AdtCoords_t &original_coords,
                            const std::string &zone_path, uint32_t area_id,
                            AdtCoords_t *coords, uint32_t x, uint32_t y, bool dumpAll ) {
      int count = 0;
      for ( AdtCoords_t::const_iterator iter = original_coords.begin();
            iter != original_coords.end();
            ++iter ) {
        count++;
        //if ( count < 256 || count > 512 ) continue;
    
        // create file string
        std::stringstream adt_ss;
        adt_ss << zone_path << "_" << iter->x << "_" << iter->y;
        std::cout << count << " " << adt_ss.str();
         
        adt_buf.clear();
        obj_buf.clear();
        // loading obj files here is pointless, but it's a reused function so live with it :p
        loadAdt( mpq_h, adt_ss.str(), &adt_buf, &obj_buf );
    
        Adt adt( adt_buf );
        const AdtTerrain_t &adt_terr = adt.getTerrain();
        for ( AdtTerrain_t::const_iterator terr = adt_terr.begin();
              terr != adt_terr.end();
              ++terr ) {
          if ( terr->areaId == area_id || dumpAll || x == iter->x && y == iter->y) {
            std::cout << " found area";
            coords->push_back( *iter );
            break;
          }
        }
        std::cout << std::endl;
      }
    }
    
    //------------------------------------------------------------------------------
    bool getDoodadGeometry( MpqHandler &mpq_h, const std::string &doodad_name,
                            Indices32_t *doodad_indices, Vertices_t *doodad_vertices,
                            Normals_t *doodad_normals ) {
      BufferS_t doodad_buf;
      mpq_h.getFile( doodad_name, &doodad_buf );
    
      // load doodad if buffer has data
      if ( doodad_buf.size() ) {
        M2 m2( doodad_buf );
    
        // only get data if parameter is passed
        if ( doodad_indices ) {
          m2.getBoundingIndices( doodad_indices );
        }
    
        if ( doodad_vertices ) {
          m2.getBoundingVertices( doodad_vertices );
        }
    
        if ( doodad_normals ) {
          m2.getBoundingNormals( doodad_normals );
        }
    
        return true;
      }
    
      return false;
    }
    Last edited by RivaLfr; 01-28-2011 at 11:45 AM.

  8. #8
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RivalFr, does this map
    mainLaunch("world\maps\Kalimdor\Kalimdor", 15, -1, -1, false, false, true);
    have a giant piece missing for you?

    This Map
    ------------------------------
    If not me than who?

  9. #9
    QKdefus's Avatar Active Member
    Reputation
    54
    Join Date
    May 2010
    Posts
    96
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want dump All Area easy whit wowmapper replace "Sample_D3dByAreaId.cpp" by this (to .obj file for recast/detour):
    unfortunately by doing an all in one build, will eventually cause wowmapper to run out of memory and crash.
    each time it loads the mpq (each id) raise the memory consumption by about 20mb + -

  10. #10
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by QKdefus View Post
    unfortunately by doing an all in one build, will eventually cause wowmapper to run out of memory and crash.
    each time it loads the mpq (each id) raise the memory consumption by about 20mb + -
    Yes but you can dump 15 or 20 area without problem (on my computer), is more speed. (or you can edit my code to free the mpq memory)

    Originally Posted by dook123 View Post
    RivalFr, does this map
    mainLaunch("world\maps\Kalimdor\Kalimdor", 15, -1, -1, false, false, true);
    have a giant piece missing for you?

    This Map
    I have a same result: Picasa Web Albums - 11022359109366392... - Others

  11. #11
    QKdefus's Avatar Active Member
    Reputation
    54
    Join Date
    May 2010
    Posts
    96
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so it turns out, thanks to dook's awesomeness ^^
    that this list is missing thousands maybe tens of thousands id's just for Azeroth to produce a mesh with no missing parts :]
    Last edited by QKdefus; 01-27-2011 at 11:52 AM.

  12. #12
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have try to make a navmesh system by tile and I have a problem for the multizone with recast, I can load multi tile mesh for the multi zone but I not can generate a path, but with one tile I can generate a good path. If I fix this problem I realese the project, make a mesh by areaID is not good because the .obj file is big.

  13. #13
    QKdefus's Avatar Active Member
    Reputation
    54
    Join Date
    May 2010
    Posts
    96
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    interesting , one of the issues we are facing is the file size as well, and consider these id's are just for the troll start zone island the file will be massive

    Code:
    14=Kalimdor(Durotar) 2320 The Great Sea
    14=Kalimdor(Durotar) 368 Echo Isles
    14=Kalimdor(Durotar) 4875 Darkspear Isle
    14=Kalimdor(Durotar) 4865 Darkspear Training Grounds
    14=Kalimdor(Durotar) 4866 Darkspear Hold
    14=Kalimdor(Durotar) 4867 Spitescale Cove
    14=Kalimdor(Durotar) 5691 Darkspear Shore

  14. #14
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Making a mesh by tile might be the best way, I have an idea how to do it using the id + x,y coords... not sure if it will work yet. I dont think I understand your issue with tiles rivalFr...

    Attempt 1

    Attempt 2


    Seems like it "might" work... going tile based. I have to do some more testing though.
    Last edited by dook123; 01-27-2011 at 03:20 PM.
    ------------------------------
    If not me than who?

  15. #15
    RivaLfr's Avatar Contributor CoreCoins Purchaser Authenticator enabled
    Reputation
    221
    Join Date
    Sep 2010
    Posts
    258
    Thanks G/R
    2/25
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have extract all tile by tile, size total: 11.3 go, with the area I have 9.03 go for the same continant.

    I make a system tile by tile, for the moment this worked, I make all mesh (is very long with a cellsize 0.35f ^^) and I post after more info.

Page 1 of 2 12 LastLast

Similar Threads

  1. [WoW][3.2.2] Info Dump Thread
    By Apoc in forum WoW Memory Editing
    Replies: 155
    Last Post: 12-04-2009, 12:40 AM
  2. [WoW][3.2.0] Info Dump Thread
    By Apoc in forum WoW Memory Editing
    Replies: 204
    Last Post: 09-22-2009, 05:14 AM
  3. 3.1.3 info dump
    By namreeb in forum WoW Memory Editing
    Replies: 98
    Last Post: 08-01-2009, 05:20 PM
  4. [WoW][3.1.0] Info Dump Thread
    By Apoc in forum WoW Memory Editing
    Replies: 1
    Last Post: 05-03-2009, 01:29 PM
  5. [WoW][3.0.9] Info dump thread
    By Apoc in forum WoW Memory Editing
    Replies: 8
    Last Post: 03-19-2009, 03:18 PM
All times are GMT -5. The time now is 05:22 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search