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

[Spells] Added basic support for icons and sounds

* few changes in spell format
* save format changed
This commit is contained in:
alexvins
2014-03-10 16:00:58 +00:00
parent 9f01a92f4c
commit 065b8366fb
22 changed files with 404 additions and 501 deletions

View File

@ -102,6 +102,8 @@ public:
* Returns resource name of icon for SPELL_IMMUNITY bonus
*/
const std::string& getIconImmune() const;
const std::string& getCastSound() const;
template <typename Handler> void serialize(Handler &h, const int version)
{
@ -114,8 +116,12 @@ public:
h & absoluteImmunities & defaultProbability;
h & isSpecial;
h & castSound & iconBook & iconEffect & iconScenarioBonus & iconScroll ;
}
friend class CSpellHandler;
friend class Graphics;
private:
void setIsOffensive(const bool val);
@ -147,9 +153,14 @@ private:
///graphics related stuff
std::string iconImmune;
std::string iconBook;
std::string iconEffect;
std::string iconScenarioBonus;
std::string iconScroll;
///sound related stuff
std::string castSound;
};