Explorar o código

- loading fix

Ivan Savenko %!s(int64=12) %!d(string=hai) anos
pai
achega
beac6b12d8
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      lib/CHeroHandler.cpp

+ 4 - 4
lib/CHeroHandler.cpp

@@ -207,10 +207,6 @@ CHeroHandler::~CHeroHandler()
 
 CHeroHandler::CHeroHandler()
 {
-	for (int i = 0; i < GameConstants::SKILL_QUANTITY; ++i)
-	{
-		VLC->modh->identifiers.registerObject("skill." + SecondarySkill::names[i], i);
-	}
 }
 
 void CHeroHandler::load(const JsonNode & input)
@@ -320,6 +316,10 @@ void CHeroHandler::loadHeroJson(CHero * hero, const JsonNode & node)
 
 void CHeroHandler::load()
 {
+	for (int i = 0; i < GameConstants::SKILL_QUANTITY; ++i)
+	{
+		VLC->modh->identifiers.registerObject("skill." + SecondarySkill::names[i], i);
+	}
 	classes.load();
 	loadHeroes();
 	loadHeroTexts();