PDA

View Full Version : Rune that converts to heal at the end of the duration


squevis667
06-21-2012, 08:18 AM
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:
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
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.

rencro
02-09-2013, 12:39 PM
Works fine once declared in spdat.h, I used spell_id 27993 which was copied from Rune I as a test...