1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation.

This commit is contained in:
John Bolton
2020-10-05 16:27:04 -07:00
parent aee51ecc27
commit c61bae4060
24 changed files with 99 additions and 102 deletions

View File

@@ -10,7 +10,7 @@
#pragma once
#include "../GameConstants.h"
#define RETURN_IF_NOT_BATTLE(X) if(!duringBattle()) {logGlobal->error("%s called when no battle!", __FUNCTION__); return X; }
#define RETURN_IF_NOT_BATTLE(...) if(!duringBattle()) {logGlobal->error("%s called when no battle!", __FUNCTION__); return __VA_ARGS__; }
class IBattleInfo;
class BattleInfo;

View File

@@ -693,7 +693,7 @@ std::vector<JsonNode> CSpellHandler::loadLegacyData(size_t dataSize)
skip(3);
read(true,true);//read creature abilities
//TODO: maybe move to config
//TODO: maybe move to config
//clone Acid Breath attributes for Acid Breath damage effect
JsonNode temp = legacyData[SpellID::ACID_BREATH_DEFENSE];
temp["index"].Integer() = SpellID::ACID_BREATH_DAMAGE;
@@ -1036,7 +1036,7 @@ std::vector<bool> CSpellHandler::getDefaultAllowed() const
void CSpellHandler::update780()
{
static_assert(MINIMAL_SERIALIZATION_VERSION < 780, "No longer needed CSpellHandler::update780");
static_assert(MINIMAL_SERIALIZATION_VERSION < 780, "No longer needed CSpellHandler::update780");
auto spellsContent = VLC->modh->content["spells"];