From c21293e5080dd2bfa10b88b7b6cba0c5ba04c654 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Feb 2018 18:55:16 -0500 Subject: [PATCH] Fix issue with spells that didn't make sense to be innate --- common/spdat.h | 2 ++ zone/mob_ai.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/common/spdat.h b/common/spdat.h index 0f9e7a47a..51ec8327b 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -73,6 +73,8 @@ enum SpellTypes : uint32 SpellTypes_Detrimental = (SpellType_Nuke | SpellType_Root | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Charm | SpellType_Debuff | SpellType_Slow), SpellTypes_Beneficial = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong), + SpellTypes_Innate = (SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root), + SpellType_Any = 0xFFFFFFFF }; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 33970640c..5ae4a7369 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2756,6 +2756,10 @@ DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) entry.min_hp = atoi(row[7]); entry.max_hp = atoi(row[8]); + // some spell types don't make much since to be priority 0, so fix that + if (!(entry.type & SpellTypes_Innate) && entry.priority == 0) + entry.priority = 1; + if (row[9]) entry.resist_adjust = atoi(row[9]); else if (IsValidSpell(spell_id))