Browse Source

Partial fix for http://bugs.vcmi.eu/view.php?id=2590

AlexVinS 9 years ago
parent
commit
f538aae95e
1 changed files with 6 additions and 4 deletions
  1. 6 4
      lib/mapObjects/CGHeroInstance.cpp

+ 6 - 4
lib/mapObjects/CGHeroInstance.cpp

@@ -995,17 +995,19 @@ bool CGHeroInstance::canCastThisSpell(const CSpell * spell) const
 	{
 		if(inSpellBook)
 		{//hero has this spell in spellbook
-			logGlobal->errorStream() << "Special spell " << spell->name << "in spellbook.";
+			logGlobal->error("Special spell %s in spellbook.", spell->name);
 		}
 		return specificBonus;
 	}
 	else if(!isAllowed)
 	{
 		if(inSpellBook)
-		{//hero has this spell in spellbook
-			logGlobal->errorStream() << "Banned spell " << spell->name << " in spellbook.";
+		{
+			//hero has this spell in spellbook
+			//it is normal if set in map editor, but trace it to possible debug of magic guild
+			logGlobal->trace("Banned spell %s in spellbook.", spell->name);
 		}
-		return specificBonus || schoolBonus || levelBonus;
+		return inSpellBook || specificBonus || schoolBonus || levelBonus;
 	}
 	else
 	{