Prevent consumption of ingredients that don't have a first effect

pull/3229/head
Evil Eye 1 year ago
parent 0ed1310417
commit f5c5ebc1dc

@ -40,6 +40,7 @@
Bug #7088: Deleting last save game of last character doesn't clear character name/details
Bug #7092: BSA archives from higher priority directories don't take priority
Bug #7122: Teleportation to underwater should cancel active water walking effect
Bug #7163: Myar Aranath: Wheat breaks the GUI
Bug #7172: Current music playlist continues playing indefinitely if next playlist is empty
Feature #5492: Let rain and snow collide with statics
Feature #6447: Add LOD support to Object Paging

@ -12,6 +12,7 @@
#include "../mwworld/actioneat.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/esmstore.hpp"
#include "../mwworld/nullaction.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwgui/tooltips.hpp"
@ -72,6 +73,8 @@ namespace MWClass
std::unique_ptr<MWWorld::Action> Ingredient::use(const MWWorld::Ptr& ptr, bool force) const
{
if (ptr.get<ESM::Ingredient>()->mBase->mData.mEffectID[0] < 0)
return std::make_unique<MWWorld::NullAction>();
std::unique_ptr<MWWorld::Action> action = std::make_unique<MWWorld::ActionEat>(ptr);
action->setSound(ESM::RefId::stringRefId("Swallow"));

Loading…
Cancel
Save