move
scrawl 9 years ago
parent 12ec90f9e7
commit 79eb2d20e0

@ -153,8 +153,7 @@ namespace MWBase
PT_Bribe100,
PT_Bribe1000
};
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange) = 0;
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange) = 0;
///< Perform a persuasion action on NPC
virtual void forceStateUpdate(const MWWorld::Ptr &ptr) = 0;

@ -529,7 +529,7 @@ namespace MWDialogue
bool success;
float temp, perm;
MWBase::Environment::get().getMechanicsManager()->getPersuasionDispositionChange(
mActor, MWBase::MechanicsManager::PersuasionType(type), mTemporaryDispositionChange,
mActor, MWBase::MechanicsManager::PersuasionType(type),
success, temp, perm);
mTemporaryDispositionChange += temp;
mPermanentDispositionChange += perm;

@ -702,8 +702,7 @@ namespace MWMechanics
return mActors.countDeaths (id);
}
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange)
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange)
{
const MWWorld::Store<ESM::GameSetting> &gmst =
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
@ -719,7 +718,7 @@ namespace MWMechanics
float playerRating1, playerRating2, playerRating3;
getPersuasionRatings(playerStats, playerRating1, playerRating2, playerRating3, true);
int currentDisposition = std::min(100, std::max(0, int(getDerivedDisposition(npc, false) + currentTemporaryDispositionDelta)));
int currentDisposition = getDerivedDisposition(npc);
float d = 1 - 0.02f * abs(currentDisposition - 50);
float target1 = d * (playerRating1 - npcRating1 + 50);

@ -98,8 +98,7 @@ namespace MWMechanics
virtual int countDeaths (const std::string& id) const;
///< Return the number of deaths for actors with the given ID.
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange);
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange);
void toLower(std::string npcFaction);
///< Perform a persuasion action on NPC

Loading…
Cancel
Save