Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2008, 11:01 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default Tunare's Renewal:

Couldn't find anything through search on this though I could swear I've posted this same problem before. Sorry if this is a repost.

I've spent the better part of the morning trying to find why this spell and the shaman equivalent both only heal a character to 75%. For those not familiar, here's a link and a quick explanation:

This spell heals for 2,925 HP, or 75% of the target's maximum health, whichever is less.

Examples:
  • If cast on a character with 5,000 maximum hitpoints, it heals for 2925.
  • If cast on a lowbie character with 200 maximum hitpoints, it heals for 150.
Currently, the spell is functioning in a way that makes it heal a person to 75% health and not past. A 5k warrior, no matter where their health is, gets healed to 3,750 hitpoints (75% of his total).

The spell was originally released on September 26th 2002, just before Planes of Power's release. The Titanium client is far past that, so I don't believe that it's an issue with the spell files. I believe there's actually a code problem at work here. Has someone already figured this out?

Thanks for any help.
Reply With Quote
  #2  
Old 09-23-2008, 11:22 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Wow, I must've misclicked the proper forum. Could a mod move this to Bug Reports, please? Appreciated.
Reply With Quote
  #3  
Old 09-23-2008, 12:35 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

In zone/spell_effects.cpp, around line 180:

Try changing:

Code:
                        case SE_PercentalHeal:
                        {
#ifdef SPELL_EFFECT_SPAM
                                snprintf(effect_desc, _EDLEN, "Percental Heal: %+i (%d%% max)", spell.max[i], effect_value);
#endif
                                //im not 100% sure about this implementation.
                                //the spell value forumula dosent work for these... at least spell 3232 anyways
                                sint32 val = spell.max[i];

                                if(caster)
                                        val = caster->GetActSpellHealing(spell_id, val);

                                sint32 mhp = GetMaxHP();
                                sint32 chp = GetHP();
                                sint32 cap = mhp * spell.base[i] / 100;
                                if((chp + val) > cap)
                                        val = cap - chp;
                                if(val > 0)
                                        HealDamage(val, caster);
                                break;
                        }
To:

Code:
                        case SE_PercentalHeal:
                        {
#ifdef SPELL_EFFECT_SPAM
                                snprintf(effect_desc, _EDLEN, "Percental Heal: %+i (%d%% max)", spell.max[i], effect_value);
#endif
                                //im not 100% sure about this implementation.
                                //the spell value forumula dosent work for these... at least spell 3232 anyways
                                sint32 val = spell.max[i];

                                if(caster)
                                        val = caster->GetActSpellHealing(spell_id, val);

                                sint32 mhp = GetMaxHP();
                                sint32 cap = mhp * spell.base[i] / 100;

                                if(cap < val)
                                        val = cap;

                                if(val > 0)
                                        HealDamage(val, caster);

                                break;
                        }
I did a quick test on it, but spell mechanics is not really my area, so you should run some tests on on various spells with % Heal effects to check if this doesn't have any unintended consequences
Reply With Quote
  #4  
Old 09-26-2008, 05:05 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Thank you very much for the code. However, I've no way to test this. Anyone else running a server with unhappy druids feel like giving this a compile and checking it out?
Reply With Quote
  #5  
Old 09-26-2008, 05:28 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I'll add it to my list to get into PEQ.
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 03:10 AM.


 

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