Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2020, 02:42 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default Getting a pet to cast a heal spell

I wanted to implement a cleric class temporary pet, so for testing purposes, I have changed the class on the mage air pet to a cleric and set the spell set to 1 (default cleric). As such, the pet will attack, cast yaulp, dds, and other buffs, but will never cast a heal (on itself, its owner, etc).

I tried disabling melee via 39^1 attribute and even made a new spell list of just the heal spells and set the list to use to it, but still no dice. I've even tried to make the pet a self only beneficial spell with the restricted spell list but all it does is target its owner - no spells.

Any thoughts?
Reply With Quote
  #2  
Old 09-22-2020, 07:49 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

hmm I also wanted to make heal pet way back.
Do your regular NPC cast heals?
Reply With Quote
  #3  
Old 09-23-2020, 12:39 AM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
hmm I also wanted to make heal pet way back.
Do your regular NPC cast heals?
Good call - turns out, none of my NPCs that are clerics (at least) are healing. For ex. I pulled the 3 mobs in Maiden's Eye near Umbral zone line (all clerics) and took all of them to 8% health - no heals spells casts. They will buff when unaggro'd and cast yaulp or DDs while aggro'd but no heals.

Any clues?
Reply With Quote
  #4  
Old 09-23-2020, 06:01 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Quote:
Originally Posted by Xanathol View Post
Good call - turns out, none of my NPCs that are clerics (at least) are healing. For ex. I pulled the 3 mobs in Maiden's Eye near Umbral zone line (all clerics) and took all of them to 8% health - no heals spells casts. They will buff when unaggro'd and cast yaulp or DDs while aggro'd but no heals.

Any clues?
there use to be a rule in DB that was called - "npc buff/heal friends" - check if that one is on. On other hand they should always at least heal themselves.
I may need to check my own npcs
Reply With Quote
  #5  
Old 09-23-2020, 10:23 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
there use to be a rule in DB that was called - "npc buff/heal friends" - check if that one is on. On other hand they should always at least heal themselves.
I may need to check my own npcs
Thanks but already checked that.

After a lot of debugging, I was able to get heals to work but no telling what all I broke in the process. Here's the changes I made.

In AICastSpell, under the switch for the AISpells[i].type, I commented out the line that prevents buffing PC pets:

Code:
				switch (AIspells[i].type) {
					case SpellType_Heal: {
						LogAI( "AI NPC [{}]: Tar [{}] DontHealMeBefore [{}] [{}]", this->GetName( ), tar->GetName( ), tar->DontHealMeBefore(), Timer::GetCurrentTime() );
						if (
							(spells[AIspells[i].spellid].targettype == ST_Target || tar == this)
							&& tar->DontHealMeBefore() < Timer::GetCurrentTime()
							// && !(tar->IsPet() && tar->GetOwner()->IsClient())	//no buffing PC's pets
							) {
In npc.cpp, under AICheckCloseBeneficialSpells, there is a check for indifferent faction which stops healing.

Code:
	/**
	 * Indifferent
	 */
	//	if (caster->GetPrimaryFaction() == 0) {
	//		return false;
	//	}
In the same function, there is a check to prevent you being healed, which seems unneccessary:

Code:
		if (mob->IsClient()) {
			// continue;
		}
And then there is a faction check which makes no sense to me - never heal an NPC that has faction with you?!

Code:
		if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {
			// continue;
		}

After all those changes, I can now summon my cleric pet and it will heal me or even another pet, which is what I was after.

Hopefully that helps you or any others out as well.
Reply With Quote
  #6  
Old 09-24-2020, 07:42 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Very interesting, I am curious what devs think on this, why healing is disabled.
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 12:58 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