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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 09:10 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