1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

cosmetic fixes

This commit is contained in:
SoundSSGood
2023-06-24 18:26:16 +03:00
parent 8751d9ab8b
commit b135045dcd
3 changed files with 14 additions and 18 deletions

View File

@ -204,7 +204,7 @@ DLL_LINKAGE CArtifactInstance * ArtifactUtils::createArtifact(CMap * map, const
art = ArtifactUtils::createScroll(SpellID(spellID)); art = ArtifactUtils::createScroll(SpellID(spellID));
} }
} }
else //TODO: create combined artifact instance for random artifacts, just in case else
{ {
art = new CArtifactInstance(); // random, empty art = new CArtifactInstance(); // random, empty
} }

View File

@ -819,9 +819,6 @@ void CArtifactInstance::init()
std::string CArtifactInstance::getDescription() const std::string CArtifactInstance::getDescription() const
{ {
std::string text = artType->getDescriptionTranslated(); std::string text = artType->getDescriptionTranslated();
if (!vstd::contains(text, '{'))
text = '{' + artType->getNameTranslated() + "}\n\n" + text; //workaround for new artifacts with single name, turns it to H3-style
if(artType->getId() == ArtifactID::SPELL_SCROLL) if(artType->getId() == ArtifactID::SPELL_SCROLL)
{ {
// we expect scroll description to be like this: This scroll contains the [spell name] spell which is added into your spell book for as long as you carry the scroll. // we expect scroll description to be like this: This scroll contains the [spell name] spell which is added into your spell book for as long as you carry the scroll.

View File

@ -782,20 +782,6 @@ struct DLL_LINKAGE SetAvailableArtifacts : public CPackForClient
} }
}; };
struct DLL_LINKAGE NewArtifact : public CPackForClient
{
void applyGs(CGameState * gs);
ConstTransitivePtr<CArtifactInstance> art;
virtual void visitTyped(ICPackVisitor & visitor) override;
template <typename Handler> void serialize(Handler & h, const int version)
{
h & art;
}
};
struct DLL_LINKAGE CGarrisonOperationPack : CPackForClient struct DLL_LINKAGE CGarrisonOperationPack : CPackForClient
{ {
}; };
@ -985,6 +971,19 @@ struct DLL_LINKAGE PutArtifact : CArtifactOperationPack
} }
}; };
struct DLL_LINKAGE NewArtifact : public CArtifactOperationPack
{
ConstTransitivePtr<CArtifactInstance> art;
void applyGs(CGameState * gs);
virtual void visitTyped(ICPackVisitor & visitor) override;
template <typename Handler> void serialize(Handler & h, const int version)
{
h & art;
}
};
struct DLL_LINKAGE EraseArtifact : CArtifactOperationPack struct DLL_LINKAGE EraseArtifact : CArtifactOperationPack
{ {
ArtifactLocation al; ArtifactLocation al;