public static void AddTownProperties(MapObject mpobjTown, TemplateHandler thTemplate, int iTownNumber, int iZoneIndex) { string[] strPropertiesNames = Enum.GetNames(typeof(eTown)); foreach (string strProperty in strPropertiesNames) { //add property mpobjTown.ObjectSpacificProperties.Add(strProperty, thTemplate.GetTownsAttributes(iZoneIndex, iTownNumber, strProperty)); } //todo: Add Player Assaign string strPlayerID = thTemplate.getPlayerIdPerZone(iZoneIndex); mpobjTown.ObjectSpacificProperties.Add("PlayerId", strPlayerID); }