[longomatch] Add formation string to old templates



commit 6369bfcab1fe79c35cb85b52770f15ac7a9bbe6f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu May 29 12:03:58 2014 +0200

    Add formation string to old templates

 LongoMatch.Core/Store/Templates/TeamTemplate.cs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Core/Store/Templates/TeamTemplate.cs b/LongoMatch.Core/Store/Templates/TeamTemplate.cs
index ef53c17..5e8cbdf 100644
--- a/LongoMatch.Core/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch.Core/Store/Templates/TeamTemplate.cs
@@ -129,7 +129,11 @@ namespace LongoMatch.Store.Templates
                }
 
                public static TeamTemplate Load(string filePath) {
-                       return SerializableObject.LoadSafe<TeamTemplate>(filePath);
+                       TeamTemplate template = SerializableObject.LoadSafe<TeamTemplate>(filePath);
+                       if (template.Formation == null) {
+                               template.FormationStr = "1-4-3-3";
+                       }
+                       return template;
                }
 
                public static TeamTemplate DefaultTemplate(int playersCount) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]