Jump to content

Rejuvenation broken


martixy

Recommended Posts

Edit: As it happens, I seem to have fixed my problem. There was an issue with one of my 2da files which was causing the problem.

And on a sidenote I discovered something cool - you can edit and recompile scripts and the game will respect the changes even without restarting or reloading.

I seem to have broken my Rejuvenation spell and I have no idea how.

Basically the spell has no effect(i.e. no regen is added).

Appreciate some help. Code below for your perusal:

case ABILITY_SPELL_CURE:
        {
            float fRegeneration = REJUVINATION_REGEN_BASE;// + REJUVINATION_REGEN_FACTOR * GetCreatureSpellPower(stEvent.oCaster);
            float fDuration = REJUVINATION_DURATION_BASE + REJUVINATION_DURATION_FACTOR * GetCreatureSpellPower(stEvent.oCaster);

            // remove stacking effects
            RemoveStackingEffects(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility);
            
            PrintToLog("***************STATS***************");   
            PrintToLog("Calculated regen:" + FloatToString(fRegeneration));
            PrintToLog("Current regen:" + FloatToString(GetCreatureProperty(stEvent.oTarget, PROPERTY_ATTRIBUTE_REGENERATION_STAMINA_COMBAT, PROPERTY_VALUE_TOTAL)));
            
            
            eEffect = EffectModifyProperty(PROPERTY_ATTRIBUTE_REGENERATION_STAMINA, fRegeneration,
                                           PROPERTY_ATTRIBUTE_REGENERATION_STAMINA_COMBAT, fRegeneration);
            eEffect = SetEffectEngineInteger(eEffect, EFFECT_INTEGER_VFX, Ability_GetImpactObjectVfxId(stEvent.nAbility));
            ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, stEvent.oTarget, fDuration, stEvent.oCaster, stEvent.nAbility);

            Ability_ApplyObjectImpactVFX(stEvent.nAbility, stEvent.oTarget);
            PrintToLog("Modified regen:" + FloatToString(GetCreatureProperty(stEvent.oTarget, PROPERTY_ATTRIBUTE_REGENERATION_STAMINA_COMBAT, PROPERTY_VALUE_TOTAL)));
            PrintToLog("***************STATS***************");

            break;
        }
Edited by martixy
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...