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