From b97afbb756202e148b980b3311e2c4cc3dd1cbaf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 10 May 2016 02:03:33 +0300 Subject: Add ability to switch emotes shortcurs bar between player, pets, homunculuses and mercenaries. --- src/actions/actions.cpp | 26 +++++++++++++++++++++++++- src/actions/actions.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 5a461f522..9c9cfa092 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -320,7 +320,7 @@ impHandler(emote) if (emotion > 0) { if (emoteShortcut) - emoteShortcut->useEmote(emotion); + emoteShortcut->useEmotePlayer(emotion); if (Game::instance()) Game::instance()->setValidSpeed(); return true; @@ -1792,4 +1792,28 @@ impHandler(dumpMemoryUsage) return true; } +impHandler(setEmoteType) +{ + const std::string &args = event.args; + if (args == "player" || args.empty()) + { + settings.emoteType = EmoteType::Player; + } + else if (args == "pet") + { + settings.emoteType = EmoteType::Pet; + } +#ifdef EATHENA_SUPPORT + else if (args == "homun" || args == "homunculus") + { + settings.emoteType = EmoteType::Homunculus; + } + else if (args == "merc" || args == "mercenary") + { + settings.emoteType = EmoteType::Mercenary; + } +#endif + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index a09022ce7..034661282 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -114,6 +114,7 @@ namespace Actions decHandler(barToChat); decHandler(seen); decHandler(dumpMemoryUsage); + decHandler(setEmoteType); } // namespace Actions #undef decHandler -- cgit v1.2.3-60-g2f50