mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 12:45:38 +00:00
Don't show sMagicInvalidTarget for soultrap on NPCs (Fixes #1762)
Note the message was accurate, since NPCs can't be soultrapped. Maybe vanilla doesn't show it to not spam the screen with message boxes when attacking with a "soultrap on strike" weapon...
This commit is contained in:
parent
a9a7a7ec73
commit
2bfcec53bf
1 changed files with 3 additions and 3 deletions
|
@ -252,12 +252,12 @@ namespace MWMechanics
|
|||
}
|
||||
break;
|
||||
case ESM::MagicEffect::Soultrap:
|
||||
if ((target.getClass().isActor() && target.getClass().isNpc())
|
||||
|| (target.getTypeName() == typeid(ESM::Creature).name() && target.get<ESM::Creature>()->mBase->mData.mSoul == 0))
|
||||
if (!target.getClass().isNpc() // no messagebox for NPCs
|
||||
&& (target.getTypeName() == typeid(ESM::Creature).name() && target.get<ESM::Creature>()->mBase->mData.mSoul == 0))
|
||||
{
|
||||
if (castByPlayer)
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicInvalidTarget}");
|
||||
return false;
|
||||
return true; // must still apply to get visual effect and have target regard it as attack
|
||||
}
|
||||
break;
|
||||
case ESM::MagicEffect::AlmsiviIntervention:
|
||||
|
|
Loading…
Reference in a new issue