1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fix issues reported by Sonar, review fixes

This commit is contained in:
Ivan Savenko
2025-04-21 18:41:01 +03:00
parent f3a57f754c
commit 4e8e85e3e4
26 changed files with 94 additions and 107 deletions

View File

@@ -116,7 +116,12 @@ public:
ArtifactID pickRandomArtifact(vstd::RNG & rand, int flags, std::function<bool(ArtifactID)> accepts);
ArtifactID pickRandomArtifact(vstd::RNG & rand, std::set<ArtifactID> filtered);
/// Creates instance of spell scroll artifact with provided spell
CArtifactInstance * createScroll(const SpellID & spellId);
/// Creates instance of requested artifact
/// For combined artifact this method will also create alll required components
/// For scrolls this method will also initialize its spell
CArtifactInstance * createArtifact(const ArtifactID & artId, const SpellID & spellId = SpellID::NONE);
/// Returns battle in which selected player is engaged, or nullptr if none.