mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 10:09:39 +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;
|
break;
|
||||||
case ESM::MagicEffect::Soultrap:
|
case ESM::MagicEffect::Soultrap:
|
||||||
if ((target.getClass().isActor() && target.getClass().isNpc())
|
if (!target.getClass().isNpc() // no messagebox for NPCs
|
||||||
|| (target.getTypeName() == typeid(ESM::Creature).name() && target.get<ESM::Creature>()->mBase->mData.mSoul == 0))
|
&& (target.getTypeName() == typeid(ESM::Creature).name() && target.get<ESM::Creature>()->mBase->mData.mSoul == 0))
|
||||||
{
|
{
|
||||||
if (castByPlayer)
|
if (castByPlayer)
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicInvalidTarget}");
|
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;
|
break;
|
||||||
case ESM::MagicEffect::AlmsiviIntervention:
|
case ESM::MagicEffect::AlmsiviIntervention:
|
||||||
|
|
Loading…
Reference in a new issue