wmo area name small fixes
This commit is contained in:
@@ -48,8 +48,8 @@ void OpenDBs(std::shared_ptr<BlizzardArchive::ClientData> clientData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// includes the parent zone name as a prefix
|
||||||
std::string AreaDB::getAreaName(int pAreaID)
|
std::string AreaDB::getAreaFullName(int pAreaID)
|
||||||
{
|
{
|
||||||
if (!pAreaID || pAreaID == -1)
|
if (!pAreaID || pAreaID == -1)
|
||||||
{
|
{
|
||||||
@@ -199,7 +199,7 @@ std::string WMOAreaTableDB::getWMOAreaName(int WMOId, int namesetId)
|
|||||||
|
|
||||||
for (Iterator i = gWMOAreaTableDB.begin(); i != gWMOAreaTableDB.end(); ++i)
|
for (Iterator i = gWMOAreaTableDB.begin(); i != gWMOAreaTableDB.end(); ++i)
|
||||||
{
|
{
|
||||||
if (i->getUInt(WMOAreaTableDB::WmoId) == WMOId && i->getUInt(WMOAreaTableDB::NameSetId) == namesetId && i->getUInt(WMOAreaTableDB::WMOGroupID) == -1)
|
if (i->getUInt(WMOAreaTableDB::WmoId) == WMOId && i->getUInt(WMOAreaTableDB::NameSetId) == namesetId && i->getInt(WMOAreaTableDB::WMOGroupID) == -1)
|
||||||
{
|
{
|
||||||
// wmoareatableid = i->getUInt(WMOAreaTableDB::ID);
|
// wmoareatableid = i->getUInt(WMOAreaTableDB::ID);
|
||||||
std::string areaName = i->getLocalizedString(WMOAreaTableDB::Name);
|
std::string areaName = i->getLocalizedString(WMOAreaTableDB::Name);
|
||||||
@@ -215,7 +215,7 @@ std::string WMOAreaTableDB::getWMOAreaName(int WMOId, int namesetId)
|
|||||||
return rec.getLocalizedString(AreaDB::Name);
|
return rec.getLocalizedString(AreaDB::Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "Unknown location"; // nullptr? need to get it from terrain
|
return "-Local Terrain Area-"; // nullptr? need to get it from terrain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,7 +233,7 @@ std::vector<std::string> WMOAreaTableDB::getWMOAreaNames(int WMOId)
|
|||||||
|
|
||||||
for (Iterator i = gWMOAreaTableDB.begin(); i != gWMOAreaTableDB.end(); ++i)
|
for (Iterator i = gWMOAreaTableDB.begin(); i != gWMOAreaTableDB.end(); ++i)
|
||||||
{
|
{
|
||||||
if (i->getUInt(WMOAreaTableDB::WmoId) == WMOId && i->getUInt(WMOAreaTableDB::WMOGroupID) == -1)
|
if (i->getUInt(WMOAreaTableDB::WmoId) == WMOId && i->getInt(WMOAreaTableDB::WMOGroupID) == -1)
|
||||||
{
|
{
|
||||||
// wmoareatableid = i->getUInt(WMOAreaTableDB::ID);
|
// wmoareatableid = i->getUInt(WMOAreaTableDB::ID);
|
||||||
std::string areaName = i->getLocalizedString(WMOAreaTableDB::Name);
|
std::string areaName = i->getLocalizedString(WMOAreaTableDB::Name);
|
||||||
@@ -249,7 +249,7 @@ std::vector<std::string> WMOAreaTableDB::getWMOAreaNames(int WMOId)
|
|||||||
areanamesvect.push_back(rec.getLocalizedString(AreaDB::Name));
|
areanamesvect.push_back(rec.getLocalizedString(AreaDB::Name));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
areanamesvect.push_back(""); // nullptr? need to get it from terrain
|
areanamesvect.push_back("-Local Terrain Area-"); // nullptr? need to get it from terrain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// could optimise and break when iterator WmoId is higher than the Wmodid, but this wouldn't support unordered DBCs.
|
// could optimise and break when iterator WmoId is higher than the Wmodid, but this wouldn't support unordered DBCs.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
static const size_t AmbientMultiplier = 34; // float
|
static const size_t AmbientMultiplier = 34; // float
|
||||||
static const size_t LightId = 35; // int
|
static const size_t LightId = 35; // int
|
||||||
|
|
||||||
static std::string getAreaName(int pAreaID);
|
static std::string getAreaFullName(int pAreaID);
|
||||||
static std::uint32_t get_area_parent(int area_id);
|
static std::uint32_t get_area_parent(int area_id);
|
||||||
static std::uint32_t get_new_areabit();
|
static std::uint32_t get_new_areabit();
|
||||||
};
|
};
|
||||||
@@ -309,7 +309,7 @@ public:
|
|||||||
static const size_t ID = 0; // uint
|
static const size_t ID = 0; // uint
|
||||||
static const size_t WmoId = 1; // uint
|
static const size_t WmoId = 1; // uint
|
||||||
static const size_t NameSetId = 2; // uint [AreaID]
|
static const size_t NameSetId = 2; // uint [AreaID]
|
||||||
static const size_t WMOGroupID= 3; // uint
|
static const size_t WMOGroupID= 3; // ! int
|
||||||
static const size_t SoundProviderPreferences = 4; // uint
|
static const size_t SoundProviderPreferences = 4; // uint
|
||||||
static const size_t UnderwaterSoundProviderPreferences = 5; // uint
|
static const size_t UnderwaterSoundProviderPreferences = 5; // uint
|
||||||
static const size_t SoundAmbience = 6; // uint
|
static const size_t SoundAmbience = 6; // uint
|
||||||
|
|||||||
@@ -1192,7 +1192,7 @@ void MapView::setupFileMenu()
|
|||||||
bookmark.camera_pitch = _camera.pitch()._;
|
bookmark.camera_pitch = _camera.pitch()._;
|
||||||
bookmark.camera_yaw = _camera.yaw()._;
|
bookmark.camera_yaw = _camera.yaw()._;
|
||||||
bookmark.map_id = _world->getMapID();
|
bookmark.map_id = _world->getMapID();
|
||||||
bookmark.name = gAreaDB.getAreaName(_world->getAreaID(_camera.position));
|
bookmark.name = gAreaDB.getAreaFullName(_world->getAreaID(_camera.position));
|
||||||
|
|
||||||
_project->createBookmark(bookmark);
|
_project->createBookmark(bookmark);
|
||||||
|
|
||||||
@@ -1207,7 +1207,7 @@ void MapView::setupFileMenu()
|
|||||||
std::stringstream port_command;
|
std::stringstream port_command;
|
||||||
port_command << ".go XYZ " << (ZEROPOINT - _camera.position.z) << " " << (ZEROPOINT - _camera.position.x) << " " << _camera.position.y << " " << _world->getMapID();
|
port_command << ".go XYZ " << (ZEROPOINT - _camera.position.z) << " " << (ZEROPOINT - _camera.position.x) << " " << _camera.position.y << " " << _world->getMapID();
|
||||||
std::ofstream f("ports.txt", std::ios_base::app);
|
std::ofstream f("ports.txt", std::ios_base::app);
|
||||||
f << "Map: " << gAreaDB.getAreaName(_world->getAreaID (_camera.position)) << " on ADT " << std::floor(_camera.position.x / TILESIZE) << " " << std::floor(_camera.position.z / TILESIZE) << std::endl;
|
f << "Map: " << gAreaDB.getAreaFullName(_world->getAreaID (_camera.position)) << " on ADT " << std::floor(_camera.position.x / TILESIZE) << " " << std::floor(_camera.position.z / TILESIZE) << std::endl;
|
||||||
f << "Trinity/AC:" << std::endl << port_command.str() << std::endl;
|
f << "Trinity/AC:" << std::endl << port_command.str() << std::endl;
|
||||||
// f << "ArcEmu:" << std::endl << ".worldport " << _world->getMapID() << " " << (ZEROPOINT - _camera.position.z) << " " << (ZEROPOINT - _camera.position.x) << " " << _camera.position.y << " " << std::endl << std::endl;
|
// f << "ArcEmu:" << std::endl << ".worldport " << _world->getMapID() << " " << (ZEROPOINT - _camera.position.z) << " " << (ZEROPOINT - _camera.position.x) << " " << _camera.position.y << " " << std::endl << std::endl;
|
||||||
f.close();
|
f.close();
|
||||||
@@ -4183,7 +4183,7 @@ void MapView::tick (float dt)
|
|||||||
// emit selectionUpdated();
|
// emit selectionUpdated();
|
||||||
|
|
||||||
_status_area->setText
|
_status_area->setText
|
||||||
(QString::fromStdString (gAreaDB.getAreaName (_world->getAreaID (_camera.position))));
|
(QString::fromStdString (gAreaDB.getAreaFullName (_world->getAreaID (_camera.position))));
|
||||||
|
|
||||||
{
|
{
|
||||||
int time ((static_cast<int>(_world->time) % 2880) / 2);
|
int time ((static_cast<int>(_world->time) % 2880) / 2);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ void selected_chunk_type::updateDetails(Noggit::Ui::detail_infos* detail_widget)
|
|||||||
|
|
||||||
select_info << "<b>Chunk</b> (" << chunk->px << ", " << chunk->py << ") flat index: (" << chunk->py * 16 + chunk->px
|
select_info << "<b>Chunk</b> (" << chunk->px << ", " << chunk->py << ") flat index: (" << chunk->py * 16 + chunk->px
|
||||||
<< ") of <b>tile</b> (" << chunk->mt->index.x << " , " << chunk->mt->index.z << ")"
|
<< ") of <b>tile</b> (" << chunk->mt->index.x << " , " << chunk->mt->index.z << ")"
|
||||||
<< "<br><b>area ID:</b> " << chunk->getAreaID() << " (\"" << gAreaDB.getAreaName(chunk->getAreaID()) << "\")"
|
<< "<br><b>area ID:</b> " << chunk->getAreaID() << " (\"" << gAreaDB.getAreaFullName(chunk->getAreaID()) << "\")"
|
||||||
<< "<br><b>flags</b>: "
|
<< "<br><b>flags</b>: "
|
||||||
<< (flags.flags.has_mcsh ? "<br>shadows " : "")
|
<< (flags.flags.has_mcsh ? "<br>shadows " : "")
|
||||||
<< (flags.flags.impass ? "<br>impassable " : "")
|
<< (flags.flags.impass ? "<br>impassable " : "")
|
||||||
|
|||||||
@@ -943,7 +943,7 @@ namespace Noggit
|
|||||||
if (area_name.empty())
|
if (area_name.empty())
|
||||||
{
|
{
|
||||||
auto chunk = world->getChunkAt(wi->pos);
|
auto chunk = world->getChunkAt(wi->pos);
|
||||||
namesetnames.append(gAreaDB.getAreaName(chunk->getAreaID()).c_str());
|
namesetnames.append(gAreaDB.getAreaFullName(chunk->getAreaID()).c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
namesetnames.append(area_name.c_str());
|
namesetnames.append(area_name.c_str());
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ namespace Noggit
|
|||||||
// save the change for the session (don't write dbc yet)
|
// save the change for the session (don't write dbc yet)
|
||||||
_parent_area_id = tree_selected_id;
|
_parent_area_id = tree_selected_id;
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << _parent_area_id << "-" << gAreaDB.getAreaName(_parent_area_id);
|
ss << _parent_area_id << "-" << gAreaDB.getAreaFullName(_parent_area_id);
|
||||||
_parent_area_label->setText(ss.str().c_str());
|
_parent_area_label->setText(ss.str().c_str());
|
||||||
|
|
||||||
// _parent_area_label->setText(std::to_string( tree_selected_id).c_str());
|
// _parent_area_label->setText(std::to_string( tree_selected_id).c_str());
|
||||||
@@ -616,7 +616,7 @@ namespace Noggit
|
|||||||
if (_parent_area_id)
|
if (_parent_area_id)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << _parent_area_id << "-" << gAreaDB.getAreaName(_parent_area_id);
|
ss << _parent_area_id << "-" << gAreaDB.getAreaFullName(_parent_area_id);
|
||||||
_parent_area_label->setText(ss.str().c_str());
|
_parent_area_label->setText(ss.str().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1111,7 +1111,7 @@ namespace Noggit
|
|||||||
_loaded_effects.push_back(ground_effect);
|
_loaded_effects.push_back(ground_effect);
|
||||||
// give it a name
|
// give it a name
|
||||||
// Area is probably useless if we merge since duplictes are per area.
|
// Area is probably useless if we merge since duplictes are per area.
|
||||||
_loaded_effects.back().Name += " - " + gAreaDB.getAreaName(chunk->getAreaID());
|
_loaded_effects.back().Name += " - " + gAreaDB.getAreaFullName(chunk->getAreaID());
|
||||||
}
|
}
|
||||||
|
|
||||||
// _texture_effect_ids[effect_id]++;
|
// _texture_effect_ids[effect_id]++;
|
||||||
|
|||||||
Reference in New Issue
Block a user