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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2009, 05:22 PM
Skomag
Fire Beetle
 
Join Date: Jul 2009
Location: no where
Posts: 5
Default Double Attack for bards and beastlords

Bards and Beastlords don't normally have the double attack skill until they put points in an AA. From a post I found, for beastlords at least, each point should be 3% for 15% max chance to double attack.

Looking at attack.cpp's Client::CheckDoubleAttack(), it will immediately return false for beastlords and bards, even with the aa trained, because HasSkill() returns false since there's no skill_cap entry for them. Initially I thought that HasSkill() could be changed to CanThisClassDoubleAttack(), but in looking at the rest of the function, since there's 0 skill and 0 max skill, bard/bst would be double attacking a lot. Instead I've come up with this patch:

Code:
  bool Client::CheckDoubleAttack(bool tripleAttack) {
-
-       // If you don't have the double attack skill, return
-       if(!HasSkill(DOUBLE_ATTACK))
-               return false;

        // You start with no chance of double attacking
        int chance = 0;

        // Used for maxSkill and triple attack calcs
        int8 classtype = GetClass();

+       // If you don't have the double attack skill, return
+       if(!HasSkill(DOUBLE_ATTACK)) {
+               // Bard and Beastlord can only double attack with AA - 3% per rank, 15% max
+               if((classtype == BEASTLORD) || (classtype == BARD)) {
+                       if(classtype == BEASTLORD) chance = 3 * GetAA(aaBestialFrenzy);
+                       if(classtype == BARD) chance = 3 * GetAA(aaHarmoniousAttack);
+                       if(chance > 0 && chance > MakeRandomInt(0, 99)) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
        // The current skill level
        uint16 skill = GetSkill(DOUBLE_ATTACK);
With the rest left as is, including the check again for the harmonious/frenzy aas. This way, a server could decide to give bard/bst double attack skill by default and let the AA increase their chances.

I just tested this fix on latest build and after 500 rounds of combat, beastlord with 5 points in AA double attacked 62 times (15.5%). Also checked a bard for a few and looked good.
Reply With Quote
  #2  
Old 10-14-2009, 10:22 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I'll look at this more in depth when I finish my qglobal stuff hopefully tonight, it might be inconsistent with how we do other things of a similar nature but I don't know off hand, either way we'll get something in and get it fixed.
Reply With Quote
  #3  
Old 10-14-2009, 10:50 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Odd, I thought bard and beastlord double attack AAs already worked.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 10-15-2009, 12:40 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

My recommendation would be to ignore the class check completely & just check if they have an AA/spell/etc (preferably via bonuses instead of a check to GetAA()). That way, if someone wants to give the AA to other classes who may not get the skill otherwise (maybe for Necros or something), it's just a database change rather than a source change.
__________________
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
Reply


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 12:02 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3