Core/Spells: defined and implemented SPELL_ATTR7_CANT_DODGE, SPELL_ATTR7_CANT_PARRY and SPELL_ATTR7_CANT_MISS (#26742)

This commit is contained in:
Gildor
2021-07-24 14:48:57 +02:00
committed by GitHub
parent ba4f2e5a83
commit bd6de8eb61
4 changed files with 21 additions and 14 deletions

View File

@@ -2447,6 +2447,9 @@ SpellMissInfo WorldObject::MagicSpellHitResult(Unit* victim, SpellInfo const* sp
if (!victim->IsAlive() && victim->GetTypeId() != TYPEID_PLAYER)
return SPELL_MISS_NONE;
if (spellInfo->HasAttribute(SPELL_ATTR7_CANT_MISS))
return SPELL_MISS_NONE;
SpellSchoolMask schoolMask = spellInfo->GetSchoolMask();
// PvP - PvE spell misschances per leveldif > 2
int32 lchance = victim->GetTypeId() == TYPEID_PLAYER ? 7 : 11;