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
  #2  
Old 04-20-2015, 05:06 PM
noudess
Discordant
 
Join Date: Sep 2012
Location: Upstate NY
Posts: 274
Default

AGAIN - This only happens when a focus item like Bear-hide boots are in effect and we use SendBuffDuration() to update the duration...

I decided to test effect as if it were a bitfield and drop a bit, test, drop a bit test..

What I found was that for the shielding line of spells, the effect field's bottom 6 bits contained an addition to max HP. So 32, 16, 8, 4, 2 and 1 changed max HP by those amounts (above and beyond the original spell). That's obviously not what we want to do when we update Buff Duration.

Setting effect to 0 cancelled the effect entirely. Setting any bits higher than 32 seemed to work (meaning, did not alter the spell effect). Maybe because the GUI rejects values that high or one of those bits being set means not to mess with the effect. So 64, 65, 128, 129, things like that had no impact on the max HP (left the value correct, while still fixing the Duration) which is what we want. Its hard to say if those upper 2 bits are a flag or simply make the value too large and the GUI rejects it.



The fix (for the shielding line) would be to set effect to 128 or 64. Trying to set it to the value of HP gained just ADDS that on top of the existing buff.

Now, for the Allure of Death, which converts HP to mana...

Setting effect to 128 resulted in the loss of 68hp per tick, 64 resulted in 30hp per tick, 32 resulted in 10 per tick, 16 resulted in 1 per tick, values 8, 4 and 2 actually resulted in POSITIVE HP per tick (from the GUI) and a value of 1 cancelled the effect as did 0.

I can't see a logical pattern to this. However, by setting the effect to 16 we only see a -1 HP per tick and the server side will do the right thing and push the correct HP updates as always.

Results of both shielding spell like and allure of death using various values for effect in the BuffFade_Struct:



At first glance setting effect to 0 in both cases seems nice, as the server will update HP regardless, but 0 makes the GUI drop max HP in the case of the shielding line and change color of max hp in the allure of death spell.

I'm planning a patch that will have a switch statement based on spellid, with a default value for effect of caster_level (which was what was there before my 1st patch). For spells we know that this breaks, I will use values that I found above. If you guys see a better solution, I'm all ears.
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 02:19 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