using ServerCommon.BusinessLogDomain; using ServerCommon; using ServerCore; using ServerBase; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GameServer { internal static class BuildingBusinessLogHelper { public static BuildingLogInfo toBuildingLogInfo(this Building building) { var building_attribute = building.getEntityAttribute(); NullReferenceCheckHelper.throwIfNull(building_attribute, () => $"building_attribute is null !!!"); var building_log_info = new BuildingLogInfo(); building_log_info.setBuildingInfo(building_attribute); return building_log_info; } public static void setBuildingInfo(this BuildingLogInfo log, BuildingAttribute buildingAttribute) { log.setLogProperty( (int)buildingAttribute.BuildingMetaId, buildingAttribute.OwnerUserGuid, buildingAttribute.RentalCurrencyType, buildingAttribute.RentalCurrencyAmount, buildingAttribute.IsRentalOpen ); } } }