public void ReturnHandler(object sender, MapReturnedEventArgs e) { Config config = Main.Get().GetConfig(); HeightData data = Main.GetResizedHeightData(e.HeightMap, Math.Min(e.HeightMap.Width, (int)config.mapDetailLevel), Math.Min(e.HeightMap.Height, (int)config.mapDetailLevel)); e.HeightMap.Dispose(); Main.StretchHeightValues(ref data); if (this.maps.Contains(e.Label)) { this.WriteToConsole("Warning: Map with label \"" + e.Label + "\" was returned more than once!"); this.maps[e.Label] = data; } else { this.maps.Add(e.Label, data); } }
public void ReturnHandler(object sender, MapReturnedEventArgs e){ Config config = Main.Get().GetConfig(); HeightData data = Main.GetResizedHeightData(e.HeightMap, Math.Min(e.HeightMap.Width, (int)config.mapDetailLevel), Math.Min(e.HeightMap.Height, (int)config.mapDetailLevel)); e.HeightMap.Dispose(); Main.StretchHeightValues(ref data); if (this.maps.Contains(e.Label)) { this.WriteToConsole("Warning: Map with label \"" + e.Label + "\" was returned more than once!"); this.maps[e.Label] = data; } else { this.maps.Add(e.Label, data); } }