From 7edc5c733ca0f52bcba0025a5dc5244c8e1dff09 Mon Sep 17 00:00:00 2001 From: gugus Date: Thu, 12 Apr 2012 17:29:05 +0200 Subject: [PATCH] corrected a bug about rank. --- apps/openmw/mwdialogue/dialoguemanager.cpp | 4 ++-- apps/openmw/mwscript/statsextensions.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp index 1405224991..90f0c0231f 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.cpp +++ b/apps/openmw/mwdialogue/dialoguemanager.cpp @@ -488,7 +488,7 @@ namespace MWDialogue if(it!=stats.mFactionRank.end()) { //check rank - if(it->second < info.data.rank) return false; + if(it->second < (int)info.data.rank) return false; } else { @@ -505,7 +505,7 @@ namespace MWDialogue if(it!=stats.mFactionRank.end()) { //check rank - if(it->second < info.data.rank) return false; + if(it->second < (int)info.data.PCrank) return false; } else { diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp index a3c517f8cb..47ae9d13d5 100644 --- a/apps/openmw/mwscript/statsextensions.cpp +++ b/apps/openmw/mwscript/statsextensions.cpp @@ -307,7 +307,7 @@ namespace MWScript MWWorld::Ptr player = context.getEnvironment().mWorld->getPlayer().getPlayer(); if(MWWorld::Class::get(player).getNpcStats(player).mFactionRank.find(factionID) == MWWorld::Class::get(player).getNpcStats(player).mFactionRank.end()) { - MWWorld::Class::get(player).getNpcStats(player).mFactionRank[factionID] = 1; + MWWorld::Class::get(player).getNpcStats(player).mFactionRank[factionID] = 0; } else { @@ -340,7 +340,7 @@ namespace MWScript MWWorld::Ptr player = context.getEnvironment().mWorld->getPlayer().getPlayer(); if(MWWorld::Class::get(player).getNpcStats(player).mFactionRank.find(factionID) == MWWorld::Class::get(player).getNpcStats(player).mFactionRank.end()) { - MWWorld::Class::get(player).getNpcStats(player).mFactionRank[factionID] = 1; + MWWorld::Class::get(player).getNpcStats(player).mFactionRank[factionID] = 0; } else {