fix(core): DK ToT off-hand strikes and Titan Grip for classless

- Item: 2H weapon subclass/inventory masks for strike spells (ToT / dual 2H).
- Player: allow SPELL_EFFECT_TITAN_GRIP through skill validation; clear TG on
  talent/spec reset only for warriors.
- PlayerStorage: sync m_canTitanGrip from spellbook before inventory load.
- Spell: treat Thassarian off-hand strike spells as OFF_ATTACK when DBC omits
  SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON.
This commit is contained in:
Dawnforger
2026-05-07 23:40:40 -05:00
parent c09646fdf0
commit 22e79a4f32
4 changed files with 98 additions and 6 deletions
+29 -1
View File
@@ -61,6 +61,34 @@
#include "IVMapMgr.h"
#include "VMapMgr2.h"
namespace
{
// Threat of Thassarian off-hand strikes (all ranks). DBC often omits SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON,
// so m_attackType would stay BASE_ATTACK and item/damage use the wrong hand (breaks dual 2H / Titan Grip).
bool IsDKThassarianOffHandStrikeSpell(SpellInfo const* spellInfo)
{
if (!spellInfo || spellInfo->SpellFamilyName != SPELLFAMILY_DEATHKNIGHT || spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE)
return false;
SpellInfo const* first = spellInfo->GetFirstRankSpell();
if (!first)
return false;
switch (first->Id)
{
case 66198: // Obliterate
case 66196: // Frost Strike
case 66216: // Plague Strike
case 66188: // Death Strike
case 66217: // Rune Strike
case 66215: // Blood Strike
return true;
default:
return false;
}
}
} // namespace
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
SpellDestination::SpellDestination()
@@ -591,7 +619,7 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
switch (m_spellInfo->DmgClass)
{
case SPELL_DAMAGE_CLASS_MELEE:
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON))
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_OFF_HAND_WEAPON) || IsDKThassarianOffHandStrikeSpell(m_spellInfo))
m_attackType = OFF_ATTACK;
else
m_attackType = BASE_ATTACK;