Core/Spells: Implemented SPELL_ATTR9_AUTOCAST_OFF_BY_DEFAULT

Port From (https://github.com/TrinityCore/TrinityCore/commit/24096f6b661161f296bfef4a3303789f245873c4)
This commit is contained in:
Hondacrx
2024-08-26 18:03:08 -04:00
parent ce08437402
commit 87a04a76e9
4 changed files with 23 additions and 6 deletions
+5 -3
View File
@@ -1046,10 +1046,12 @@ namespace Game.Entities
if (active == ActiveStates.Decide) // active was not used before, so we save it's autocast/passive state here
{
if (spellInfo.IsAutocastable())
newspell.active = ActiveStates.Disabled;
else
if (!spellInfo.IsAutocastable())
newspell.active = ActiveStates.Passive;
else if (spellInfo.IsAutocastEnabledByDefault())
newspell.active = ActiveStates.Enabled;
else
newspell.active = ActiveStates.Disabled;
}
else
newspell.active = active;