Index: StatSystem.cpp===================================================================
--- StatSystem.cpp (revision 113)
+++ StatSystem.cpp (working copy)
@@ -20,6 +20,7 @@
#include "Player.h"
#include "Pet.h"
#include "Creature.h"
+#include "Config/ConfigEnv.h" //配置系统
#include "SharedDefines.h"
#include "SpellAuras.h"
@@ -486,7 +487,14 @@
value += GetRatingBonusValue(CR_BLOCK);
value = value < 0.0f ? 0.0f : value;
}
+ if(sConfig.GetIntDefault("Maxofvalue.On.Off", 0)==1)
+ {
+ SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, sConfig.GetFloatDefault("Maxof.Block", 100.0f));
+ }
+ else
+ {
SetStatFloatValue(PLAYER_BLOCK_PERCENTAGE, value);
+ }
}
void Player::UpdateCritPercentage(WeaponAttackType attType)
@@ -551,7 +559,14 @@
value += GetRatingBonusValue(CR_PARRY);
value = value < 0.0f ? 0.0f : value;
}
- SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, value);
+ if(sConfig.GetIntDefault("Maxofvalue.On.Off", 0)==1)
+ {
+ SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, sConfig.GetFloatDefault("Maxof.Parry", 100.0f));
+ }
+ else
+ {
+ SetStatFloatValue(PLAYER_PARRY_PERCENTAGE, value);
+ }
}
void Player::UpdateDodgePercentage()
@@ -565,7 +580,14 @@
// Dodge from rating
value += GetRatingBonusValue(CR_DODGE);
value = value < 0.0f ? 0.0f : value;
+ if(sConfig.GetIntDefault("Maxofvalue.On.Off", 0)==1)
+ {
+ SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, sConfig.GetFloatDefault("Maxof.Dodge", 100.0f));
+ }
+ else
+ {
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
+ }
}
void Player::UpdateSpellCritChance(uint32 school)
|