bool IOMapSerialize::loadMap(Map* map) { std::string config = asLowerCaseString(g_config.getString(ConfigManager::HOUSE_STORAGE)); bool result = false; if(config == "binary-tilebased") result = loadMapBinaryTileBased(map); else if(config == "binary") result = loadMapBinary(map); else result = loadMapRelational(map); if(!result) return false; for(HouseMap::iterator it = Houses::getInstance()->getHouseBegin(); it != Houses::getInstance()->getHouseEnd(); ++it) { if(!it->second->hasSyncFlag(House::HOUSE_SYNC_UPDATE)) continue; it->second->resetSyncFlag(House::HOUSE_SYNC_UPDATE); it->second->updateDoorDescription(); } return true; }
bool IOMapSerialize::loadMap(Map* map) { bool result = false; if(g_config.getBool(ConfigManager::HOUSE_STORAGE)) result = loadMapBinary(map); else result = loadMapRelational(map); if(!result) return false; for(HouseMap::iterator it = Houses::getInstance()->getHouseBegin(); it != Houses::getInstance()->getHouseEnd(); ++it) { if(!it->second->hasSyncFlag(House::HOUSE_SYNC_UPDATE)) continue; it->second->resetSyncFlag(House::HOUSE_SYNC_UPDATE); it->second->updateDoorDescription(); } return true; }