1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Spell scroll improvements, fixing #689, #690, #691.

CArtPlace now uses common CInfoWindow for r-click popup (with or without a custom component), old CMessage::genWindow no longer needed.
This commit is contained in:
Michał W. Urbańczyk
2011-03-12 21:55:31 +00:00
parent 122a6a039e
commit 39120fe4a5
10 changed files with 140 additions and 76 deletions

View File

@@ -1026,6 +1026,17 @@ void CArtifactInstance::deserializationFix()
setType(artType);
}
int CArtifactInstance::getGivenSpellID() const
{
const Bonus * b = getBonus(Selector::type(Bonus::SPELL));
if(!b)
{
tlog3 << "Warning: " << nodeName() << " doesn't bear any spell!\n";
return -1;
}
return b->subtype;
}
bool CCombinedArtifactInstance::canBePutAt(const ArtifactLocation &al, bool assumeDestRemoved /*= false*/) const
{
bool canMainArtifactBePlaced = CArtifactInstance::canBePutAt(al, assumeDestRemoved);