]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
added spell selection battle state
[l2e.git] / src / battle / Hero.h
index d7f6a49d97b0a89efaeffe8c752d46db5484f922..69db286c74d32fb69fa64a8ffe575439e90c0d4b 100644 (file)
@@ -31,7 +31,8 @@ public:
 
        Uint16 MaxMana() const { return maxMana; }
        Uint16 Mana() const { return mana; }
-       int RelativeMana(int max) const { return mana * max / maxMana; }
+       int RelativeMana(int max) const { return maxMana == 0 ? 0 : mana * max / maxMana; }
+       bool CanUseMagic() const { return maxMana > 0; }
 
        Uint8 IP() const { return ip; }
        int RelativeIP(int max) const { return ip * max / 255; }