mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Use switch for CArtHandler::isTradableArtifact
This commit is contained in:
parent
4cb98e7e8d
commit
04d15174e7
@ -585,10 +585,18 @@ bool CArtHandler::legalArtifact(ArtifactID id)
|
||||
|
||||
bool CArtHandler::isTradableArtifact(ArtifactID id) const
|
||||
{
|
||||
if (id < 7 && id != ArtifactID::SPELL_SCROLL)
|
||||
switch (id)
|
||||
{
|
||||
case ArtifactID::SPELLBOOK:
|
||||
case ArtifactID::GRAIL:
|
||||
case ArtifactID::CATAPULT:
|
||||
case ArtifactID::BALLISTA:
|
||||
case ArtifactID::AMMO_CART:
|
||||
case ArtifactID::FIRST_AID_TENT:
|
||||
return false;
|
||||
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void CArtHandler::initAllowedArtifactsList(const std::vector<bool> &allowed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user