mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Fix Witch Hut messages to match H3
This commit is contained in:
parent
eedaa63f5f
commit
48eba6c362
@ -48,6 +48,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"description" : 355,
|
||||||
"secondary" : {
|
"secondary" : {
|
||||||
"@gainedSkill" : 1
|
"@gainedSkill" : 1
|
||||||
},
|
},
|
||||||
|
@ -307,6 +307,12 @@ void Rewardable::Info::configureRewards(
|
|||||||
info.description.replaceLocalString(EMetaText::SPELL_NAME, artifact.getNum());
|
info.description.replaceLocalString(EMetaText::SPELL_NAME, artifact.getNum());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto & secondary : info.reward.secondary )
|
||||||
|
{
|
||||||
|
info.message.replaceLocalString(EMetaText::SEC_SKILL_NAME, secondary.first.getNum());
|
||||||
|
info.description.replaceLocalString(EMetaText::SEC_SKILL_NAME, secondary.first.getNum());
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto & variable : object.variables.values )
|
for (const auto & variable : object.variables.values )
|
||||||
{
|
{
|
||||||
if( boost::algorithm::starts_with(variable.first, "spell"))
|
if( boost::algorithm::starts_with(variable.first, "spell"))
|
||||||
@ -314,6 +320,11 @@ void Rewardable::Info::configureRewards(
|
|||||||
info.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
info.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
||||||
info.description.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
info.description.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
||||||
}
|
}
|
||||||
|
if( boost::algorithm::starts_with(variable.first, "secondarySkill"))
|
||||||
|
{
|
||||||
|
info.message.replaceLocalString(EMetaText::SEC_SKILL_NAME, variable.second);
|
||||||
|
info.description.replaceLocalString(EMetaText::SEC_SKILL_NAME, variable.second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object.info.push_back(info);
|
object.info.push_back(info);
|
||||||
@ -347,8 +358,12 @@ void Rewardable::Info::configureObject(Rewardable::Configuration & object, CRand
|
|||||||
onVisited.visitType = Rewardable::EEventType::EVENT_ALREADY_VISITED;
|
onVisited.visitType = Rewardable::EEventType::EVENT_ALREADY_VISITED;
|
||||||
onVisited.message = loadMessage(parameters["onVisitedMessage"], TextIdentifier(objectTextID, "onVisited"));
|
onVisited.message = loadMessage(parameters["onVisitedMessage"], TextIdentifier(objectTextID, "onVisited"));
|
||||||
for (const auto & variable : object.variables.values )
|
for (const auto & variable : object.variables.values )
|
||||||
|
{
|
||||||
if( boost::algorithm::starts_with(variable.first, "spell"))
|
if( boost::algorithm::starts_with(variable.first, "spell"))
|
||||||
onVisited.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
onVisited.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
||||||
|
if( boost::algorithm::starts_with(variable.first, "secondarySkill"))
|
||||||
|
onVisited.message.replaceLocalString(EMetaText::SEC_SKILL_NAME, variable.second);
|
||||||
|
}
|
||||||
|
|
||||||
object.info.push_back(onVisited);
|
object.info.push_back(onVisited);
|
||||||
}
|
}
|
||||||
@ -359,8 +374,12 @@ void Rewardable::Info::configureObject(Rewardable::Configuration & object, CRand
|
|||||||
onEmpty.visitType = Rewardable::EEventType::EVENT_NOT_AVAILABLE;
|
onEmpty.visitType = Rewardable::EEventType::EVENT_NOT_AVAILABLE;
|
||||||
onEmpty.message = loadMessage(parameters["onEmptyMessage"], TextIdentifier(objectTextID, "onEmpty"));
|
onEmpty.message = loadMessage(parameters["onEmptyMessage"], TextIdentifier(objectTextID, "onEmpty"));
|
||||||
for (const auto & variable : object.variables.values )
|
for (const auto & variable : object.variables.values )
|
||||||
|
{
|
||||||
if( boost::algorithm::starts_with(variable.first, "spell"))
|
if( boost::algorithm::starts_with(variable.first, "spell"))
|
||||||
onEmpty.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
onEmpty.message.replaceLocalString(EMetaText::SPELL_NAME, variable.second);
|
||||||
|
if( boost::algorithm::starts_with(variable.first, "secondarySkill"))
|
||||||
|
onEmpty.message.replaceLocalString(EMetaText::SEC_SKILL_NAME, variable.second);
|
||||||
|
}
|
||||||
|
|
||||||
object.info.push_back(onEmpty);
|
object.info.push_back(onEmpty);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user