For dialogue filtering, use the Vampirism magic effect instead of the untouched NpcStats::mVampire

actorid
scrawl 11 years ago
parent 356b53bd22
commit f4517c8221

@ -514,7 +514,8 @@ bool MWDialogue::Filter::getSelectStructBoolean (const SelectWrapper& select) co
case SelectWrapper::Function_PcVampire:
return MWWorld::Class::get (player).getNpcStats (player).isVampire();
return MWWorld::Class::get (player).getCreatureStats(player).getMagicEffects().
get(ESM::MagicEffect::Vampirism).mMagnitude > 0;
case SelectWrapper::Function_TalkedToPc:

@ -28,7 +28,6 @@ MWMechanics::NpcStats::NpcStats()
, mBounty (0)
, mLevelProgress(0)
, mDisposition(0)
, mVampire (0)
, mReputation(0)
, mWerewolfKills (0)
, mProfit(0)
@ -318,16 +317,6 @@ void MWMechanics::NpcStats::setFactionReputation (const std::string& faction, in
mFactionReputation[faction] = value;
}
bool MWMechanics::NpcStats::isVampire() const
{
return mVampire;
}
void MWMechanics::NpcStats::setVampire (bool set)
{
mVampire = set;
}
int MWMechanics::NpcStats::getReputation() const
{
return mReputation;

@ -50,7 +50,6 @@ namespace MWMechanics
int mBounty;
std::set<std::string> mExpelled;
std::map<std::string, int> mFactionReputation;
bool mVampire;
int mReputation;
int mWerewolfKills;
int mProfit;
@ -135,10 +134,6 @@ namespace MWMechanics
void setFactionReputation (const std::string& faction, int value);
bool isVampire() const;
void setVampire (bool set);
bool hasSkillsForRank (const std::string& factionId, int rank) const;
bool isWerewolf() const;

Loading…
Cancel
Save