forked from teamnwah/openmw-tes3coop
Cleanup
This commit is contained in:
parent
12ec90f9e7
commit
79eb2d20e0
4 changed files with 5 additions and 8 deletions
|
@ -153,8 +153,7 @@ namespace MWBase
|
||||||
PT_Bribe100,
|
PT_Bribe100,
|
||||||
PT_Bribe1000
|
PT_Bribe1000
|
||||||
};
|
};
|
||||||
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
|
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange) = 0;
|
||||||
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange) = 0;
|
|
||||||
///< Perform a persuasion action on NPC
|
///< Perform a persuasion action on NPC
|
||||||
|
|
||||||
virtual void forceStateUpdate(const MWWorld::Ptr &ptr) = 0;
|
virtual void forceStateUpdate(const MWWorld::Ptr &ptr) = 0;
|
||||||
|
|
|
@ -529,7 +529,7 @@ namespace MWDialogue
|
||||||
bool success;
|
bool success;
|
||||||
float temp, perm;
|
float temp, perm;
|
||||||
MWBase::Environment::get().getMechanicsManager()->getPersuasionDispositionChange(
|
MWBase::Environment::get().getMechanicsManager()->getPersuasionDispositionChange(
|
||||||
mActor, MWBase::MechanicsManager::PersuasionType(type), mTemporaryDispositionChange,
|
mActor, MWBase::MechanicsManager::PersuasionType(type),
|
||||||
success, temp, perm);
|
success, temp, perm);
|
||||||
mTemporaryDispositionChange += temp;
|
mTemporaryDispositionChange += temp;
|
||||||
mPermanentDispositionChange += perm;
|
mPermanentDispositionChange += perm;
|
||||||
|
|
|
@ -702,8 +702,7 @@ namespace MWMechanics
|
||||||
return mActors.countDeaths (id);
|
return mActors.countDeaths (id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
|
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange)
|
||||||
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange)
|
|
||||||
{
|
{
|
||||||
const MWWorld::Store<ESM::GameSetting> &gmst =
|
const MWWorld::Store<ESM::GameSetting> &gmst =
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
|
||||||
|
@ -719,7 +718,7 @@ namespace MWMechanics
|
||||||
float playerRating1, playerRating2, playerRating3;
|
float playerRating1, playerRating2, playerRating3;
|
||||||
getPersuasionRatings(playerStats, playerRating1, playerRating2, playerRating3, true);
|
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 d = 1 - 0.02f * abs(currentDisposition - 50);
|
||||||
float target1 = d * (playerRating1 - npcRating1 + 50);
|
float target1 = d * (playerRating1 - npcRating1 + 50);
|
||||||
|
|
|
@ -98,8 +98,7 @@ namespace MWMechanics
|
||||||
virtual int countDeaths (const std::string& id) const;
|
virtual int countDeaths (const std::string& id) const;
|
||||||
///< Return the number of deaths for actors with the given ID.
|
///< Return the number of deaths for actors with the given ID.
|
||||||
|
|
||||||
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
|
virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type, bool& success, float& tempChange, float& permChange);
|
||||||
float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange);
|
|
||||||
void toLower(std::string npcFaction);
|
void toLower(std::string npcFaction);
|
||||||
///< Perform a persuasion action on NPC
|
///< Perform a persuasion action on NPC
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue