View Single Post
  #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