Browse Source

Added rule R_Spells,NoInterruptBaseChance set to 50

Base chance to resist interrupt was 30%, increased to 50%.  Maybe later on a level restriction to reduce when you are much higher level than your target.

Fixes #34
Image 4 years ago
parent
commit
e86c4bb4aa

+ 3 - 2
EQ2/source/WorldServer/Combat.cpp

@@ -1029,8 +1029,9 @@ bool Entity::CheckInterruptSpell(Entity* attacker) {
 	if(!spell || spell->GetSpellData()->interruptable == 0)
 		return false;
 
-	//base of 30 percent chance to continue casting if attacked (RULE)
-	int8 percent = 30;
+	//originally base of 30 percent chance to continue casting if attacked
+	//modified to 50% and added global rule, 30% was too small at starting levels
+	int8 percent = rule_manager.GetGlobalRule(R_Spells, NoInterruptBaseChance)->GetInt32();
 	Skill* skill = GetSkillByName("Focus", true);
 	if(skill)
 		percent += ((skill->current_val + 1)/6);

+ 3 - 1
EQ2/source/WorldServer/Rules/Rules.cpp

@@ -283,9 +283,11 @@ RuleManager::RuleManager() {
 	RULE_INIT(R_Zone, DefaultZoneShutdownTimer, "300000");
 	RULE_INIT(R_Zone, WeatherTimer, "60000");						// default: 1 minute
 	RULE_INIT(R_Zone, SpawnDeleteTimer, "30000");					// default: 30 seconds, how long a spawn pointer is held onto after being removed from the world before deleting it
-	
+
 	RULE_INIT(R_Loot, LootRadius, "5.0");
 
+	RULE_INIT(R_Spells, NoInterruptBaseChance, "50");
+
 	#undef RULE_INIT
 }
 

+ 6 - 1
EQ2/source/WorldServer/Rules/Rules.h

@@ -37,7 +37,8 @@ enum RuleCategory {
 	R_UI,
 	R_World,
 	R_Zone,
-	R_Loot
+	R_Loot,
+	R_Spells
 };
 
 enum RuleType {
@@ -142,6 +143,10 @@ enum RuleType {
 
 	/* LOOT */
 	LootRadius,
+
+	/* SPELLS */
+	NoInterruptBaseChance,
+
 	/* ZONE TIMERS */
 	RegenTimer,
 	ClientSaveTimer,