EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development: Custom Code (https://www.eqemulator.org/forums/forumdisplay.php?f=665)
-   -   Rune that converts to heal at the end of the duration (https://www.eqemulator.org/forums/showthread.php?t=35444)

squevis667 06-21-2012 08:18 AM

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.

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...


All times are GMT -4. The time now is 04:52 AM.

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