mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Werewolf: only NPCs should have modified fight and react to your transformation
This commit is contained in:
parent
9e0d5dc28a
commit
c1cc66985d
@ -1307,12 +1307,15 @@ namespace MWMechanics
|
||||
+ ((50 - disposition) * fFightDispMult))
|
||||
+ bias;
|
||||
|
||||
if (target.getClass().getNpcStats(target).isWerewolf() ||
|
||||
(target == MWBase::Environment::get().getWorld()->getPlayerPtr() &&
|
||||
MWBase::Environment::get().getWorld()->getGlobalInt("pcknownwerewolf")))
|
||||
if (ptr.getClass().isNpc() && target.getClass().isNpc())
|
||||
{
|
||||
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().search("iWerewolfFightMod");
|
||||
fight += iWerewolfFightMod->getInt();
|
||||
if (target.getClass().getNpcStats(target).isWerewolf() ||
|
||||
(target == MWBase::Environment::get().getWorld()->getPlayerPtr() &&
|
||||
MWBase::Environment::get().getWorld()->getGlobalInt("pcknownwerewolf")))
|
||||
{
|
||||
const ESM::GameSetting * iWerewolfFightMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().search("iWerewolfFightMod");
|
||||
fight += iWerewolfFightMod->getInt();
|
||||
}
|
||||
}
|
||||
|
||||
return (fight >= 100);
|
||||
|
@ -2344,6 +2344,9 @@ namespace MWWorld
|
||||
if (*it == actor)
|
||||
continue;
|
||||
|
||||
if (!it->getClass().isNpc())
|
||||
continue;
|
||||
|
||||
if (getLOS(*it, actor) && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, *it))
|
||||
{
|
||||
detected = true;
|
||||
|
Loading…
Reference in New Issue
Block a user