diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-27 18:07:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-27 18:17:32 +0300 |
commit | 498eb532209e476e250b7b3e817533008faa85b2 (patch) | |
tree | ee4bb05a18656d5836b4340c5a9cedb2cbb92a86 /src/actions | |
parent | c34858a4c7889483a8775c65c9bd1f357bca2572 (diff) | |
download | mv-498eb532209e476e250b7b3e817533008faa85b2.tar.gz mv-498eb532209e476e250b7b3e817533008faa85b2.tar.bz2 mv-498eb532209e476e250b7b3e817533008faa85b2.tar.xz mv-498eb532209e476e250b7b3e817533008faa85b2.zip |
Add chat commands for add/remove/ignore pickups.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 36 | ||||
-rw-r--r-- | src/actions/commands.h | 3 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 114144477..b57883841 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -1154,4 +1154,40 @@ impHandler(npcClipboard) return false; } +impHandler(addPickup) +{ + if (actorManager) + { + actorManager->addPickupItem(event.args); + if (socialWindow) + socialWindow->updatePickupFilter(); + return true; + } + return false; +} + +impHandler(removePickup) +{ + if (actorManager) + { + actorManager->removePickupItem(event.args); + if (socialWindow) + socialWindow->updatePickupFilter(); + return true; + } + return false; +} + +impHandler(ignorePickup) +{ + if (actorManager) + { + actorManager->addIgnorePickupItem(event.args); + if (socialWindow) + socialWindow->updatePickupFilter(); + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 451f84285..e49dcaddd 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -94,6 +94,9 @@ namespace Actions decHandler(skill); decHandler(craft); decHandler(npcClipboard); + decHandler(addPickup); + decHandler(removePickup); + decHandler(ignorePickup); } // namespace Actions #undef decHandler |