From d7e51f2a4f0b3b29f28a1b5eca35aa2bfe4ab305 Mon Sep 17 00:00:00 2001 From: elexis Date: Thu, 6 Oct 2016 14:11:56 +0000 Subject: [PATCH] Fix an OOS without rejoin after selecting the first unit. Introduced by 46ead523b8, caused by serializing the aura cache which is initialized by the tooltip calls from the GUI. Reviewed by Itms, in combination with 09e775446e fixes #4239. This was SVN commit r18804. --- .../simulation/components/DataTemplateManager.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/DataTemplateManager.js b/binaries/data/mods/public/simulation/components/DataTemplateManager.js index 25616e9433..efe3783fe9 100644 --- a/binaries/data/mods/public/simulation/components/DataTemplateManager.js +++ b/binaries/data/mods/public/simulation/components/DataTemplateManager.js @@ -10,9 +10,12 @@ DataTemplateManager.prototype.Init = function() { this.allTechs = {}; this.allAuras = {}; - var techNames = this.ListAllTechs(); - for (var i in techNames) - this.GetTechnologyTemplate(techNames[i]); + + for (let techName of this.ListAllTechs()) + this.GetTechnologyTemplate(techName); + + for (let auraName of this.ListAllAuras()) + this.GetAuraTemplate(auraName); }; DataTemplateManager.prototype.GetTechnologyTemplate = function(template) @@ -44,6 +47,11 @@ DataTemplateManager.prototype.ListAllTechs = function() return Engine.FindJSONFiles("technologies", true); }; +DataTemplateManager.prototype.ListAllAuras = function() +{ + return Engine.FindJSONFiles("auras", true); +}; + DataTemplateManager.prototype.GetAllTechs = function() { return this.allTechs;