EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development: Custom Code (https://www.eqemulator.org/forums/forumdisplay.php?f=665)
-   -   changing the recast on Harm Touch / Lay on Hands (https://www.eqemulator.org/forums/showthread.php?t=38881)

Xanathol 10-13-2014 11:36 AM

changing the recast on Harm Touch / Lay on Hands
 
Hi Everyone,

I am attempting to change the recast time on both Harm Touch and Lay on Hands, but thus far, so no avail. Here is what I have done so far (starting with HT):

1. In spells_new, changed the recast_time on IDs 88, 929, 2821, and 12622.
2. In altadv_vars, changed the spell_refresh on IDs 207 and 7800.
3. Changed HarmTouchReuseTime in features.h
4. In spells.cpp in SpellFinished, I changed the following code:

Code:

        //set our reuse timer on long ass reuse_time spells...
        if(IsClient())
        {
                if(spell_id == casting_spell_id && casting_spell_timer != 0xFFFFFFFF)
                {
                        CastToClient()->GetPTimers().Start(casting_spell_timer, casting_spell_timer_duration);
                        mlog(SPELLS__CASTING, "Spell %d: Setting custom reuse timer %d to %d", spell_id, casting_spell_timer, casting_spell_timer_duration);
                }
                else if(spells[spell_id].recast_time > 1000) {
                        int recast = spells[spell_id].recast_time/1000;
                        if (spell_id == SPELL_LAY_ON_HANDS)        //lay on hands
                        {
                                // Xanathol
                                // {        changing to 12 minute base, -1 from AA
                                        // new
                                        recast        = 720;
                                        recast -= GetAA(aaFervrentBlessing) * 60;
                                        // old
                                        // recast -= GetAA(aaFervrentBlessing) * 420;
                                // }
                        }
                        else if (spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2)        //harm touch
                        {
                                // Xanathol
                                // {        changing to 12 minute base, -1 from AA
                                        // new
                                        recast        = 720;
                                        recast -= GetAA(aaTouchoftheWicked) * 60;
                                        // old
                                        // recast -= GetAA(aaTouchoftheWicked) * 420;
                                // }
                        }
                        int reduction = CastToClient()->GetFocusEffect(focusReduceRecastTime, spell_id);
                        if(reduction)
                                recast -= reduction;

                        mlog(SPELLS__CASTING, "Spell %d: Setting long reuse timer to %d s (orig %d)", spell_id, recast, spells[spell_id].recast_time);
                        CastToClient()->GetPTimers().Start(pTimerSpellStart + spell_id, recast);
                }
        }

So far, nothing has effected it - a character I created still gets the 1 hour 12 minute reuse timer.

Any ideas what I am missing / how to change the reuse timer on these abilities?

jdoran 10-13-2014 12:36 PM

I would check to see if that is handled client side in the spells file.

demonstar55 10-13-2014 12:51 PM

There is also the fact that some of the clients use AAs for LOH/HT and their reuse is set elsewhere.

Xanathol 10-13-2014 02:25 PM

Thank you for the replies!

Quote:

I would check to see if that is handled client side in the spells file.
I did indeed export the spells from the DB and updated the spells_us.txt in the client.

Quote:

There is also the fact that some of the clients use AAs for LOH/HT and their reuse is set elsewhere.
Any idea where that I haven't listed above? Or do you mean the client is hardcoded in some way? I noticed that the apparent spells that are tied to the new AA implementations of HT don't appear to have a recast time ( set to 0 ), so I am fearful this may be client side now. :(

Drajor 10-13-2014 06:14 PM

This is a real long shot! I recently noticed that sending OP_IncreaseStats to an Underfoot client triggers the client message "Ability change operation successful. Target's ability score has been adjusted.".

I have not had time to investigate further :/ If you search for 'ability' in eqstr_us.txt you will notice we are missing much of the functionality available.

Xanathol 10-14-2014 12:48 AM

Found it!

In aa_actions, there are a number of skill_id = 7800 ( or 7850 for Lay On Hands ) that I had missed. Setting the reuse_time value here finally changed it, as well as adjusting the reduction AA value ( redux_aa & redux_rate ).

The only problems now are:

(1) the AA window shows the non-reduced reuse timer, despite the ability working again when it should (note - the timer here was showing 'correctly' before I made the latest changes, so that is tied to one of the previous things I did, but who knows which? )

(2) the button doesn't pop back up when it is ready.


Oh well - tackle those another day!

demonstar55 10-14-2014 02:30 AM

We don't do redux AAs correctly (we do a hack, we tell the client the timer reduced, live the client calculates it itself, this hack doesn't work with HT)


All times are GMT -4. The time now is 05:49 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.