summaryrefslogtreecommitdiff
path: root/src/spellmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-26 19:17:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-26 19:18:17 +0300
commitf8b39b10698870111df67af3645b17d8d15a7685 (patch)
tree05146e7a9f7a45321237e3be629dff7af7e733a7 /src/spellmanager.cpp
parentea6a5a78b7bed5fc47cfc4d81dac78c71d6289b3 (diff)
downloadManaVerse-f8b39b10698870111df67af3645b17d8d15a7685.tar.gz
ManaVerse-f8b39b10698870111df67af3645b17d8d15a7685.tar.bz2
ManaVerse-f8b39b10698870111df67af3645b17d8d15a7685.tar.xz
ManaVerse-f8b39b10698870111df67af3645b17d8d15a7685.zip
Allow invoke chat command from invoking skill.
New skill attribute: invokeCmd.
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r--src/spellmanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index fbf372de7..6dfdd483d 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -182,6 +182,14 @@ void SpellManager::invokeSpell(const TextCommand *const spell,
chatWindow->localChatInput(parseCommand(spell->getCommand(), target));
}
+void SpellManager::invokeCommand(const std::string &command,
+ const Being *const target)
+{
+ if (!chatWindow)
+ return;
+ chatWindow->localChatInput(parseCommand(command, target));
+}
+
std::string SpellManager::parseCommand(std::string command,
const Being *const target)
{