From f1f5595df167c69cc1c04157e477cd9dce290f66 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 Mar 2013 13:20:54 +0300 Subject: improve spellmanager class. --- src/spellmanager.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/spellmanager.h') diff --git a/src/spellmanager.h b/src/spellmanager.h index c374aae19..1b25fd83d 100644 --- a/src/spellmanager.h +++ b/src/spellmanager.h @@ -42,9 +42,9 @@ class SpellManager final ~SpellManager(); - TextCommand *getSpell(const int spellId) A_WARN_UNUSED; + TextCommand *getSpell(const int spellId) const A_WARN_UNUSED; - TextCommand* getSpellByItem(const int itemId) A_WARN_UNUSED; + TextCommand* getSpellByItem(const int itemId) const A_WARN_UNUSED; bool addSpell(TextCommand *const spell); @@ -52,15 +52,16 @@ class SpellManager final std::vector getAll() const A_WARN_UNUSED; - void useItem(const int itemId); + void useItem(const int itemId) const; - void invoke(const int spellId); + void invoke(const int spellId) const; void load(const bool oldConfig = false); - void save(); + void save() const; - std::string autoComplete(std::string partName) A_WARN_UNUSED; + std::string autoComplete(const std::string &partName) + const A_WARN_UNUSED; private: void fillSpells(); -- cgit v1.2.3-60-g2f50