mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Artifacts: replace few more ints by ArtifactID
This commit is contained in:
parent
e645b46aed
commit
7eebcb9d60
@ -907,7 +907,7 @@ void CGameState::initDuel()
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
|
@ -824,6 +824,7 @@ public:
|
||||
FIRST_AID_TENT = 6,
|
||||
//CENTAUR_AXE = 7,
|
||||
//BLACKSHARD_OF_THE_DEAD_KNIGHT = 8,
|
||||
ARMAGEDDONS_BLADE = 128,
|
||||
TITANS_THUNDER = 135,
|
||||
//CORNUCOPIA = 140,
|
||||
//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;
|
||||
|
||||
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))
|
||||
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)
|
||||
portrait = type->imageIndex;
|
||||
|
@ -668,8 +668,7 @@ void CMapLoaderH3M::readAllowedArtifacts()
|
||||
}
|
||||
if (map->version == EMapFormat::ROE)
|
||||
{
|
||||
// Armageddon's Blade
|
||||
map->allowedArtifact[128] = false;
|
||||
map->allowedArtifact[ArtifactID::ARMAGEDDONS_BLADE] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user