mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-19 00:17:56 +02:00
Fix Grail digging success message
This commit is contained in:
@ -325,6 +325,11 @@ void MetaString::serializeJson(JsonSerializeFormat & handler)
|
|||||||
jsonDeserialize(handler.getCurrent());
|
jsonDeserialize(handler.getCurrent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MetaString::appendName(const ArtifactID & id)
|
||||||
|
{
|
||||||
|
appendTextID(id.toEntity(VLC)->getNameTextID());
|
||||||
|
}
|
||||||
|
|
||||||
void MetaString::appendName(const SpellID & id)
|
void MetaString::appendName(const SpellID & id)
|
||||||
{
|
{
|
||||||
appendTextID(id.toEntity(VLC)->getNameTextID());
|
appendTextID(id.toEntity(VLC)->getNameTextID());
|
||||||
|
@ -75,6 +75,7 @@ public:
|
|||||||
/// Appends specified number to resulting string
|
/// Appends specified number to resulting string
|
||||||
void appendNumber(int64_t value);
|
void appendNumber(int64_t value);
|
||||||
|
|
||||||
|
void appendName(const ArtifactID& id);
|
||||||
void appendName(const SpellID& id);
|
void appendName(const SpellID& id);
|
||||||
void appendName(const PlayerColor& id);
|
void appendName(const PlayerColor& id);
|
||||||
void appendName(const CreatureID & id, TQuantity count);
|
void appendName(const CreatureID & id, TQuantity count);
|
||||||
|
@ -3699,8 +3699,8 @@ bool CGameHandler::dig(const CGHeroInstance *h)
|
|||||||
{
|
{
|
||||||
ArtifactID grail = ArtifactID::GRAIL;
|
ArtifactID grail = ArtifactID::GRAIL;
|
||||||
|
|
||||||
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 58); //"Congratulations! After spending many hours digging here, your hero has uncovered the "
|
iw.text.appendLocalString(EMetaText::GENERAL_TXT, 58); //"Congratulations! After spending many hours digging here, your hero has uncovered the " ...
|
||||||
iw.text.replaceName(grail);
|
iw.text.appendName(grail); // ... " The Grail"
|
||||||
iw.soundID = soundBase::ULTIMATEARTIFACT;
|
iw.soundID = soundBase::ULTIMATEARTIFACT;
|
||||||
giveHeroNewArtifact(h, grail.toArtifact(), ArtifactPosition::FIRST_AVAILABLE); //give grail
|
giveHeroNewArtifact(h, grail.toArtifact(), ArtifactPosition::FIRST_AVAILABLE); //give grail
|
||||||
sendAndApply(&iw);
|
sendAndApply(&iw);
|
||||||
|
Reference in New Issue
Block a user