public PlanshetViewData SetPlanshetMoonInfo(IDbConnection connection, MoonInfoOut moon) { return(PlanshetBodyHelper.SetBody( moon, Resource.Moon, IdConstructor(moon.TypeNativeName, moon.Id), MapInfoTemplates[3], MapInfoTemplates[4])); }
public MoonInfoOut GetMoonInfo(IDbConnection connection, int moonId) { var geometryMoon = _moonService.GetGeometryMoon(connection, moonId); if (geometryMoon == null) { return(null); } var moonType = _gameTypeService.GetGGameType(connection, geometryMoon.TypeId); if (moonType == null) { return(null); } var galaxyName = _galaxyService.GetGalaxyById(connection, geometryMoon.GalaxyId, i => i.NativeName); if (galaxyName == null) { return(null); } var sectorName = _gSectorsService.GetById(connection, geometryMoon.SectorId, i => i.NativeName); if (sectorName == null) { return(null); } var systemName = _systemService.GetDetailSystemBySystemId(connection, geometryMoon.SystemId, i => i.Name); if (systemName == null) { return(null); } var detailMoon = _moonService.GetDetailMoon(connection, moonId); if (detailMoon == null) { return(null); } var moonInfo = new MoonInfoOut { GalaxyId = geometryMoon.GalaxyId, GalaxyName = galaxyName, SectorId = geometryMoon.SectorId, SectorName = sectorName, SystemId = geometryMoon.SystemId, SystemName = systemName, Id = geometryMoon.Id, NativeName = detailMoon.Name, TextureTypeId = geometryMoon.TextureTypeId, SpriteImages = new SpriteImages().MoonImages(geometryMoon.TextureTypeId), TypeNativeName = moonType.SubType, Description = L10N.ExecuteTranslateNameOrDescr(detailMoon.Description, false, L10N.GetCurrentCulture()), }; moonInfo.SetComplexButtonView(); return(moonInfo); }