[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 <akkadius1@gmail.com>
This commit is contained in:
regneq 2024-06-01 14:08:14 -07:00 committed by GitHub
parent 8b166bf5b9
commit 217a80ee76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);