diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-26 19:17:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-26 19:18:17 +0300 |
commit | f8b39b10698870111df67af3645b17d8d15a7685 (patch) | |
tree | 05146e7a9f7a45321237e3be629dff7af7e733a7 /src/spellmanager.cpp | |
parent | ea6a5a78b7bed5fc47cfc4d81dac78c71d6289b3 (diff) | |
download | manaverse-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.cpp | 8 |
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) { |