Removed mapindex from char-server (#7533)

Converted last_point to mapname
Converted save_point to mapname
Converted memo to mapname
Converted start point to mapname
Removed default map
Converted party member to mapname
Converted maplists to mapname
Removed mapindex loading
Fixed instance loading with multiple map-servers
Fixed castle loading with multiple map-servers
Fixed battleground loading with multiple map-servers
Fixed warping between map-servers

Thanks to @aleos89 for his help!
This commit is contained in:
Lemongrass3110
2023-01-11 16:54:53 +01:00
committed by GitHub
parent cbe2acb786
commit 14cb61d598
25 changed files with 311 additions and 337 deletions

View File

@@ -167,14 +167,21 @@ uint64 InstanceDatabase::parseBodyNode(const ryml::NodeRef& node) {
if (!this->asString(enterNode, "Map", map))
return 0;
int16 m = map_mapname2mapid(map.c_str());
uint16 mapindex = mapindex_name2idx( map.c_str(), nullptr );
if (m == -1) {
if( mapindex == 0 ){
this->invalidWarning(enterNode["Map"], "Map %s is not a valid map, skipping.\n", map.c_str());
return 0;
}
instance->enter.map = m;
int16 mapid = map_mapindex2mapid( mapindex );
if( mapid < 0 ){
// Ignore silently, the map is on another mapserver
return 0;
}
instance->enter.map = mapid;
}
if (this->nodeExists(enterNode, "X")) {