Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2014, 11:36 AM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default 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?
Reply With Quote
  #2  
Old 10-13-2014, 12:36 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

I would check to see if that is handled client side in the spells file.
Reply With Quote
  #3  
Old 10-13-2014, 12:51 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

There is also the fact that some of the clients use AAs for LOH/HT and their reuse is set elsewhere.
Reply With Quote
  #4  
Old 10-13-2014, 02:25 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

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. :(
Reply With Quote
  #5  
Old 10-13-2014, 06:14 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

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.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #6  
Old 10-14-2014, 12:48 AM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

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!
Reply With Quote
  #7  
Old 10-14-2014, 02:30 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

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)
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 02:33 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