1
0
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:
Michał W. Urbańczyk
2010-06-27 16:03:01 +00:00
parent ec6342d9a7
commit 21a05d73cb
20 changed files with 305 additions and 42 deletions

View File

@@ -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);
}
}