mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Artifacts: replace few more ints by ArtifactID
This commit is contained in:
@ -907,7 +907,7 @@ void CGameState::initDuel()
|
|||||||
|
|
||||||
if(!ss.spells.empty())
|
if(!ss.spells.empty())
|
||||||
{
|
{
|
||||||
h->putArtifact(ArtifactPosition::SPELLBOOK, CArtifactInstance::createNewArtifactInstance(0));
|
h->putArtifact(ArtifactPosition::SPELLBOOK, CArtifactInstance::createNewArtifactInstance(ArtifactID::SPELLBOOK));
|
||||||
boost::copy(ss.spells, std::inserter(h->spells, h->spells.begin()));
|
boost::copy(ss.spells, std::inserter(h->spells, h->spells.begin()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,6 +824,7 @@ public:
|
|||||||
FIRST_AID_TENT = 6,
|
FIRST_AID_TENT = 6,
|
||||||
//CENTAUR_AXE = 7,
|
//CENTAUR_AXE = 7,
|
||||||
//BLACKSHARD_OF_THE_DEAD_KNIGHT = 8,
|
//BLACKSHARD_OF_THE_DEAD_KNIGHT = 8,
|
||||||
|
ARMAGEDDONS_BLADE = 128,
|
||||||
TITANS_THUNDER = 135,
|
TITANS_THUNDER = 135,
|
||||||
//CORNUCOPIA = 140,
|
//CORNUCOPIA = 140,
|
||||||
//FIXME: the following is only true if WoG is enabled. Otherwise other mod artifacts will take these slots.
|
//FIXME: the following is only true if WoG is enabled. Otherwise other mod artifacts will take these slots.
|
||||||
|
@ -261,10 +261,10 @@ void CGHeroInstance::initHero()
|
|||||||
spells -= SpellID::PRESET;
|
spells -= SpellID::PRESET;
|
||||||
|
|
||||||
if(!getArt(ArtifactPosition::MACH4) && !getArt(ArtifactPosition::SPELLBOOK) && type->haveSpellBook) //no catapult means we haven't read pre-existent set -> use default rules for spellbook
|
if(!getArt(ArtifactPosition::MACH4) && !getArt(ArtifactPosition::SPELLBOOK) && type->haveSpellBook) //no catapult means we haven't read pre-existent set -> use default rules for spellbook
|
||||||
putArtifact(ArtifactPosition::SPELLBOOK, CArtifactInstance::createNewArtifactInstance(0));
|
putArtifact(ArtifactPosition::SPELLBOOK, CArtifactInstance::createNewArtifactInstance(ArtifactID::SPELLBOOK));
|
||||||
|
|
||||||
if(!getArt(ArtifactPosition::MACH4))
|
if(!getArt(ArtifactPosition::MACH4))
|
||||||
putArtifact(ArtifactPosition::MACH4, CArtifactInstance::createNewArtifactInstance(3)); //everyone has a catapult
|
putArtifact(ArtifactPosition::MACH4, CArtifactInstance::createNewArtifactInstance(ArtifactID::CATAPULT)); //everyone has a catapult
|
||||||
|
|
||||||
if(portrait < 0 || portrait == 255)
|
if(portrait < 0 || portrait == 255)
|
||||||
portrait = type->imageIndex;
|
portrait = type->imageIndex;
|
||||||
|
@ -668,8 +668,7 @@ void CMapLoaderH3M::readAllowedArtifacts()
|
|||||||
}
|
}
|
||||||
if (map->version == EMapFormat::ROE)
|
if (map->version == EMapFormat::ROE)
|
||||||
{
|
{
|
||||||
// Armageddon's Blade
|
map->allowedArtifact[ArtifactID::ARMAGEDDONS_BLADE] = false;
|
||||||
map->allowedArtifact[128] = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user