diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 60c694fda..abfeb7926 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -3902,8 +3902,8 @@ void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const break; case 2: //res iw.text.addTxt(MetaString::ADVOB_TXT, txtid); - iw.components.push_back(Component(Component::RESOURCE,bonusType,bonusVal,0)); - cb->giveResource(h->getOwner(),bonusType,bonusVal); + iw.components.push_back (Component(Component::RESOURCE, bonusType, bonusVal, 0)); + cb->giveResource(h->getOwner(), bonusType, bonusVal); break; } if(ID == 105 && artOrRes == 1) diff --git a/hch/CObjectHandler.h b/hch/CObjectHandler.h index 6bc81de1e..2c3dc6c79 100644 --- a/hch/CObjectHandler.h +++ b/hch/CObjectHandler.h @@ -905,7 +905,7 @@ public: template void serialize(Handler &h, const int version) { h & static_cast(*this);; - h & bonusType & bonusVal; + h & artOrRes & bonusType & bonusVal; } };