Browse Source

Removed WoG dependency for random artifacts. WoG version in repository updated.

DjWarmonger 10 years ago
parent
commit
971f6d1c1f
2 changed files with 6 additions and 3 deletions
  1. 5 3
      lib/CArtHandler.cpp
  2. 1 0
      lib/GameConstants.h

+ 5 - 3
lib/CArtHandler.cpp

@@ -578,9 +578,11 @@ bool CArtHandler::legalArtifact(ArtifactID id)
 	auto art = artifacts[id];
 	//assert ( (!art->constituents) || art->constituents->size() ); //artifacts is not combined or has some components
 	return (art->possibleSlots[ArtBearer::HERO].size() ||
-			(art->possibleSlots[ArtBearer::COMMANDER].size() && VLC->modh->modules.COMMANDERS) ||
-			(art->possibleSlots[ArtBearer::CREATURE].size() && VLC->modh->modules.STACK_ARTIFACT)) &&
-			!(art->constituents); //no combo artifacts spawning
+		(art->possibleSlots[ArtBearer::COMMANDER].size() && VLC->modh->modules.COMMANDERS) ||
+		(art->possibleSlots[ArtBearer::CREATURE].size() && VLC->modh->modules.STACK_ARTIFACT) &&
+		!(art->constituents) && //no combo artifacts spawning
+		art->aClass >= CArtifact::ART_TREASURE &&
+		art->aClass <= CArtifact::ART_RELIC);
 }
 
 bool CArtHandler::isTradableArtifact(ArtifactID id) const

+ 1 - 0
lib/GameConstants.h

@@ -823,6 +823,7 @@ public:
 		//BLACKSHARD_OF_THE_DEAD_KNIGHT = 8,
 		TITANS_THUNDER = 135,
 		//CORNUCOPIA = 140,
+		//FIXME: the following is only true if WoG is enabled. Otherwise other mod artifacts will take these slots.
 		ART_SELECTION = 144,
 		ART_LOCK = 145,
 		AXE_OF_SMASHING = 146,