mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +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
|
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 false;
|
||||||
|
default:
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CArtHandler::initAllowedArtifactsList(const std::vector<bool> &allowed)
|
void CArtHandler::initAllowedArtifactsList(const std::vector<bool> &allowed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user