From f8b39b10698870111df67af3645b17d8d15a7685 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 Oct 2014 19:17:04 +0300 Subject: Allow invoke chat command from invoking skill. New skill attribute: invokeCmd. --- src/spellmanager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/spellmanager.cpp') 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) { -- cgit v1.2.3-60-g2f50