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

Redid stack artifacts. Broken save compatibility. Added serializer support for boost::variant and sending CStackInstace* over network by implicitly passing IDs. Moved seeds and checksum to StartInfo. Various minor changes.

This commit is contained in:
Michał W. Urbańczyk
2012-04-14 02:20:22 +00:00
parent d55d48b978
commit 722ec55384
31 changed files with 529 additions and 640 deletions

View File

@@ -874,18 +874,6 @@ void CStackInstance::setArmyObj(const CArmedInstance *ArmyObj)
attachTo(const_cast<CArmedInstance*>(_armyObj));
}
}
// void CStackInstance::getParents(TCNodes &out, const CBonusSystemNode *source /*= NULL*/) const
// {
// out.insert(type);
//
// if(source && source != this) //we should be root, if not - do not inherit anything
// return;
//
// if(armyObj)
// out.insert(armyObj);
// else
// out.insert(&IObjectInterface::cb->gameState()->globalEffects);
// }
std::string CStackInstance::getQuantityTXT(bool capitalized /*= true*/) const
{
@@ -930,9 +918,7 @@ void CStackInstance::deserializationFix()
const CArmedInstance *armyBackup = _armyObj;
_armyObj = NULL;
setArmyObj(armyBackup);
if(activeArtifact.artifact)
attachTo(activeArtifact.artifact);
artDeserializationFix(this);
}
int CStackInstance::getCreatureID() const
@@ -954,6 +940,11 @@ ui64 CStackInstance::getPower() const
return type->AIValue * count;
}
ui8 CStackInstance::bearerType() const
{
return ArtBearer::CREATURE;
}
CStackBasicDescriptor::CStackBasicDescriptor()
{
type = NULL;