Selaa lähdekoodia

Block summon of elemtals only by ally summoned elementals

AlexVinS 10 vuotta sitten
vanhempi
sitoutus
a1ea551a85
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/CBattleCallback.cpp

+ 1 - 1
lib/CBattleCallback.cpp

@@ -1638,7 +1638,7 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell
 	if(arpos < ARRAY_COUNT(spellIDs))
 	if(arpos < ARRAY_COUNT(spellIDs))
 	{
 	{
 		//check if there are summoned elementals of other type
 		//check if there are summoned elementals of other type
-		for( const CStack * st : battleAliveStacks())
+		for(const CStack * st : battleAliveStacks(side))
 			if(vstd::contains(st->state, EBattleStackState::SUMMONED) && st->getCreature()->idNumber != creIDs[arpos])
 			if(vstd::contains(st->state, EBattleStackState::SUMMONED) && st->getCreature()->idNumber != creIDs[arpos])
 				return ESpellCastProblem::ANOTHER_ELEMENTAL_SUMMONED;
 				return ESpellCastProblem::ANOTHER_ELEMENTAL_SUMMONED;
 	}
 	}