From 217a80ee7670cce7523b7ba3948ea75f30489464 Mon Sep 17 00:00:00 2001 From: regneq Date: Sat, 1 Jun 2024 14:08:14 -0700 Subject: [PATCH] [NPC Spells] Fixed an issue where the repository spell adj value was overriding the spell difficulty default value (#4370) * [NPC Spells} fixed an issue where the repository spell adj value was overriding the spell difficulty default value. [Command] Add resist adj to #show spells_list command to see the resist value. * True fix, do IsValidSpell on actual spell --------- Co-authored-by: Akkadius --- zone/mob_ai.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 083d2284d..486dbee95 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2787,10 +2787,11 @@ void NPC::AISpellsList(Client *c) c->Message( Chat::White, fmt::format( - "Spell {} | Priority: {} Recast Delay: {}", + "Spell {} | Priority: {} Recast Delay: {} Resist Difficulty: {}", spell_slot, ai_spell.priority, - ai_spell.recast_delay + ai_spell.recast_delay, + ai_spell.resist_adjust ).c_str() ); @@ -2915,8 +2916,8 @@ DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 npc_spells_id) if (e.resist_adjust) { se.resist_adjust = e.resist_adjust; } - else if (IsValidSpell(e.id)) { - se.resist_adjust = spells[e.id].resist_difficulty; + else if (IsValidSpell(e.spellid)) { + se.resist_adjust = spells[e.spellid].resist_difficulty; } ss.entries.push_back(se);