Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #19  
Old 03-01-2008, 09:12 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default Hook 5 : Tweak AC calculation

Index: client_mods.cpp
================================================== =================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/client_mods.cpp,v
retrieving revision 1.6.4.19
diff -u -b -B -r1.6.4.19 client_mods.cpp
--- client_mods.cpp 21 Feb 2007 16:04:20 -0000 1.6.4.19
+++ client_mods.cpp 2 Mar 2008 09:11:32 -0000
@@ -28,6 +28,7 @@
#include "../common/moremath.h"
#include "../common/guilds.h"
#include "../common/logsys.h"
+#include "../common/rulesys.h"
#include "StringIDs.h"
#include "NpcAI.h"

@@ -714,7 +715,10 @@
// AC from spells are not included (cant even cast spells yet..)
sint16 Client::CalcAC() {

- // new formula
+if(RuleH(Character, CalcAC) != NULL)
+ AC = ((Hook_Character_CalcAC) RuleH(Character, CalcAC))(GetLevel(), GetSkill(DEFENSE), itembonuses.AC, spellbonuses.AC);
+else
+{ // new formula
int avoidance = 0;
avoidance = (acmod() + ((GetSkill(DEFENSE)*16)/9));
if (avoidance < 0)
@@ -749,8 +753,8 @@

//spell AC bonuses are added directly to natural total
displayed += spellbonuses.AC;
-
AC = displayed;
+}
return(AC);
}
Reply With Quote
 


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 04:51 AM.


 

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