Переглянути джерело

Fix: VCAI should not attempt to move Spellbook

Dmitry Orlov 4 роки тому
батько
коміт
0e5d427dc9
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      AI/VCAI/VCAI.cpp

+ 3 - 3
AI/VCAI/VCAI.cpp

@@ -1165,12 +1165,12 @@ void VCAI::pickBestArtifacts(const CGHeroInstance * h, const CGHeroInstance * ot
 
 			for(auto location : allArtifacts)
 			{
+				if(location.slot == ArtifactPosition::MACH4 || location.slot == ArtifactPosition::SPELLBOOK)
+					continue; // don't attempt to move catapult and spellbook
+
 				if(location.relatedObj() == target && location.slot < ArtifactPosition::AFTER_LAST)
 					continue; //don't reequip artifact we already wear
 
-				if(location.slot == ArtifactPosition::MACH4) // don't attempt to move catapult
-					continue;
-
 				auto s = location.getSlot();
 				if(!s || s->locked) //we can't move locks
 					continue;