From ecb2bcb2dbde7aeca4ff049008be4225ffe80bd8 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Mon, 1 Apr 2024 21:58:17 +0200 Subject: [PATCH] Fix TODO comments --- lib/CGameInfoCallback.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index 98c0699af..514740528 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -294,10 +294,10 @@ bool CGameInfoCallback::isTileGuardedAfterDimensionDoorUse(int3 tile, const CGHe if(isVisible(tile)) canAccessInfo = true; - else if(VLC->settings()->getBoolean(EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS) //TODO: check if available casts > 0 + else if(VLC->settings()->getBoolean(EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS) && isInScreenRange(castingHero->getSightCenter(), tile) && castingHero->canCastThisSpell(static_cast(SpellID::DIMENSION_DOOR).toSpell())) - canAccessInfo = true; + canAccessInfo = true; //TODO: check if available casts > 0, before adding that check make dimension door daily limit popup trigger on spell pick if(canAccessInfo) return !gs->guardingCreatures(tile).empty(); @@ -540,8 +540,8 @@ const TerrainTile * CGameInfoCallback::getTileForDimensionDoor(int3 tile, const if(!allowOnlyToUncoveredTiles) { if(castingHero->canCastThisSpell(static_cast(SpellID::DIMENSION_DOOR).toSpell()) - && isInScreenRange(castingHero->getSightCenter(), tile)) //TODO: check if > 0 casts left - { + && isInScreenRange(castingHero->getSightCenter(), tile)) + { //TODO: check if available casts > 0, before adding that check make dimension door daily limit popup trigger on spell pick //we are allowed to get basic blocked/water invisible nearby tile date when casting DD spell TerrainTile targetTile = gs->map->getTile(tile); auto obfuscatedTile = std::make_shared();