mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 00:48:39 +01:00
Core/Entities: Fix null-dereference crash
Closes #19191
(cherry picked from commit d61e0f79c4)
This commit is contained in:
@@ -8053,7 +8053,7 @@ void Player::CastItemCombatSpell(DamageInfo const& damageInfo, Item* item, ItemT
|
||||
|
||||
// reduce effect values if enchant is limited
|
||||
CastSpellExtraArgs args(item);
|
||||
if ((entry->AttributesMask & ENCHANT_PROC_ATTR_LIMIT_60) && target->getLevel() > 60)
|
||||
if (entry && (entry->AttributesMask & ENCHANT_PROC_ATTR_LIMIT_60) && target->getLevel() > 60)
|
||||
{
|
||||
int32 const lvlDifference = target->getLevel() - 60;
|
||||
int32 const lvlPenaltyFactor = 4; // 4% lost effectiveness per level
|
||||
|
||||
Reference in New Issue
Block a user