1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:53:52 +00:00

tradding skill use, spechcraft use

This commit is contained in:
eduard 2012-12-06 18:30:19 +01:00
parent b2a0e4b1fd
commit 2d62649dc9

View file

@ -431,6 +431,7 @@ namespace MWDialogue
void DialogueManager::persuade(int type) void DialogueManager::persuade(int type)
{ {
bool success; bool success;
bool skillincrease = 1;
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), mTemporaryDispositionChange,
@ -445,10 +446,6 @@ namespace MWDialogue
else if (curDisp + mTemporaryDispositionChange > 100) else if (curDisp + mTemporaryDispositionChange > 100)
mTemporaryDispositionChange = 100 - curDisp; mTemporaryDispositionChange = 100 - curDisp;
// practice skill, it doesn't need to be a success to use skill
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
MWWorld::Class::get(player).skillUsageSucceeded(player, ESM::Skill::Speechcraft, 0);
// add status message to dialogue window // add status message to dialogue window
std::string text; std::string text;
@ -458,8 +455,16 @@ namespace MWDialogue
text = "sTaunt"; text = "sTaunt";
else if (type == MWBase::MechanicsManager::PT_Intimidate) else if (type == MWBase::MechanicsManager::PT_Intimidate)
text = "sIntimidate"; text = "sIntimidate";
else else{
text = "sBribe"; text = "sBribe";
skillincrease = success;
}
if (skillincrease){
// practice skill, it doesn't need to be a success to use skill
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
MWWorld::Class::get(player).skillUsageSucceeded(player, ESM::Skill::Speechcraft, 0);
}
text += (success ? "Success" : "Fail"); text += (success ? "Success" : "Fail");