PDA

View Full Version : COMMITTED: Haste over value 127 fix


Secrets
11-24-2010, 06:59 AM
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.

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 (http://lucy.allakhazam.com/spell.html?id=911) so seemed kind of important.