1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix Ice Ring target selection

This commit is contained in:
Ivan Savenko
2022-12-18 19:00:06 +02:00
parent e9e549148d
commit 53f6b7bd32
3 changed files with 43 additions and 10 deletions

View File

@@ -114,10 +114,11 @@ EffectTarget UnitEffect::transformTargetByRange(const Mechanics * m, const Targe
Target spellTargetCopy(spellTarget);
//make sure that we have valid target with valid aim, even if spell have invalid range configured
//TODO: check than spell range is actually not valid
//also hackfix for banned creature massive spells
if(!aimPoint.empty())
// make sure that we have valid target with valid aim, even if spell have invalid range configured
// TODO: check than spell range is actually not valid
// also hackfix for banned creature massive spells
// FIXME: potentially breaking change: aimPoint may NOT be in Target - example: frost ring
if(!aimPoint.empty() && spellTarget.empty())
spellTargetCopy.insert(spellTargetCopy.begin(), Destination(aimPoint.front()));
std::set<const battle::Unit *> targets;