mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Tools: reduced differences for extractors between master and 434 branch
This commit is contained in:
@@ -81,7 +81,7 @@ struct LiquidTypeEntry
|
||||
uint8 MaterialID;
|
||||
};
|
||||
|
||||
map_id *map_ids;
|
||||
std::vector<map_id> map_ids;
|
||||
std::unordered_map<uint32, LiquidMaterialEntry> LiquidMaterials;
|
||||
std::unordered_map<uint32, LiquidObjectEntry> LiquidObjects;
|
||||
std::unordered_map<uint32, LiquidTypeEntry> LiquidTypes;
|
||||
@@ -316,7 +316,7 @@ uint32 ReadMapDBC()
|
||||
}
|
||||
|
||||
size_t map_count = dbc.getRecordCount();
|
||||
map_ids = new map_id[map_count];
|
||||
map_ids.resize(map_count);
|
||||
for(uint32 x = 0; x < map_count; ++x)
|
||||
{
|
||||
map_ids[x].id = dbc.getRecord(x).getUInt(0);
|
||||
@@ -1133,7 +1133,6 @@ void ExtractMapsFromMpq(uint32 build)
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
delete[] map_ids;
|
||||
}
|
||||
|
||||
bool ExtractFile(HANDLE fileInArchive, char const* filename)
|
||||
|
||||
@@ -126,7 +126,6 @@ bool ADTFile::init(uint32 map_num, uint32 originalMapId)
|
||||
char* buf = new char[size];
|
||||
_file.read(buf, size);
|
||||
char* p = buf;
|
||||
int t = 0;
|
||||
while (p < buf + size)
|
||||
{
|
||||
std::string path(p);
|
||||
@@ -151,7 +150,6 @@ bool ADTFile::init(uint32 map_num, uint32 originalMapId)
|
||||
char* buf = new char[size];
|
||||
_file.read(buf, size);
|
||||
char* p = buf;
|
||||
int q = 0;
|
||||
while (p < buf + size)
|
||||
{
|
||||
std::string path(p);
|
||||
|
||||
@@ -121,9 +121,6 @@ struct LiquidTypeEntry
|
||||
|
||||
std::map<uint32, map_info> map_ids;
|
||||
std::unordered_set<uint32> maps_that_are_parents;
|
||||
std::unordered_map<uint32, LiquidMaterialEntry> LiquidMaterials;
|
||||
std::unordered_map<uint32, LiquidObjectEntry> LiquidObjects;
|
||||
std::unordered_map<uint32, LiquidTypeEntry> LiquidTypes;
|
||||
char output_path[128]=".";
|
||||
char input_path[1024]=".";
|
||||
bool preciseVectorData = false;
|
||||
|
||||
@@ -27,11 +27,9 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
extern uint16 *LiqType;
|
||||
|
||||
WMORoot::WMORoot(std::string const& filename)
|
||||
: filename(filename), col(0), nTextures(0), nGroups(0), nP(0), nLights(0),
|
||||
nModels(0), nDoodads(0), nDoodadSets(0), RootWMOID(0), liquidType(0)
|
||||
: filename(filename), color(0), nTextures(0), nGroups(0), nPortals(0), nLights(0),
|
||||
nDoodadNames(0), nDoodadDefs(0), nDoodadSets(0), RootWMOID(0), flags(0)
|
||||
{
|
||||
memset(bbcorn1, 0, sizeof(bbcorn1));
|
||||
memset(bbcorn2, 0, sizeof(bbcorn2));
|
||||
@@ -65,16 +63,16 @@ bool WMORoot::open()
|
||||
{
|
||||
f.read(&nTextures, 4);
|
||||
f.read(&nGroups, 4);
|
||||
f.read(&nP, 4);
|
||||
f.read(&nPortals, 4);
|
||||
f.read(&nLights, 4);
|
||||
f.read(&nModels, 4);
|
||||
f.read(&nDoodads, 4);
|
||||
f.read(&nDoodadNames, 4);
|
||||
f.read(&nDoodadDefs, 4);
|
||||
f.read(&nDoodadSets, 4);
|
||||
f.read(&col, 4);
|
||||
f.read(&color, 4);
|
||||
f.read(&RootWMOID, 4);
|
||||
f.read(bbcorn1, 12);
|
||||
f.read(bbcorn2, 12);
|
||||
f.read(&liquidType, 4);
|
||||
f.read(&flags, 4);
|
||||
}
|
||||
else if (!strcmp(fourcc, "MODS"))
|
||||
{
|
||||
@@ -207,7 +205,7 @@ bool WMOGroup::open(WMORoot* rootWMO)
|
||||
f.read(&groupWMOID, 4);
|
||||
|
||||
// according to WoW.Dev Wiki:
|
||||
if (rootWMO->liquidType & 4)
|
||||
if (rootWMO->flags & 4)
|
||||
groupLiquid = GetLiquidTypeId(groupLiquid);
|
||||
else if (groupLiquid == 15)
|
||||
groupLiquid = 0;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "vec3d.h"
|
||||
#include "mpqfile.h"
|
||||
|
||||
@@ -81,8 +82,8 @@ class WMORoot
|
||||
private:
|
||||
std::string filename;
|
||||
public:
|
||||
unsigned int col;
|
||||
uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
|
||||
unsigned int color;
|
||||
uint32 nTextures, nGroups, nPortals, nLights, nDoodadNames, nDoodadDefs, nDoodadSets, RootWMOID, flags;
|
||||
float bbcorn1[3];
|
||||
float bbcorn2[3];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user