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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools
Display Modes

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 09:41 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3