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 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
  #2  
Old 02-09-2013, 12:39 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Works fine once declared in spdat.h, I used spell_id 27993 which was copied from Rune I as a test...
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 05:59 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3