Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 07-25-2009, 10:17 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just finished testing this out. Here's a diff of the changes:

Code:
Index: Y:/svn/trunk/EQEmuServer/zone/client_mods.cpp
===================================================================
--- Y:/svn/trunk/EQEmuServer/zone/client_mods.cpp	(revision 780)
+++ Y:/svn/trunk/EQEmuServer/zone/client_mods.cpp	(working copy)
@@ -979,19 +979,22 @@
 
 sint16 Client::CalcAGI() {
 	sint16 val = m_pp.AGI + itembonuses.AGI + spellbonuses.AGI;
-	
 	sint16 mod = aabonuses.AGI;
-	
-	sint16 str = GetSTR()*10;
-	if(weight > str) {
-		//ratio is wrong (close), but better than nothing
-		val -= (weight-str) * 100 / 1500;	//WR said /1875
-	}
-	
+
 	if(val>255 && GetLevel() <= 60)
 		val = 255;
-	AGI = val + mod;
+
+	sint16 str = GetSTR();
 	
+	//Encumbered penalty
+	if(weight > (str * 10)) {
+		//AGI is halved when we double our weight, zeroed (defaults to 1) when we triple it. this includes AGI from AAs
+		float total_agi = float(val + mod);
+		float str_float = float(str);
+		AGI = (sint16)(((-total_agi) / (str_float * 2)) * (((float)weight / 10) - str_float) + total_agi);	//casting to an int assumes this will be floor'd. without using floats & casting to sint16, the calculation doesn't work right
+	} else
+		AGI = val + mod;
+
 	if(AGI < 1)
 		AGI = 1;
I'm real out of date to SVN, so it may be a little while before I can get this committed, but if someone else wants to update it for me, feel free.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3