Selaa lähdekoodia

Update client/battle/BattleActionsController.cpp

Co-authored-by: Nordsoft91 <[email protected]>
Dydzio 2 vuotta sitten
vanhempi
sitoutus
cba9ddd66a
1 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 5
      client/battle/BattleActionsController.cpp

+ 3 - 5
client/battle/BattleActionsController.cpp

@@ -235,13 +235,11 @@ void BattleActionsController::reorderPossibleActionsPriority(const CStack * stac
 					bool enemyTargetingPositiveSpellcast = item.spell().toSpell()->isPositive() && stackOwner != LOCPLINT->playerID;
 					bool friendTargetingNegativeSpellcast = item.spell().toSpell()->isNegative() && stackOwner == LOCPLINT->playerID;
 
-					if(enemyTargetingPositiveSpellcast || friendTargetingNegativeSpellcast)
-						return 100;
-					else
+					if(!enemyTargetingPositiveSpellcast && !friendTargetingNegativeSpellcast)
 						return 1;
 				}
-				else
-					return 100; //bottom priority
+				return 100; //bottom priority
+
 				break;
 			case PossiblePlayerBattleAction::RANDOM_GENIE_SPELL:
 				return 2;