EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   COMMITTED: Haste over value 127 fix (https://www.eqemulator.org/forums/showthread.php?t=32529)

Secrets 11-24-2010 06:59 AM

COMMITTED: Haste over value 127 fix
 
This will allow added bonuses of 128% haste or higher to be applied properly. Currently if you have a haste bonus of 128% on a single item or spell, it goes into the negatives and doesn't apply it period. However, if you allow the value and cap it, this works more intentionally. Mainly a custom server fix but i'm sure live did it somewhere.

Code:

Index: zone/bonuses.cpp
===================================================================
--- zone/bonuses.cpp        (revision 1744)
+++ zone/bonuses.cpp        (working copy)
@@ -294,7 +294,7 @@
        }
       
        //FatherNitwit: New style haste, shields, and regens
-        if(newbon->haste < (sint8)item->Haste) {
+        if(newbon->haste < (sint16)item->Haste) {
                newbon->haste = item->Haste;
        }
        if(item->Regen > 0)
Index: zone/mob.h
===================================================================
--- zone/mob.h        (revision 1744)
+++ zone/mob.h        (working copy)
@@ -224,9 +224,9 @@
        uint16        ReverseDamageShieldSpellID;
        DmgShieldType        ReverseDamageShieldType;
        int                movementspeed;
-        sint8        haste;
-        sint8        hastetype2;
-        sint8        hastetype3;
+        sint16        haste;
+        sint16        hastetype2;
+        sint16        hastetype3;
        float        AggroRange;                                                        // when calculate just replace original value with this
        float        AssistRange;
        sint16        skillmod[HIGHEST_SKILL+1];


Caryatis 11-25-2010 02:02 AM

I did some querying and found some spells that exceed 127 in base spell file so I committed this. One of the spells was Can o' Whoop Ass so seemed kind of important.


All times are GMT -4. The time now is 06:56 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.