mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fixed skeleton (part of #268)
This commit is contained in:
@@ -3878,27 +3878,34 @@ void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const
|
|||||||
txtid++;
|
txtid++;
|
||||||
if(ID == 105) //wagon has extra text (for finding art) we need to omit
|
if(ID == 105) //wagon has extra text (for finding art) we need to omit
|
||||||
txtid++;
|
txtid++;
|
||||||
|
|
||||||
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
|
|
||||||
}
|
}
|
||||||
else //first visit - give bonus!
|
else //first visit - give bonus!
|
||||||
{
|
{
|
||||||
switch(artOrRes)
|
switch(artOrRes)
|
||||||
{
|
{
|
||||||
case 0: // first visit but empty
|
case 0: // first visit but empty
|
||||||
|
if (ID == 22) //Corpse
|
||||||
|
++txtid;
|
||||||
|
else
|
||||||
txtid+=2;
|
txtid+=2;
|
||||||
|
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
|
||||||
break;
|
break;
|
||||||
case 1: //art
|
case 1: //art
|
||||||
iw.components.push_back(Component(Component::ARTIFACT,bonusType,0,0));
|
iw.components.push_back(Component(Component::ARTIFACT,bonusType,0,0));
|
||||||
cb->giveHeroArtifact(bonusType,h->id,-2);
|
cb->giveHeroArtifact(bonusType,h->id,-2);
|
||||||
|
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
|
||||||
|
if (ID == 22) //Corpse
|
||||||
|
{
|
||||||
|
iw.text << "%s";
|
||||||
|
iw.text.addReplacement (MetaString::ART_NAMES, bonusType);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2: //res
|
case 2: //res
|
||||||
|
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
|
||||||
iw.components.push_back(Component(Component::RESOURCE,bonusType,bonusVal,0));
|
iw.components.push_back(Component(Component::RESOURCE,bonusType,bonusVal,0));
|
||||||
cb->giveResource(h->getOwner(),bonusType,bonusVal);
|
cb->giveResource(h->getOwner(),bonusType,bonusVal);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
iw.text.addTxt(MetaString::ADVOB_TXT, txtid);
|
|
||||||
if(ID == 105 && artOrRes == 1)
|
if(ID == 105 && artOrRes == 1)
|
||||||
{
|
{
|
||||||
iw.text.localStrings.back().second++;
|
iw.text.localStrings.back().second++;
|
||||||
|
Reference in New Issue
Block a user