diff --git a/AI/BattleAI/BattleExchangeVariant.cpp b/AI/BattleAI/BattleExchangeVariant.cpp index 186fc5e2a..a60e677c4 100644 --- a/AI/BattleAI/BattleExchangeVariant.cpp +++ b/AI/BattleAI/BattleExchangeVariant.cpp @@ -349,7 +349,7 @@ MoveTarget BattleExchangeEvaluator::findMoveTowardsUnreachable( logAi->trace( "Checking movement towards %d of %s", enemy->getCount(), - enemy->creatureId().toCreature()->getNameSingularTranslated()); + VLC->creatures()->getById(enemy->creatureId())->getJsonKey()); auto distance = dists.distToNearestNeighbour(activeStack, enemy); diff --git a/client/battle/BattleOverlayLogVisualizer.h b/client/battle/BattleOverlayLogVisualizer.h index a7636fc76..a61699904 100644 --- a/client/battle/BattleOverlayLogVisualizer.h +++ b/client/battle/BattleOverlayLogVisualizer.h @@ -1,28 +1,28 @@ -/* - * BattleOverlayLogVisualizer.h, part of VCMI engine - * - * Authors: listed in file AUTHORS in main folder - * - * License: GNU General Public License v2.0 or later - * Full text of license available in license.txt file, in main folder - * - */ -#pragma once - -#include "../../lib/logging/VisualLogger.h" -#include "BattleRenderer.h" - -class Canvas; -class BattleInterface; - -class BattleOverlayLogVisualizer : public IBattleOverlayLogVisualizer -{ -private: - BattleRenderer::RendererRef & target; - BattleInterface & owner; - -public: - BattleOverlayLogVisualizer(BattleRenderer::RendererRef & target, BattleInterface & owner); - - void drawText(const BattleHex & hex, int lineNumber, const std::string & text) override; -}; +/* + * BattleOverlayLogVisualizer.h, part of VCMI engine + * + * Authors: listed in file AUTHORS in main folder + * + * License: GNU General Public License v2.0 or later + * Full text of license available in license.txt file, in main folder + * + */ +#pragma once + +#include "../../lib/logging/VisualLogger.h" +#include "BattleRenderer.h" + +class Canvas; +class BattleInterface; + +class BattleOverlayLogVisualizer : public IBattleOverlayLogVisualizer +{ +private: + BattleRenderer::RendererRef & target; + BattleInterface & owner; + +public: + BattleOverlayLogVisualizer(BattleRenderer::RendererRef & target, BattleInterface & owner); + + void drawText(const BattleHex & hex, int lineNumber, const std::string & text) override; +}; diff --git a/lib/CStack.cpp b/lib/CStack.cpp index 0a5cb82a1..dbdd8e75c 100644 --- a/lib/CStack.cpp +++ b/lib/CStack.cpp @@ -167,7 +167,7 @@ std::string CStack::nodeName() const oss << owner.toString(); oss << " battle stack [" << ID << "]: " << getCount() << " of "; if(typeID.hasValue()) - oss << typeID.toCreature()->getNamePluralTranslated(); + oss << typeID.toEntity(VLC)->getJsonKey(); else oss << "[UNDEFINED TYPE]"; diff --git a/lib/battle/BattleHex.h b/lib/battle/BattleHex.h index fbd2292e4..ed7399d36 100644 --- a/lib/battle/BattleHex.h +++ b/lib/battle/BattleHex.h @@ -28,7 +28,7 @@ class BattleHexArray; * @brief Represents a battlefield hexagonal tile. * * Valid hexes are within the range 0 to 186, excluding some invalid values, ex. castle towers (-2, -3, -4). - * Available hexes are those in the first or last column. + * Available hexes are those valid ones but NOT in the first or last column. */ class DLL_LINKAGE BattleHex {