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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-28-2009, 01:12 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Here's the code:

zone/MobAI.cpp
Code:
                                //now off hand
                                if (attack_dw_timer.Check() && CanThisClassDualWield()) 
                                {
                                        int myclass = GetClass();
                                        //can only dual weild without a weapon if your a monk
                                        if((GetEquipment(MATERIAL_SECONDARY) != 0 && GetLevel() > 39) || myclass == MONK || myclass == MONKGM) {
                                                float DualWieldProbability = (GetSkill(DUAL_WIELD) + GetLevel()) / 400.0f;
                                                DualWieldProbability -= MakeRandomFloat(0, 1);
                                                if(DualWieldProbability < 0){
                                                        Attack(target, 14);
                                                        if (CanThisClassDoubleAttack()) 
                                                        {
                                                                sint32 RandRoll = rand()%100;
                                                                if (RandRoll < (GetLevel() + 20))  
                                                                {
                                                                        if (Attack(target, 14));
                                                                }
                                                        } // if (CanThisClassDoubleAttack())
                                                }
                                        }
                                }
First of all, it looks like it's hard coded to be at least level 40 before we can duel wield. I honestly can't remember how this is supposed to be setup on Live, but if this is correct, it can very easily be changed to a rule.

Secondly, I honestly am not understanding why we're subtracting a random float with a value between 0 & 1 from our probability and checking to see if it's less than 0. Using your examples, that would put the probability somewhere between -0.55 & 0.45 for level 30 and between -0.325 & 0.675, which actually has an inverse affect on our probability to duel wield. Effectively, at level 70, the probability would be between 0.05 & 1.05, which will never be < 0.

Unless I'm misreading something, we should just be able to flip the check to > 0.

On a side note, if this is effectively broken, this could have a potentially large impact on DPS NPCs are dealing out at higher levels.
__________________
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

Last edited by AndMetal; 06-28-2009 at 09:15 AM..
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 08:13 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