diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 31 | ||||
-rw-r--r-- | src/actions/commands.h | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 4ae5d0f49..a6d9d56a2 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -297,4 +297,35 @@ impHandler(setTarget) return true; } +impHandler(commandOutfit) +{ + if (outfitWindow) + { + if (!event.args.empty()) + { + const std::string op = event.args.substr(0, 1); + if (op == "n") + { + outfitWindow->wearNextOutfit(true); + } + else if (op == "p") + { + outfitWindow->wearPreviousOutfit(true); + } + else + { + outfitWindow->wearOutfit(atoi(event.args.c_str()) - 1, + false, true); + } + } + else + { + outfitWindow->wearOutfit(atoi(event.args.c_str()) - 1, + false, true); + } + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 8ff28cd00..3face961f 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -40,6 +40,7 @@ namespace Actions decHandler(printAll); decHandler(move); decHandler(setTarget); + decHandler(commandOutfit); } // namespace Actions #undef decHandler |