mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Black Market and Artifact Merchant (only buying artifacts) support.
This commit is contained in:
@@ -196,6 +196,18 @@ void IGameCallback::getAllowedArts(std::vector<CArtifact*> &out, std::vector<CAr
|
||||
}
|
||||
}
|
||||
|
||||
void IGameCallback::pickAllowedArtsSet(std::vector<const CArtifact*> &out)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
for (int j = 0; j < 3 ; j++)
|
||||
{
|
||||
out.push_back(VLC->arth->artifacts[getRandomArt(CArtifact::ART_TREASURE << i)]);
|
||||
}
|
||||
}
|
||||
out.push_back(VLC->arth->artifacts[getRandomArt(CArtifact::ART_MAJOR)]);
|
||||
}
|
||||
|
||||
void IGameCallback::getAllowed(std::vector<CArtifact*> &out, int flags)
|
||||
{
|
||||
if(flags & CArtifact::ART_TREASURE)
|
||||
@@ -269,4 +281,4 @@ inline TerrainTile * IGameCallback::getTile( int3 pos )
|
||||
const PlayerState * IGameCallback::getPlayerState( int color )
|
||||
{
|
||||
return gs->getPlayer(color, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user