diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 953d31b9..a02876c4 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -470,6 +470,21 @@ class MapManager implements CallbackListener { return null; } + /** + * Get's a Map by it's Mania-Exchange Id + * + * @param $mxId + * @return Map + */ + public function getMapByMxId($mxId) { + foreach ($this->maps as $map) { + if ($map->mx->id == $mxId) { + return $map; + } + } + return null; + } + /** * Updates the full Map list, needed on Init, addMap and on ShuffleMaps */