All pastes #969589 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-04-03 17:29 UTC
rendered paste body
Index: BaseClass.cs
===================================================================
--- BaseClass.cs	(revision 222)
+++ BaseClass.cs	(working copy)
@@ -275,52 +275,9 @@
         /// <param name="baseInt">the player's base Intellect</param>
         /// <param name="addInt">the player's added Intellect</param>
         /// <returns>the total magic critical chance</returns>
-        public float CalculateMagicCritChance(uint level, uint intellect)
+        public virtual float CalculateMagicCritChance(uint level, uint intellect)
 		{
-			float classconstant;
-
-#warning Move class-specific values into their corresponding class.
-			switch (ClassID) {
-				case ClassType.Hunter:
-					classconstant = 3.6f;
-					break;
-
-				case ClassType.Druid:
-					classconstant = 1.85f;
-					break;
-
-				case ClassType.Paladin:
-					classconstant = 3.336f;
-					break;
-
-				case ClassType.Mage:
-					classconstant = 0.91f;
-					break;
-
-				case ClassType.Priest:
-					classconstant = 1.24f;
-					break;
-
-				case ClassType.Shaman:
-					classconstant = 2.2f;
-					break;
-
-				case ClassType.Warlock:
-					classconstant = 1.701f;
-					break;
-
-				default:
-					classconstant = 0f;
-					break;
-			}
-
-			float critchance;
-			if (ClassID != ClassType.Warlock)
-				critchance = (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +classconstant;
-			else
-				critchance = (intellect / 82f) + /*(Spell Critical Strike Rating/22.08)*/ +classconstant;
-
-			return critchance;
+            return (intellect / 80f); /*+ (Spell Critical Strike Rating/22.08)*/
 		}
 
 		/// <summary>
Index: Druid.cs
===================================================================
--- Druid.cs	(revision 222)
+++ Druid.cs	(working copy)
@@ -45,6 +45,11 @@
             return ((strength * 2) - 20);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +1.85f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
Index: Hunter.cs
===================================================================
--- Hunter.cs	(revision 222)
+++ Hunter.cs	(working copy)
@@ -56,6 +56,11 @@
             return (agility / ((level * 0.41f) + 1.476f));
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +3.6f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -67,6 +72,11 @@
             return (15f + (spirit / 5f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.25f) + 6f;
+        }
+
         /// <summary>
         /// Calculates ranged attack power for the class at a specific level, Strength and Agility.
         /// </summary>
Index: Mage.cs
===================================================================
--- Mage.cs	(revision 222)
+++ Mage.cs	(working copy)
@@ -45,6 +45,11 @@
             return (strength - 10);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +0.91f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -56,6 +61,11 @@
             return (12.5f + (spirit / 4f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.10f);
+        }
+
         /// <summary>
         /// Gets the amount of health gained at a specific level.
         /// </summary>
Index: Paladin.cs
===================================================================
--- Paladin.cs	(revision 222)
+++ Paladin.cs	(working copy)
@@ -45,6 +45,11 @@
             return (((level * 3) + (strength * 2)) - 20);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +3.336f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -56,6 +61,11 @@
             return (15f + (spirit / 5f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.25f);
+        }
+
         /// <summary>
         /// Gets the amount of health gained at a specific level.
         /// </summary>
Index: Priest.cs
===================================================================
--- Priest.cs	(revision 222)
+++ Priest.cs	(working copy)
@@ -45,6 +45,11 @@
             return (strength - 10);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +1.24f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -56,6 +61,11 @@
             return (12.5f + (spirit / 4f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.10f);
+        }
+
         /// <summary>
         /// Gets the amount of health gained at a specific level.
         /// </summary>
Index: Rogue.cs
===================================================================
--- Rogue.cs	(revision 222)
+++ Rogue.cs	(working copy)
@@ -55,6 +55,11 @@
             return (agility / ((level * 0.226f) + 0.838f));
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return 0;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -66,6 +71,11 @@
             return 20f;
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.50f) + 2f;
+        }
+
         /// <summary>
         /// Calculates ranged attack power for the class at a specific level, Strength and Agility.
         /// </summary>
@@ -128,4 +138,4 @@
             get { return ClassType.Rogue; }
         }
     }
-}
\ No newline at end of file
+}
Index: Shaman.cs
===================================================================
--- Shaman.cs	(revision 222)
+++ Shaman.cs	(working copy)
@@ -45,6 +45,11 @@
             return (((level * 2) + (strength * 2)) - 20);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +2.2f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -56,6 +61,11 @@
             return (17f + (spirit / 5f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.11f) + 7f;
+        }
+
         /// <summary>
         /// Gets the amount of health gained at a specific level.
         /// </summary>
Index: Warlock.cs
===================================================================
--- Warlock.cs	(revision 222)
+++ Warlock.cs	(working copy)
@@ -45,6 +45,11 @@
             return (strength - 10);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 82f) + /*(Spell Critical Strike Rating/22.08)*/ +1.701f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -56,6 +61,11 @@
             return (15f + (spirit / 5f));
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.07f) + 6f;
+        }
+
         /// <summary>
         /// Gets the amount of health gained at a specific level.
         /// </summary>
Index: Warrior.cs
===================================================================
--- Warrior.cs	(revision 222)
+++ Warrior.cs	(working copy)
@@ -44,6 +44,11 @@
             return (((level * 3) + (strength * 2)) - 20);
         }
 
+        public override float CalculateMagicCritChance(uint level, uint intellect)
+        {
+            return (intellect / 80f) + /*(Spell Critical Strike Rating/22.08)*/ +2.2f;
+        }
+
         /// <summary>
         /// Calculates the amount of power regeneration for the class at a specific level and Spirit.
         /// </summary>
@@ -55,6 +60,11 @@
             return -20f;
         }
 
+        public override float CalculateHealthRegen(uint level, uint spirit)
+        {
+            return (spirit * 0.50f) + 6f;
+        }
+
         /// <summary>
         /// Calculates ranged attack power for the class at a specific level, Strength and Agility.
         /// </summary>
@@ -126,4 +136,4 @@
             get { return ClassType.Warrior; }
         }
     }
-}
\ No newline at end of file
+}