diff options
Diffstat (limited to 'src/progs/manaplus/actions')
-rw-r--r-- | src/progs/manaplus/actions/actions.cpp | 4 | ||||
-rw-r--r-- | src/progs/manaplus/actions/commands.cpp | 4 | ||||
-rw-r--r-- | src/progs/manaplus/actions/pets.cpp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp index 1a351d268..4606137f3 100644 --- a/src/progs/manaplus/actions/actions.cpp +++ b/src/progs/manaplus/actions/actions.cpp @@ -1274,9 +1274,11 @@ impHandler(undress) if (sz == 2) { - const int itemId = atoi(pars[1].c_str()); if (target != nullptr) + { + const int itemId = atoi(pars[1].c_str()); target->undressItemById(itemId); + } } else { diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp index dd58c221b..711816eac 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaplus/actions/commands.cpp @@ -1036,9 +1036,11 @@ impHandler(homunEmote) event.action >= InputAction::HOMUN_EMOTE_1 && event.action <= InputAction::HOMUN_EMOTE_48) { - const int emotion = event.action - InputAction::HOMUN_EMOTE_1; if (emoteShortcut != nullptr) + { + const int emotion = event.action - InputAction::HOMUN_EMOTE_1; homunculusHandler->emote(emoteShortcut->getEmote(emotion)); + } if (Game::instance() != nullptr) Game::instance()->setValidSpeed(); return true; diff --git a/src/progs/manaplus/actions/pets.cpp b/src/progs/manaplus/actions/pets.cpp index bb8ec4591..fd8c959f8 100644 --- a/src/progs/manaplus/actions/pets.cpp +++ b/src/progs/manaplus/actions/pets.cpp @@ -102,9 +102,11 @@ impHandler(petEmote) if (event.action >= InputAction::PET_EMOTE_1 && event.action <= InputAction::PET_EMOTE_48) { - const int emotion = event.action - InputAction::PET_EMOTE_1; if (emoteShortcut != nullptr) + { + const int emotion = event.action - InputAction::PET_EMOTE_1; petHandler->emote(emoteShortcut->getEmote(emotion)); + } if (Game::instance() != nullptr) Game::instance()->setValidSpeed(); return true; |