Spells: Feral Charge turns into Feral Charge (Cat) in Cat Form

Feral Charge 1238122 swaps on the action bar through two hidden form spells, 414925 (Cat Form: override to Feral
Charge (Cat) 414924) and 1238124 (Bear, Dire Bear Form: override to Feral Charge (Bear) 16979). Nothing in the client
data teaches them, so no druid had them: in Cat Form the button stayed on the bear version and could not be used.

- World SQL: learning Feral Charge teaches both (spell_learn_spell, not shown in the spellbook). Existing druids get
  them at their next login; the shapeshift casts the one that fits the form (HandleShapeshiftBoosts).
- Player::AddSpell: such a hidden form spell learned while already in one of its forms goes on at once instead of
  waiting for the next shapeshift.
This commit is contained in:
Karrz1
2026-11-16 16:41:32 +00:00
parent 6bc651e5b5
commit 90413ecffb
2 changed files with 13 additions and 0 deletions
@@ -0,0 +1,8 @@
-- Druid: Feral Charge 1238122 (talent) turns into Feral Charge (Cat) 414924 in Cat Form and Feral Charge (Bear) 16979 in Bear and
-- Dire Bear Form through two hidden form spells: 414925 (Cat Form only) and 1238124 (Bear, Dire Bear Form), both "override action bar
-- spell 1238122". The client data (SpellLearnSpell, SkillLineAbility) teaches neither, so nobody had them and the button stayed on the
-- bear version in Cat Form ("Requires Bear Form"). Learning Feral Charge now teaches both; the shapeshift puts the one for the form on.
DELETE FROM `spell_learn_spell` WHERE `entry` = 1238122 AND `SpellID` IN (414925, 1238124);
INSERT INTO `spell_learn_spell` (`entry`, `SpellID`, `Active`) VALUES
(1238122, 414925, 0),
(1238122, 1238124, 0);
@@ -3234,6 +3234,11 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent
castSpell = true;
else if (spellInfo->HasAttribute(SPELL_ATTR1_CAST_WHEN_LEARNED))
castSpell = true;
// A hidden form spell (AuraEffect::HandleShapeshiftBoosts casts it at every shapeshift into one of its forms) learned while already
// in such a form goes on now, as it would at the next shapeshift (Feral Charge 1238122 teaches the Cat Form override 414925)
else if (!loading && IsInWorld() && spellInfo->Stances && spellInfo->HasAttribute(SPELL_ATTR0_DO_NOT_DISPLAY_SPELLBOOK_AURA_ICON_COMBAT_LOG))
if (ShapeshiftForm const form = GetShapeshiftForm(); form != FORM_NONE)
castSpell = (spellInfo->Stances & (UI64LIT(1) << (form - 1))) != 0;
if (castSpell)
{