View Single Post
  #1  
Old 06-21-2012, 08:18 AM
squevis667
Fire Beetle
 
Join Date: Dec 2010
Posts: 18
Default Rune that converts to heal at the end of the duration

I wanted to make a rune that would convert the unused portion of the rune to a heal when the duration was up (I have several 30 sec runes). This is how I did it.
Added a boolean to tell me if it is a healing ward in spdat.cpp:
Code:
bool IsHealingWard(int16 spell_id)
{
	switch(spell_id)
	{
		case 9810:
		case 9812:
		case 9813:
		case 9815:
		case 9816:
		case 9818:
			return true;
	}
	return false;
}
In Mob:BuffFadeBySlot in spell_effects.cpp, I added the following to the section that handles type SE_Rune
Code:
if(IsHealingWard(buffs[slot].spellid) && buffs[slot].melee_rune > 0)
				{
					this->HealDamage(buffs[slot].melee_rune, entity_list.GetMob(buffs[slot].casterid));
				}
				buffs[slot].melee_rune = 0;
				break;
I am looking for feedback, as I am still not well versed in c++ and not as familiar with the guts of the emu as I would like. Thank you.
Reply With Quote